Function at 0x140014b70
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov qword [rax - 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov rbx, rdx
mov rbp, rcx
call fcn.1400179f4
mov rcx, rax
test rax, rax
je 0x140014df0
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140001f80
xor r12d, r12d
lea r14, [r12 - 1]
test al, al
jne 0x140014bfb
test rbx, rbx
jne 0x140014bd8
mov eax, r12d
jmp 0x140014bea
mov rax, r14
nop dword [rax + rax]
inc rax
cmp word [rbx + rax*2], r12w
jne 0x140014be0
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140002300
nop
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [rbp + 0x48], 0
je 0x140014d23
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileType]
mov rbx, qword [rsp + 0x40]
test al, 1
jne 0x140014cf3
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov r9d, r14d
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rsi, eax
mov rcx, rsi
call fcn.140017048
mov r15, rax
mov r8, rsi
xor edx, edx
mov rcx, rax
call fcn.140038400
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r15
mov r9d, r14d
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [rsi - 1]
cdqe
mov byte [rax + r15], 0
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov edi, eax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov r8, r14
nop
inc r8
cmp byte [r15 + r8], 0
jne 0x140014cb0
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0xa8]
mov rdx, r15
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov rcx, r15
call fcn.140017040
jmp 0x140014db3
mov r8d, dword [rbx - 0x10]
add r8d, r8d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0xa0]
mov rdx, rbx
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x140014db3
call fcn.1400179f4
mov rcx, rax
test rax, rax
je 0x140014de5
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
mov rbx, qword [rsp + 0x40]
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.1400106c0
test al, al
jne 0x140014d67
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.1400107d0
nop
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0xa0]
mov r8d, dword [rbx - 0x10]
mov rdx, rbx
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140014dae
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x40]
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r14d
sub r14d, 1
jg 0x140014dcc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov ecx, 0x80004005
call fcn.1400024c0
nop
mov ecx, 0x80004005
call fcn.1400024c0
int3