joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10022d1
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x1005280]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x210], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 0x17
pop ecx
push 0x1ac
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x1b0]
push 0
mov esi, 0x1001468
lea edi, [ebp - 0x20c]
push eax
mov dword [ebp - 0x218], 4
rep movsd dword es:[edi], dword [esi]
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.01002164
test eax, eax
jl 0x100239e
lea eax, [ebp - 0x210]
push eax
push 0x20119
xor esi, esi
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.KERNEL32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100239e
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x21c]
push eax
push esi
push esi
push ebx
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_RegQueryValueExW]
test eax, eax
jne 0x100239e
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x210], 0
pop edi
pop esi
pop ebx
je 0x10023b6
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x214]
xor ecx, ebp
call fcn.01004124
leave
ret 0xc
Function at 0x10036e9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1005280]
xor eax, ebp
mov dword [ebp - 4], eax
test esi, esi
je 0x100377e
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1003707
sub eax, edx
sar eax, 1
mov ecx, 0x104
cmp eax, ecx
ja 0x100377e
push esi
push ecx
lea eax, [ebp - 0x20c]
push eax
call sub.msvcrt.dll_wcscpy_s
lea eax, [ebp - 0x20c]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1003738
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 - 0x20c]
dec eax
dec eax
movzx ecx, word [eax]
cmp cx, 0x5c
je 0x100375e
cmp cx, 0x2f
jne 0x1003765
xor ecx, ecx
mov word [eax], cx
jmp 0x100374d
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
jmp 0x1003780
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01004124
leave
ret
Function at 0x1003791
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x768
mov eax, dword [0x1005280]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push dword [edi + 4]
mov dword [ebp - 0x768], eax
mov ebx, 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [edi + 4]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x10037d1
sub eax, edx
sar eax, 1
sub ebx, eax
mov eax, ecx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10037e6
sub eax, ecx
sar eax, 1
push 0x1001cd8
lea eax, [ebp + eax*2 - 0x20c]
push ebx
push eax
mov dword [ebp - 0x764], eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
lea eax, [ebp - 0x75c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x760], eax
cmp eax, 0xffffffff
jne 0x1003841
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x12
neg eax
sbb eax, eax
jmp 0x10039cc
mov ecx, 0x1001cd4
lea eax, [ebp - 0x730]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1003872
test dx, dx
je 0x100386e
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1003872
add eax, 4
add ecx, 4
test dx, dx
jne 0x100384c
xor eax, eax
jmp 0x1003877
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1003992
mov ecx, 0x1001ccc
lea eax, [ebp - 0x730]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10038b0
test dx, dx
je 0x10038ac
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10038b0
add eax, 4
add ecx, 4
test dx, dx
jne 0x100388a
xor eax, eax
jmp 0x10038b5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1003992
lea eax, [ebp - 0x730]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
push eax
push ebx
push dword [ebp - 0x764]
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [edi + 0xc]
add esp, 0x10
test eax, eax
je 0x10038f6
push eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
push 0x104
lea eax, [ebp - 0x730]
push eax
push dword [edi + 8]
call fcn.01003c50
test eax, eax
je 0x1003992
cmp dword [edi + 0xc], 0
je 0x100396f
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x50c]
push eax
lea eax, [ebp - 0x30c]
push eax
lea edx, [ebp - 0x20c]
call fcn.01003616
test eax, eax
je 0x100396f
test byte [ebp - 0x75c], 0x10
je 0x1003992
lea esi, [ebp - 0x30c]
call fcn.010036e9
test eax, eax
je 0x1003992
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x50c]
push eax
mov eax, esi
push eax
mov eax, dword [ebp + 8]
call fcn.0100345b
jmp 0x1003992
lea esi, [ebp - 0x20c]
call fcn.010036e9
test eax, eax
je 0x1003992
mov eax, esi
push eax
mov eax, dword [ebp - 0x768]
call fcn.01003534
mov esi, eax
test esi, esi
jne 0x10039af
lea eax, [ebp - 0x75c]
push eax
push dword [ebp - 0x760]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
test esi, esi
jne 0x1003841
push dword [ebp - 0x760]
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
jne 0x10039ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x10039ca
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.01004124
leave
ret 8
Function at 0x1004115
Capabilities:
Terminate process

Disassembly:
push 0x10
push 0x10045c8
call fcn.010042f4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x1c], ebx
mov edi, 0x100666c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x1003f2a
cmp eax, esi
jne 0x1003f1d
xor esi, esi
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x1003f2d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1003f04
xor esi, esi
inc esi
mov eax, dword [0x1006668]
cmp eax, esi
jne 0x1003f40
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x1003f7b
mov eax, dword [0x1006668]
test eax, eax
jne 0x1003f75
mov dword [0x1006668], esi
push 0x1001188
push 0x100117c
call fcn.01003e81
pop ecx
pop ecx
test eax, eax
je 0x1003f7b
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x1004045
mov dword [0x10052fc], esi
mov eax, dword [0x1006668]
cmp eax, esi
jne 0x1003f9f
push 0x1001178
push 0x1001170
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x1006668], 2
cmp dword [ebp - 0x1c], ebx
jne 0x1003fac
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x1006670], ebx
je 0x1003fcd
push 0x1006670
call fcn.01004269
pop ecx
test eax, eax
je 0x1003fcd
push ebx
push 2
push ebx
call dword [0x1006670]
push dword [0x10052e4]
push dword [0x10052e8]
push dword [0x10052e0]
call fcn.010023cf
add esp, 0xc
mov dword [0x10052f8], eax
cmp dword [0x10052ec], ebx
jne 0x100402b
push eax
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x20], ecx
push eax
push ecx
call sub.msvcrt.dll__XcptFilter
pop ecx
pop ecx
ret
cmp dword [0x10052fc], ebx
jne 0x1004039
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x10052f8]
call fcn.01004339
ret
call fcn.01004441
jmp 0x1003ee2
Function at 0x401000
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
push edi
xor ebp, ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov esi, 1
mov dword [esp + 0x18], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0x10], eax
je 0x401064
push eax
call fcn.00401f44
mov ecx, dword [esp + 0x14]
add esp, 4
mov ebx, eax
push ebx
push ecx
push ebp
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x401064
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push 0x40916c
push ebx
call sub.VERSION.dll_VerQueryValueA
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push ecx
push edi
mov dword [esp + 0x18], 0
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0x10], eax
je 0x4010b5
push eax
call fcn.00401f44
mov edx, dword [esp + 0x14]
add esp, 4
mov ebp, eax
push ebp
push edx
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x4010b5
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0x40916c
push ebp
call sub.VERSION.dll_VerQueryValueA
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4010e3
mov edx, dword [esp + 0x18]
test edx, edx
je 0x4010e3
mov eax, dword [edi + 8]
mov ecx, dword [edx + 8]
cmp ecx, eax
jne 0x4010dd
mov eax, dword [edi + 0xc]
mov ecx, dword [edx + 0xc]
cmp ecx, eax
jne 0x4010dd
xor esi, esi
jmp 0x4010e3
sbb esi, esi
and esi, 2
dec esi
test ebx, ebx
je 0x4010f0
push ebx
call fcn.0040251d
add esp, 4
test ebp, ebp
je 0x4010fd
push ebp
call fcn.0040251d
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x401110
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ecx
push esi
push 0x409178
push 0x85
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x401198
push ebx
push ebp
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x401196
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40118e
mov eax, dword [esp + 0x18]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x40118e
push 0
lea ecx, [esp + 0x14]
push ecx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret
Function at 0x402cb3
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x409298
call fcn.00403778
mov edi, 0x94
mov eax, edi
call fcn.00405cc0
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 [0x40b900], ecx
mov eax, dword [esi + 4]
mov dword [0x40b90c], eax
mov edx, dword [esi + 8]
mov dword [0x40b910], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40b904], esi
cmp ecx, 2
je 0x402d13
or esi, 0x8000
mov dword [0x40b904], esi
shl eax, 8
add eax, edx
mov dword [0x40b908], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x402d4e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402d4e
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402d66
cmp eax, 0x20b
je 0x402d53
mov dword [ebp - 0x1c], esi
jmp 0x402d7a
cmp dword [ecx + 0x84], 0xe
jbe 0x402d4e
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402d74
cmp dword [ecx + 0x74], 0xe
jbe 0x402d4e
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00405c6c
pop ecx
test eax, eax
jne 0x402da6
cmp dword [0x40b8ac], 1
jne 0x402d93
call fcn.00405421
push 0x1c
call fcn.004052a9
push 0xff
call fcn.0040510e
pop ecx
pop ecx
call fcn.00405bca
mov dword [ebp - 4], esi
call fcn.00405a1f
test eax, eax
jge 0x402dbf
push 0x1b
call fcn.00402c8e
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ce94], eax
call fcn.004058fd
mov dword [0x40b8a4], eax
call fcn.0040585b
test eax, eax
jge 0x402de5
push 8
call fcn.00402c8e
pop ecx
call fcn.00405628
test eax, eax
jge 0x402df6
push 9
call fcn.00402c8e
pop ecx
push 1
call fcn.0040513e
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x402e0c
push eax
call fcn.00402c8e
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004055cb
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x402e2d
movzx eax, word [ebp - 0x40]
jmp 0x402e30
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401be0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x402e4e
push edi
call fcn.00405269
call fcn.0040528b
jmp 0x402e80
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004037b3
ret
Function at 0x4051a8
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40b940], esi
push edi
jne 0x4051c8
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 [0x40b93c], esi
mov byte [0x40b938], al
jne 0x40522e
mov ecx, dword [0x40ce88]
test ecx, ecx
je 0x40520f
mov eax, dword [0x40ce84]
sub eax, 4
cmp eax, ecx
jmp 0x405208
mov eax, dword [eax]
test eax, eax
je 0x4051fa
call eax
mov eax, dword [0x40ce84]
sub eax, 4
cmp eax, dword [0x40ce88]
mov dword [0x40ce84], eax
jae 0x4051f2
mov eax, 0x40b024
mov esi, 0x40b02c
cmp eax, esi
mov edi, eax
jae 0x40522e
mov eax, dword [edi]
test eax, eax
je 0x405227
call eax
add edi, 4
cmp edi, esi
jb 0x40521f
mov eax, 0x40b030
mov esi, 0x40b038
cmp eax, esi
mov edi, eax
jae 0x40524d
mov eax, dword [edi]
test eax, eax
je 0x405246
call eax
add edi, 4
cmp edi, esi
jb 0x40523e
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x405267
push dword [ebp + 8]
mov dword [0x40b940], 1
call fcn.0040510e
pop ebp
ret

Function at 0x4052a9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x40b0e0]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40b168]
je 0x4052e0
inc eax
cmp eax, 0x13
jb 0x4052d1
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40b168]
jne 0x405403
mov eax, dword [0x40b8ac]
cmp eax, 1
je 0x4053de
cmp eax, edx
jne 0x405310
cmp dword [0x40b104], 1
je 0x4053de
cmp ecx, 0xfc
je 0x405403
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 0x405346
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.004068b0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00402f30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40537a
mov eax, edi
push eax
call fcn.00402f30
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x409304
push edi
call fcn.00407200
add esp, 0x10
push edi
call fcn.00402f30
push dword [esi + 0x40b16c]
mov ebx, eax
call fcn.00402f30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00405cc0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004068b0
push edi
push ebx
call fcn.004068c0
push 0x409300
push ebx
call fcn.004068c0
push dword [esi + 0x40b16c]
push ebx
call fcn.004068c0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004070fd
add esp, 0x2c
jmp 0x405403
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x40b16c]
push dword [esi]
call fcn.00402f30
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.004025de
add ebp, 0x90
leave
ret
Function at 0x4070fd
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40ba68], ebx
push esi
push edi
jne 0x40717d
push 0x409f50
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4071b8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x409f44
push edi
call esi
test eax, eax
mov dword [0x40ba68], eax
je 0x4071b8
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40ba6c], eax
call esi
cmp dword [0x40b900], 2
mov dword [0x40ba70], eax
jne 0x40717d
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40ba78], eax
je 0x40717d
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40ba74], eax
mov eax, dword [0x40ba74]
test eax, eax
je 0x4071c2
call eax
test eax, eax
je 0x4071a9
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40ba78]
test eax, eax
je 0x4071a9
test byte [ebp - 8], 1
jne 0x4071c2
cmp dword [0x40b90c], 4
jb 0x4071bc
or byte [ebp + 0x12], 0x20
jmp 0x4071e1
xor eax, eax
jmp 0x4071f1
or byte [ebp + 0x12], 4
jmp 0x4071e1
mov eax, dword [0x40ba6c]
test eax, eax
je 0x4071e1
call eax
mov ebx, eax
test ebx, ebx
je 0x4071e1
mov eax, dword [0x40ba70]
test eax, eax
je 0x4071e1
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40ba68]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407324
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 0x407352
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 0x407359
cmp ebx, dword [eax + 4]
jae 0x407359
xor eax, eax
jmp 0x407549
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40736a
xor eax, eax
inc eax
jmp 0x407548
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x407380
cmp ecx, edx
jae 0x4074c5
cmp dword [eax + 4], 0
je 0x407389
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x407371
cmp dword [ebp + 8], 0
je 0x4073ab
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4074c5
cmp eax, esi
jae 0x4074c5
mov eax, dword [0x40ba80]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4073d0
cmp dword [esi*4 + 0x40ba88], edi
je 0x4074c9
inc esi
cmp esi, eax
jl 0x4073be
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407545
cmp dword [ebp - 8], 0x1000000
jne 0x407545
test byte [ebp - 0xc], 0xcc
je 0x40744e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407545
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407545
cmp word [eax + 0x18], 0x10b
jne 0x407545
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407545
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40744e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40744e
test byte [ecx + 0x27], 0x80
jne 0x4074c5
push 1
push 0x40bac8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x407362
mov ecx, dword [0x40ba80]
test ecx, ecx
mov edx, ecx
jle 0x407482
lea eax, [ecx*4 + 0x40ba84]
cmp dword [eax], edi
je 0x407482
dec edx
sub eax, 4
test edx, edx
jg 0x407476
test edx, edx
jne 0x4074b3
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40748f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4074a7
lea eax, [edx*4 + 0x40ba88]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x407495
cmp ecx, 0x10
jge 0x4074b3
inc ecx
mov dword [0x40ba80], ecx
push 0
push 0x40bac8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x407362
xor eax, eax
jmp 0x407548
test esi, esi
jle 0x407362
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40bac8
call ebx
test eax, eax
jne 0x407362
cmp dword [esi*4 + 0x40ba88], edi
je 0x40751f
mov eax, dword [0x40ba80]
lea esi, [eax - 1]
test esi, esi
jl 0x40750d
cmp dword [esi*4 + 0x40ba88], edi
je 0x407509
dec esi
jns 0x4074fd
test esi, esi
jge 0x40751d
cmp eax, 0x10
jge 0x407518
inc eax
mov dword [0x40ba80], eax
lea esi, [eax - 1]
jmp 0x40751f
je 0x407537
xor ecx, ecx
test esi, esi
jl 0x407537
lea eax, [ecx*4 + 0x40ba88]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x407525
push 0
push 0x40bac8
call ebx
jmp 0x407362
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407841
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.00405cc0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4078dc
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 [0x40b900]
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 0x4078dc
cmp eax, 1
je 0x4078fd
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 0x4078dc
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4078a9
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4078d8
xor eax, eax
inc eax
jmp 0x40791c
cmp edi, eax
jae 0x4078e0
xor eax, eax
jmp 0x40791c
cmp eax, esi
jae 0x4078e7
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 [0x40b900]
jmp 0x407900
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