看着源代码脱吧:D
@Loader_Start: ; DATA XREF: CompressFile+4A9o
; CompressFile+52Ao ...
pushf
pusha
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
db 0BDh ; ? ; mov ebp
@1 dd 0 ; DATA XREF: CompressFile+4AEw
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
add ss:@Dcomp_Buffer_Offset[ebp], ebp
push ss:@Largest_Needed_Buffer[ebp]
push GPTR
call ss:_GlobalAlloc[ebp]
push eax
push eax
sub eax, offset @Critical_Symbiont
mov ss:@2[ebp], eax
pop edi
lea esi, @Critical_Symbiont[ebp]
mov ecx, (@Loader_End - @Loader_Start)/4+1
rep movsd
pop edi
jmp edi
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@Critical_Symbiont db 0BDh ; DATA XREF: pcs1:00403961o
; pcs1:0040396Dr
@2 dd 0 ; DATA XREF: pcs1:00403966w
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
mov esi, edi
add esi, 160h
add edi, @Loader_End-@Loader_Start
push edi
push esi
push edi
push ebp
push edi
push esi
call aP_Depack
add esp, 8
pop ebp
xchg eax, ecx
pop esi
pop edi
rep movsb
jmp decomp_done
@Largest_Needed_Buffer dd 0 ; DATA XREF: CompressFile+3C2r
; CompressFile+3CAw ...
@Dcomp_Buffer_Offset dd offset dcomp_buffer ; DATA XREF: pcs1:0040394Bw
fake_import_table dd 28h ; DATA XREF: CompressFile+4BAw
dd 2 dup(0)
dword_403A64 dd 3Ch ; DATA XREF: CompressFile+4C0w
dword_403A68 dd 28h ; DATA XREF: CompressFile+4C6w
dd 5 dup(0) ; end marker
_LoadLibraryA dd 49h ; DATA XREF: CompressFile+4CCw
; pcs1:00403B6Cr ...
_GetProcAddress dd 58h ; DATA XREF: CompressFile+4D2w
; pcs1:00403B7Er ...
_GlobalAlloc dd 69h ; DATA XREF: CompressFile+4D8w
; pcs1:00403959r
_ExitProcess dd 77h ; DATA XREF: CompressFile+4DEw
; pcs1:00403B95r
dd 0
aKernel32_dll_0 db 'KERNEL32.DLL',0
dw 0
aLoadlibrarya db 'LoadLibraryA',0
dw 0
aGetprocaddress db 'GetProcAddress',0
dw 0
aGlobalalloc db 'GlobalAlloc',0
dw 0
aExitprocess db 'ExitProcess',0
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
decomp_done: ; CODE XREF: pcs1:004039A4j
; DATA XREF: sub_402185+45o ...
pop edi
lea esi, byte_403C71[ebp]
loc_403AE4: ; CODE XREF: pcs1:00403B25j
push ebp
push edi
push esi
lodsd
or eax, eax
jz short loc_403B27
xchg eax, edx
lodsd
xchg eax, ecx
push edi
push ecx
mov esi, edx
rep movsb
pop ecx
pop edi
cmp edx, ss:dword_403C6D[ebp]
jnz short loc_403B15
mov eax, ss:RsrcDisplacement[ebp]
pusha
mov esi, edi
mov edi, edx
mov ecx, eax
rep movsb
popa
add edi, eax
add edx, eax
sub ecx, eax
loc_403B15: ; CODE XREF: pcs1:00403AFDj
push edx
push edi
call aP_Depack
add esp, 8
pop esi
pop edi
pop ebp
add esi, 8
jmp short loc_403AE4
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
loc_403B30: ; CODE XREF: pcs1:00403B5Cj
lodsd
or eax, eax
jz short loc_403B5E
xchg eax, ebx
lodsd
xchg eax, edx
lodsd
xchg eax, ecx
push edi
push esi
xchg ebx, esi
push edi
push ecx
rep movsb
pop ecx
pop esi
mov edi, edx
rep movsb
pop esi
lodsd
xchg eax, ecx
xor eax, eax
rep stosb
mov edi, [esi-10h]
mov ecx, [esi-0Ch]
sub ecx, edi
xor eax, eax
rep stosb
pop edi
jmp short loc_403B30
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
_ProcessImportDir proc near ; CODE XREF: _ProcessImports+14p
pop eax
pop esi ; 1st import dir
pop edx ; edx->imagebase
push eax
mov ecx, [esi] ; OriginalFirstThunk
mov edi, [esi+10h] ; FirstThunk
or ecx, ecx
jnz short @Original1stThunkOK
mov ecx, edi
@Original1stThunkOK: ; CODE XREF: _ProcessImportDir+Bj
add ecx, edx
add edi, edx
mov eax, [esi+0Ch] ; eax->dll name
add eax, edx ; +ImageBase
push ecx
push edx
push eax
call ss:_LoadLibraryA[ebp]
pop edx
pop ecx
or eax, eax
jz short @Error
mov ss:DllHandle[ebp], eax
@Process_Dir_Loop: ; CODE XREF: _ProcessImportDir+5Ej
mov ebx, [ecx]
or ebx, ebx
jz short iret_success
test ebx, IMAGE_ORDINAL_FLAG32
jnz short @Ordinal ; clear 31st bit
add ebx, edx ; skip hint(WORD)
inc ebx
inc ebx
@Ordinal: ; CODE XREF: _ProcessImportDir+39j
and ebx, 7FFFFFFFh ; clear 31st bit
push ecx
push edx
push ebx
push ss:DllHandle[ebp]
call ss:_GetProcAddress[ebp]
pop edx
pop ecx
or eax, eax
jz short @Error
stosd
add ecx, 4
jmp short @Process_Dir_Loop
; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━