Function at 0x4077d5
Capabilities:
Write file on windows

Disassembly:
push 0x38
mov eax, 0x5514f9
call fcn.00550118
mov ebx, ecx
call fcn.00405f50
mov edi, eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], edi
push eax
call fcn.004076ce
pop ecx
pop ecx
test al, al
je 0x40780f
lea eax, [ebp + 8]
push eax
call fcn.0040770f
pop ecx
jmp 0x40799f
mov ecx, ebx
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
test eax, eax
je 0x40784f
mov ecx, ebx
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
mov ecx, ebx
mov esi, eax
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp eax, esi
jae 0x40784f
mov ecx, ebx
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov esi, eax
lea eax, [ebp + 8]
push eax
call fcn.00407ccf
mov byte [esi], al
mov eax, dword [ebp + 8]
pop ecx
jmp 0x40799f
xor esi, esi
cmp dword [ebx + 0x50], esi
je 0x40799d
mov ecx, ebx
call fcn.0040753e
lea eax, [ebp + 8]
cmp dword [ebx + 0x40], esi
jne 0x407889
push dword [ebx + 0x50]
push eax
call fcn.00407ccf
pop ecx
movzx eax, al
push eax
call fcn.00407009
test al, al
pop ecx
cmovne edi, dword [ebp + 8]
pop ecx
jmp 0x40799d
push eax
call fcn.00407ccf
pop ecx
push esi
push 8
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x2c], al
call fcn.0040718e
mov dword [ebp - 4], esi
jmp 0x40791d
cmp eax, 1
jg 0x40797d
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x28]
call fcn.00407657
mov ecx, eax
call fcn.004072ae
mov esi, dword [ebp - 0x34]
sub esi, eax
je 0x4078f1
push dword [ebx + 0x50]
lea eax, [ebp - 0x40]
push esi
push 1
push eax
lea ecx, [ebp - 0x28]
call fcn.00407657
mov ecx, eax
call fcn.004072ae
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x407995
lea eax, [ebp - 0x2c]
mov byte [ebx + 0x45], 1
cmp dword [ebp - 0x30], eax
jne 0x407978
test esi, esi
jne 0x40791d
lea ecx, [ebp - 0x28]
call fcn.0041bb9b
cmp eax, 0x20
jae 0x407995
push esi
push 8
lea ecx, [ebp - 0x28]
call fcn.004075aa
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x28]
call fcn.00407657
mov ecx, eax
call fcn.004072ae
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.0041bb9b
add esi, eax
lea ecx, [ebp - 0x28]
push esi
lea eax, [ebp - 0x3c]
push eax
call fcn.00407657
mov ecx, eax
call fcn.004072ae
mov ecx, dword [ebx + 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2b]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebx + 0x48]
push eax
call dword [sym.imp.MSVCP120.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
test eax, eax
jns 0x4078a3
jmp 0x407995
mov edi, dword [ebp + 8]
jmp 0x407995
cmp eax, 3
jne 0x407995
push dword [ebx + 0x50]
push dword [ebp - 0x2c]
call fcn.00407009
test al, al
pop ecx
cmovne edi, dword [ebp + 8]
pop ecx
lea ecx, [ebp - 0x28]
call fcn.0040575c
mov eax, edi
call fcn.005500d6
ret 4