Function at 0x10016d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov dword [ebp - 8], ecx
call fcn.10013600
mov dword [ebp - 0x1c], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.10016820
add esp, 8
movzx edx, al
test edx, edx
je 0x10016d5b
lea eax, [ebp + 8]
push eax
call fcn.10016c20
add esp, 4
jmp 0x10016ee2
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 0x10016da1
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 0x10016da1
lea ecx, [ebp + 8]
push ecx
call fcn.10017530
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 0x10016ee2
mov edx, dword [ebp - 8]
cmp dword [edx + 0x4c], 0
jne 0x10016db4
call fcn.10013600
jmp 0x10016ee2
mov ecx, dword [ebp - 8]
call fcn.10015fc0
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
jne 0x10016e03
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.10017530
add esp, 4
movzx ecx, al
push ecx
call fcn.10013b80
add esp, 8
movzx edx, al
test edx, edx
je 0x10016df3
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
jmp 0x10016dfb
call fcn.10013600
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
jmp 0x10016ee2
mov dword [ebp - 0x28], 0x20
lea ecx, [ebp + 8]
push ecx
call fcn.10017530
add esp, 4
mov byte [ebp - 2], al
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 1]
push eax
lea ecx, [ebp - 2]
push ecx
mov edx, dword [ebp - 8]
add edx, 0x40
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 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
jl 0x10016edd
cmp dword [ebp - 0xc], 1
jle 0x10016e5f
cmp dword [ebp - 0xc], 3
je 0x10016ead
jmp 0x10016edd
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x4c]
sub ecx, edx
mov dword [ebp - 0x10], ecx
je 0x10016e92
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push 1
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x10], eax
je 0x10016e92
call fcn.10013600
jmp 0x10016ee2
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x3d], 1
lea edx, [ebp - 2]
cmp dword [ebp - 0x24], edx
je 0x10016ea6
mov eax, dword [ebp + 8]
jmp 0x10016ee2
call fcn.10013600
jmp 0x10016ee2
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, byte [ebp - 2]
push edx
call fcn.10013b80
add esp, 8
movzx eax, al
test eax, eax
je 0x10016ed0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
jmp 0x10016ed8
call fcn.10013600
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x10016ee2
call fcn.10013600
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4