Function at 0x415770
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a958
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
mov dword [ebp - 0x14], ecx
call fcn.004146d0
mov dword [ebp - 0x28], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.00414740
add esp, 8
movzx edx, al
test edx, edx
je 0x4157c2
lea eax, [ebp + 8]
push eax
call fcn.00415560
add esp, 4
jmp 0x415a60
mov ecx, dword [ebp - 0x14]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
test eax, eax
je 0x41580a
mov ecx, dword [ebp - 0x14]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
mov esi, eax
mov ecx, dword [ebp - 0x14]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
cmp esi, eax
jae 0x41580a
lea ecx, [ebp + 8]
push ecx
call fcn.00418160
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0x14]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x415a60
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x4c], 0
jne 0x41581d
call fcn.004146d0
jmp 0x415a60
mov ecx, dword [ebp - 0x14]
call fcn.00412bd0
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x38], 0
jne 0x415871
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.00418160
add esp, 4
movzx ecx, al
push ecx
call fcn.0040c560
add esp, 8
movzx edx, al
test edx, edx
je 0x41585c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
jmp 0x415864
call fcn.004146d0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
jmp 0x415a60
mov dword [ebp - 0x48], 8
lea ecx, [ebp + 8]
push ecx
call fcn.00418160
add esp, 4
mov byte [ebp - 0xe], al
push 0
push 8
lea ecx, [ebp - 0x70]
call fcn.0040ec10
mov dword [ebp - 4], 0
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x70]
call fcn.00413eb0
mov ecx, eax
call fcn.0040fef0
mov esi, eax
lea ecx, [ebp - 0x70]
call fcn.00417e50
add esi, eax
push esi
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x70]
call fcn.00413eb0
mov ecx, eax
call fcn.0040fef0
push eax
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0xd]
push eax
lea ecx, [ebp - 0xe]
push ecx
mov edx, dword [ebp - 0x14]
add edx, 0x40
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x38]
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]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jl 0x415a30
cmp dword [ebp - 0x1c], 1
jle 0x415913
cmp dword [ebp - 0x1c], 3
je 0x4159eb
jmp 0x415a30
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x70]
call fcn.00413eb0
mov ecx, eax
call fcn.0040fef0
mov edx, dword [ebp - 0x2c]
sub edx, eax
mov dword [ebp - 0x18], edx
je 0x41597e
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 1
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x70]
call fcn.00413eb0
mov ecx, eax
call fcn.0040fef0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x18], eax
je 0x41597e
call fcn.004146d0
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.0040f630
mov eax, dword [ebp - 0x30]
jmp 0x415a60
mov ecx, dword [ebp - 0x14]
mov byte [ecx + 0x3d], 1
lea edx, [ebp - 0xe]
cmp dword [ebp - 0x34], edx
je 0x4159aa
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.0040f630
mov eax, dword [ebp - 0x38]
jmp 0x415a60
cmp dword [ebp - 0x18], 0
jbe 0x4159b2
jmp 0x4159e9
lea ecx, [ebp - 0x70]
call fcn.00417e50
cmp eax, 0x20
jae 0x4159cd
push 0
push 8
lea ecx, [ebp - 0x70]
call fcn.004136e0
jmp 0x4159e9
call fcn.004146d0
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.0040f630
mov eax, dword [ebp - 0x3c]
jmp 0x415a60
jmp 0x415a4c
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x4c]
push edx
movzx eax, byte [ebp - 0xe]
push eax
call fcn.0040c560
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x415a0e
mov edx, dword [ebp + 8]
mov dword [ebp - 0x24], edx
jmp 0x415a16
call fcn.004146d0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.0040f630
mov eax, dword [ebp - 0x40]
jmp 0x415a60
call fcn.004146d0
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.0040f630
mov eax, dword [ebp - 0x44]
jmp 0x415a60
jmp 0x41589a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4