Function at 0x401ea6
Capabilities:
Write file on windows

Disassembly:
jmp 0x4085d0
sub esp, 0x30
mov eax, dword [0x4fe040]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
mov ebx, dword [esp + 0x38]
push edi
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x408600
pop edi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4
push esi
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 0x408641
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
mov ecx, edi
mov esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp eax, esi
jae 0x408641
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
pop edi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4
cmp dword [edi + 0x4c], 0
je 0x40874d
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [edi + 0x3c]
cmp eax, ecx
jne 0x40866a
push dword [edi + 0x54]
mov eax, dword [edi + 0x50]
mov ecx, edi
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov ecx, dword [edi + 0x38]
test ecx, ecx
jne 0x40869f
push dword [edi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop esi
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1d]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [edi + 0x40]
push eax
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]
sub eax, 0
je 0x408707
sub eax, 1
je 0x408707
sub eax, 2
jne 0x40874d
push dword [edi + 0x4c]
push dword [esp + 0x10]
call fcn.0040186b
add esp, 8
or ecx, 0xffffffff
test al, al
cmove ebx, ecx
pop esi
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x18]
sub esi, eax
je 0x408727
push dword [edi + 0x4c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x40874d
lea ecx, [esp + 0xc]
mov byte [edi + 0x3d], 1
or eax, 0xffffffff
cmp dword [esp + 0x14], ecx
pop esi
pop edi
cmovne eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop esi
pop edi
pop ebx
xor ecx, esp
call fcn.004018ca
add esp, 0x30
ret 4