joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402150
Capabilities:
Get common file path

Disassembly:
sub esp, 0x404
mov eax, dword [0x412100]
mov dword [esp + 0x400], eax
lea eax, [esp]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x400
ja 0x4021ad
test eax, eax
je 0x4021ad
mov edx, dword [esp + 0x408]
lea eax, [esp]
mov ecx, eax
sub edx, ecx
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402190
mov ecx, dword [esp + 0x400]
call fcn.00404b17
add esp, 0x404
ret
mov edx, dword [str.c:_temp]
mov eax, dword [esp + 0x408]
mov dword [eax], edx
mov ecx, dword [0x40f308]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x400]
call fcn.00404b17
add esp, 0x404
ret

Function at 0x4021e0
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 8]
push 0
push 0
push eax
push ecx
push 0
push 0
mov dword [esi], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov dword [esi], eax
pop esi
mov eax, edx
ret

Function at 0x402360
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f330
push 0x405bec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x1c]
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4023ed
push 1
push str.SeDebugPrivilege
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004022b0
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push edi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, edi
je 0x4023ed
push 1
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x4023ed
mov dword [ebp - 0x24], 1
mov dword [ebp - 4], 0xffffffff
call fcn.00402412
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402810
Capabilities:
Acquire debug privileges
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x402819
ret
lea ecx, [esp + 4]
push ecx
push eax
mov dword [esp + 0xc], 0
call fcn.004025d0
add esp, 8
test eax, eax
jne 0x402839
mov eax, 1
ret
mov edx, dword [esp + 4]
mov dword [esp + 4], edx
jmp fcn.00402360

Function at 0x4029bb
Capabilities:
Enumerate process modules

Disassembly:
sub esp, 0x110
mov eax, dword [0x412100]
push esi
mov esi, ecx
mov dword [esp + 0x110], eax
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x402a46
test eax, eax
je 0x402a46
lea ecx, [esp + 8]
push ecx
push 4
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x18], 0
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x402a46
mov ecx, dword [esp + 4]
mov edx, dword [esi]
push 0x104
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call sub.PSAPI.DLL_GetModuleFileNameExA
lea eax, [esp + 0xc]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a10
mov ecx, dword [esp + 0x118]
sub eax, edx
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00401750
mov eax, 1
pop esi
mov ecx, dword [esp + 0x10c]
call fcn.00404b17
add esp, 0x110
ret 4
mov ecx, dword [esp + 0x110]
xor eax, eax
pop esi
call fcn.00404b17
add esp, 0x110
ret 4

Function at 0x402a60
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x808
mov eax, dword [0x412100]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push edi
push 0
push str._pmc
mov dword [esp + 0x814], eax
call esi
push eax
call fcn.004012a0
add esp, 0xc
test al, al
je 0x402b2f
xor eax, eax
mov byte [esp + 0x408], 0
mov ecx, 0xff
lea edi, [esp + 0x409]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 8], 0
mov ecx, 0xff
lea edi, [esp + 9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3ff
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call esi
push str._pmc
push eax
call fcn.00404c00
add eax, 4
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x418]
push str.__s__s
push edx
call fcn.0040514d
push 0x20
lea eax, [esp + 0x424]
push 0
push eax
call fcn.00402060
add esp, 0x24
mov eax, 1
mov ecx, dword [esp + 0x80c]
call fcn.00404b17
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x80c]
xor eax, eax
call fcn.00404b17
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403560
Capabilities:
Persist via run registry key

Disassembly:
push 0xffffffffffffffff
push 0x40e83b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x408
mov eax, dword [0x412100]
lea ecx, [esp]
mov dword [esp + 0x404], eax
call fcn.004022a0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
lea ecx, [esp + 8]
mov dword [esp + 0x418], 0
call fcn.004032a0
test eax, eax
je 0x4035d1
lea eax, [esp + 4]
push eax
call fcn.00401cd0
add esp, 4
lea ecx, [esp + 4]
push ecx
push str.RzxMon
lea ecx, [esp + 8]
call fcn.00403230
lea ecx, [esp]
mov dword [esp + 0x410], 0xffffffff
call fcn.00403280
mov ecx, dword [esp + 0x408]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x404]
call fcn.00404b17
add esp, 0x414
ret

Function at 0x403610
Capabilities:
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push 0xf003f
push 0
push 0
mov esi, 3
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x403644
push str.OpenSCManager_error_r_n
call fcn.00405f46
add esp, 4
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
push edi
push 0xf01ff
push str.rzxnm
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x40366f
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4036b5
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x40368f
mov esi, 2
jmp 0x4036b5
cmp eax, 1
je 0x4036a0
cmp eax, 7
je 0x4036a0
mov esi, 3
jmp 0x4036b5
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov esi, ecx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push ebx
call edi
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x40629a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40fbe0
call fcn.00407958
mov edi, 0x94
mov eax, edi
call fcn.00404b30
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 [0x412d4c], ecx
mov eax, dword [esi + 4]
mov dword [0x412d58], eax
mov edx, dword [esi + 8]
mov dword [0x412d5c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x412d50], esi
cmp ecx, 2
je 0x4062fa
or esi, 0x8000
mov dword [0x412d50], esi
shl eax, 8
add eax, edx
mov dword [0x412d54], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x406335
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406335
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40634d
cmp eax, 0x20b
je 0x40633a
mov dword [ebp - 0x1c], esi
jmp 0x406361
cmp dword [ecx + 0x84], 0xe
jbe 0x406335
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40635b
cmp dword [ecx + 0x74], 0xe
jbe 0x406335
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040aec2
pop ecx
test eax, eax
jne 0x406375
push 0x1c
call fcn.00406276
pop ecx
call fcn.004073c7
test eax, eax
jne 0x406386
push 0x10
call fcn.00406276
pop ecx
call fcn.0040c7d8
mov dword [ebp - 4], esi
call fcn.00409c3f
test eax, eax
jge 0x40639f
push 0x1b
call fcn.00406251
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4145b4], eax
call fcn.0040c6b6
mov dword [0x412d28], eax
call fcn.0040c614
test eax, eax
jge 0x4063c5
push 8
call fcn.00406251
pop ecx
call fcn.0040c3e1
test eax, eax
jge 0x4063d6
push 9
call fcn.00406251
pop ecx
push 1
call fcn.00407773
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4063ec
push eax
call fcn.00406251
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040c384
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40640d
movzx eax, word [ebp - 0x40]
jmp 0x406410
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401a90
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40642e
push edi
call fcn.004078a0
call fcn.004078c2
jmp 0x406460
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00407993
ret
Function at 0x4077dd
Capabilities:
Terminate process

Disassembly:
push 8
push 0x40fcf0
call fcn.00407958
push 8
call fcn.0040a3f8
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x412d8c], esi
jne 0x407811
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x412d88], esi
mov al, byte [ebp + 0x10]
mov byte [0x412d84], al
cmp dword [ebp + 0xc], edi
jne 0x40785b
cmp dword [0x4145a8], edi
je 0x40784b
mov eax, dword [0x4145a4]
sub eax, 4
mov dword [0x4145a4], eax
cmp eax, dword [0x4145a8]
jb 0x40784b
mov eax, dword [eax]
cmp eax, edi
je 0x40782c
call eax
jmp 0x40782c
push 0x412034
mov eax, 0x41202c
call fcn.0040775b
pop ecx
push 0x412040
mov eax, 0x412038
call fcn.0040775b
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40788c
cmp dword [ebp + 0x10], edi
jne 0x40789a
mov dword [0x412d8c], esi
push dword [ebp + 8]
call fcn.00407719
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x407899
push 8
call fcn.0040a343
pop ecx
ret
call fcn.00407993
ret

Function at 0x40952f
Capabilities:
Get common file path

Disassembly:
push 0x120
push 0x40ffd8
call fcn.00407958
mov eax, dword [0x412100]
mov dword [ebp - 0x1c], eax
lea edi, [ebp - 0x124]
and dword [ebp - 0x128], 0
mov eax, edi
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x104
jle 0x4095d3
and dword [ebp - 4], 0
lea eax, [esi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.00404b30
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x130], edi
jmp 0x4095c0
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x4095d3
push edi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x4095ee
cmp byte [edi + 1], 0x3a
jne 0x4095ee
movzx eax, byte [edi]
push eax
call fcn.0040d59b
pop ecx
mov ebx, eax
sub ebx, 0x40
cmp dword [ebp - 0x128], 0
je 0x4095fe
push edi
call fcn.00405fe9
pop ecx
mov eax, ebx
lea esp, [ebp - 0x13c]
mov ecx, dword [ebp - 0x1c]
call fcn.00404b17
call fcn.00407993
ret
Function at 0x40973c
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x412100]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40976d
xor eax, eax
jmp 0x4098f6
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x413240]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4097a9
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040d5bd
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x409884
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x4098c2
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40980d
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4097fe
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x4097de
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40984d
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x409856
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x4097cf
jmp 0x409858
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x4098f1
cmp dword [ebp - 0x6c], edi
je 0x4098c2
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x4098b7
call fcn.004092f2
mov dword [eax], 9
call fcn.004092fb
mov dword [eax], esi
jmp 0x4098ec
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4098ac
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x409858
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x409858
push dword [ebp - 0x6c]
call fcn.00409304
pop ecx
jmp 0x4098ec
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4098da
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x4098da
xor eax, eax
jmp 0x4098f4
call fcn.004092f2
mov dword [eax], 0x1c
call fcn.004092fb
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4098f4
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00404b17
add ebp, 0x3a0
leave
ret
Function at 0x409e3d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40a011
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x413240]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40a011
test cl, 0x48
je 0x409ea8
cmp byte [eax + 5], 0xa
je 0x409ea8
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409efa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x409ee2
call fcn.004092f2
mov dword [eax], 9
call fcn.004092fb
mov dword [eax], esi
jmp 0x409ef2
cmp eax, 0x6d
je 0x40a011
push eax
call fcn.00409304
pop ecx
or eax, 0xffffffff
jmp 0x40a013
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40a00c
test eax, eax
je 0x409f21
cmp byte [ebx], 0xa
jne 0x409f21
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x409f2a
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40a006
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x409ff6
cmp al, 0xd
je 0x409f5c
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x409fe8
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x409f76
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x409f71
add dword [ebp + 0x10], 2
jmp 0x409fca
mov dword [ebp + 0x10], eax
jmp 0x409fe4
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409f9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x409fe4
cmp dword [ebp - 0xc], 0
je 0x409fe4
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x409fbf
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x409fca
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x409fe7
cmp ebx, dword [ebp + 0xc]
jne 0x409fcf
cmp byte [ebp - 1], 0xa
jne 0x409fcf
mov byte [ebx], 0xa
jmp 0x409fe7
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a0ca
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x409fe8
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x409f40
jmp 0x40a006
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40a006
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40a013
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ab09
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 0x40ab37
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 0x40ab3e
cmp ebx, dword [eax + 4]
jae 0x40ab3e
xor eax, eax
jmp 0x40ad2e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40ab4f
xor eax, eax
inc eax
jmp 0x40ad2d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40ab65
cmp ecx, edx
jae 0x40acaa
cmp dword [eax + 4], 0
je 0x40ab6e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40ab56
cmp dword [ebp + 8], 0
je 0x40ab90
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40acaa
cmp eax, esi
jae 0x40acaa
mov eax, dword [0x412fe0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40abb5
cmp dword [esi*4 + 0x412fe8], edi
je 0x40acae
inc esi
cmp esi, eax
jl 0x40aba3
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ad2a
cmp dword [ebp - 8], 0x1000000
jne 0x40ad2a
test byte [ebp - 0xc], 0xcc
je 0x40ac33
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40ad2a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40ad2a
cmp word [eax + 0x18], 0x10b
jne 0x40ad2a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40ad2a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40ac33
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40ac33
test byte [ecx + 0x27], 0x80
jne 0x40acaa
push 1
push 0x413028
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40ab47
mov ecx, dword [0x412fe0]
test ecx, ecx
mov edx, ecx
jle 0x40ac67
lea eax, [ecx*4 + 0x412fe4]
cmp dword [eax], edi
je 0x40ac67
dec edx
sub eax, 4
test edx, edx
jg 0x40ac5b
test edx, edx
jne 0x40ac98
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40ac74
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40ac8c
lea eax, [edx*4 + 0x412fe8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40ac7a
cmp ecx, 0x10
jge 0x40ac98
inc ecx
mov dword [0x412fe0], ecx
push 0
push 0x413028
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40ab47
xor eax, eax
jmp 0x40ad2d
test esi, esi
jle 0x40ab47
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x413028
call ebx
test eax, eax
jne 0x40ab47
cmp dword [esi*4 + 0x412fe8], edi
je 0x40ad04
mov eax, dword [0x412fe0]
lea esi, [eax - 1]
test esi, esi
jl 0x40acf2
cmp dword [esi*4 + 0x412fe8], edi
je 0x40acee
dec esi
jns 0x40ace2
test esi, esi
jge 0x40ad02
cmp eax, 0x10
jge 0x40acfd
inc eax
mov dword [0x412fe0], eax
lea esi, [eax - 1]
jmp 0x40ad04
je 0x40ad1c
xor ecx, ecx
test esi, esi
jl 0x40ad1c
lea eax, [ecx*4 + 0x412fe8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40ad0a
push 0
push 0x413028
call ebx
jmp 0x40ab47
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c070
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x412100]
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 + 0x412b60]
je 0x40c0a5
inc eax
cmp eax, 0x13
jb 0x40c096
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x412b60]
jne 0x40c1cb
mov eax, dword [0x412d30]
cmp eax, 1
je 0x40c1a3
cmp eax, edx
jne 0x40c0d5
cmp dword [0x4122d8], 1
je 0x40c1a3
cmp ecx, 0xfc
je 0x40c1cb
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 0x40c10b
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040adb0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00406550
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40c13f
mov eax, edi
push eax
call fcn.00406550
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40fd44
push edi
call fcn.00405ac0
add esp, 0x10
push edi
call fcn.00406550
push dword [esi + 0x412b64]
mov ebx, eax
call fcn.00406550
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404b30
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040adb0
push edi
push ebx
call fcn.0040adc0
push 0x40fd40
push ebx
call fcn.0040adc0
push dword [esi + 0x412b64]
push ebx
call fcn.0040adc0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040c983
add esp, 0x2c
jmp 0x40c1cb
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x412b64]
push dword [esi]
call fcn.00406550
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.00404b17
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret