; Started: June 10, 1998 ; Finished: June 13, 1998 ; ; ÉÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÍ» ; ³ Terminate 5.00 ùkEYGENù ³ ; ³ Crack By Q [PhRoZeN CReW '98] ³ ; ³ -1999 Strainer- ³ ; ÈÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄͼ Comment % Use Tasm 16 bit compiler (Ver 2.0+) , to compiler to a 16bit COM file. tasm keygen.asm tlink /t keygen.obj I use COM instead of EXE because i will use the HEAP. COM files are memory images,each COM file gets 1 segment (64kb) of memory when loaded (so CS=DS=ES=SS). The image is loaded to cs:100h , and the stack pointer points to the end of the segment (FFFFh) beacase SP is decreasing when values are PUSHed to the stack. Even if ur file is less than 64kb, u still have the whole segment allocated . The memory left from the END of the image to the start of the stack is called HEAP. So if u have small COMs (=small image) ,u have a rather large chank of memory to play with - the Heap. In exe , or the other hand , u need to ask DOS to allocate memroy as buffer. (Int 21h/Ah=48h). This keygen is a small program, so we'll use COM. last notes: the code here is NOT optimized due to the simple reason - to be readable. Many CODE and Data buffers are not nessercery , but I used it anyway,to make the source more readable. *(Much) More info in the essay.. That's it .. Enjoy .. :) % Code Segment Byte Public Assume Ds:Code,Cs:Code Org 100h Start: JMP Main ;/--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---\ ; Program Data ;\--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---/ Logo DB 9,9," ÉÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÍ»",10,13 DB 9,9," ³ Terminate 5.00 ùkEYGENù ³",10,13 DB 9,9," ³ Crack By Q [PhRoZeN CReW '98] ³",10,13 DB 9,9," ³ -1999 Strainer- ³",10,13 DB 9,9," ÈÍÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄͼ",10,13,10,13 DB "þ 50 chars top for each of the following fields.",10,13,10,13 DB " Name : ",50 dup('_'), 10,13 DB " Address : ",50 dup('_'), 10,13 DB " Country : ",50 dup('_'), 10,13 DB " Phone : ",50 dup('_'), '$' LineNumber DB 0 File_Name DB "terminat.key",0 Fill_String DB "cRACK bY Q - 1999 +HCU Strainer -",10,13 FString_tag DB 0 End_message DB 10,13,10,13," þ Terminate kEYFILE created. Copy it to the main terminate directory." DB 10,13,10,13," EnJoY! $" Counter1 DW 0 ;Holds the Block number in CRC procedure Counter2 DW 0 ;Holds the OFFSET in the block , currently ;in CRC procedure . CRC DW 0,0 ;CRC = 32 bit kEY. Input_string DB 51,53 dup(0) Master_Encrypt_Table DB 070h,040h,001h,0DFh,0D6h,07Ch,079h,020h,065h,0DCh,072h,009h,098h,08Ah,001h,086h DB 010h,090h,0E2h,072h,015h,015h,07Fh,0B3h,038h,027h,086h,043h,002h,029h,0CBh,07Ah DB 037h,094h,0ECh,0B6h,08Bh,052h,08Bh,0D1h,086h,092h,0D6h,013h,007h,055h,0B5h,072h DB 059h,05Ch,030h,055h,008h,082h,0A3h,00Eh,0EFh,024h,039h,0F1h,075h,0AEh,034h,06Ch DB 007h,08Ah,07Dh,026h,08Ch,0C3h,031h,0B8h,04Fh,057h,0BFh,052h,061h,0BBh,0EDh,0A3h DB 019h,042h,0E6h,086h,090h,0B7h,08Dh,0BFh,06Ch,0C2h,0CFh,070h,062h,0B6h,076h,06Dh DB 0E0h,03Dh,0F8h,07Eh,0CDh,0FEh,0C9h,0E0h,064h,0DAh,039h,02Bh,00Ah,02Eh,0A0h,027h DB 09Dh,06Eh,054h,0DAh,08Eh,0FFh,014h,062h,01Ch,0FEh,03Ch,022h,0DFh,0C2h,0E5h,09Fh DB 026h,0DAh,099h,0A8h,03Bh,0DBh,0B9h,080h,03Ah,0FDh,0CDh,0E9h,034h,03Fh,09Eh,000h DB 076h,0B5h,018h,077h,0A2h,040h,0BEh,0E0h,03Bh,088h,0F2h,058h,067h,080h,006h,0A8h DB 09Ah,08Fh,09Ah,009h,097h,019h,041h,07Fh,016h,062h,001h,069h,0DFh,0C0h,024h,07Bh DB 0E3h,0F5h,016h,03Eh,00Ch,0BAh,026h,092h,0BAh,092h,09Dh,086h,0D4h,0E8h,0A1h,04Bh DB 093h,07Ah,051h,0AEh,04Fh,0D8h,0A1h,008h,049h,06Ah,042h,021h,0DAh,0F7h,076h,06Eh DB 032h,019h,0FFh,09Eh,067h,09Fh,091h,030h,052h,09Ch,000h,0B2h,059h,0E0h,022h,075h DB 09Dh,010h,07Bh,0B0h,069h,0CAh,0F6h,055h,00Bh,0FFh,0EDh,02Dh,0F8h,05Fh,0A1h,00Ah DB 075h,0C5h,012h,082h,0CBh,0AEh,0EBh,093h,0B3h,06Dh,075h,023h,013h,09Bh,08Dh,08Fh DB 0E4h,0C2h,0E1h,081h,078h,009h,06Fh Encrypt_Table_Length DW ($ - OFFSET Master_Encrypt_Table) CRC_Table DB 000h,000h,000h,000h,096h,030h,007h,077h,02Ch,061h,00Eh,0EEh,0BAh,051h,009h,099h DB 019h,0C4h,06Dh,007h,08Fh,0F4h,06Ah,070h,035h,0A5h,063h,0E9h,0A3h,095h,064h,09Eh DB 032h,088h,0DBh,00Eh,0A4h,0B8h,0DCh,079h,01Eh,0E9h,0D5h,0E0h,088h,0D9h,0D2h,097h DB 02Bh,04Ch,0B6h,009h,0BDh,07Ch,0B1h,07Eh,007h,02Dh,0B8h,0E7h,091h,01Dh,0BFh,090h DB 064h,010h,0B7h,01Dh,0F2h,020h,0B0h,06Ah,048h,071h,0B9h,0F3h,0DEh,041h,0BEh,084h DB 07Dh,0D4h,0DAh,01Ah,0EBh,0E4h,0DDh,06Dh,051h,0B5h,0D4h,0F4h,0C7h,085h,0D3h,083h DB 056h,098h,06Ch,013h,0C0h,0A8h,06Bh,064h,07Ah,0F9h,062h,0FDh,0ECh,0C9h,065h,08Ah DB 04Fh,05Ch,001h,014h,0D9h,06Ch,006h,063h,063h,03Dh,00Fh,0FAh,0F5h,00Dh,008h,08Dh DB 0C8h,020h,06Eh,03Bh,05Eh,010h,069h,04Ch,0E4h,041h,060h,0D5h,072h,071h,067h,0A2h DB 0D1h,0E4h,003h,03Ch,047h,0D4h,004h,04Bh,0FDh,085h,00Dh,0D2h,06Bh,0B5h,00Ah,0A5h DB 0FAh,0A8h,0B5h,035h,06Ch,098h,0B2h,042h,0D6h,0C9h,0BBh,0DBh,040h,0F9h,0BCh,0ACh DB 0E3h,06Ch,0D8h,032h,075h,05Ch,0DFh,045h,0CFh,00Dh,0D6h,0DCh,059h,03Dh,0D1h,0ABh DB 0ACh,030h,0D9h,026h,03Ah,000h,0DEh,051h,080h,051h,0D7h,0C8h,016h,061h,0D0h,0BFh DB 0B5h,0F4h,0B4h,021h,023h,0C4h,0B3h,056h,099h,095h,0BAh,0CFh,00Fh,0A5h,0BDh,0B8h DB 09Eh,0B8h,002h,028h,008h,088h,005h,05Fh,0B2h,0D9h,00Ch,0C6h,024h,0E9h,00Bh,0B1h DB 087h,07Ch,06Fh,02Fh,011h,04Ch,068h,058h,0ABh,01Dh,061h,0C1h,03Dh,02Dh,066h,0B6h DB 090h,041h,0DCh,076h,006h,071h,0DBh,001h,0BCh,020h,0D2h,098h,02Ah,010h,0D5h,0EFh DB 089h,085h,0B1h,071h,01Fh,0B5h,0B6h,006h,0A5h,0E4h,0BFh,09Fh,033h,0D4h,0B8h,0E8h DB 0A2h,0C9h,007h,078h,034h,0F9h,000h,00Fh,08Eh,0A8h,009h,096h,018h,098h,00Eh,0E1h DB 0BBh,00Dh,06Ah,07Fh,02Dh,03Dh,06Dh,008h,097h,06Ch,064h,091h,001h,05Ch,063h,0E6h DB 0F4h,051h,06Bh,06Bh,062h,061h,06Ch,01Ch,0D8h,030h,065h,085h,04Eh,000h,062h,0F2h DB 0EDh,095h,006h,06Ch,07Bh,0A5h,001h,01Bh,0C1h,0F4h,008h,082h,057h,0C4h,00Fh,0F5h DB 0C6h,0D9h,0B0h,065h,050h,0E9h,0B7h,012h,0EAh,0B8h,0BEh,08Bh,07Ch,088h,0B9h,0FCh DB 0DFh,01Dh,0DDh,062h,049h,02Dh,0DAh,015h,0F3h,07Ch,0D3h,08Ch,065h,04Ch,0D4h,0FBh DB 058h,061h,0B2h,04Dh,0CEh,051h,0B5h,03Ah,074h,000h,0BCh,0A3h,0E2h,030h,0BBh,0D4h DB 041h,0A5h,0DFh,04Ah,0D7h,095h,0D8h,03Dh,06Dh,0C4h,0D1h,0A4h,0FBh,0F4h,0D6h,0D3h DB 06Ah,0E9h,069h,043h,0FCh,0D9h,06Eh,034h,046h,088h,067h,0ADh,0D0h,0B8h,060h,0DAh DB 073h,02Dh,004h,044h,0E5h,01Dh,003h,033h,05Fh,04Ch,00Ah,0AAh,0C9h,07Ch,00Dh,0DDh DB 03Ch,071h,005h,050h,0AAh,041h,002h,027h,010h,010h,00Bh,0BEh,086h,020h,00Ch,0C9h DB 025h,0B5h,068h,057h,0B3h,085h,06Fh,020h,009h,0D4h,066h,0B9h,09Fh,0E4h,061h,0CEh DB 00Eh,0F9h,0DEh,05Eh,098h,0C9h,0D9h,029h,022h,098h,0D0h,0B0h,0B4h,0A8h,0D7h,0C7h DB 017h,03Dh,0B3h,059h,081h,00Dh,0B4h,02Eh,03Bh,05Ch,0BDh,0B7h,0ADh,06Ch,0BAh,0C0h DB 020h,083h,0B8h,0EDh,0B6h,0B3h,0BFh,09Ah,00Ch,0E2h,0B6h,003h,09Ah,0D2h,0B1h,074h DB 039h,047h,0D5h,0EAh,0AFh,077h,0D2h,09Dh,015h,026h,0DBh,004h,083h,016h,0DCh,073h DB 012h,00Bh,063h,0E3h,084h,03Bh,064h,094h,03Eh,06Ah,06Dh,00Dh,0A8h,05Ah,06Ah,07Ah DB 00Bh,0CFh,00Eh,0E4h,09Dh,0FFh,009h,093h,027h,0AEh,000h,00Ah,0B1h,09Eh,007h,07Dh DB 044h,093h,00Fh,0F0h,0D2h,0A3h,008h,087h,068h,0F2h,001h,01Eh,0FEh,0C2h,006h,069h DB 05Dh,057h,062h,0F7h,0CBh,067h,065h,080h,071h,036h,06Ch,019h,0E7h,006h,06Bh,06Eh DB 076h,01Bh,0D4h,0FEh,0E0h,02Bh,0D3h,089h,05Ah,07Ah,0DAh,010h,0CCh,04Ah,0DDh,067h DB 06Fh,0DFh,0B9h,0F9h,0F9h,0EFh,0BEh,08Eh,043h,0BEh,0B7h,017h,0D5h,08Eh,0B0h,060h DB 0E8h,0A3h,0D6h,0D6h,07Eh,093h,0D1h,0A1h,0C4h,0C2h,0D8h,038h,052h,0F2h,0DFh,04Fh DB 0F1h,067h,0BBh,0D1h,067h,057h,0BCh,0A6h,0DDh,006h,0B5h,03Fh,04Bh,036h,0B2h,048h DB 0DAh,02Bh,00Dh,0D8h,04Ch,01Bh,00Ah,0AFh,0F6h,04Ah,003h,036h,060h,07Ah,004h,041h DB 0C3h,0EFh,060h,0DFh,055h,0DFh,067h,0A8h,0EFh,08Eh,06Eh,031h,079h,0BEh,069h,046h DB 08Ch,0B3h,061h,0CBh,01Ah,083h,066h,0BCh,0A0h,0D2h,06Fh,025h,036h,0E2h,068h,052h DB 095h,077h,00Ch,0CCh,003h,047h,00Bh,0BBh,0B9h,016h,002h,022h,02Fh,026h,005h,055h DB 0BEh,03Bh,0BAh,0C5h,028h,00Bh,0BDh,0B2h,092h,05Ah,0B4h,02Bh,004h,06Ah,0B3h,05Ch DB 0A7h,0FFh,0D7h,0C2h,031h,0CFh,0D0h,0B5h,08Bh,09Eh,0D9h,02Ch,01Dh,0AEh,0DEh,05Bh DB 0B0h,0C2h,064h,09Bh,026h,0F2h,063h,0ECh,09Ch,0A3h,06Ah,075h,00Ah,093h,06Dh,002h DB 0A9h,006h,009h,09Ch,03Fh,036h,00Eh,0EBh,085h,067h,007h,072h,013h,057h,000h,005h DB 082h,04Ah,0BFh,095h,014h,07Ah,0B8h,0E2h,0AEh,02Bh,0B1h,07Bh,038h,01Bh,0B6h,00Ch DB 09Bh,08Eh,0D2h,092h,00Dh,0BEh,0D5h,0E5h,0B7h,0EFh,0DCh,07Ch,021h,0DFh,0DBh,00Bh DB 0D4h,0D2h,0D3h,086h,042h,0E2h,0D4h,0F1h,0F8h,0B3h,0DDh,068h,06Eh,083h,0DAh,01Fh DB 0CDh,016h,0BEh,081h,05Bh,026h,0B9h,0F6h,0E1h,077h,0B0h,06Fh,077h,047h,0B7h,018h DB 0E6h,05Ah,008h,088h,070h,06Ah,00Fh,0FFh,0CAh,03Bh,006h,066h,05Ch,00Bh,001h,011h DB 0FFh,09Eh,065h,08Fh,069h,0AEh,062h,0F8h,0D3h,0FFh,06Bh,061h,045h,0CFh,06Ch,016h DB 078h,0E2h,00Ah,0A0h,0EEh,0D2h,00Dh,0D7h,054h,083h,004h,04Eh,0C2h,0B3h,003h,039h DB 061h,026h,067h,0A7h,0F7h,016h,060h,0D0h,04Dh,047h,069h,049h,0DBh,077h,06Eh,03Eh DB 04Ah,06Ah,0D1h,0AEh,0DCh,05Ah,0D6h,0D9h,066h,00Bh,0DFh,040h,0F0h,03Bh,0D8h,037h DB 053h,0AEh,0BCh,0A9h,0C5h,09Eh,0BBh,0DEh,07Fh,0CFh,0B2h,047h,0E9h,0FFh,0B5h,030h DB 01Ch,0F2h,0BDh,0BDh,08Ah,0C2h,0BAh,0CAh,030h,093h,0B3h,053h,0A6h,0A3h,0B4h,024h DB 005h,036h,0D0h,0BAh,093h,006h,0D7h,0CDh,029h,057h,0DEh,054h,0BFh,067h,0D9h,023h DB 02Eh,07Ah,066h,0B3h,0B8h,04Ah,061h,0C4h,002h,01Bh,068h,05Dh,094h,02Bh,06Fh,02Ah DB 037h,0BEh,00Bh,0B4h,0A1h,08Eh,00Ch,0C3h,01Bh,0DFh,005h,05Ah,08Dh,0EFh,002h,02Dh ;/--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---\ ; Program Procedures ;\--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---/ StartUp_Message PROC mov ax,3 int 10h ;Clear Screen mov ah,9 lea dx,Logo int 21h ;Print Logo RET StartUp_Message ENDP Zero_heap PROC lea DI, Heap_Location mov cx,(162h*0Bh) ;KeyFile Size.. xor al,al rep stosb RET Zero_heap ENDP GetInStr PROC ;Get input string from keyboard. mov ah,2 ;Set Cursor position mov bh,0 mov dh, LineNumber ;Row (0-top) mov dl,1 ;Column (0-left) int 10h ;We could also write directly to 40h:50h mov ah,2 mov dl,'' int 21h mov ah,2 mov bh,0 mov dh, LineNumber mov dl,13 int 10h lea DI, (Input_string+1) xor al,al mov cx,50 rep stosb ;Clear Input string mov ah,0Ah lea dx, Input_string int 21h RET GetInStr ENDP Copy_InStr_to_Heap PROC mov bp,sp mov ax, word ptr [bp+2] lea SI, (Input_string+1) lea DI, Heap_Location Add di,(162h*3) ;Start Address of the 4th block.. Add di,ax ;Offset in 4th block.. Xor cx,cx mov cl,byte ptr [SI] inc cl rep Movsb RET Copy_InStr_to_Heap ENDP Fill_Rest PROC mov bp,sp mov ax, word ptr [bp+2] lea SI, Fill_String lea DI, Heap_Location Add DI, ax Mov cx, word ptr [bp+4] @Fill1: Movsb Cmp si, (OFFSET FString_tag) Jnz @Fill2 lea SI, Fill_String @Fill2: Loop @Fill1 RET Fill_Rest ENDP CRC_4th_Block PROC Mov word ptr [ CRC ], -1 Mov word ptr [ CRC+2 ], -1 Mov word ptr [Counter2], 5Bh @CRC_loop: Mov bx, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] lea DI, Heap_Location Add di, (162h*3) ;Base Address of the 4th block.. Add di, word ptr [Counter2] mov al, byte ptr [di] xor bl,al xor bh,bh Shl bx,1 Shl bx,1 ;Shl bx,2 == Mul bx, 4 Add bx, OFFSET CRC_Table Mov ax, word ptr [BX] Mov cx, word ptr [BX+2] Mov bx, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] Push cx ;save cx mov cx,8 @CRC1: Shr DX,1 Rcr BX,1 ;Shift right 32bit CRC value.. Loop @CRC1 Pop cx Xor ax, bx Xor dx, cx Mov word ptr [ CRC ],ax Mov word ptr [ CRC+2 ],dx Inc word ptr [Counter2] Cmp word ptr [Counter2], 15Dh Jna @CRC_loop Mov ax, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] lea DI, Heap_Location Add di, (162h*4) ;Base Address of the 5th block.. Sub di, 4 ;END of 4th block - CRC location . Stosw mov ax,dx Stosw ;5th block CRC should be ;4th_block_CRC - 10 OR ;4th_block_CRC + 10 . Mov ax, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] Add ax, 10 Adc dx, 0 ;Add 10 to a 32bit (integer) key .. lea DI, Heap_Location Add di, (162h*5) ;Base Address of the 6th block.. Sub di, 4 ;END of 5th block - CRC location . Stosw mov ax,dx Stosw RET CRC_4th_Block ENDP Encrypt_4th_Block PROC lea SI, Master_Encrypt_Table lea DI, Heap_Location Add di, (162h*3) ;Base Address of the 4th block.. Add di, 5Bh ;Offset of encrypted DATA Mov CX, Encrypt_Table_Length @Encrypt_Loop: Lodsb Mov ah, byte ptr [DI] XOR al,ah Stosb Loop @Encrypt_Loop RET Encrypt_4th_Block ENDP CRC_File PROC Mov word ptr [ CRC ], -1 Mov word ptr [ CRC+2 ], -1 Mov word ptr [Counter1], 0 @CRC_loop1: Mov word ptr [Counter2], 0 @CRC_loop2: Mov bx, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] lea DI, Heap_Location Mov cx, word ptr [Counter1] Cmp Cx,0 Jz @calc_off @calc_base: Add di, 162h Loop @calc_base @calc_off: Add di, word ptr [Counter2] mov al, byte ptr [di] xor bl,al xor bh,bh Shl bx,1 Shl bx,1 Add bx, OFFSET CRC_Table Mov ax, word ptr [BX] Mov cx, word ptr [BX+2] Mov bx, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] Push cx mov cx,8 @CRC_: Shr DX,1 Rcr BX,1 Loop @CRC_ Pop cx Xor ax, bx Xor dx, cx Mov word ptr [ CRC ],ax Mov word ptr [ CRC+2 ],dx Inc word ptr [Counter2] Cmp word ptr [Counter2], 15Dh Jna @CRC_loop2 Inc word ptr [Counter1] Cmp word ptr [Counter1], 0Bh Jne @CRC_loop1 Mov ax, word ptr [ CRC ] Mov dx, word ptr [ CRC+2 ] lea DI, Heap_Location Add di, (162h*0Bh -4) ;END of 11th block - CRC location . Stosw mov ax,dx Stosw RET CRC_File ENDP Copy_Heap_to_File PROC mov ah,3ch ;Create kEY FILE xor cx,cx lea dx,File_Name int 21h mov bx,ax ;File handle in BX mov ah,40h ;Write to file mov cx,(162h*0Bh) ;Number of bytes to write lea dx,Heap_Location ;Address to write from int 21h mov ah,3eh ;Close File int 21h RET Copy_Heap_to_File ENDP ;/--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---\ ; Program Main Code ;\--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---/ Main: Call StartUp_Message Call Zero_heap Mov byte ptr [LineNumber] ,8 Call GetInStr ;Get Name push word ptr 7Ah ;Name location in the 4th block.. Call Copy_InStr_to_Heap ;Copy from buffer to Heap Inc byte ptr [LineNumber] Call GetInStr ;Get Address push word ptr 0ADh ;Address location in the 4th block .. Call Copy_InStr_to_Heap ;Copy from buffer to Heap Inc byte ptr [LineNumber] ;And so on .. Call GetInStr push word ptr 0E0h Call Copy_InStr_to_Heap Inc byte ptr [LineNumber] Call GetInStr push word ptr 113h Call Copy_InStr_to_Heap push word ptr (162h*3) push word ptr 0 Call Fill_Rest ;fill first 3 blocks push word ptr (162h*7) push word ptr (162h*4) ;base address of the 5th block Call Fill_Rest ;fill last 7 blocks Call CRC_4th_Block ;Calculate CRC for the 4th block Call Encrypt_4th_Block ;XOR block #4 with Master_Table Call CRC_File ;Calculate CRC for all 11 blocks Call Copy_Heap_to_File ;Write to file mov ah,9 ;Print End message lea dx, End_message Int 21h mov ax,4c00h ;Asta-lavista,baby! int 21h ;/--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---\ ; HEAP ;\--ÄÄÄÄÄÄÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄÄÄÄÄÄÄ---/ Heap_Location: ;End of the COM (the image) , Heap starts Code Ends End Start