joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402600
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x41b2c0]
mov dword [ebp - 4], eax
mov dword [ebp - 0x414], 0x400
cmp dword [ebp + 0x10], 0
je 0x402708
push 0
lea eax, [ebp - 0x418]
push eax
push 2
push 0x415f6c
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x400
push 0
push 0x41bc40
call fcn.00407c90
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
push str.Contents_of__s:
push 0x41bc40
call fcn.00407ff2
add esp, 0xc
push 0
lea eax, [ebp - 0x418]
push eax
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x41bc40
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x418]
push edx
push 2
push 0x415f80
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x2d
push 0x41bc40
call fcn.00407900
add esp, 0xc
push 0
lea ecx, [ebp - 0x418]
push ecx
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x41bc40
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x418]
push eax
push 2
push 0x415f84
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0x8100020
push 3
push 0
push 2
push SQLAllocStmt
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0xffffffff
jne 0x4027c5
mov eax, dword [ebp + 0xc]
push eax
push 0x415f88
push 0x41b080
call fcn.00407930
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x41c], 0
je 0x402771
mov ecx, dword [ebp - 0x41c]
push ecx
call fcn.00405c70
add esp, 4
push 0x415fa8
push 0x41bc40
call fcn.00407700
add esp, 8
push 0
lea edx, [ebp - 0x418]
push edx
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x41bc40
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x418]
push ecx
push 2
push 0x415fbc
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x402826
push 0
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x414]
push ecx
lea edx, [ebp - 0x408]
push edx
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402819
cmp dword [ebp - 0x410], 0
je 0x402819
push 0
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp - 0x410]
push edx
lea eax, [ebp - 0x408]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4027c5
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 4]
call fcn.00407d96
mov esp, ebp
pop ebp
ret
Function at 0x402840
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.00407db0
mov eax, dword [0x41b2c0]
mov dword [ebp - 4], eax
mov dword [ebp - 0x1014], 0x400
push 0
push 0x8100020
push 3
push 0
push 2
push SQLAllocStmt
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1018], eax
cmp dword [ebp - 0x1018], 0xffffffff
jne 0x402921
mov ecx, dword [ebp + 0xc]
push ecx
push str._Unable_to_open_file__s__n
push 0x41b080
call fcn.00407930
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1024], eax
cmp dword [ebp - 0x1024], 0
je 0x4028ca
mov edx, dword [ebp - 0x1024]
push edx
call fcn.00405c70
add esp, 4
push str.Unable_to_open_file
push 0x41bc40
call fcn.00407700
add esp, 8
push 0
lea eax, [ebp - 0x101c]
push eax
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x41bc40
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x101c]
push edx
push 2
push 0x415ff4
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x402a81
mov dword [ebp - 0x1014], 2
push 0
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp - 0x1014]
push edx
lea eax, [ebp - 0x808]
push eax
mov ecx, dword [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx edx, word [ebp - 0x808]
cmp edx, 0xfeff
je 0x402970
movzx eax, word [ebp - 0x808]
and eax, 0xff
jne 0x402a03
mov dword [ebp - 0x1014], 0x800
push 0
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp - 0x1014]
push edx
lea eax, [ebp - 0x808]
push eax
mov ecx, dword [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402a01
cmp dword [ebp - 0x80c], 0
je 0x402a01
push 0
push 0
push 0x800
lea edx, [ebp - 0x1010]
push edx
mov eax, dword [ebp - 0x80c]
shr eax, 1
push eax
lea ecx, [ebp - 0x808]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1020], eax
push 0
lea edx, [ebp - 0x101c]
push edx
mov eax, dword [ebp - 0x1020]
push eax
lea ecx, [ebp - 0x1010]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40297a
jmp 0x402a74
push 0
push 0
push 0
mov eax, dword [ebp - 0x1018]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x1014], 0x800
push 0
lea ecx, [ebp - 0x80c]
push ecx
mov edx, dword [ebp - 0x1014]
push edx
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402a74
cmp dword [ebp - 0x80c], 0
je 0x402a74
push 0
lea edx, [ebp - 0x101c]
push edx
mov eax, dword [ebp - 0x80c]
push eax
lea ecx, [ebp - 0x1010]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x402a20
mov eax, dword [ebp - 0x1018]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 4]
call fcn.00407d96
mov esp, ebp
pop ebp
ret
Function at 0x403360
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416728
push 0x407eec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffbdc
mov eax, dword [0x41b2c0]
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x424], 1
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 0x428]
push eax
push 2
push 0x4160b4
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x428]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call fcn.00407800
add esp, 4
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x428]
push eax
push 2
push 0x4160b8
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 0x14]
push edx
call sub.ODBC32.dll_SQLCancel
mov eax, dword [ebp + 0x18]
push eax
push str._call__s
lea ecx, [ebp - 0x420]
push ecx
call fcn.00407ff2
add esp, 0xc
mov dword [ebp - 0x434], 0
lea edx, [ebp - 0x434]
push edx
push 8
lea eax, [ebp - 0x42c]
push eax
push 0
push 0xa
push 4
push 0xffffffffffffffee
push 4
push 1
mov ecx, dword [ebp + 0x14]
push ecx
call sub.ODBC32.dll_SQLBindParameter
movsx edx, ax
mov dword [ebp - 0x430], edx
cmp dword [ebp - 0x430], 0
je 0x40348b
cmp dword [ebp - 0x430], 1
je 0x40348b
mov eax, dword [ebp - 0x430]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
push 0xfffffffffffffffd
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp + 0x14]
push eax
call sub.ODBC32.dll_SQLExecDirect
movsx ecx, ax
mov dword [ebp - 0x430], ecx
cmp dword [ebp - 0x430], 0
je 0x4034dc
cmp dword [ebp - 0x430], 1
je 0x4034dc
mov edx, dword [ebp - 0x430]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00402e70
add esp, 8
mov dword [ebp - 4], 0xffffffff
jmp 0x40350f
cmp dword [ebp - 0x424], 0
jne 0x40356a
push 0
lea eax, [ebp - 0x428]
push eax
push 0x4160c8
call fcn.00407800
add esp, 4
push eax
push 0x4160e0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x428]
push edx
push 2
push 0x4160f8
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x4160fc
push 0x41b080
call fcn.00407930
add esp, 8
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
call fcn.00407d96
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403590
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416738
push 0x407eec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 0x20]
push eax
push 2
push 0x416120
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp + 0x1c], 0
je 0x40361b
push 0
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call fcn.00407800
add esp, 4
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x20]
push eax
push 2
push 0x416124
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 0x14]
push edx
call sub.ODBC32.dll_SQLCancel
push 0xfffffffffffffffd
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call sub.ODBC32.dll_SQLExecDirect
movsx edx, ax
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
je 0x403666
cmp dword [ebp - 0x24], 1
je 0x403666
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
cmp dword [ebp + 0x1c], 0
je 0x40367c
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00402e70
add esp, 8
mov dword [ebp - 4], 0xffffffff
jmp 0x40369c
cmp dword [ebp - 0x1c], 0
jne 0x4036f4
cmp dword [ebp + 0x1c], 0
je 0x4036e2
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0x416128
call fcn.00407800
add esp, 4
push eax
push 0x416140
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x20]
push eax
push 2
push 0x416158
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x41615c
push 0x41b080
call fcn.00407930
add esp, 8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4062e0
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416b80
push 0x407eec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff90
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0
push 0x10
push 0
lea eax, [ebp - 0x7c]
push eax
call fcn.00407c90
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x68]
push ecx
call fcn.00407c90
add esp, 0xc
mov dword [ebp - 0x68], 0x44
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp + 0xc]
push edx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x68]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4063a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
je 0x406393
mov eax, dword [ebp - 0x80]
push eax
call fcn.00405c70
add esp, 4
push 0
push 0
push 0
push 0xe0000101
call dword [sym.imp.KERNEL32.dll_RaiseException]
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x6c]
push edx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_SetStdHandle]
mov dword [ebp - 4], 0xffffffff
jmp 0x4063dc
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408c76
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x416c70
call fcn.0040a76c
mov edi, 0x94
mov eax, edi
call fcn.00407db0
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 [0x41c090], ecx
mov eax, dword [esi + 4]
mov dword [0x41c09c], eax
mov edx, dword [esi + 8]
mov dword [0x41c0a0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41c094], esi
cmp ecx, 2
je 0x408cd6
or esi, 0x8000
mov dword [0x41c094], esi
shl eax, 8
add eax, edx
mov dword [0x41c098], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x408d0f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408d0f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x408d27
cmp eax, 0x20b
je 0x408d14
mov dword [ebp - 0x1c], edi
jmp 0x408d3b
cmp dword [ecx + 0x84], 0xe
jbe 0x408d0f
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x408d35
cmp dword [ecx + 0x74], 0xe
jbe 0x408d0f
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040b659
pop ecx
test eax, eax
jne 0x408d4f
push 0x1c
call fcn.00408bf2
pop ecx
call fcn.00409d34
test eax, eax
jne 0x408d60
push 0x10
call fcn.00408bf2
pop ecx
call fcn.0040ddd8
mov dword [ebp - 4], edi
call fcn.0040a7bd
test eax, eax
jge 0x408d79
push 0x1b
call fcn.00408bc8
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41c8a8], eax
call fcn.0040dcb1
mov dword [0x41c05c], eax
call fcn.0040dc0a
test eax, eax
jge 0x408d9f
push 8
call fcn.00408bc8
pop ecx
call fcn.0040d9cd
test eax, eax
jge 0x408db0
push 9
call fcn.00408bc8
pop ecx
push 1
call fcn.0040ab42
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x408dc6
push eax
call fcn.00408bc8
pop ecx
mov eax, dword [0x41c0b0]
mov dword [0x41c0b4], eax
push eax
push dword [0x41c0a8]
push dword [0x41c0a4]
call fcn.00401180
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x408df5
push esi
call fcn.0040ac79
call fcn.0040aca5
jmp 0x408e27
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0040a7a7
ret
Function at 0x40abb1
Capabilities:
Terminate process

Disassembly:
push 8
push 0x416f70
call fcn.0040a76c
push 8
call fcn.0040b023
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41c0d0], esi
jne 0x40abe5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41c0cc], esi
mov al, byte [ebp + 0x10]
mov byte [0x41c0c8], al
cmp dword [ebp + 0xc], edi
jne 0x40ac2f
cmp dword [0x41c784], edi
je 0x40ac1f
mov eax, dword [0x41c780]
sub eax, 4
mov dword [0x41c780], eax
cmp eax, dword [0x41c784]
jb 0x40ac1f
mov eax, dword [eax]
cmp eax, edi
je 0x40ac00
call eax
jmp 0x40ac00
push 0x41b028
mov eax, 0x41b020
call fcn.0040ab02
pop ecx
push 0x41b030
mov eax, 0x41b02c
call fcn.0040ab02
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40ac60
cmp dword [ebp + 0x10], edi
jne 0x40ac6e
mov dword [0x41c0d0], esi
push dword [ebp + 8]
call fcn.0040aab1
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40ac6d
push 8
call fcn.0040af47
pop ecx
ret
call fcn.0040a7a7
ret
Function at 0x40b24d
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 0x40b27b
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 0x40b282
cmp ebx, dword [eax + 4]
jae 0x40b282
xor eax, eax
jmp 0x40b472
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40b293
xor eax, eax
inc eax
jmp 0x40b471
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40b2a9
cmp ecx, edx
jae 0x40b3ee
cmp dword [eax + 4], 0
je 0x40b2b2
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40b29a
cmp dword [ebp + 8], 0
je 0x40b2d4
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40b3ee
cmp eax, esi
jae 0x40b3ee
mov eax, dword [0x41c230]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40b2f9
cmp dword [esi*4 + 0x41c238], edi
je 0x40b3f2
inc esi
cmp esi, eax
jl 0x40b2e7
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b46e
cmp dword [ebp - 8], 0x1000000
jne 0x40b46e
test byte [ebp - 0xc], 0xcc
je 0x40b377
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40b46e
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40b46e
cmp word [eax + 0x18], 0x10b
jne 0x40b46e
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40b46e
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40b377
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40b377
test byte [ecx + 0x27], 0x80
jne 0x40b3ee
push 1
push 0x41c278
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40b28b
mov ecx, dword [0x41c230]
test ecx, ecx
mov edx, ecx
jle 0x40b3ab
lea eax, [ecx*4 + 0x41c234]
cmp dword [eax], edi
je 0x40b3ab
dec edx
sub eax, 4
test edx, edx
jg 0x40b39f
test edx, edx
jne 0x40b3dc
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40b3b8
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40b3d0
lea eax, [edx*4 + 0x41c238]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40b3be
cmp ecx, 0x10
jge 0x40b3dc
inc ecx
mov dword [0x41c230], ecx
push 0
push 0x41c278
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40b28b
xor eax, eax
jmp 0x40b471
test esi, esi
jle 0x40b28b
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41c278
call ebx
test eax, eax
jne 0x40b28b
cmp dword [esi*4 + 0x41c238], edi
je 0x40b448
mov eax, dword [0x41c230]
lea esi, [eax - 1]
test esi, esi
jl 0x40b436
cmp dword [esi*4 + 0x41c238], edi
je 0x40b432
dec esi
jns 0x40b426
test esi, esi
jge 0x40b446
cmp eax, 0x10
jge 0x40b441
inc eax
mov dword [0x41c230], eax
lea esi, [eax - 1]
jmp 0x40b448
je 0x40b460
xor ecx, ecx
test esi, esi
jl 0x40b460
lea eax, [ecx*4 + 0x41c238]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40b44e
push 0
push 0x41c278
call ebx
jmp 0x40b28b
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c80e
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.00407db0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40c8a9
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 [0x41c090]
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 0x40c8a9
cmp eax, 1
je 0x40c8ca
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 0x40c8a9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40c876
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40c8a5
xor eax, eax
inc eax
jmp 0x40c8e9
cmp edi, eax
jae 0x40c8ad
xor eax, eax
jmp 0x40c8e9
cmp eax, esi
jae 0x40c8b4
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 [0x41c090]
jmp 0x40c8cd
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 0x40d62d
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x41b2c0]
mov ecx, dword [ebp + 0x98]
push ebx
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41b628]
je 0x40d662
inc eax
cmp eax, 0x13
jb 0x40d653
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41b628]
jne 0x40d785
mov eax, dword [0x41c064]
cmp eax, 1
je 0x40d760
cmp eax, edx
jne 0x40d692
cmp dword [0x41b2e4], 1
je 0x40d760
cmp ecx, 0xfc
je 0x40d785
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d6c8
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00407700
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00407800
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40d6fc
mov eax, edi
push eax
call fcn.00407800
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x416fec
push edi
call fcn.00407b20
add esp, 0x10
push edi
call fcn.00407800
push dword [esi + 0x41b62c]
mov ebx, eax
call fcn.00407800
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00407db0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00407700
push edi
push ebx
call fcn.00407710
push 0x416fe8
push ebx
call fcn.00407710
push dword [esi + 0x41b62c]
push ebx
call fcn.00407710
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004112a8
add esp, 0x2c
jmp 0x40d785
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x41b62c]
push dword [esi]
call fcn.00407800
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 + 0x8c]
call fcn.00407d96
pop edi
pop esi
pop ebx
add ebp, 0x90
leave
ret