Function at 0x404330
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x40e040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.00404b80
push eax
call fcn.00405d60
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x40436f
mov edx, dword [ebp + 8]
push edx
call fcn.00405d20
add esp, 4
jmp 0x4044f3
mov ecx, dword [ebp - 0x38]
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 0x4043b5
mov ecx, dword [ebp - 0x38]
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 - 0x38]
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 0x4043b5
mov eax, dword [ebp + 8]
push eax
call fcn.00404b90
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0x38]
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 0x4044f3
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x4c], 0
jne 0x4043c8
call fcn.00404b80
jmp 0x4044f3
mov ecx, dword [ebp - 0x38]
call fcn.00405390
nop
mov edx, dword [ebp - 0x38]
cmp dword [edx + 0x38], 0
jne 0x404418
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00404b90
add esp, 4
movzx eax, al
push eax
call fcn.004019c0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x404408
mov edx, dword [ebp + 8]
mov dword [ebp - 0x44], edx
jmp 0x404410
call fcn.00404b80
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
jmp 0x4044f3
mov dword [ebp - 0x4c], 0x20
mov eax, dword [ebp + 8]
push eax
call fcn.00404b90
add esp, 4
mov byte [ebp - 0x2a], al
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x29]
push edx
lea eax, [ebp - 0x2a]
push eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x40
push ecx
mov edx, dword [ebp - 0x38]
mov ecx, dword [edx + 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 - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x404470
cmp dword [ebp - 0x3c], 1
je 0x404470
cmp dword [ebp - 0x3c], 3
je 0x4044be
jmp 0x4044ee
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x28]
sub eax, ecx
mov dword [ebp - 0x40], eax
je 0x4044a3
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
push 1
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x40], eax
je 0x4044a3
call fcn.00404b80
jmp 0x4044f3
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x3d], 1
lea ecx, [ebp - 0x2a]
cmp dword [ebp - 0x34], ecx
je 0x4044b7
mov eax, dword [ebp + 8]
jmp 0x4044f3
call fcn.00404b80
jmp 0x4044f3
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x4c]
push eax
movzx ecx, byte [ebp - 0x2a]
push ecx
call fcn.004019c0
add esp, 8
movzx edx, al
test edx, edx
je 0x4044e1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x48], eax
jmp 0x4044e9
call fcn.00404b80
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
jmp 0x4044f3
call fcn.00404b80
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408891
mov esp, ebp
pop ebp
ret 4