Function at 0x140112b18
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3f]
sub rsp, 0xa0
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov ebx, r9d
mov r15, r8
mov rdi, rcx
cmp r9d, dword [rcx + 0x68]
je 0x140112b6f
mov byte [rcx + 0x64], 0
add rcx, 0x90
call fcn.1400257a8
lea rcx, [rdi + 0xc0]
call fcn.1400259b0
mov dword [rdi + 0x68], ebx
and qword [rbp - 0x39], 0
and qword [rbp - 0x31], 0
and qword [rbp - 0x29], 0
mov rax, qword [rdi + 0xb0]
lea r8, [rbp - 0x39]
mov edx, dword [rax + 8]
mov rcx, rdi
call fcn.140112a08
mov r13d, eax
mov r8, qword [rbp - 0x31]
mov rax, r8
mov rbx, qword [rbp - 0x39]
mov qword [rbp + 0x47], rbx
sub rax, rbx
sar rax, 4
mov qword [rbp - 9], rax
mov ecx, dword [rdi + 0x58]
lea edx, [rcx + rcx*4]
shl edx, 8
cmp dword [rdi + 0x68], edx
cmova edx, dword [rdi + 0x68]
mov eax, edx
mov qword [rbp - 0x19], rax
xor r14d, r14d
and qword [rbp - 0x61], r14
xor r12d, r12d
mov qword [rbp - 0x59], r12
mov qword [rbp - 0x11], r8
mov qword [rbp - 0x69], rbx
cmp rbx, qword [rbp - 0x11]
je 0x140112d79
mov rax, qword [rbx]
mov qword [rbp - 0x49], rax
mov rcx, qword [rbx + 8]
mov qword [rbp - 0x41], rcx
test rcx, rcx
je 0x140112c0f
lock inc dword [rcx + 8]
mov r12, qword [rbp - 0x59]
mov rbx, qword [rbp - 0x69]
mov qword [rbp + 0x47], rbx
mov rcx, qword [rbp - 0x41]
mov rax, qword [rbp - 0x49]
mov qword [rbp - 0x61], rax
mov rsi, r12
mov r12, rcx
mov qword [rbp - 0x51], rcx
mov qword [rbp - 0x59], rcx
test rsi, rsi
je 0x140112c58
lock dec dword [rsi + 8]
jne 0x140112c48
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lock dec dword [rsi + 0xc]
jne 0x140112c48
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov rbx, qword [rbp - 0x69]
mov r12, qword [rbp - 0x59]
mov qword [rbp + 0x47], rbx
mov qword [rbp - 0x51], r12
test r13d, r13d
jne 0x140112d79
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x4f]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x140112c81
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
and dword [rbp + 0x5f], 0
xor esi, esi
test r15, r15
je 0x140112d6c
mov r12, qword [rbp + 0x77]
mov rbx, qword [rbp + 0x4f]
test r13d, r13d
jne 0x140112d60
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x30]
mov r11, qword [rdi]
mov rcx, rdi
call qword [r11 + 0x10]
test al, al
jne 0x140112d51
mov rcx, qword [rdi + 0xe0]
test rcx, rcx
je 0x140112cd2
mov rax, qword [rcx]
call qword [rax + 0x30]
test al, al
je 0x140112d51
mov r9b, byte [rbp + 0x67]
mov r8, rsi
mov rdx, r15
mov rcx, rdi
call fcn.140110e08
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x5f]
mov r8d, eax
mov rdx, qword [rbp - 0x49]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140112d46
mov eax, dword [rbp + 0x5f]
mov r8d, eax
add rsi, rax
xor edx, edx
div dword [rbp - 9]
mov ecx, eax
add r12, rcx
add r14, r8
cmp qword [rbp + 0x6f], 0
je 0x140112d57
cmp r14, qword [rbp - 0x19]
jbe 0x140112d57
mov rdx, qword [rbp + 0x7f]
mov rcx, qword [rdi + 0xe0]
mov r8, rdx
mov rax, qword [rcx]
cmp r12, rdx
jae 0x140112d3e
mov rdx, r12
call qword [rax + 0x28]
xor r14d, r14d
jmp 0x140112d57
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
jmp 0x140112d57
mov r13d, 0x4c7
cmp rsi, r15
jb 0x140112c98
mov qword [rbp + 0x77], r12
mov rbx, qword [rbp + 0x47]
mov r12, qword [rbp - 0x51]
add rbx, 0x10
mov qword [rbp + 0x47], rbx
jmp 0x140112bd9
test r12, r12
je 0x140112da4
lock dec dword [r12 + 8]
jne 0x140112da4
mov rbx, qword [rbp - 0x59]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lock dec dword [rbx + 0xc]
jne 0x140112da4
mov rcx, qword [rbp - 0x59]
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rbx, qword [rbp - 0x39]
test rbx, rbx
je 0x140112dd3
mov rdi, qword [rbp - 0x31]
cmp rbx, rdi
je 0x140112dcb
mov rcx, rbx
call fcn.140058134
add rbx, 0x10
cmp rbx, rdi
jne 0x140112db6
mov rbx, qword [rbp - 0x39]
mov rcx, rbx
call fcn.1400be0f4
mov eax, r13d
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret