joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43a990
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x453540]
mov dword [ebp - 8], eax
mov byte [ebp - 0xa], 0
push 6
lea eax, [ebp - 0x10]
push eax
push 0x1004
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x43a9c4
mov dword [ebp - 4], 0xffffffff
jmp 0x43a9d3
lea edx, [ebp - 0x10]
push edx
call fcn.0043cd20
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
call fcn.0042bcf0
mov esp, ebp
pop ebp
ret

Function at 0x43de04
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x43de5a
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x44e305
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x43de4d
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x43de5c
xor eax, eax
pop esi
leave
ret 4
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x478004]
jne 0x40100a
repz ret
jmp fcn.00401374

Function at 0x406a57
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00404663
and dword [ebp - 4], 0
cmp dword [0x47a01c], 0
mov ebx, eax
jne 0x406b08
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x406bb9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x406bb9
push eax
call fcn.004045f1
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x47a01c], eax
call esi
push eax
call fcn.004045f1
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x47a020], eax
call esi
push eax
call fcn.004045f1
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x47a024], eax
call esi
push eax
call fcn.004045f1
pop ecx
mov dword [0x47a02c], eax
test eax, eax
je 0x406b08
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004045f1
pop ecx
mov dword [0x47a028], eax
mov eax, dword [0x47a028]
cmp eax, ebx
je 0x406b60
cmp dword [0x47a02c], ebx
je 0x406b60
push eax
call fcn.0040466c
push dword [0x47a02c]
mov esi, eax
call fcn.0040466c
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x406b60
test edi, edi
je 0x406b60
call esi
test eax, eax
je 0x406b57
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x406b57
test byte [ebp - 0xc], 1
jne 0x406b60
or dword [ebp + 0x10], 0x200000
jmp 0x406b99
mov eax, dword [0x47a020]
cmp eax, ebx
je 0x406b99
push eax
call fcn.0040466c
pop ecx
test eax, eax
je 0x406b99
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x406b99
mov eax, dword [0x47a024]
cmp eax, ebx
je 0x406b99
push eax
call fcn.0040466c
pop ecx
test eax, eax
je 0x406b99
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x47a01c]
call fcn.0040466c
pop ecx
test eax, eax
je 0x406bb9
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x406bbb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4714f0
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1004
call fcn.00409650
mov eax, dword [0x478004]
xor eax, esp
mov dword [esp + 0x1000], eax
mov eax, dword [0x478f20]
push ebx
mov ebx, dword [0x85fb0c]
push edi
mov edi, dword [0x85f954]
push eax
call fcn.004713d0
add esp, 4
cmp dword [0x85fb0c], 0x2f
jne 0x471533
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
call fcn.00471440
cmp dword [0x85fb0c], 0x568
pop edi
pop ebx
jne 0x471567
push 0
push 0
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesW]
push 0
lea edx, [esp + 0x804]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.00401000
add esp, 0x1004
ret
Function at 0x4014e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4014f9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40150d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40152e
cmp esi, eax
jae 0x401507
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401520
cmp esi, eax
jae 0x401507
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x403fd0
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4130eb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x600
mov eax, dword [0x4ea33c]
push ebx
push esi
push edi
mov dword [esp + 0x604], eax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x2d0]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x2d4]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x2d0]
push ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], eax
call fcn.00403f20
lea ecx, [esp + 0xc]
mov dword [esp + 0x614], ebx
call fcn.00403df0
mov ecx, eax
call fcn.00403e40
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea edx, [esp + 0x1a8]
xor eax, eax
push edx
mov ecx, 0x4a
lea edi, [esp + 0x1ac]
rep stosd dword es:[edi], eax
push esi
mov dword [esp + 0x1b0], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
mov dword [esp + 0x10], ebx
je 0x404138
jmp 0x4040a0
mov eax, dword [esp + 0x1b0]
push eax
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edx, eax
xor eax, eax
mov ecx, 0x89
lea edi, [esp + 0x3d8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x3d8]
push ecx
push edx
mov dword [esp + 0x3e0], 0x224
call sub.KERNEL32.dll_Module32First
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x4f8]
push edx
push eax
call fcn.0040b401
add esp, 8
test eax, eax
jne 0x404103
mov eax, dword [esp + 0x1b0]
test eax, eax
je 0x404103
mov dword [esp + ebx*4 + 0x18], eax
inc ebx
xor eax, eax
mov ecx, 0x4a
lea edi, [esp + 0x1a8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1a8]
push ecx
push esi
mov dword [esp + 0x1b0], 0x128
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x4040a0
mov dword [esp + 0x10], ebx
xor edi, edi
test ebx, ebx
jle 0x404174
mov ebx, dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [esp + edi*4 + 0x18]
push esi
push 1
push 0x1f0fff
call ebx
cmp esi, dword [esp + 0x14]
je 0x40416b
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x40416b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
jl 0x404144
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x614], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40419d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x60c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x604]
call fcn.0040b1e3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4041c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
mov eax, dword [0x4ea33c]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [esp + 0xdc], eax
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
cmp dword [section.Shared], ebx
je 0x404231
mov eax, dword [section.Shared]
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
je 0x40420d
mov ecx, dword [section.Shared]
push 9
push ecx
call esi
mov edx, dword [section.Shared]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [section.Shared]
push 5
push eax
call esi
cmp eax, ebx
jne 0x4042d0
call fcn.00403fd0
mov ecx, dword [ebp + 8]
mov dword [0x4eace8], ecx
xor eax, eax
lea edx, [esp + 0x40]
mov ecx, 0x25
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x44], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x50], 1
jne 0x404276
cmp dword [esp + 0x44], 5
jae 0x404276
cmp dword [esp + 0x48], 0x5a
ja 0x404276
mov byte [0x4eacec], 1
lea ecx, [esp + 0x10]
call fcn.004024b0
push ebx
push 0x64
call fcn.00401540
add esp, 8
cmp eax, ebx
je 0x40429a
push 0x64
push eax
lea ecx, [esp + 0x18]
call fcn.004026f0
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 0x20a0000
push ecx
mov ecx, 0x4ead98
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.00405000
test eax, eax
lea ecx, [esp + 0x10]
jne 0x4042e7
call fcn.004015d0
xor eax, eax
mov ecx, dword [esp + 0xdc]
call fcn.0040b1e3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004015d0
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
push ebx
lea edx, [esp + 0x30]
push edx
call esi
test eax, eax
jle 0x40435f
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea esp, [esp]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
mov ecx, 0x4ead98
call fcn.00404490
test eax, eax
jne 0x40434e
lea eax, [esp + 0x24]
push eax
mov ecx, 0x4ead98
call fcn.004038b0
test eax, eax
jne 0x40434e
lea ecx, [esp + 0x24]
push ecx
call edi
lea edx, [esp + 0x24]
push edx
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
call esi
test eax, eax
jg 0x404310
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0xdc]
mov eax, 1
call fcn.0040b1e3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4051c0
Capabilities:
Decrypt data using tea
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov edi, dword [esi]
mov dword [esp + 0x18], edi
mov edi, dword [esi + 4]
mov dword [esp + 0x14], edi
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov dword [esp + 0x10], edi
mov edx, 0xc6ef3720
mov dword [esp + 0x24], esi
mov edi, 0x20
lea esp, [esp]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x10]
mov esi, ecx
shr esi, 5
add esi, ebx
mov ebx, ecx
shl ebx, 4
add ebx, ebp
mov ebp, dword [esp + 0x18]
xor esi, ebx
lea ebx, [edx + ecx]
xor esi, ebx
mov ebx, dword [esp + 0x14]
sub eax, esi
mov esi, eax
shr esi, 5
add esi, ebx
mov ebx, eax
shl ebx, 4
add ebx, ebp
xor esi, ebx
lea ebx, [edx + eax]
xor esi, ebx
sub ecx, esi
add edx, 0x61c88647
dec edi
jne 0x405200
mov edx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [edx], ecx
mov dword [edx + 4], eax
pop ebx
add esp, 0xc
ret

Function at 0x405f50
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x28
mov eax, dword [0x4ea33c]
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, dword [esp + 0x48]
cmp edi, ebx
mov dword [esp + 0x34], eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov dword [esi], 0x67452301
mov dword [esi + 4], 0xefcdab89
mov dword [esi + 8], 0x98badcfe
mov dword [esi + 0xc], 0x10325476
jle 0x405fa4
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x3c]
push ebp
push ebx
push esi
mov ecx, esi
call fcn.00405df0
dec edi
jne 0x405f95
xor ebx, ebx
mov ebp, dword [esp + 0x44]
push esi
push ebp
mov ecx, esi
call fcn.00405ec0
xor eax, eax
mov word [esp + 0x49], ax
mov byte [esp + 0x48], 0
mov byte [esp + 0x4b], al
lea edi, [esp + 0x10]
mov dword [esp + 0x10], ebx
xor esi, esi
jmp 0x405fd0
movzx ecx, byte [esi + ebp]
push ecx
push str._02x
lea edx, [esp + 0x50]
push 4
push edx
call fcn.0040bf25
push 2
lea eax, [esp + 0x5c]
push eax
push edi
call fcn.0040bdf0
add esp, 0x1c
add edi, 2
inc esi
cmp esi, 0x10
jl 0x405fd0
mov byte [edi - 1], 0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [ebp], ecx
mov ecx, dword [esp + 0x1c]
pop edi
mov dword [ebp + 4], edx
mov dword [ebp + 8], eax
pop esi
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x2c]
pop ebp
pop ebx
call fcn.0040b1e3
add esp, 0x28
ret 0x10
Function at 0x4070d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x413228
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push esi
push edi
mov edi, ecx
push eax
mov dword [esp + 0xc], edi
call fcn.00403f20
mov ecx, dword [esp + 0x20]
mov dword [edi + 4], ecx
push 0x40100000
push 0x3e800000
push 0x3f400000
push 1
lea esi, [edi + 0xc]
push 0x11
mov ecx, esi
mov dword [esp + 0x28], 0
call fcn.00403c50
mov ecx, dword [esp + 0xc]
mov eax, edi
mov dword [esi + 0x24], 0xa
mov dword [esi + 0x28], 0x4c
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x407160
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x12c
mov eax, dword [0x4ea33c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x13c]
test edi, edi
mov dword [esp + 0x134], eax
mov ebp, ecx
jne 0x407184
mov edi, ebp
mov esi, dword [esp + 0x140]
test esi, esi
je 0x4072fe
push ebx
mov ebx, dword [esp + 0x148]
jmp 0x4071a0
mov edx, dword [ebp + 0x34]
push 0
lea ecx, [esp + 0x20]
lea eax, [esi + ebx]
push ecx
push eax
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4071cb
call fcn.00405b20
mov edx, dword [ebp + 0x34]
push 0
lea eax, [esp + 0x14]
push eax
push 0x10
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4071f4
call fcn.00405b20
mov eax, dword [esp + 0x24]
sub eax, esi
cmp eax, 0x103
jbe 0x407206
mov eax, 0x103
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
mov eax, dword [ebp + 0x34]
lea edx, [esp + 0x40]
push edx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40722e
call fcn.00405b20
movsx edx, byte [esp + 0x34]
mov ecx, dword [esp + 0x14c]
cmp edx, ecx
lea eax, [esp + 0x34]
je 0x40724d
sub byte [eax], cl
movsx edx, byte [eax + 1]
inc eax
cmp edx, ecx
jne 0x407242
mov byte [eax], 0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, edi
call fcn.00406530
test eax, eax
jne 0x4072c1
lea ecx, [edi + 0x24]
call fcn.00405cf0
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
call fcn.004070d0
mov eax, dword [edi]
cmp eax, dword [edi + 0x18]
jbe 0x4072a3
mov ecx, dword [edi + 0x20]
test ecx, ecx
jne 0x4072a3
push eax
mov ecx, edi
call fcn.00405ca0
push eax
mov ecx, edi
call fcn.004079f0
mov eax, dword [esi + 4]
xor edx, edx
div dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [eax + edx*4]
mov dword [esi + 8], ecx
mov eax, dword [edi + 4]
mov dword [eax + edx*4], esi
inc dword [edi]
add esi, 0xc
jmp 0x4072c4
lea esi, [eax + 0xc]
push ebx
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.00406c50
test byte [esi + 0x34], 1
je 0x4072f1
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4072f1
mov edx, dword [esp + 0x14c]
push edx
push ebx
push eax
push esi
mov ecx, ebp
call fcn.00407160
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x4071a0
pop ebx
mov ecx, dword [esp + 0x134]
pop edi
pop esi
pop ebp
call fcn.0040b1e3
add esp, 0x12c
ret 0x10
Function at 0x40b7ed
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4eaf28], esi
push edi
jne 0x40b80d
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 [0x4eaf24], esi
mov byte [0x4eaf20], al
jne 0x40b873
mov ecx, dword [0x4ec4f0]
test ecx, ecx
je 0x40b854
mov eax, dword [0x4ec4ec]
sub eax, 4
cmp eax, ecx
jmp 0x40b84d
mov eax, dword [eax]
test eax, eax
je 0x40b83f
call eax
mov eax, dword [0x4ec4ec]
sub eax, 4
cmp eax, dword [0x4ec4f0]
mov dword [0x4ec4ec], eax
jae 0x40b837
mov eax, 0x4ea03c
mov esi, 0x4ea044
cmp eax, esi
mov edi, eax
jae 0x40b873
mov eax, dword [edi]
test eax, eax
je 0x40b86c
call eax
add edi, 4
cmp edi, esi
jb 0x40b864
mov eax, 0x4ea048
mov esi, 0x4ea050
cmp eax, esi
mov edi, eax
jae 0x40b892
mov eax, dword [edi]
test eax, eax
je 0x40b88b
call eax
add edi, 4
cmp edi, esi
jb 0x40b883
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40b8ac
push dword [ebp + 8]
mov dword [0x4eaf28], 1
call fcn.0040b753
pop ebp
ret

Function at 0x40ba1e
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040bb10
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40bab9
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4eaee8]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40bab9
cmp eax, 1
je 0x40bada
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40bab9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40ba86
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40bab5
xor eax, eax
inc eax
jmp 0x40baf9
cmp edi, eax
jae 0x40babd
xor eax, eax
jmp 0x40baf9
cmp eax, esi
jae 0x40bac4
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4eaee8]
jmp 0x40badd
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c004
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4e7380
call fcn.0040c240
mov edi, 0x94
mov eax, edi
call fcn.0040bb10
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 [0x4eaee8], ecx
mov eax, dword [esi + 4]
mov dword [0x4eaef4], eax
mov edx, dword [esi + 8]
mov dword [0x4eaef8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4eaeec], esi
cmp ecx, 2
je 0x40c064
or esi, 0x8000
mov dword [0x4eaeec], esi
shl eax, 8
add eax, edx
mov dword [0x4eaef0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40c09f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40c09f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40c0b7
cmp eax, 0x20b
je 0x40c0a4
mov dword [ebp - 0x1c], esi
jmp 0x40c0cb
cmp dword [ecx + 0x84], 0xe
jbe 0x40c09f
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40c0c5
cmp dword [ecx + 0x74], 0xe
jbe 0x40c09f
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040ce16
pop ecx
test eax, eax
jne 0x40c0f7
cmp dword [0x4eaf34], 1
jne 0x40c0e4
call fcn.0040f968
push 0x1c
call fcn.0040f7f1
push 0xff
call fcn.0040b753
pop ecx
pop ecx
call fcn.0040e98b
mov dword [ebp - 4], esi
call fcn.0040ff66
test eax, eax
jge 0x40c110
push 0x1b
call fcn.0040bfdf
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4ec4e4], eax
call fcn.0040fe44
mov dword [0x4eaf2c], eax
call fcn.0040fda2
test eax, eax
jge 0x40c136
push 8
call fcn.0040bfdf
pop ecx
call fcn.0040fb6f
test eax, eax
jge 0x40c147
push 9
call fcn.0040bfdf
pop ecx
push 1
call fcn.0040b783
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40c15d
push eax
call fcn.0040bfdf
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040fb12
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40c17e
movzx eax, word [ebp - 0x40]
jmp 0x40c181
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004041c0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40c19f
push edi
call fcn.0040b8ae
call fcn.0040b8d0
jmp 0x40c1d1
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040c27b
ret
Function at 0x40e06d
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 0x40e09b
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 0x40e0a2
cmp ebx, dword [eax + 4]
jae 0x40e0a2
xor eax, eax
jmp 0x40e292
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40e0b3
xor eax, eax
inc eax
jmp 0x40e291
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40e0c9
cmp ecx, edx
jae 0x40e20e
cmp dword [eax + 4], 0
je 0x40e0d2
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40e0ba
cmp dword [ebp + 8], 0
je 0x40e0f4
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40e20e
cmp eax, esi
jae 0x40e20e
mov eax, dword [0x4eaf58]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40e119
cmp dword [esi*4 + 0x4eaf60], edi
je 0x40e212
inc esi
cmp esi, eax
jl 0x40e107
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e28e
cmp dword [ebp - 8], 0x1000000
jne 0x40e28e
test byte [ebp - 0xc], 0xcc
je 0x40e197
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40e28e
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40e28e
cmp word [eax + 0x18], 0x10b
jne 0x40e28e
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40e28e
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40e197
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40e197
test byte [ecx + 0x27], 0x80
jne 0x40e20e
push 1
push 0x4eafa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40e0ab
mov ecx, dword [0x4eaf58]
test ecx, ecx
mov edx, ecx
jle 0x40e1cb
lea eax, [ecx*4 + 0x4eaf5c]
cmp dword [eax], edi
je 0x40e1cb
dec edx
sub eax, 4
test edx, edx
jg 0x40e1bf
test edx, edx
jne 0x40e1fc
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40e1d8
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40e1f0
lea eax, [edx*4 + 0x4eaf60]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40e1de
cmp ecx, 0x10
jge 0x40e1fc
inc ecx
mov dword [0x4eaf58], ecx
push 0
push 0x4eafa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40e0ab
xor eax, eax
jmp 0x40e291
test esi, esi
jle 0x40e0ab
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4eafa0
call ebx
test eax, eax
jne 0x40e0ab
cmp dword [esi*4 + 0x4eaf60], edi
je 0x40e268
mov eax, dword [0x4eaf58]
lea esi, [eax - 1]
test esi, esi
jl 0x40e256
cmp dword [esi*4 + 0x4eaf60], edi
je 0x40e252
dec esi
jns 0x40e246
test esi, esi
jge 0x40e266
cmp eax, 0x10
jge 0x40e261
inc eax
mov dword [0x4eaf58], eax
lea esi, [eax - 1]
jmp 0x40e268
je 0x40e280
xor ecx, ecx
test esi, esi
jl 0x40e280
lea eax, [ecx*4 + 0x4eaf60]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40e26e
push 0
push 0x4eafa0
call ebx
jmp 0x40e0ab
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret