joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401006
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x422004]
jne 0x401010
repz ret
jmp fcn.00401649

Function at 0x405ef6
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.00404d6f
and dword [ebp - 4], 0
cmp dword [0x424c5c], 0
mov ebx, eax
jne 0x405fa7
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x406058
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x406058
push eax
call fcn.00404cfd
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x424c5c], eax
call esi
push eax
call fcn.00404cfd
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x424c60], eax
call esi
push eax
call fcn.00404cfd
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x424c64], eax
call esi
push eax
call fcn.00404cfd
pop ecx
mov dword [0x424c6c], eax
test eax, eax
je 0x405fa7
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00404cfd
pop ecx
mov dword [0x424c68], eax
mov eax, dword [0x424c68]
cmp eax, ebx
je 0x405fff
cmp dword [0x424c6c], ebx
je 0x405fff
push eax
call fcn.00404d78
push dword [0x424c6c]
mov esi, eax
call fcn.00404d78
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x405fff
test edi, edi
je 0x405fff
call esi
test eax, eax
je 0x405ff6
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x405ff6
test byte [ebp - 0xc], 1
jne 0x405fff
or dword [ebp + 0x10], 0x200000
jmp 0x406038
mov eax, dword [0x424c60]
cmp eax, ebx
je 0x406038
push eax
call fcn.00404d78
pop ecx
test eax, eax
je 0x406038
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x406038
mov eax, dword [0x424c64]
cmp eax, ebx
je 0x406038
push eax
call fcn.00404d78
pop ecx
test eax, eax
je 0x406038
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x424c5c]
call fcn.00404d78
pop ecx
test eax, eax
je 0x406058
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40605a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x409b80
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x422004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x233c3ac], 0x930
jne 0x409baa
push str.sobugo
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
cmp dword [0x233c3ac], 0x114e
mov eax, dword [ebp + 8]
mov dword [0x233c1f0], eax
jne 0x409bdd
push 0
lea ecx, [ebp - 0x804]
push ecx
push 0
call sub.KERNEL32.dll_VerLanguageNameW
lea edx, [ebp - 0x820]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_BuildCommDCBW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401006
mov esp, ebp
pop ebp
ret
Function at 0x40aa49
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x416c08]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00405c3b
mov dword [ebp - 0x14], eax
cmp dword [0x4450ac], esi
jne 0x40ab3c
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40aac9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40ac1c
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40ac1c
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40ac1c
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x4450ac], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x4450b0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x4450b4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4450bc], eax
test eax, eax
je 0x40ab39
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4450b8], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40ab61
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40ab54
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40ab76
push 4
pop eax
jmp 0x40ac1e
cmp dword [ebp - 0x14], esi
je 0x40ab76
push dword [0x4450ac]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40ab5b
mov eax, dword [0x4450b8]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40abd4
cmp dword [0x4450bc], edi
je 0x40abd4
push eax
call ebx
push dword [0x4450bc]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40abd4
test eax, eax
je 0x40abd4
call ecx
test eax, eax
je 0x40abc9
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40abc9
test byte [ebp - 8], 1
jne 0x40abd4
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40ac04
mov eax, dword [0x4450b0]
cmp eax, edi
je 0x40ac01
push eax
call ebx
test eax, eax
je 0x40ac01
call eax
mov esi, eax
test esi, esi
je 0x40ac01
mov eax, dword [0x4450b4]
cmp eax, edi
je 0x40ac01
push eax
call ebx
test eax, eax
je 0x40ac01
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x4450ac]
call ebx
test eax, eax
je 0x40ac1c
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40ac1e
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004038cd
mov esp, ebp
pop ebp
ret
Function at 0x10004c3b
Capabilities:
Hash data using fnv

Disassembly:
cmp dword [eax + 0x14], 0x10
jb 0x10004c45
mov ecx, dword [eax]
jmp 0x10004c47
mov ecx, eax
mov edx, dword [eax + 0x10]
push esi
mov eax, 0x811c9dc5
add edx, ecx
jmp 0x10004c60
movsx esi, byte [ecx]
imul eax, eax, 0x1000193
xor eax, esi
inc ecx
cmp ecx, edx
jne 0x10004c54
mov esi, 0x7fffffff
and eax, esi
push 0x1f31d
push eax
call dword [sym.imp.MSVCR100.dll_ldiv]
imul eax, eax, 0xb14
imul edx, edx, 0x41a7
pop ecx
sub edx, eax
pop ecx
mov eax, edx
jns 0x10004c8d
add eax, esi
pop esi
ret

Function at 0x10006300
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1000d018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x20]
push ebx
push edi
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
test eax, eax
jne 0x10006328
xor al, al
jmp 0x1000638a
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov eax, dword [esi]
sub ebx, dword [ebp - 0x14]
sub edi, dword [ebp - 0x10]
mov ecx, esi
call dword [eax]
cmp ebx, eax
jne 0x1000634f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp edi, eax
jne 0x1000634f
cmp byte [esi + 0x54], 0
je 0x10006324
push edi
push ebx
mov ecx, esi
call fcn.10005b84
push dword [0x1000d068]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call edi
cmp dword [eax + 0xc], esi
jne 0x10006388
push dword [0x1000d068]
call edi
mov eax, dword [eax + 8]
push esi
push eax
call dword [sym.imp.libGLESv2.dll_Ordinal_147]
push eax
call dword [sym.imp.libGLESv2.dll_Ordinal_146]
add esp, 0xc
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.10007c63
leave
ret

Function at 0x10006ef6
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push edi
lea eax, [ebp + 0xb]
push str.eglBindAPI_EGLenum_api__0x_X__n
push eax
call fcn.1000654f
mov esi, 0x30a0
add esp, 0xc
cmp edi, esi
je 0x10006f51
jbe 0x10006f3b
cmp edi, 0x30a2
ja 0x10006f3b
push 0x300c
call fcn.10007c50
pop ecx
call fcn.10006576
xor eax, eax
pop edi
pop esi
pop ebp
ret 4
push 0x300c
call fcn.10007c50
xor esi, esi
pop ecx
call fcn.10006576
mov eax, esi
jmp 0x10006f35
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + 4], esi
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], 1
call fcn.10007b9a
mov esi, dword [eax]
jmp 0x10006f47
Function at 0x1000732b
Capabilities:
Get thread local storage value

Disassembly:
push 4
mov eax, 0x100087bc
call fcn.1000866f
push dword [ebp + 0xc]
lea eax, [ebp + 0xb]
push dword [ebp + 8]
push str.eglSwapInterval_EGLDisplay_dpy__0x_0.8p__EGLint_interval___d__n
push eax
call fcn.1000654f
add esp, 0x10
and dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
call fcn.10006586
test al, al
jne 0x10007371
call fcn.10006576
xor eax, eax
call fcn.100086db
ret 8
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x10007398
push 0x300d
call fcn.10007c50
pop ecx
call fcn.10006576
mov eax, esi
jmp 0x10007369
mov eax, dword [ebp + 0xc]
call fcn.1000642e
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], 1
call fcn.10007b9a
mov esi, dword [eax]
jmp 0x1000738e

Function at 0x1000757a
Capabilities:
Get thread local storage value

Disassembly:
push 4
mov eax, 0x100088a8
call fcn.1000866f
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
push edi
push esi
push dword [ebp + 0xc]
lea eax, [ebp + 0xf]
push ebx
push str.eglMakeCurrent_EGLDisplay_dpy__0x_0.8p__EGLSurface_draw__0x_0.8p__EGLSurface_read__0x_0.8p__EGLContext_ctx__0x_0.8p__n
push eax
call fcn.1000654f
add esp, 0x18
and dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
test eax, eax
je 0x1000769a
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
test al, al
jne 0x1000769a
cmp byte [ebx + 0x65c], al
je 0x100075e4
push 0x300e
call fcn.10007c50
pop ecx
jmp 0x100076a1
test edi, edi
je 0x100075f7
push ebx
call fcn.100065dc
pop ecx
test al, al
je 0x100076a1
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x10007609
push ebx
call fcn.10006609
pop ecx
test al, al
je 0x1000761a
test esi, esi
je 0x1000762b
push ebx
mov edi, esi
call fcn.10006609
pop ecx
test al, al
jne 0x1000762b
xor esi, esi
call fcn.10006576
mov eax, esi
call fcn.100086db
ret 0x10
cmp dword [ebp + 0xc], esi
je 0x1000764b
mov ecx, 0x38a
push ecx
mov eax, 0x1000a194
push eax
push ecx
push eax
push str.fixme:__s__d_:__t__Unimplemented:__s__d__n_n
call fcn.10006510
add esp, 0x14
push dword [0x1000d068]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call esi
push dword [0x1000d068]
mov dword [eax + 8], ebx
call esi
mov edi, dword [ebp + 0xc]
push dword [0x1000d068]
mov dword [eax + 0xc], edi
call esi
mov ecx, dword [ebp + 0x10]
push edi
push ebx
push dword [ebp + 0x14]
mov dword [eax + 0x10], ecx
call dword [sym.imp.libGLESv2.dll_Ordinal_146]
lea eax, [ebp + 0xc]
push eax
mov dword [ebp + 0xc], 1
call fcn.10007b9a
mov esi, dword [eax]
add esp, 0x10
jmp 0x1000761c
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x6c]
call fcn.10006576
xor eax, eax
jmp 0x10007623
Function at 0x100076ee
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
lea eax, [ebp + 0xb]
push str.eglGetCurrentSurface_EGLint_readdraw___d__n
push eax
call fcn.1000654f
add esp, 0xc
cmp dword [ebp + 8], 0x305a
jne 0x10007735
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0x10]
push 0x3000
call fcn.10007c50
pop ecx
call fcn.10006576
mov eax, esi
pop esi
pop ebp
ret 4
cmp dword [ebp + 8], 0x3059
jne 0x1000774f
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0xc]
jmp 0x1000771e
push 0x300c
call fcn.10007c50
xor esi, esi
jmp 0x10007728

Function at 0x10007baa
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [esp + 8]
sub eax, 0
push esi
je 0x10007c26
dec eax
je 0x10007bda
dec eax
je 0x10007bee
dec eax
jne 0x10007c49
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10007c49
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10007c49
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1000d068], eax
cmp eax, 0xffffffff
jne 0x10007bee
xor eax, eax
jmp 0x10007c4c
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x10007c49
push esi
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
and dword [esi + 8], 0
and dword [esi + 0xc], 0
and dword [esi + 0x10], 0
mov dword [esi], 0x3000
mov dword [esi + 4], 0x30a0
jmp 0x10007c49
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10007c3d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [0x1000d068]
call dword [sym.imp.KERNEL32.dll_TlsFree]
xor eax, eax
inc eax
pop esi
ret 0xc

Function at 0x10007c63
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1000d018]
jne 0x10007c6d
repz ret
jmp fcn.1000811f

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x402c30
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 0x402c5c
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 0x402c84
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x402c8a
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 0x402cf2
jg 0x402ca1
test esi, esi
je 0x402cf2
test ecx, ecx
jl 0x402ced
jg 0x402cab
test eax, eax
je 0x402ced
cmp edi, ecx
jg 0x402cbf
jl 0x402cb5
cmp esi, eax
jae 0x402cbf
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 0x402cf5
mov ecx, dword [ebp + 8]
jmp 0x402cff
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402d19
jg 0x402cff
test esi, esi
je 0x402d19
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402d19
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 0x402d30
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 0x402d5c
jl 0x402d50
test ecx, ecx
jne 0x402d5c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402d75
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 0x402dbd
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402dc3
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x402dc3
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x402e36
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402dec
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 0x402e24
nop dword [eax]
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 0x402e36
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402e00
test edi, edi
je 0x402e36
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 0x4031b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x44900c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4031e0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d9b2
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40321c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40321c
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.0043d9b2
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4032f3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x403244
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 0x403250
movsx eax, bl
jmp 0x403288
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 0x4032b2
sub eax, 1
je 0x4032b2
sub eax, 2
jne 0x4032f3
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.0043d9b2
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4032d0
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 0x4032f3
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.0043d9b2
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.0043d9b2
mov esp, ebp
pop ebp
ret 4
Function at 0x403670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x44900c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40372c
cmp byte [esi + 0x3d], 0
je 0x40372c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40371a
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 0x4036e1
sub eax, 1
je 0x4036e5
sub eax, 2
jne 0x40371a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d9b2
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403703
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 0x40371a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d9b2
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d9b2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0043d9b2
mov esp, ebp
pop ebp
ret