joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4059a0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
push edi
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [ebp - 0x210], ebx
call fcn.00411080
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
push 0
push 0x41f088
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x41ef2c
push 0x12f
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x405aaf
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405aaf
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x405aaf
push 0
push 0x80
push 2
push 0
push 2
push 0x40000004
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405aaf
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x210], 0
push ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
Function at 0x4063a0
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [esi], 0x1b58
call fcn.00411080
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.mshtml.dll
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x214]
xor edi, edi
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], edi
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x218], eax
test eax, eax
je 0x4064a2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x4064a2
push ebx
push dword [ebp - 0x218]
lea eax, [ebp - 0x20c]
push dword [ebp - 0x214]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x406490
lea eax, [ebp - 0x210]
mov dword [ebp - 0x218], edi
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x210], edi
push eax
push 0x41e9f4
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x406490
cmp dword [ebp - 0x210], edi
je 0x406490
mov eax, dword [ebp - 0x218]
movzx edi, word [eax + 0xa]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp edi, 0xb
jne 0x4064bb
mov dword [esi], 0x2af8
pop edi
mov dword [esi], 0x1b58
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
cmp edi, 0xa
jne 0x4064d9
pop edi
mov dword [esi], 0x2710
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
cmp edi, 9
jne 0x4064f7
pop edi
mov dword [esi], 0x2328
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
cmp edi, 8
jne 0x406515
pop edi
mov dword [esi], 0x1f40
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
cmp edi, 7
je 0x4064a2
cmp edi, 6
jne 0x4064a2
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi], 0x1770
xor ecx, ebp
pop esi
pop ebx
call fcn.0040d13e
mov esp, ebp
pop ebp
ret 4
Function at 0x406540
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov word [ebp - 0x28], 0x100
lea eax, [ebp - 0x30]
mov dword [ebp - 0x2c], esi
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 1
lea eax, [ebp - 0x2c]
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x44], ebx
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], edi
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40661a
mov eax, dword [ebp - 0x30]
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x14], xmm0
mov dword [ebp - 8], eax
lea eax, [ebp - 0x34]
push eax
push esi
lea eax, [ebp - 0x24]
mov dword [ebp - 0x10], esi
movdqu xmmword [ebp - 0x24], xmm0
push eax
push 1
mov dword [ebp - 0x24], 0x1f01ff
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0xc], 5
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x40661a
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x40661a
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40661a
push edi
push dword [ebp - 0x34]
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40661a
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0xc
push eax
push ebx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x406628
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x406638
push eax
call ebx
test esi, esi
je 0x40663f
push esi
call ebx
test edi, edi
jne 0x40665e
push edi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d13e
mov esp, ebp
pop ebp
ret

Function at 0x406680
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
mov esi, ecx
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00411080
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
push 0
push 0x41f088
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x41f158
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
Function at 0x406700
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4233b0]
push ebx
mov dword [ebp - 0x420], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00411080
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.00411080
add esp, 0x18
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x20c]
push eax
push 0
push 0x41f160
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x41ef2c
push 0x12d
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
jne 0x4067ac
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
push edi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x4067cc
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
push esi
push 0
push 0x80
push 2
push 0
push 2
push 0x40000004
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40689c
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
xor edx, edx
mov dword [ebp - 0x41c], eax
add eax, 1
setb dl
neg edx
or edx, eax
push edx
call fcn.0040d4c1
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40689c
push dword [ebp - 0x41c]
push edi
push ebx
call fcn.00412590
add esp, 0xc
lea eax, [ebp - 0x418]
push 0
push eax
push dword [ebp - 0x41c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0040d553
mov edi, dword [ebp - 0x420]
add esp, 4
mov ecx, edi
call fcn.00406680
lea ecx, [ebp - 0x20c]
call fcn.004069a0
mov esi, eax
push edi
push esi
call sym.zt.exe__ExtractArchive_8
test esi, esi
je 0x406886
push esi
call fcn.0040d553
add esp, 4
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0040d13e
mov esp, ebp
pop ebp
ret
Function at 0x40b4e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov eax, dword [eax]
and eax, 7
cmp edx, 5
jae 0x40b500
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
add edx, 0xfffffffc
or ebx, 0xffffffff
add edx, ecx
push esi
mov dword [ebp - 8], edx
lea ecx, [ecx]
lea esi, [edi + ecx]
cmp esi, edx
jae 0x40b529
mov cl, byte [esi]
and cl, 0xfe
cmp cl, 0xe8
je 0x40b526
inc esi
cmp esi, edx
jb 0x40b517
mov ecx, dword [ebp - 4]
mov edi, esi
sub edi, ecx
mov ecx, edi
sub ecx, ebx
cmp esi, edx
jae 0x40b631
cmp ecx, 3
jbe 0x40b542
xor eax, eax
jmp 0x40b580
dec ecx
shl eax, cl
and eax, 7
je 0x40b580
movzx ecx, byte [eax + 0x41ee7c]
mov edx, esi
sub edx, ecx
cmp byte [eax + 0x41ee74], 0
mov cl, byte [edx + 4]
je 0x40b56a
test cl, cl
je 0x40b56a
cmp cl, 0xff
jne 0x40b57d
mov edx, dword [ebp - 8]
and eax, 3
mov ecx, dword [ebp - 4]
add eax, eax
mov ebx, edi
or eax, 1
inc edi
jmp 0x40b510
mov edx, dword [ebp - 8]
mov cl, byte [esi + 4]
mov ebx, edi
mov dword [ebp - 0x10], ebx
test cl, cl
je 0x40b5a2
cmp cl, 0xff
je 0x40b5a2
mov ecx, dword [ebp - 4]
and eax, 3
add eax, eax
or eax, 1
inc edi
jmp 0x40b510
movzx edx, cl
movzx ecx, byte [esi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 2]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 1]
shl edx, 8
or edx, ecx
sub edx, edi
lea ebx, [edx - 5]
test eax, eax
je 0x40b5fe
movzx edx, byte [eax + 0x41ee7c]
mov ecx, 0x18
shl edx, 3
sub ecx, edx
mov dword [ebp - 0xc], edx
mov edx, ebx
shr edx, cl
test dl, dl
je 0x40b5ea
cmp dl, 0xff
jne 0x40b5fe
mov ecx, 0x20
mov edx, 1
sub ecx, dword [ebp - 0xc]
shl edx, cl
dec edx
xor edx, ebx
jmp 0x40b5c0
mov edx, dword [ebp - 8]
mov ecx, ebx
shr ecx, 0x18
and cl, 1
mov byte [esi + 1], bl
dec cl
not cl
mov byte [esi + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, ebx
mov ebx, dword [ebp - 0x10]
shr ecx, 8
add edi, 5
mov byte [esi + 2], cl
mov ecx, dword [ebp - 4]
jmp 0x40b510
pop esi
pop ebx
cmp ecx, 3
jbe 0x40b646
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
dec ecx
shl eax, cl
mov ecx, dword [ebp + 0xc]
and eax, 7
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4019b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x4019dc
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 edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x401a04
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x401a0a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x401a72
jg 0x401a21
test esi, esi
je 0x401a72
test ecx, ecx
jl 0x401a6d
jg 0x401a2b
test eax, eax
je 0x401a6d
cmp edi, ecx
jg 0x401a3f
jl 0x401a35
cmp esi, eax
jae 0x401a3f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x401a75
mov ecx, dword [ebp + 8]
jmp 0x401a7f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x401a99
jg 0x401a7f
test esi, esi
je 0x401a99
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x401a99
push eax
push esi
push 1
push ecx
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 [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401ab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x401adc
jl 0x401ad0
test ecx, ecx
jne 0x401adc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x401af5
push eax
push ecx
push esi
mov ecx, ebx
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, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x401b43
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x401b49
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x401b49
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x401bb6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x401b72
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 [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x401ba4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x401bb6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x401b80
test edi, edi
je 0x401bb6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401f30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x401f60
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x401f9c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x401f9c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x402073
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x401fc4
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 0x401fd0
movsx eax, bl
jmp 0x402008
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
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 0x402032
sub eax, 1
je 0x402032
sub eax, 2
jne 0x402073
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
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
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402050
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 0x402073
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
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.0040288e
mov esp, ebp
pop ebp
ret 4
Function at 0x402440
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4024fc
cmp byte [esi + 0x3d], 0
je 0x4024fc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4024ea
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x4024b1
sub eax, 1
je 0x4024b5
sub eax, 2
jne 0x4024ea
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4024d3
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 0x4024ea
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040288e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040288e
mov esp, ebp
pop ebp
ret

Function at 0x40312e
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40316d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40316d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40316d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40316d
cmp dword [ecx + 0x74], 0xe
jbe 0x40316d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10001520
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [0x100396e8], 0
je 0x10001539
mov eax, dword [0x100396e8]
jmp 0x100016d6
mov dword [0x100396e8], 0x100396c0
push 0x28
push 0
push 0x100396c0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [0x100396c0], eax
push str.imagehlp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x100396c4], eax
cmp dword [0x100396c4], 0
jne 0x1000157f
xor eax, eax
jmp 0x100016d6
push str.ImagehlpApiVersionEx
mov eax, dword [0x100396c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396c8], eax
push str.SymInitialize
mov ecx, dword [0x100396c4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396cc], eax
push str.SymSetOptions
mov edx, dword [0x100396c4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396d0], eax
push str.SymGetOptions
mov eax, dword [0x100396c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396d4], eax
push str.SymLoadModule
mov ecx, dword [0x100396c4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396d8], eax
push str.SymGetModuleInfo
mov edx, dword [0x100396c4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396dc], eax
push str.SymGetSymFromName
mov eax, dword [0x100396c4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396e0], eax
push str.BindImage
mov ecx, dword [0x100396c4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100396e4], eax
push 8
push 0
lea edx, [ebp - 8]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov word [ebp - 8], 9
cmp dword [0x100396c8], 0
je 0x1000165d
lea eax, [ebp - 8]
push eax
call dword [0x100396c8]
cmp dword [0x100396c8], 0
je 0x1000166f
movzx ecx, word [ebp - 8]
cmp ecx, 9
jge 0x1000168a
mov edx, dword [0x100396c4]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x100396c4], 0
xor eax, eax
jmp 0x100016d6
cmp dword [0x100396cc], 0
je 0x100016a3
push 0
push 0
mov eax, dword [0x100396c0]
push eax
call dword [0x100396cc]
cmp dword [0x100396d4], 0
je 0x100016d1
cmp dword [0x100396d0], 0
je 0x100016d1
call dword [0x100396d4]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
and ecx, 7
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [0x100396d0]
mov eax, dword [0x100396e8]
mov esp, ebp
pop ebp
ret