Function at 0x14002f530
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push r14
sub rsp, 0xa0
cmp qword [0x14008e770], 0
je 0x14002f82e
mov qword [rax - 0x10], rbx
mov qword [rax - 0x18], rbp
mov qword [rax - 0x20], rsi
lea rsi, [rcx + 8]
mov qword [rax - 0x28], rdi
mov qword [rax - 0x30], r12
mov r12, qword [rcx + 0x18]
mov rcx, rsi
mov qword [rax - 0x38], r13
mov qword [rsp + 0x20], r12
mov qword [rax - 0x40], r15
mov qword [rax - 0x80], rsi
call fcn.140034420
xor r13d, r13d
mov qword [rsp + 0x38], rax
mov rbp, rax
mov qword [rsp + 0x30], rax
mov rdi, rax
mov byte [rsp + 0xc8], 0x7b
lea r14, [rsp + 0xc8]
lea r15d, [r13 + 1]
mov rax, rbp
sub rax, rdi
add rax, 0x3f8
jne 0x14002f624
mov rax, qword [rsi + 8]
mov rcx, rax
mov rdx, qword [rax + 0x18]
add rdx, 7
and rdx, 0xfffffffffffffff8
lea rax, [rdx + 0x400]
cmp rax, qword [rcx + 0x10]
jbe 0x14002f5ef
mov edx, 0x400
mov rcx, rsi
call fcn.140038a30
xor edx, edx
mov rax, qword [rsi + 8]
lea rcx, [rdx + 0x400]
mov rdi, qword [rax + 0x28]
mov qword [rax + 0x18], rcx
add rdi, rdx
mov rax, qword [rsi + 8]
mov rdx, qword [rax + 0x20]
add rdx, qword [rax + 0x18]
mov eax, 0x3f8
mov qword [rsi + 0x10], rdx
mov qword [rbp + 0x3f8], rdi
mov rbp, rdi
cmp rax, r15
mov rbx, r15
mov rdx, r14
mov rcx, rdi
cmovb rbx, rax
mov r8, rbx
call fcn.1400700e0
add rdi, rbx
add r13, rbx
add r14, rbx
sub r15, rbx
jne 0x14002f5b2
mov r8, qword [rsp + 0xc0]
lea rcx, [rsp + 0x28]
mov rdx, qword [rsp + 0xb8]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x48], r15b
call fcn.14002f2a0
mov rsi, qword [rsp + 0x28]
lea r13, [rsp + 0xc8]
mov rdi, qword [rsp + 0x50]
mov r15d, 1
mov rbp, qword [rsp + 0x40]
mov r12, qword [rsp + 0x38]
mov r14, qword [rsp + 0xb0]
mov byte [rsp + 0xc8], 0x7d
nop
mov rax, r12
sub rax, rbp
add rax, 0x3f8
jne 0x14002f723
mov rax, qword [rsi + 8]
mov rcx, rax
mov rdx, qword [rax + 0x18]
add rdx, 7
and rdx, 0xfffffffffffffff8
lea rax, [rdx + 0x400]
cmp rax, qword [rcx + 0x10]
jbe 0x14002f6ed
mov edx, 0x400
mov rcx, rsi
call fcn.140038a30
xor edx, edx
mov rax, qword [rsi + 8]
lea rcx, [rdx + 0x400]
mov rbp, qword [rax + 0x28]
mov qword [rax + 0x18], rcx
add rbp, rdx
mov rax, qword [rsi + 8]
mov rdx, qword [rax + 0x20]
add rdx, qword [rax + 0x18]
mov eax, 0x3f8
mov qword [rsi + 0x10], rdx
mov qword [r12 + 0x3f8], rbp
mov r12, rbp
cmp rax, r15
mov rbx, r15
mov rdx, r13
mov rcx, rbp
cmovb rbx, rax
mov r8, rbx
call fcn.1400700e0
add rbp, rbx
add rdi, rbx
add r13, rbx
sub r15, rbx
jne 0x14002f6b0
cmp qword [0x14008e770], 0
mov r15, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
mov r12, qword [rsp + 0x20]
je 0x14002f7dc
lea rcx, [0x14008ead8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbp, qword [0x14008e770]
mov rsi, qword [rsp + 0x30]
test rdi, rdi
je 0x14002f7c2
nop dword [rax]
nop dword [rax + rax]
mov ebx, 0x3f8
mov r9, rbp
cmp rdi, rbx
mov edx, 1
mov rcx, rsi
cmovb rbx, rdi
mov r8, rbx
call fcn.1400529c8
mov rsi, qword [rsi + 0x3f8]
sub rdi, rbx
jne 0x14002f790
mov rbp, qword [0x14008e770]
mov rdx, rbp
mov ecx, 0xa
call fcn.140052f48
lea rcx, [0x14008ead8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [r14 + 0x10]
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
mov qword [r14 + 0x18], r12
cmp qword [rax + 0x20], r12
jbe 0x14002f81d
nop word [rax + rax]
mov rax, qword [rax]
mov qword [r14 + 0x10], rax
cmp qword [rax + 0x20], r12
ja 0x14002f810
mov rax, qword [r14 + 0x10]
sub r12, qword [rax + 0x20]
mov qword [rax + 0x18], r12
mov r12, qword [rsp + 0x78]
add rsp, 0xa0
pop r14
ret