Function at 0x10010950
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
mov edx, 0xffff
push 0xffffffffffffffff
push 0x10064b28
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
cmp dx, di
jne 0x10010990
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0x20]
push esi
mov ecx, dword [eax]
test ecx, ecx
je 0x100109d3
mov edx, dword [ebx + 0x30]
mov esi, dword [edx]
lea eax, [ecx + esi*2]
cmp ecx, eax
jae 0x100109ce
lea ecx, [esi - 1]
mov ax, di
mov dword [edx], ecx
mov edx, dword [ebx + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], di
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov edx, 0xffff
cmp dword [ebx + 0x4c], 0
jne 0x100109ef
pop esi
pop edi
mov ax, dx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x10010a0f
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 0x1c]
sar edx, 1
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
cmp dword [ebx + 0x38], 0
jne 0x10010a48
push dword [ebx + 0x4c]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, di
jne 0x10010bfa
pop esi
pop edi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
movzx eax, di
mov ecx, 0xf
mov dword [ebp - 0x10], eax
xorps xmm0, xmm0
mov byte [ebp - 0x34], 0
lea eax, [ebp - 0x34]
cmp ecx, 0x10
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x20], ecx
cmovae eax, dword [ebp - 0x34]
mov dword [ebp - 0x24], 8
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x20]
cmp edi, 0x10
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x34]
cmovae edx, esi
lea ecx, [ebp - 0x34]
cmovae ecx, esi
add eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x38]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebx + 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]
test eax, eax
js 0x10010ba1
cmp eax, 1
jg 0x10010b5f
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x34]
mov esi, dword [ebp - 0x34]
cmp edi, 0x10
mov ecx, dword [ebp - 0x14]
cmovae eax, esi
sub ecx, eax
mov dword [ebp - 0x18], ecx
je 0x10010b07
push dword [ebx + 0x4c]
cmp edi, 0x10
lea eax, [ebp - 0x34]
push ecx
cmovae eax, esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov ecx, dword [ebp - 0x18]
add esp, 0x10
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x34]
cmp ecx, eax
jne 0x10010b31
lea eax, [ebp - 0x10]
mov byte [ebx + 0x3e], 1
cmp dword [ebp - 0x1c], eax
jne 0x10010b4e
test ecx, ecx
jne 0x10010a84
cmp dword [ebp - 0x24], 0x20
jae 0x10010b41
push ecx
push 8
lea ecx, [ebp - 0x34]
call fcn.10011720
jmp 0x10010a7e
mov eax, 0xffff
movzx eax, ax
movzx eax, ax
movzx ebx, ax
jmp 0x10010bac
mov eax, 0xffff
movzx eax, ax
movzx ebx, ax
jmp 0x10010bac
mov eax, dword [ebp + 8]
movzx eax, ax
movzx eax, ax
movzx eax, ax
movzx ebx, ax
jmp 0x10010bac
cmp eax, 3
jne 0x10010ba1
push dword [ebx + 0x4c]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
mov ecx, 0xffff
add esp, 8
cmp ax, cx
je 0x10010b91
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x34]
movzx eax, ax
movzx eax, ax
movzx ebx, ax
jmp 0x10010bac
mov edi, dword [ebp - 0x20]
mov eax, ecx
mov esi, dword [ebp - 0x34]
movzx eax, ax
movzx ebx, ax
jmp 0x10010bac
mov edi, dword [ebp - 0x20]
mov ebx, 0xffff
mov esi, dword [ebp - 0x34]
cmp edi, 0x10
jb 0x10010bf7
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x10010bee
test byte [ebp - 0x34], 0x1f
je 0x10010bc7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov eax, dword [esi - 4]
cmp eax, esi
jb 0x10010bd4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
sub esi, eax
cmp esi, 4
jae 0x10010be1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp esi, 0x23
jbe 0x10010bec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov esi, eax
push esi
call fcn.10061b5c
add esp, 4
mov ax, bx
mov ecx, dword [ebp - 0xc]
pop esi
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4