joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100030a0
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10019004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
xor bl, bl
mov dword [ebp - 0xc], edx
push ecx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x1000322b
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x1000320e
push ebx
call fcn.10008514
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
xor esi, esi
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, ebx
sub eax, esi
push eax
lea eax, [esi + edi]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000312d
add esi, dword [ebp - 8]
cmp esi, ebx
jb 0x10003103
cmp esi, ebx
jne 0x10003205
mov esi, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1000314b
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x10003205
cmp ebx, 0xa
jae 0x1000317a
or edi, 0xffffffff
jmp 0x10003193
movzx eax, byte [edi + 8]
mov byte [ebp - 8], al
movzx eax, byte [edi + 9]
mov edi, ebx
mov byte [ebp - 7], al
movzx eax, word [ebp - 8]
sub edi, eax
sub edi, 0xa
push edi
call fcn.10008514
add esp, 4
mov dword [ebp - 8], eax
push edi
push eax
push ebx
push dword [ebp - 0x14]
call fcn.10001120
mov ebx, dword [ebp - 8]
test eax, eax
je 0x100031f0
xor esi, esi
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100031dd
add esi, dword [ebp - 8]
cmp esi, edi
jb 0x100031b3
mov eax, dword [ebp - 0x10]
cmp esi, edi
movzx eax, al
mov ecx, 1
cmove eax, ecx
mov dword [ebp - 0x10], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.100084f7
mov edi, dword [ebp - 0x14]
add esp, 4
push edi
call fcn.100084f7
add esp, 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004cce
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10004cce
mov esp, ebp
pop ebp
ret
Function at 0x10003240
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x10019004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ecx
mov dword [ebp - 0xc], edx
mov byte [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
cmp ebx, 0xffffffff
je 0x100033e4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x100033dd
push edi
call fcn.10008514
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
xor esi, esi
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ecx]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100032cf
add esi, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
cmp esi, edi
jb 0x100032a4
cmp esi, edi
jne 0x100033d2
mov esi, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100032ed
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x100033d2
mov dword [ebp - 0x10], 0x4034b50
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], 0x14
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.100084e5
add esp, 4
call fcn.100084c4
and eax, 0x8000007f
jns 0x1000334c
dec eax
or eax, 0xffffff80
inc eax
add eax, 0x20
lea ebx, [edi + 0xa]
movzx eax, ax
add ebx, eax
push ebx
call fcn.10008514
add esp, 4
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x24]
push ebx
push eax
push edi
push dword [ebp - 0x18]
call section..text
mov edi, dword [ebp - 8]
test eax, eax
je 0x100033bd
xor esi, esi
nop word [eax + eax]
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp - 0xc]
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100033aa
add esi, dword [ebp - 8]
cmp esi, ebx
jb 0x10003380
mov eax, dword [ebp - 0x14]
cmp esi, ebx
movzx eax, al
mov ecx, 1
cmove eax, ecx
mov dword [ebp - 0x14], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call fcn.100084f7
mov ebx, dword [ebp - 0x1c]
add esp, 4
push dword [ebp - 0x18]
call fcn.100084f7
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x14]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10004cce
mov esp, ebp
pop ebp
ret
Function at 0x100036c0
Capabilities:
Check if file exists
Check mutex on windows
Delete file
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x10019004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push edi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], ecx
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x10], 0x73626154
mov dword [ebp - 0xc], 0x62697065
mov dword [ebp - 8], 0x796c75
lea eax, [ebp - 0x10]
xor esi, esi
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x10003727
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov eax, 1
push edi
cmove esi, eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call ebx
test esi, esi
je 0x10003738
push 0x6f
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x100036f8
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
nop
lea eax, [ebp - 0x10]
push eax
push 0
push 0
call esi
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x10003740
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10003769
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x10003869
push dword [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x1c], 0x4034b50
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x18], 0x14
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
call edi
mov esi, eax
add esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.100084e5
add esp, 4
call fcn.100084c4
and eax, 0x8000007f
jns 0x100037d7
dec eax
or eax, 0xffffff80
inc eax
add eax, 0x20
add esi, 0xa
movzx eax, ax
add esi, eax
push esi
mov dword [ebp - 0x18], esi
call fcn.10008514
add esp, 4
mov dword [ebp - 0x20], eax
push esi
mov esi, dword [ebp - 0x14]
push eax
push esi
call edi
add eax, eax
lea ecx, [ebp - 0x34]
push eax
push esi
call section..text
test eax, eax
je 0x10003851
mov edi, dword [ebp - 0x18]
xor esi, esi
mov ebx, dword [ebp - 0x28]
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
mov eax, edi
sub eax, esi
push eax
mov eax, dword [ebp - 0x20]
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000383b
add esi, dword [ebp - 0x14]
cmp esi, edi
jb 0x10003811
mov eax, dword [ebp - 0x24]
cmp esi, edi
mov ebx, dword [ebp - 0x2c]
mov ecx, 1
movzx eax, al
cmove eax, ecx
mov dword [ebp - 0x24], eax
push dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call fcn.100084f7
add esp, 4
jmp 0x1000386f
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call esi
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x24]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10004cce
mov esp, ebp
pop ebp
ret
Function at 0x401180
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push str.PYTHONSCRIPT
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push 0x304
push 0x404d20
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4011b2
push str.Retrieving_module_name
jmp 0x40121c
xor eax, eax
jmp 0x4011c0
mov cl, byte [eax + 0x404d20]
mov byte [eax + 0x405040], cl
inc eax
test cl, cl
jne 0x4011c0
push 0x5c
push 0x405040
call dword [sym.imp.MSVCR71.dll_strrchr]
add esp, 8
test esi, esi
mov byte [eax], 0
jne 0x4011ef
push str.Could_not_locate_script_resource:
jmp 0x40121c
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401202
push str.Could_not_load_script_resource:
jmp 0x40121c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [0x405144], eax
mov dword [0x40526c], eax
jne 0x401230
push str.Could_not_lock_script_resource:
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
mov ecx, dword [eax + 0xc]
mov dword [0x405264], ecx
lea ecx, [eax + 0x10]
mov dword [0x405144], ecx
cmp dword [eax], 0x78563412
je 0x40125e
push str.Bug:_Invalid_script_resource
push 0
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401263
push ecx
push 0x405040
push 0x4040fc
sub eax, esi
lea edx, [ecx + eax + 1]
push 0x304
push 0x404a00
mov dword [0x405144], edx
call dword [sym.imp.MSVCR71.dll__snprintf]
add esp, 0x14
pop edi
mov eax, 1
pop esi
ret

Function at 0x4012a0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ecx
push esi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4012c7
xor eax, eax
pop esi
pop ecx
ret
push ebx
push edi
lea ecx, [esp + 0xc]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
push 2
push 0
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
call esi
cmp edi, 0xffffffff
jne 0x4012ff
pop edi
pop ebx
xor eax, eax
pop esi
pop ecx
ret
push ebp
push 0
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov ebp, eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40131e
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret
Function at 0x401330
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x308
push esi
mov esi, dword [esp + 0x310]
push 0x404104
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40137f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push 0x404114
call fcn.00401aa0
add esp, 8
test eax, eax
jne 0x40141e
push str.Could_not_load_python_dll
jmp 0x401405
lea eax, [esp + 4]
push eax
mov eax, 0x404a00
call fcn.004012a0
mov esi, eax
add esp, 4
test esi, esi
je 0x4013ce
push edi
push 0xb
push 0x404140
push esi
xor edi, edi
call dword [sym.imp.MSVCR71.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x4013c2
lea ecx, [esi + 0xf]
push ecx
push 0x40414c
call fcn.00401aa0
add esp, 8
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test edi, edi
pop edi
jne 0x40141e
push str.PYTHON24.DLL
push 0x405040
push str._s_s
lea edx, [esp + 0x14]
push 0x304
push edx
call dword [sym.imp.MSVCR71.dll__snprintf]
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00401aa0
add esp, 0x1c
test eax, eax
jne 0x40141e
push str.LoadLibrary_pythondll__failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call section..text
add esp, 8
xor eax, eax
pop esi
add esp, 0x308
ret
mov eax, 1
pop esi
add esp, 0x308
ret

Function at 0x401460
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
mov esi, dword [esp + 8]
push str.ZLIB.PYD
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4014b5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401512
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push str.zlib.pyd
call fcn.00402280
add esp, 8
test eax, eax
je 0x401512
push str.initzlib
push eax
call fcn.00401fa0
add esp, 8
test eax, eax
je 0x401512
pop esi
jmp eax
push edi
push 0
mov eax, 0x404a00
call fcn.004012a0
mov esi, eax
add esp, 4
test esi, esi
mov edi, esi
je 0x401511
push ebx
mov ebx, dword [sym.imp.MSVCR71.dll_strncmp]
push 0xb
push str._pythondll_
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4014ec
mov eax, dword [esi + 0xb]
lea edi, [esi + eax + 0xf]
push 0xa
push str._zlib.pyd_
push edi
call ebx
add esp, 0xc
test eax, eax
pop ebx
jne 0x40150a
add edi, 0xe
push edi
call fcn.00401430
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop edi
pop esi
ret
Function at 0x4016a0
Capabilities:
Compiled with py2exe
Query environment variable

Disassembly:
push edi
mov edi, dword [esp + 8]
push edi
call fcn.00401180
add esp, 4
test eax, eax
je 0x4016bf
push edi
call fcn.00401330
add esp, 4
test eax, eax
jne 0x4016c6
mov eax, 0xff
pop edi
ret
mov eax, dword [0x40526c]
mov ecx, dword [eax + 8]
test ecx, ecx
push esi
je 0x401702
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
mov esi, dword [sym.imp.MSVCR71.dll_setbuf]
push 0
push ecx
call esi
mov edx, dword [sym.imp.MSVCR71.dll__iob]
add edx, 0x20
push 0
push edx
call esi
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x40
push 0
push eax
call esi
add esp, 0x18
mov esi, dword [sym.imp.MSVCR71.dll_getenv]
push 0x4041f0
call esi
add esp, 4
test eax, eax
je 0x401731
push str.PY2EXE_VERBOSE
call esi
push eax
call dword [sym.imp.MSVCR71.dll_atoi]
mov ecx, dword [0x40479c]
add esp, 8
mov dword [ecx], eax
jmp 0x40173d
mov edx, dword [0x40479c]
mov dword [edx], 0
mov eax, dword [0x4047b4]
mov dword [eax], 1
mov ecx, dword [0x4047a4]
mov dword [ecx], 1
mov edx, dword [0x40526c]
mov eax, dword [edx + 4]
mov ecx, dword [0x4047ac]
push 0x404d20
mov dword [ecx], eax
call dword [0x404644]
add esp, 4
call fcn.00401520
test eax, eax
jne 0x4017df
call dword [0x40461c]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4017af
push 1
call dword [0x404794]
push eax
push 0x404210
call dword [0x404734]
add esp, 0xc
push edi
call fcn.00401460
add esp, 4
pop esi
xor eax, eax
pop edi
ret
push eax
call dword [0x404744]
mov esi, eax
add esp, 4
test esi, esi
je 0x4017d4
push esi
push str.frozen
call dword [0x404734]
push esi
call fcn.004019b0
add esp, 0xc
push edi
call fcn.00401460
add esp, 4
xor eax, eax
pop esi
pop edi
ret

Function at 0x401940
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push esi
push eax
push ecx
call dword [0x40475c]
call fcn.00401850
push str.PYTHONINSPECT
mov esi, eax
call dword [sym.imp.MSVCR71.dll_getenv]
add esp, 0xc
test eax, eax
je 0x401997
mov edx, dword [sym.imp.MSVCR71.dll__iob]
push 0x404230
push edx
call dword [0x40474c]
add esp, 8
test eax, eax
je 0x401997
mov eax, dword [sym.imp.MSVCR71.dll__iob]
push str._stdin_
push eax
call dword [0x404754]
add esp, 8
call dword [0x40462c]
mov eax, esi
pop esi
ret

Function at 0x401a20
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [esp + 4]
push esi
push edi
push eax
mov esi, 0x404618
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
jne 0x401a3b
pop edi
pop esi
ret
mov eax, dword [str.Py_Initialize]
test eax, eax
push ebx
je 0x401a67
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x401a50
mov ecx, dword [esi]
push ecx
push edi
call ebx
test eax, eax
mov dword [esi + 4], eax
je 0x401a70
mov eax, dword [esi + 8]
add esi, 8
test eax, eax
jne 0x401a50
pop ebx
pop edi
mov eax, 1
pop esi
ret
push 0x4047c4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [esi]
mov eax, dword [sym.imp.MSVCR71.dll__iob]
push edx
add eax, 0x40
push 0x4047d4
push eax
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 0xc
pop ebx
pop edi
xor eax, eax
pop esi
ret
Function at 0x401aa0
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [esp + 8]
test eax, eax
push esi
mov esi, 0x404618
jne 0x401abd
mov eax, dword [esp + 8]
push eax
call fcn.00401a20
add esp, 4
pop esi
ret
mov ecx, dword [esp + 8]
push edi
push eax
push ecx
call fcn.00402280
mov edi, eax
add esp, 8
test edi, edi
je 0x401b2b
mov eax, dword [str.Py_Initialize]
test eax, eax
je 0x401afd
jmp 0x401ae0
mov edx, dword [esi]
push edx
push edi
call fcn.00401fa0
add esp, 8
test eax, eax
mov dword [esi + 4], eax
je 0x401b05
mov eax, dword [esi + 8]
add esi, 8
test eax, eax
jne 0x401ae0
pop edi
mov eax, 1
pop esi
ret
push str.undef_symbol
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esi]
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
push eax
add ecx, 0x40
push str.undefined_symbol__s____exit__1__n
push ecx
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 0xc
pop edi
xor eax, eax
pop esi
ret

Function at 0x401ca0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
push ebp
mov ebp, dword [eax + 4]
mov eax, dword [eax]
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ebx, [ecx + eax + 0x18]
mov dword [esp + 8], 0
jbe 0x401d60
push esi
add ebx, 0x10
push edi
lea esp, [esp]
mov eax, dword [ebx]
test eax, eax
jne 0x401d0e
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 0x38]
test esi, esi
jle 0x401d40
mov eax, dword [ebx - 4]
push 4
push 0x1000
push esi
add eax, ebp
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, esi
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [ebx - 8], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x401d40
push 4
push 0x1000
push eax
mov eax, dword [ebx - 4]
add eax, ebp
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov edi, dword [esp + 0x18]
mov edx, ecx
add esi, edi
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx - 8], eax
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov eax, dword [esp + 0x10]
movzx ecx, word [edx + 6]
inc eax
add ebx, 0x28
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x401cd0
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x401d70
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [eax]
movzx ecx, word [ebx + 0x14]
push ebp
xor ebp, ebp
cmp word [ebx + 6], bp
lea eax, [ecx + ebx + 0x18]
jbe 0x401e25
push esi
push edi
lea edi, [eax + 0x24]
mov eax, dword [edi]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x401dc5
mov edx, dword [edi - 0x14]
mov eax, dword [edi - 0x1c]
push 0x4000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x401e0d
test eax, 0x4000000
lea ecx, [edx + ecx*2]
lea edx, [esi + ecx*2]
mov esi, dword [edx*4 + 0x40482c]
je 0x401ddf
or esi, 0x200
mov edx, dword [edi - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x401dfa
test al, 0x40
je 0x401df1
mov ecx, dword [ebx + 0x20]
jmp 0x401df8
test al, al
jns 0x401e0d
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jbe 0x401e0d
mov ecx, dword [edi - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [esp + 0x18]
mov ebx, dword [edx]
movzx eax, word [ebx + 6]
inc ebp
add edi, 0x28
cmp ebp, eax
jl 0x401d92
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x402280
Capabilities:
Parse pe header

Disassembly:
push ecx
push esi
mov esi, dword [0x4049f4]
test esi, esi
push edi
je 0x4022ac
mov edi, dword [sym.imp.MSVCR71.dll__stricmp]
mov eax, dword [esi + 0x18]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call edi
add esp, 8
test eax, eax
je 0x4022d6
mov esi, dword [esi + 0x20]
test esi, esi
jne 0x402293
mov eax, dword [esp + 0x14]
cmp word [eax], 0x5a4d
jne 0x4022c8
mov edi, dword [eax + 0x3c]
add edi, eax
cmp dword [edi], 0x4550
mov dword [esp + 8], edi
je 0x4022df
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
pop ecx
ret
inc dword [esi + 0x1c]
pop edi
mov eax, esi
pop esi
pop ecx
ret
mov edx, dword [edi + 0x50]
mov eax, dword [edi + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebp
push 4
push 0x2000
push edx
push eax
call esi
mov ebp, eax
test ebp, ebp
jne 0x402320
mov ecx, dword [edi + 0x50]
push 4
push 0x2000
push ecx
push eax
call esi
mov ebp, eax
test ebp, ebp
jne 0x402320
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop edi
xor eax, eax
pop esi
pop ecx
ret
push ebx
push 0x28
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [esp + 0x18]
mov ebx, eax
xor eax, eax
push edx
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x1c], 1
call dword [sym.imp.MSVCR71.dll__strdup]
add esp, 4
push 4
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], 0
mov eax, dword [edi + 0x50]
push 0x1000
push eax
push ebp
call esi
mov ecx, dword [edi + 0x54]
push 4
push 0x1000
push ecx
push ebp
call esi
mov edx, dword [edi + 0x54]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x3c]
add ecx, edx
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x3c]
mov esi, dword [esp + 0x10]
push ebx
add eax, edx
push esi
mov dword [ebx], eax
push ecx
mov dword [eax + 0x34], ebp
call fcn.00401ca0
mov ecx, dword [esi + 0x34]
mov eax, ebp
add esp, 0xc
sub eax, ecx
je 0x4023d0
push eax
mov eax, ebx
call fcn.00401e30
add esp, 4
push ebx
call fcn.00402100
add esp, 4
test eax, eax
je 0x402408
push ebx
call fcn.00401d70
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
add esp, 4
test eax, eax
je 0x40242a
add eax, ebp
jne 0x4023fd
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402408
push 0
push 1
push ebp
call eax
test eax, eax
jne 0x402423
mov ecx, dword [ebx + 0x18]
push ecx
call dword [sym.imp.MSVCR71.dll_free]
push ebx
call fcn.00402020
add esp, 8
pop ebx
pop ebp
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov dword [ebx + 0x10], 1
mov eax, ebx
call fcn.00401b30
pop ebx
pop ebp
pop edi
pop esi
pop ecx
ret