joyce8/EMBER2024-capa huggingface dataset:
Function at 0x434880
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x461a78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.0045b09a
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.00434220
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.0045afc8
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.004578c2
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.004578c2
push 1
push 0
push 0
mov ecx, esi
call fcn.0045786a
push 1
push 0
push 1
mov ecx, esi
call fcn.0045786a
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0045b10c
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x434a00
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x461a98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.0045b09a
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.00434220
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.0045afc8
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x434ac4
cmp dword [esp + 0x40], 1
jne 0x434ac2
cmp ecx, eax
jge 0x434ac4
mov eax, ecx
cmp eax, 0xc8
jge 0x434ad0
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.00434880
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0045b10c
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x435250
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x461b03
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.00455cf4
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.0045b342
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.0045c85e
test eax, eax
je 0x43536c
mov ecx, dword [esp + 0x3c]
call fcn.0045b36f
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x435330
push edi
mov ecx, esi
call fcn.004589d8
mov ecx, esi
call fcn.004354d0
cmp dword [esp + 0x38], 1
jne 0x435365
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00458b13
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x437d90
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x437dc3
push esi
call fcn.0043aea0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x437dbc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x437e49
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x437e32
mov eax, dword [esi + 8]
test eax, eax
je 0x437de7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x437e2e
cmp eax, 2
je 0x437e32
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x437dda
cmp eax, 3
je 0x437e0d
cmp eax, 1
jne 0x437dda
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x437dda
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x437dda
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00437e70
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x437e58
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00437e70
add esp, 4
pop esi
ret

Function at 0x456ad0
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x456b08
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00454ba1
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00454b79
jmp 0x456b14
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4581c6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x458208
call fcn.0045db48
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x458208
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4581ff
xor eax, eax
jmp 0x458210
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00458216
pop edi
pop esi
pop ebx
ret 4

Function at 0x45e078
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x45e0a6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x45e0c4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0045dfde
jmp 0x45e0c4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x45e0c4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0045dfde
test edi, edi
mov eax, edi
jne 0x45e0ae
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4012f3
Capabilities:
Delete registry value
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x18c]
sub esp, 0x20c
mov eax, dword [0x409240]
push ebx
mov dword [ebp + 0x188], eax
lea eax, [ebp - 0x74]
push eax
push 0xf003f
xor ebx, ebx
push ebx
push dword [ebp + 0x198]
mov byte [ebp - 0x6d], bl
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401459
push esi
push ebx
push ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x80]
push eax
push 0x4098cc
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x74]
call esi
cmp dword [0x4098cc], ebx
mov dword [0x4098c8], ebx
jbe 0x40144f
push edi
push 0x63
pop ecx
xor eax, eax
mov byte [ebp - 0x6c], bl
lea edi, [ebp - 0x6b]
rep stosd dword es:[edi], eax
push ebx
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
mov eax, dword [ebp - 0x78]
push ebx
push ebx
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x6c]
push eax
push dword [0x4098c8]
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push 6
lea eax, [ebp - 0x6c]
push str.Serial
push eax
call fcn.00401ba0
add esp, 0xc
test eax, eax
jne 0x401437
push 0x18
mov byte [ebp + 0x124], bl
pop ecx
lea edi, [ebp + 0x125]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x124]
push eax
mov byte [ebp - 0x6d], 1
call fcn.00401aa0
lea eax, [ebp + 0x124]
push str._removed
push eax
call fcn.00401ab0
add esp, 0x10
push ebx
push str.Cleaning_...
lea eax, [ebp + 0x124]
push eax
push dword [ebp + 0x194]
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push ebx
push ebx
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x80]
push eax
push 0x4098cc
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x74]
mov dword [0x4098c8], ebx
call esi
inc dword [0x4098c8]
mov eax, dword [0x4098c8]
cmp eax, dword [0x4098cc]
jb 0x401369
pop edi
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp + 0x188]
mov al, byte [ebp - 0x6d]
pop ebx
call fcn.00401a5c
add ebp, 0x18c
leave
ret
Function at 0x401f2d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4072c8
call fcn.004022b8
mov edi, 0x94
mov eax, edi
call fcn.00403960
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x40990c], ecx
mov eax, dword [esi + 4]
mov dword [0x409918], eax
mov edx, dword [esi + 8]
mov dword [0x40991c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x409910], esi
cmp ecx, 2
je 0x401f8d
or esi, 0x8000
mov dword [0x409910], esi
shl eax, 8
add eax, edx
mov dword [0x409914], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x401fc8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401fc8
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x401fe0
cmp eax, 0x20b
je 0x401fcd
mov dword [ebp - 0x1c], esi
jmp 0x401ff4
cmp dword [ecx + 0x84], 0xe
jbe 0x401fc8
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x401fee
cmp dword [ecx + 0x74], 0xe
jbe 0x401fc8
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00403908
pop ecx
test eax, eax
jne 0x402020
cmp dword [0x4098f8], 1
jne 0x40200d
call fcn.004030bd
push 0x1c
call fcn.00402f46
push 0xff
call fcn.00402dab
pop ecx
pop ecx
call fcn.00403866
mov dword [ebp - 4], esi
call fcn.004036bb
test eax, eax
jge 0x402039
push 0x1b
call fcn.00401f08
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ae94], eax
call fcn.00403599
mov dword [0x4098f0], eax
call fcn.004034f7
test eax, eax
jge 0x40205f
push 8
call fcn.00401f08
pop ecx
call fcn.004032c4
test eax, eax
jge 0x402070
push 9
call fcn.00401f08
pop ecx
push 1
call fcn.00402ddb
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x402086
push eax
call fcn.00401f08
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00403267
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4020a7
movzx eax, word [ebp - 0x40]
jmp 0x4020aa
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004018b0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4020c8
push edi
call fcn.00402f06
call fcn.00402f28
jmp 0x4020fa
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004022f3
ret
Function at 0x402e45
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40994c], esi
push edi
jne 0x402e65
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x409948], esi
mov byte [0x409944], al
jne 0x402ecb
mov ecx, dword [0x40ae88]
test ecx, ecx
je 0x402eac
mov eax, dword [0x40ae84]
sub eax, 4
cmp eax, ecx
jmp 0x402ea5
mov eax, dword [eax]
test eax, eax
je 0x402e97
call eax
mov eax, dword [0x40ae84]
sub eax, 4
cmp eax, dword [0x40ae88]
mov dword [0x40ae84], eax
jae 0x402e8f
mov eax, 0x409020
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x402ecb
mov eax, dword [edi]
test eax, eax
je 0x402ec4
call eax
add edi, 4
cmp edi, esi
jb 0x402ebc
mov eax, 0x40902c
mov esi, 0x409030
cmp eax, esi
mov edi, eax
jae 0x402eea
mov eax, dword [edi]
test eax, eax
je 0x402ee3
call eax
add edi, 4
cmp edi, esi
jb 0x402edb
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x402f04
push dword [ebp + 8]
mov dword [0x40994c], 1
call fcn.00402dab
pop ebp
ret

Function at 0x402f46
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x409240]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x409260]
je 0x402f7b
inc eax
cmp eax, 0x13
jb 0x402f6c
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x409260]
jne 0x4030a1
mov eax, dword [0x4098f8]
cmp eax, 1
je 0x403079
cmp eax, edx
jne 0x402fab
cmp dword [0x409254], 1
je 0x403079
cmp ecx, 0xfc
je 0x4030a1
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402fe1
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00401aa0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004019a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x403015
mov eax, edi
push eax
call fcn.004019a0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40730c
push edi
call fcn.00401d20
add esp, 0x10
push edi
call fcn.004019a0
push dword [esi + 0x409264]
mov ebx, eax
call fcn.004019a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403960
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00401aa0
push edi
push ebx
call fcn.00401ab0
push 0x407308
push ebx
call fcn.00401ab0
push dword [esi + 0x409264]
push ebx
call fcn.00401ab0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040399d
add esp, 0x2c
jmp 0x4030a1
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x409264]
push dword [esi]
call fcn.004019a0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00401a5c
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40399d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x409a64], ebx
push esi
push edi
jne 0x403a1d
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x403a58
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40799c
push edi
call esi
test eax, eax
mov dword [0x409a64], eax
je 0x403a58
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x409a68], eax
call esi
cmp dword [0x40990c], 2
mov dword [0x409a6c], eax
jne 0x403a1d
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x409a74], eax
je 0x403a1d
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x409a70], eax
mov eax, dword [0x409a70]
test eax, eax
je 0x403a62
call eax
test eax, eax
je 0x403a49
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x409a74]
test eax, eax
je 0x403a49
test byte [ebp - 8], 1
jne 0x403a62
cmp dword [0x409918], 4
jb 0x403a5c
or byte [ebp + 0x12], 0x20
jmp 0x403a81
xor eax, eax
jmp 0x403a91
or byte [ebp + 0x12], 4
jmp 0x403a81
mov eax, dword [0x409a68]
test eax, eax
je 0x403a81
call eax
mov ebx, eax
test ebx, ebx
je 0x403a81
mov eax, dword [0x409a6c]
test eax, eax
je 0x403a81
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x409a64]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403b86
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x403bb4
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x403bbb
cmp ebx, dword [eax + 4]
jae 0x403bbb
xor eax, eax
jmp 0x403dab
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x403bcc
xor eax, eax
inc eax
jmp 0x403daa
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x403be2
cmp ecx, edx
jae 0x403d27
cmp dword [eax + 4], 0
je 0x403beb
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x403bd3
cmp dword [ebp + 8], 0
je 0x403c0d
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x403d27
cmp eax, esi
jae 0x403d27
mov eax, dword [0x409a78]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x403c32
cmp dword [esi*4 + 0x409a80], edi
je 0x403d2b
inc esi
cmp esi, eax
jl 0x403c20
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403da7
cmp dword [ebp - 8], 0x1000000
jne 0x403da7
test byte [ebp - 0xc], 0xcc
je 0x403cb0
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x403da7
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x403da7
cmp word [eax + 0x18], 0x10b
jne 0x403da7
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x403da7
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x403cb0
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x403cb0
test byte [ecx + 0x27], 0x80
jne 0x403d27
push 1
push 0x409ac0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x403bc4
mov ecx, dword [0x409a78]
test ecx, ecx
mov edx, ecx
jle 0x403ce4
lea eax, [ecx*4 + 0x409a7c]
cmp dword [eax], edi
je 0x403ce4
dec edx
sub eax, 4
test edx, edx
jg 0x403cd8
test edx, edx
jne 0x403d15
push 0xf
pop ebx
cmp ecx, ebx
jg 0x403cf1
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x403d09
lea eax, [edx*4 + 0x409a80]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x403cf7
cmp ecx, 0x10
jge 0x403d15
inc ecx
mov dword [0x409a78], ecx
push 0
push 0x409ac0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x403bc4
xor eax, eax
jmp 0x403daa
test esi, esi
jle 0x403bc4
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x409ac0
call ebx
test eax, eax
jne 0x403bc4
cmp dword [esi*4 + 0x409a80], edi
je 0x403d81
mov eax, dword [0x409a78]
lea esi, [eax - 1]
test esi, esi
jl 0x403d6f
cmp dword [esi*4 + 0x409a80], edi
je 0x403d6b
dec esi
jns 0x403d5f
test esi, esi
jge 0x403d7f
cmp eax, 0x10
jge 0x403d7a
inc eax
mov dword [0x409a78], eax
lea esi, [eax - 1]
jmp 0x403d81
je 0x403d99
xor ecx, ecx
test esi, esi
jl 0x403d99
lea eax, [ecx*4 + 0x409a80]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x403d87
push 0
push 0x409ac0
call ebx
jmp 0x403bc4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403e3b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40ad6c]
mov eax, dword [0x409240]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x404001
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ad80]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x404001
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x403ea5
xor eax, eax
jmp 0x404015
test al, 0x20
je 0x403eb6
push 2
push edi
push edi
push ecx
call fcn.00405775
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x403f8b
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x403fd2
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x403f18
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x403f09
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x403eeb
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403f58
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x403f64
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x403edf
jmp 0x403f66
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x403ffc
cmp dword [ebp + 0x3a4], edi
je 0x403fd2
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x403fc4
mov dword [0x409904], eax
jmp 0x404008
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403fb6
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x403f66
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x403f66
push dword [ebp + 0x3a4]
call fcn.00405660
pop ecx
jmp 0x404012
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x403fea
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x403e9e
mov dword [0x409900], 0x1c
mov dword [0x409904], edi
jmp 0x404012
sub eax, dword [ebp - 0x7c]
jmp 0x404015
and dword [0x409904], 0
mov dword [0x409900], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00401a5c
add ebp, 0x39c
leave
ret