Function at 0x10005b40
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 0x10005b6c
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 0x10005cf2
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 0x10005b90
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x30]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
jmp 0x10005b97
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 0x10005ca3
jg 0x10005bc3
cmp dword [ebp + 0xc], 0
jbe 0x10005ca3
cmp dword [ebp - 0x24], 0
jl 0x10005ca3
jg 0x10005bd9
cmp dword [ebp - 0x28], 0
jbe 0x10005ca3
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x24]
jg 0x10005bf7
jl 0x10005beb
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x28]
jae 0x10005bf7
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 0x10005c48
mov dword [ebp - 0xc], 0
jmp 0x10005c2c
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x10005c46
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 0x10005c23
jmp 0x10005c5c
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 0x10005ce6
jg 0x10005cb1
cmp dword [ebp + 0xc], 0
jbe 0x10005ce6
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0
je 0x10005ce6
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