Function at 0x1000bdf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1000f6b8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x10016018]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x10016018]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 8]
mov edi, 0xffff
cmp di, bx
jne 0x1000be3d
xor eax, eax
jmp 0x1000c060
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x1000be71
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [ecx + edi*2]
cmp ecx, eax
jae 0x1000be6c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov ax, bx
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], bx
jmp 0x1000c060
mov edi, 0xffff
cmp dword [esi + 0x50], 0
jne 0x1000be7f
mov ax, di
jmp 0x1000c060
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
lea eax, [esi + 0x44]
cmp ecx, eax
jne 0x1000be9b
mov eax, dword [esi + 0x3c]
push eax
push eax
push dword [esi + 0x38]
mov ecx, esi
call dword [sym.imp.MSVCP110.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setg_wchar_t___wchar_t___wchar_t__]
cmp dword [esi + 0x40], 0
jne 0x1000bec4
push dword [esi + 0x50]
push ebx
call dword [sym.imp.MSVCR110.dll_fputwc]
add esp, 8
cmp ax, di
movzx eax, bx
jne 0x1000c060
mov eax, 0xffff
jmp 0x1000c060
movzx eax, bx
sub esp, 8
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], eax
call fcn.1000d470
mov dword [esp + 0x48], 0
nop
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x24]
cmovae edx, dword [esp + 0x24]
lea ecx, [esp + 0x24]
cmovae ecx, dword [esp + 0x24]
add eax, edx
push eax
push ecx
mov ecx, dword [esi + 0x40]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esi + 0x48]
push eax
call dword [sym.imp.MSVCP110.dll_public:_int___thiscall_std::codecvt_wchar_t__char__int_::out_int___wchar_t_const___wchar_t_const___wchar_t_const____char___char___char___const]
test eax, eax
js 0x1000c044
cmp eax, 1
jg 0x1000c01a
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
cmp ebx, 0x10
lea eax, [esp + 0x20]
cmovae eax, ecx
sub edi, eax
je 0x1000bf69
push dword [esi + 0x50]
lea eax, [esp + 0x24]
push edi
cmp ebx, 0x10
cmovae eax, ecx
push 1
push eax
call dword [sym.imp.MSVCR110.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1000bfe1
lea eax, [esp + 0x14]
mov byte [esi + 0x46], 1
cmp dword [esp + 0x1c], eax
jne 0x1000c009
test edi, edi
jne 0x1000bee0
mov ecx, dword [esp + 0x30]
cmp ecx, 0x20
jae 0x1000bffc
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x1000bff1
lea edi, [ecx + 8]
push ecx
push edi
lea ecx, [esp + 0x28]
call fcn.10001ed0
test al, al
je 0x1000bee0
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x20]
cmovae ecx, dword [esp + 0x20]
xorps xmm0, xmm0
movq qword [ecx + eax], xmm0
cmp dword [esp + 0x34], 0x10
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
mov dword [esp + 0x30], edi
mov byte [eax + edi], 0
jmp 0x1000bee0
mov eax, 0xffff
movzx eax, ax
movzx eax, ax
movzx esi, ax
jmp 0x1000c049
push str.string_too_long
call dword [sym.imp.MSVCP110.dll_void___cdecl_std::_Xlength_error_char_const__]
mov eax, 0xffff
movzx eax, ax
movzx esi, ax
jmp 0x1000c049
mov eax, dword [ebp + 8]
movzx eax, ax
movzx eax, ax
movzx eax, ax
movzx esi, ax
jmp 0x1000c049
cmp eax, 3
jne 0x1000c044
mov edx, dword [esi + 0x50]
mov ecx, dword [esp + 0x14]
call fcn.1000a8b0
test al, al
je 0x1000c03a
mov eax, dword [ebp + 8]
movzx eax, ax
movzx esi, ax
jmp 0x1000c049
mov eax, 0xffff
movzx esi, ax
jmp 0x1000c049
mov esi, 0xffff
cmp dword [esp + 0x34], 0x10
jb 0x1000c05d
push dword [esp + 0x20]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ax, si
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.1000e3b2
mov esp, ebp
pop ebp
ret 4