Function at 0x40a35e
Capabilities:
Write file on windows

Disassembly:
push 0x38
mov eax, 0x4129ad
call fcn.0040ffa5
mov ebx, ecx
call fcn.00407d01
mov edi, eax
lea edx, [ebp + 8]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], edi
call fcn.00407ce4
test al, al
je 0x40a391
mov ecx, edx
call fcn.00407cec
jmp 0x40a54d
mov ecx, ebx
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 0x40a3cf
mov ecx, ebx
call dword [sym.imp.MSVCP140.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.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp eax, esi
jae 0x40a3cf
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
lea ecx, [ebp + 8]
mov edx, eax
call fcn.00407cdd
mov byte [edx], al
mov eax, dword [ebp + 8]
jmp 0x40a54d
xor esi, esi
cmp dword [ebx + 0x4c], esi
je 0x40a54b
mov ecx, ebx
call fcn.0040b074
lea ecx, [ebp + 8]
call fcn.00407cdd
cmp dword [ebx + 0x38], esi
jne 0x40a403
mov edx, dword [ebx + 0x4c]
mov cl, al
call fcn.00407e8d
test al, al
cmovne edi, dword [ebp + 8]
jmp 0x40a54b
push ecx
push ecx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 0x11], al
call fcn.00409abd
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], esi
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x3c]
lea esi, [ebx + 0x40]
call fcn.0040992f
mov ecx, eax
call fcn.00409811
lea ecx, [ebp - 0x3c]
mov edx, eax
call fcn.00409844
add edx, eax
lea eax, [ebp - 0x24]
push edx
push eax
call fcn.0040992f
mov ecx, eax
call fcn.00409811
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x11]
push eax
push esi
jmp 0x40a515
cmp eax, 1
jg 0x40a52d
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040992f
mov ecx, eax
call fcn.00409811
mov esi, dword [ebp - 0x1c]
sub esi, eax
je 0x40a4ab
push dword [ebx + 0x4c]
lea eax, [ebp - 0x44]
push esi
push 1
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040992f
mov ecx, eax
call fcn.00409811
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x40a543
lea eax, [ebp - 0x11]
mov byte [ebx + 0x3d], 1
cmp dword [ebp - 0x18], eax
jne 0x40a528
test esi, esi
jne 0x40a4d0
lea ecx, [ebp - 0x3c]
call fcn.00409844
cmp eax, 0x20
jae 0x40a543
push esi
push 8
call fcn.0040ae45
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040992f
mov ecx, eax
call fcn.00409811
lea ecx, [ebp - 0x3c]
mov edx, eax
call fcn.00409844
add edx, eax
lea eax, [ebp - 0x24]
push edx
push eax
call fcn.0040992f
mov ecx, eax
call fcn.00409811
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x11]
push eax
lea eax, [ebx + 0x40]
push eax
mov ecx, dword [ebx + 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]
test eax, eax
jns 0x40a45d
jmp 0x40a543
mov edi, dword [ebp + 8]
jmp 0x40a543
cmp eax, 3
jne 0x40a543
mov edx, dword [ebx + 0x4c]
mov cl, byte [ebp - 0x11]
call fcn.00407e8d
test al, al
cmovne edi, dword [ebp + 8]
lea ecx, [ebp - 0x3c]
call fcn.00409a01
mov eax, edi
call fcn.0040ff4f
ret 4