Function at 0x10005940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x1000596c
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, 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__]
jmp 0x10005af2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x20]
cmp dword [ecx], 0
je 0x10005990
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x30]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
jmp 0x10005997
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cdq
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0x10], 0
jl 0x10005aa3
jg 0x100059c3
cmp dword [ebp + 0xc], 0
jbe 0x10005aa3
cmp dword [ebp - 0x24], 0
jl 0x10005aa3
jg 0x100059d9
cmp dword [ebp - 0x28], 0
jbe 0x10005aa3
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x24]
jg 0x100059f7
jl 0x100059eb
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x28]
jae 0x100059f7
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov byte [ebp - 1], 0
movzx ecx, byte [ebp - 1]
test ecx, ecx
je 0x10005a48
mov dword [ebp - 0xc], 0
jmp 0x10005a2c
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x10005a46
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0xc]
mov al, byte [edx]
mov byte [ecx], al
jmp 0x10005a23
jmp 0x10005a5c
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp + 8]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x10]
sbb eax, dword [ebp - 0x24]
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x30]
mov ecx, dword [eax]
sub ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x30]
mov dword [eax], ecx
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x20]
mov eax, dword [edx]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x20]
mov dword [edx], eax
cmp dword [ebp + 0x10], 0
jl 0x10005ae6
jg 0x10005ab1
cmp dword [ebp + 0xc], 0
jbe 0x10005ae6
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0
je 0x10005ae6
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x4c]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
xor edx, edx
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, dword [ebp + 0x10]
sbb eax, edx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x34]
sbb edx, dword [ebp + 0x10]
mov esp, ebp
pop ebp
ret 0xc