Function at 0x100213c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x10064200]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 0xffff
push edi
mov edi, ecx
cmp bx, si
jne 0x100213f7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002fe52
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
test eax, eax
je 0x1002143e
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::epptr_void_const]
mov ecx, edi
mov esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
cmp eax, esi
jae 0x1002143b
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Pninc_void_]
mov ecx, dword [ebp + 8]
pop edi
pop esi
mov word [eax], cx
mov ax, cx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002fe52
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp + 8]
cmp dword [edi + 0x4c], 0
je 0x10021531
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::eback_void_const]
lea ecx, [edi + 0x3c]
cmp eax, ecx
jne 0x10021467
push dword [edi + 0x54]
mov eax, dword [edi + 0x50]
mov ecx, edi
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setg_wchar_t___wchar_t___wchar_t__]
mov ecx, dword [edi + 0x38]
test ecx, ecx
jne 0x1002149a
push dword [edi + 0x4c]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 8
movzx ecx, si
cmp ax, bx
cmove ecx, ebx
pop edi
pop esi
mov ax, cx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002fe52
mov esp, ebp
pop ebp
ret 4
movzx eax, si
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x26]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [edi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_wchar_t__char__struct__Mbstatet_::out_struct__Mbstatet___wchar_t_const___wchar_t_const___wchar_t_const____char___char___char___const]
sub eax, 0
je 0x100214fd
sub eax, 1
je 0x100214fd
sub eax, 2
jne 0x10021531
push dword [edi + 0x4c]
push dword [ebp - 0x28]
call fcn.1001e5f0
add esp, 8
movzx ecx, si
test al, al
cmove ecx, ebx
pop edi
pop esi
mov ax, cx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002fe52
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x24]
sub eax, ecx
mov dword [ebp - 0x34], eax
je 0x10021521
push dword [edi + 0x4c]
push eax
mov eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x34], eax
jne 0x10021531
lea ecx, [ebp - 0x28]
movzx eax, si
cmp dword [ebp - 0x30], ecx
mov byte [edi + 0x3e], 1
cmovne ebx, eax
mov ecx, dword [ebp - 4]
mov ax, bx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002fe52
mov esp, ebp
pop ebp
ret 4