Function at 0x4057d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x14], eax
cmp dword [eax + 0x38], 0
je 0x405832
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov edx, dword [ebp + 8]
mov eax, esp
mov dword [eax + 8], edi
mov dword [eax + 4], esi
mov dword [eax], edx
mov eax, dword [sym.imp.MSVCP140D.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
call eax
sub esp, 0xc
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
jmp 0x40598f
mov ecx, dword [esp + 0x14]
movsd xmm0, qword [esp + 0x30]
movsd qword [esp + 0x20], xmm0
mov eax, dword [sym.imp.MSVCP140D.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
call eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
sub ecx, 1
sbb eax, 0
jl 0x405915
jmp 0x40586a
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
sub ecx, 1
sbb eax, 0
jl 0x405915
jmp 0x405883
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
sub edx, esi
sbb eax, ecx
jge 0x4058ae
jmp 0x4058a2
movsd xmm0, qword [esp + 0x30]
movsd qword [esp + 0x18], xmm0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
call eax
mov edx, dword [esp + 0x10]
mov ecx, eax
mov eax, esp
mov dword [eax + 8], esi
mov dword [eax + 4], edx
mov dword [eax], ecx
call fcn.00403cf0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp + 8], eax
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
sub edx, edi
sbb eax, esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.MSVCP140D.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
sub esp, 4
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
sub ecx, 1
sbb eax, 0
jl 0x405973
jmp 0x40592e
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x4c], 0
je 0x405973
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x4c]
mov edx, dword [esp + 0x30]
mov ecx, dword [ebp + 8]
mov eax, esp
mov dword [eax + 0xc], esi
mov dword [eax + 8], edx
mov dword [eax], ecx
mov dword [eax + 4], 1
mov eax, dword [sym.imp.ucrtbased.dll_fwrite]
call eax
mov ecx, eax
mov eax, dword [esp + 0x30]
sub eax, ecx
sbb dword [esp + 0x34], 0
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
sub ecx, esi
sbb eax, edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret 0xc