Function at 0x100022d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.100030d0
push eax
call fcn.10003120
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x10002305
mov edx, dword [ebp + 8]
push edx
call fcn.100030e0
add esp, 4
jmp 0x10002488
mov ecx, dword [ebp - 8]
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 0x1000234b
mov ecx, dword [ebp - 8]
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 - 8]
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 0x1000234b
mov eax, dword [ebp + 8]
push eax
call fcn.10003150
add esp, 4
mov bl, al
mov ecx, dword [ebp - 8]
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 0x10002488
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x4c], 0
jne 0x1000235e
call fcn.100030d0
jmp 0x10002488
mov ecx, dword [ebp - 8]
call fcn.10002a20
mov edx, dword [ebp - 8]
cmp dword [edx + 0x38], 0
jne 0x100023ad
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10003150
add esp, 4
movzx eax, al
push eax
call fcn.10001500
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x1000239d
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], edx
jmp 0x100023a5
call fcn.100030d0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
jmp 0x10002488
mov dword [ebp - 0x24], 0x20
mov eax, dword [ebp + 8]
push eax
call fcn.10003150
add esp, 4
mov byte [ebp - 2], al
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 1]
push edx
lea eax, [ebp - 2]
push eax
mov ecx, dword [ebp - 8]
add ecx, 0x40
push ecx
mov edx, dword [ebp - 8]
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 - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x10002405
cmp dword [ebp - 0xc], 1
je 0x10002405
cmp dword [ebp - 0xc], 3
je 0x10002453
jmp 0x10002483
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x48]
sub eax, ecx
mov dword [ebp - 0x10], eax
je 0x10002438
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 1
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x10], eax
je 0x10002438
call fcn.100030d0
jmp 0x10002488
mov eax, dword [ebp - 8]
mov byte [eax + 0x3d], 1
lea ecx, [ebp - 2]
cmp dword [ebp - 0x20], ecx
je 0x1000244c
mov eax, dword [ebp + 8]
jmp 0x10002488
call fcn.100030d0
jmp 0x10002488
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
movzx ecx, byte [ebp - 2]
push ecx
call fcn.10001500
add esp, 8
movzx edx, al
test edx, edx
je 0x10002476
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
jmp 0x1000247e
call fcn.100030d0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x10002488
call fcn.100030d0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4