Function at 0x405ba0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x84]
mov ecx, 0x21
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x41200c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov ecx, 0x4130f4
call fcn.00409670
call fcn.00405610
mov dword [ebp - 0x13c], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00405650
add esp, 8
movzx edx, al
test edx, edx
je 0x405c0d
lea eax, [ebp + 8]
push eax
call fcn.00405a00
add esp, 4
jmp 0x405de7
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.00409640
test eax, eax
je 0x405c77
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.00409640
mov esi, eax
mov edi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
cmp edi, esp
call fcn.00409640
cmp esi, eax
jae 0x405c77
lea eax, [ebp + 8]
push eax
call fcn.00406620
add esp, 4
mov bl, al
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
cmp esi, esp
call fcn.00409640
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x405de7
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x4c], 0
jne 0x405c8a
call fcn.00405610
jmp 0x405de7
mov ecx, dword [ebp - 0xc]
call fcn.00404c50
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x38], 0
jne 0x405ce2
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
lea edx, [ebp + 8]
push edx
call fcn.00406620
add esp, 4
movzx eax, al
push eax
call fcn.00401670
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x405ccc
mov edx, dword [ebp + 8]
mov dword [ebp - 0x144], edx
jmp 0x405cd7
call fcn.00405610
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
jmp 0x405de7
mov dword [ebp - 0x18], 0x20
lea eax, [ebp + 8]
push eax
call fcn.00406620
add esp, 4
mov byte [ebp - 0x49], al
mov esi, esp
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x40]
push edx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x49]
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x40
push eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
call dword [sym.imp.MSVCP140D.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 0
je 0x405d52
cmp dword [ebp - 0x144], 1
je 0x405d52
cmp dword [ebp - 0x144], 3
je 0x405da9
jmp 0x405de2
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x40]
sub eax, ecx
mov dword [ebp - 0x70], eax
je 0x405d8e
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x70]
push edx
push 1
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.ucrtbased.dll_fwrite]
add esp, 0x10
cmp esi, esp
call fcn.00409640
cmp dword [ebp - 0x70], eax
je 0x405d8e
call fcn.00405610
jmp 0x405de7
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x3d], 1
lea eax, [ebp - 0x49]
cmp dword [ebp - 0x58], eax
je 0x405da2
mov eax, dword [ebp + 8]
jmp 0x405de7
call fcn.00405610
jmp 0x405de7
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, byte [ebp - 0x49]
push edx
call fcn.00401670
add esp, 8
movzx eax, al
test eax, eax
je 0x405dcf
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x144], ecx
jmp 0x405dda
call fcn.00405610
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
jmp 0x405de7
call fcn.00405610
push edx
mov ecx, ebp
push eax
lea edx, [0x405e18]
call fcn.004095e0
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004096b0
add esp, 0x144
cmp ebp, esp
call fcn.00409640
mov esp, ebp
pop ebp
ret 4