Function at 0x10224540
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x10358f40]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.100701c0
push eax
call fcn.1008d720
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x1022457e
mov edx, dword [ebp + 8]
push edx
call fcn.100f5810
add esp, 4
jmp 0x10224716
mov ecx, dword [ebp - 0x2c]
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 0x102245c8
mov ecx, dword [ebp - 0x2c]
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 - 0x2c]
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 0x102245c8
mov eax, dword [ebp + 8]
push eax
call fcn.100f5ff0
add esp, 4
mov byte [ebp - 0x2f], al
mov ecx, dword [ebp - 0x2c]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov cl, byte [ebp - 0x2f]
mov byte [eax], cl
mov eax, dword [ebp + 8]
jmp 0x10224716
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x4c], 0
jne 0x102245db
call fcn.100701c0
jmp 0x10224716
mov ecx, dword [ebp - 0x2c]
call fcn.102242a0
nop
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x38], 0
jne 0x10224635
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x4c]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp + 8]
push eax
call fcn.100f5ff0
add esp, 4
mov byte [ebp - 0x30], al
mov ecx, dword [ebp - 0x44]
push ecx
movzx edx, byte [ebp - 0x30]
push edx
call fcn.102228a0
add esp, 8
movzx eax, al
test eax, eax
je 0x10224625
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
jmp 0x1022462d
call fcn.100701c0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
jmp 0x10224716
mov dword [ebp - 0x54], 0x20
mov edx, dword [ebp + 8]
push edx
call fcn.100f5ff0
add esp, 4
mov byte [ebp - 0x2e], al
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x48], ecx
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x2d]
push eax
lea ecx, [ebp - 0x2e]
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x40
push edx
mov ecx, dword [ebp - 0x48]
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 - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x10224693
cmp dword [ebp - 0x34], 1
je 0x10224693
cmp dword [ebp - 0x34], 3
je 0x102246e1
jmp 0x10224711
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x28]
sub eax, ecx
mov dword [ebp - 0x38], eax
je 0x102246c6
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0x38]
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 - 0x38], eax
je 0x102246c6
call fcn.100701c0
jmp 0x10224716
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x3d], 1
lea ecx, [ebp - 0x2e]
cmp dword [ebp - 0x50], ecx
je 0x102246da
mov eax, dword [ebp + 8]
jmp 0x10224716
call fcn.100701c0
jmp 0x10224716
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x4c]
push eax
movzx ecx, byte [ebp - 0x2e]
push ecx
call fcn.102228a0
add esp, 8
movzx edx, al
test edx, edx
je 0x10224704
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40], eax
jmp 0x1022470c
call fcn.100701c0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
jmp 0x10224716
call fcn.100701c0
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102390e8
mov esp, ebp
pop ebp
ret 4