Function at 0x140086e90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
lea rbx, [rcx + 0x708]
mov rsi, rcx
or rcx, 0xffffffffffffffff
mov rbp, qword [rbx]
xor r12d, r12d
xor eax, eax
lea r15, [0x1400a89b8]
mov r13d, r8d
mov r14d, r12d
mov rdi, r15
mov dword [rsp + 0xd0], r12d
repne scasw ax, word [rdi]
not rcx
lea rdi, [rcx - 1]
mov ecx, dword [rbx + 0x14]
cmp edi, 0xffffffff
jne 0x140086ef6
mov rcx, rbp
call sub.msvcrt.dll_free
jmp 0x140086f3e
mov r12d, dword [rbx + 8]
cmp edi, r12d
jl 0x140086f3b
nop
add dword [rbx + 8], ecx
mov eax, dword [rbx + 8]
cmp edi, eax
jge 0x140086f00
add eax, eax
movsxd rcx, eax
call sub.msvcrt.dll_malloc
test r12d, r12d
mov rcx, rax
mov qword [rbx], rax
jle 0x140086f3b
test rax, rax
je 0x140086f33
lea eax, [r12 + r12]
mov rdx, rbp
movsxd r8, eax
call sub.msvcrt.dll_memcpy
mov rcx, rbp
call sub.msvcrt.dll_free
xor r12d, r12d
test rbp, rbp
jne 0x140086f4f
mov rax, qword [rbx]
test rax, rax
je 0x140086f4f
mov word [rax], r14w
test edi, edi
jle 0x140086f64
mov rcx, qword [rbx]
movsxd r8, edi
mov rdx, r15
add r8, r8
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx]
movsxd rcx, edi
mov word [rax + rcx*2], r14w
mov dword [rbx + 0xc], edi
mov eax, 0x2000
mov dword [rsi + 0x71c], eax
mov rax, qword [rsi + 0x6d0]
cmp dword [rax + 0xa5c], r14d
je 0x140086f9c
mov rcx, qword [rsi + 0x6d8]
mov rdx, rbx
call fcn.14009fd30
test r13d, r13d
je 0x14008707a
mov r12, qword [rsi + 0x6d8]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [r12 + 0x310]
mov edx, 0x1004
call qword [sym.imp.USER32.dll_SendMessageW]
mov rbp, rax
sub ebp, 1
js 0x140087061
xor r13d, r13d
mov r14d, 0x2000
nop
nop
cmp dword [r12 + 0x3b0], r13d
mov rcx, qword [r12 + 0x310]
mov edi, 2
cmovne edi, r14d
lea r9, [rsp + 0x40]
mov edx, 0x104b
xor r8d, r8d
mov dword [rsp + 0x40], InitCommonControls
mov dword [rsp + 0x44], ebp
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x48], r13d
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x140087059
test dword [rsp + 0x4c], edi
je 0x140087059
mov rax, qword [r12]
mov rdi, qword [rsp + 0x68]
mov rcx, r12
call qword [rax]
mov rdx, rbx
mov rcx, qword [rax]
mov eax, dword [r12 + 8]
imul eax, edi
movsxd r8, eax
add r8, rcx
mov rcx, qword [rsi + 0x6d8]
call fcn.14009f0e0
sub ebp, 1
jns 0x140086fe0
mov r14d, r13d
mov rcx, qword [rsi + 0x6d8]
mov rcx, qword [rcx + 0x310]
call qword [sym.imp.USER32.dll_SetFocus]
xor r12d, r12d
jmp 0x1400870cc
mov rax, qword [rsi + 0x6d8]
mov ebp, r12d
cmp dword [rax + 0x50], r14d
jle 0x1400870cc
nop
nop
mov rdi, qword [rsi + 0x6d8]
mov rcx, rdi
mov rax, qword [rdi]
call qword [rax]
mov rdx, rbx
mov rcx, qword [rax]
mov eax, dword [rdi + 8]
imul eax, ebp
movsxd r8, eax
add r8, rcx
mov rcx, qword [rsi + 0x6d8]
call fcn.14009f0e0
mov rax, qword [rsi + 0x6d8]
add ebp, 1
cmp ebp, dword [rax + 0x50]
jl 0x140087090
cmp dword [rbx + 0x10], 0
je 0x1400870d7
mov esi, dword [rbx + 0xc]
jmp 0x1400870f4
mov rdi, qword [rbx]
test rdi, rdi
je 0x1400870f1
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasw ax, word [rdi]
not rcx
lea rsi, [rcx - 1]
jmp 0x1400870f4
mov esi, r12d
lea edi, [rsi + 0xa]
movsxd rcx, edi
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov rbp, rax
mov rax, qword [rbx]
mov dword [rsp + 0x28], edi
test rax, rax
mov qword [rsp + 0x20], rbp
cmovne r15, rax
or r9d, 0xffffffff
xor edx, edx
mov r8, r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, qword [rsp + 0xc8]
xor r9d, r9d
mov qword [rsp + 0x30], r12
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x140087198
lea r9, [rsp + 0xd0]
mov r8d, esi
mov rdx, rbp
mov rcx, rax
mov r14d, 1
mov dword [rsp + 0xd0], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbp, rbp
je 0x1400871a5
mov rcx, rbp
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov eax, r14d
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret