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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x45bb20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x418ab0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x418ae0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x418ae0
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x418bdb
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x418b09
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x418b3d
push dword [esi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x418b9c
sub eax, 1
je 0x418b9c
sub eax, 2
jne 0x418bdb
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00403480
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x418bba
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x418bdb
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x418bdb
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret 4
Function at 0x41a730
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x41a754
jl 0x41a748
test esi, esi
jne 0x41a754
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x41a76d
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, esi
mov ecx, dword [eax]
test ecx, ecx
je 0x41a7ab
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x41a7ab
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push ecx
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp + 8], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
jmp 0x41a7b1
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
cmp dword [ebx + 0x4c], 0
mov edx, edi
je 0x41a830
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x41a7da
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, edi
mov ecx, dword [ebp + 8]
cmp edi, 0xfff
jbe 0x41a81c
lea esp, [esp]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp + 8]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp + 8], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x41a843
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x41a7f0
test edx, edx
je 0x41a830
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, edi
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x41a860
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x41a885
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
test eax, eax
je 0x41a8a6
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x41a8a8
xor eax, eax
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x41a926
jg 0x41a8bb
test esi, esi
je 0x41a926
test ecx, ecx
jl 0x41a909
jg 0x41a8c5
test eax, eax
je 0x41a909
cmp edi, ecx
jg 0x41a8d7
jl 0x41a8cf
cmp esi, eax
jae 0x41a8d7
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 8]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov eax, dword [ebx + 0x30]
sub esi, ecx
mov edx, dword [ebp + 8]
sbb edi, dword [ebp - 4]
add edx, ecx
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x41a926
jg 0x41a90c
test esi, esi
je 0x41a926
jmp 0x41a90c
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x41a926
push eax
push esi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x423ff0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x45bb20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x44]
push 0x40
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x44], 0x40
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov dword [esi], eax
mov eax, dword [ebp - 0x38]
shrd ecx, eax, 0x14
mov eax, dword [ebp - 0x30]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x34]
shrd ecx, eax, 0x14
mov eax, dword [ebp - 0x28]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x2c]
shrd ecx, eax, 0x14
mov eax, dword [ebp - 0x20]
mov dword [esi + 0xc], ecx
mov ecx, dword [ebp - 0x24]
shrd ecx, eax, 0x14
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x10], ecx
mov ecx, dword [ebp - 0x1c]
shrd ecx, eax, 0x14
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x14], ecx
mov ecx, dword [ebp - 0x14]
shrd ecx, eax, 0x14
mov dword [esi + 0x18], ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0043ccfc
mov esp, ebp
pop ebp
ret
Function at 0x4284f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
test ebx, ebx
jne 0x428511
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
mov dword [eax], 1
xor al, al
pop ebp
ret 0x10
push str.SymInitialize
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [ebp + 0x14]
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi], 0
jne 0x42853f
mov dword [edi], 2
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
push str.SymCleanup
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi + 4], 0
jne 0x42856c
mov dword [edi], 0xd
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
push str.StackWalk64
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi + 8], 0
jne 0x428599
mov dword [edi], 3
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
push str.SymGetSymFromAddr
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi + 0xc], 0
jne 0x4285c6
mov dword [edi], 4
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
push str.SymGetModuleInfo64
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi + 0x10], 0
jne 0x4285ea
mov dword [edi], 0xe
push str.SymFromAddr
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp dword [esi + 0x1c], 0
jne 0x428617
mov dword [edi], 0xf
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
mov eax, dword [esi + 0x14]
mov ebx, dword [ebp + 0xc]
cmp eax, ebx
jne 0x428627
cmp byte [esi + 0x18], 0
jne 0x428685
test eax, eax
jne 0x42864d
mov dword [esi + 0x14], ebx
cmp byte [esi + 0x18], 0
jne 0x428675
mov eax, dword [esi + 4]
push ebx
call eax
mov eax, dword [esi]
push 1
push 0
push ebx
call eax
test eax, eax
je 0x428666
mov byte [esi + 0x18], 1
jmp 0x428675
cmp eax, ebx
je 0x42862e
cmp byte [esi + 0x18], 0
je 0x42865d
push eax
mov eax, dword [esi + 4]
call eax
mov dword [esi + 0x14], ebx
mov byte [esi + 0x18], 0
jmp 0x428634
mov dword [edi], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
cmp byte [ebp + 0x10], 0
je 0x428685
mov al, byte [esi + 0x18]
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
pop edi
pop esi
mov al, 1
pop ebx
pop ebp
ret 0x10
Function at 0x437970
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4459fd
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x45bb20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov eax, esi
mov dword [ebp - 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x4379ac
mov eax, dword [esi]
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
push ecx
push 0x20119
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x437a15
push dword [ebp - 0x10]
call ebx
cmp dword [esi + 0x14], 8
jb 0x4379d9
mov esi, dword [esi]
lea eax, [ebp - 0x10]
push eax
push 0x20219
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x437a15
push dword [ebp - 0x10]
call ebx
push dword [ebp + 0x18]
mov ecx, dword [ebp + 8]
call fcn.00403ba0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x800
mov dword [ebp - 0x14], 0
mov dword [ebp + 0x10], 0x400
call fcn.0043ca9d
mov edi, eax
mov dword [ebp - 0x18], edi
mov ecx, dword [ebp + 0x10]
add ecx, ecx
mov dword [ebp - 4], 0
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 0x14]
add esp, 0x10
cmp dword [eax + 0x14], 8
jb 0x437a55
mov eax, dword [eax]
lea ecx, [ebp + 0x10]
push ecx
push edi
lea ecx, [ebp - 0x14]
push ecx
push 0
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x10]
mov esi, eax
call ebx
test esi, esi
mov esi, dword [ebp + 8]
je 0x437a84
push dword [ebp + 0x18]
mov ecx, esi
call fcn.00403ba0
jmp 0x437aba
mov ecx, edi
mov dword [esi], 0
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x437aa2
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, esi
call fcn.00402190
test edi, edi
je 0x437ac7
push edi
call fcn.0043caa6
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x437e70
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 8
jb 0x437e7e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x437e92
test al, 0x10
jne 0x437e92
mov al, 1
pop ebp
ret
xor al, al
pop ebp
ret
Function at 0x401102
Capabilities:
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x44
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0x18
mov eax, dword [ebp - 0x18]
mov eax, dword fs:[eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
jmp 0x40115e
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
jne 0x40114d
mov dword [ebp - 0xc], 1
jmp 0x401188
mov dword [esp], 0x3e8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], 0x4070b4
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
lock cmpxchg dword [edx], ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40113c
mov eax, dword [0x4070b8]
cmp eax, 1
jne 0x4011a0
mov dword [esp], 0x1f
call sym.__amsg_exit
jmp 0x4011d3
mov eax, dword [0x4070b8]
test eax, eax
jne 0x4011c9
mov dword [0x4070b8], 1
mov dword [esp + 4], 0x409014
mov dword [esp], 0x40900c
call sym.__initterm
jmp 0x4011d3
mov dword [0x40701c], 1
mov eax, dword [0x4070b8]
cmp eax, 1
jne 0x4011fb
mov dword [esp + 4], 0x409008
mov dword [esp], section..CRT
call sym.__initterm
mov dword [0x4070b8], 2
cmp dword [ebp - 0xc], 0
jne 0x401217
mov dword [ebp - 0x2c], 0x4070b4
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
xchg dword [eax], edx
mov eax, dword [entry1]
test eax, eax
je 0x401241
mov eax, dword [entry1]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 0
call eax
sub esp, 0xc
call sym.__pei386_runtime_relocator
mov dword [esp], sym.__gnu_exception_handler_4
mov eax, dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call eax
sub esp, 4
mov dword [0x407074], eax
mov dword [esp], sym.___mingw_invalidParameterHandler
call sym.__set_invalid_parameter_handler
call sym.__fpreset
mov eax, dword [0x407004]
mov dword [esp + 4], 0x407008
mov dword [esp], eax
call sym._duplicate_ppstrings
call sym.___main
mov eax, dword [0x404028]
mov edx, dword [0x40700c]
mov dword [eax], edx
mov ecx, dword [0x40700c]
mov edx, dword [0x407008]
mov eax, dword [0x407004]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._main
mov dword [0x407014], eax
mov eax, dword [0x407018]
test eax, eax
jne 0x4012d0
mov eax, dword [0x407014]
mov dword [esp], eax
call sym._exit
mov eax, dword [0x40701c]
test eax, eax
jne 0x4012de
call sym.__cexit
mov eax, dword [0x407014]
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret
Function at 0x4012eb
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x40704c], 1
mov dword [0x407050], 1
mov dword [0x407054], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x40132c
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40134f
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x401371
cmp eax, 0x20b
je 0x401396
jmp 0x4013c1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x401383
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x4013ae
mov eax, 0
jmp 0x4013c6
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4013c6
mov eax, 0
leave
ret
Function at 0x401b48
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call sym.___acrt_iob_func
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call sym.___acrt_iob_func
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._vfprintf
call sym._abort

Function at 0x40271c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x40273b
mov eax, 0
jmp 0x40277f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40275e
mov eax, 0
jmp 0x40277f
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x40277a
mov eax, 0
jmp 0x40277f
mov eax, 1
leave
ret

Function at 0x402781
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x4027e0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x4027d8
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x4027d8
mov eax, dword [ebp - 4]
jmp 0x4027f4
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x4027b5
mov eax, 0
leave
ret
Function at 0x4032e4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404a18
test esi, esi
jne 0x40331a
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404b08
jmp 0x403338
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403188
mov edi, eax
test esi, esi
je 0x403338
cmp dword [ebx], 0
je 0x403338
dec esi
jmp 0x403321
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403a04
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x457020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403a9c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403a7c
xor eax, eax
push ebp
push 0x403a75
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403ab8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403a7c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x457020]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x457020], ax
mov esp, ebp
pop ebp
ret

Function at 0x404898
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x57c044], 0
je 0x4048f9
cmp word [0x57c218], 0xd7b2
jne 0x4048c1
cmp dword [0x57c220], 0
jbe 0x4048c1
mov eax, 0x57c214
call dword [0x57c230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404920
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x45702c], 0
jne 0x404915
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret