Function at 0x14001bd19
Capabilities:
Write file on windows

Disassembly:
test rdx, rdx
je 0x14001bf6e
mov r11, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xa0
mov qword [r11 - 0x80], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x140222080]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rbp, rdx
mov r14, rcx
xor r12d, r12d
xor r15b, r15b
mov qword [r11 - 0x78], r12
lea rdi, [rcx + 0x18]
mov rsi, rdi
mov qword [rsp + 0x50], rdi
test rdi, rdi
je 0x14001bd7d
mov rcx, qword [rdi]
test rcx, rcx
je 0x14001bd7d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
cmp rax, rcx
je 0x14001bdb9
nop dword [rax]
cmp rbp, qword [rax]
je 0x14001bda0
add rax, 0x18
cmp rax, rcx
jne 0x14001bd90
jmp 0x14001bdb9
lea r8, [rsp + 0x50]
mov rdx, rbp
mov rcx, r14
call fcn.14001bf70
movzx r15d, al
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x14001bdd4
mov rcx, qword [rsi]
test rcx, rcx
je 0x14001bdcc
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x60], rdi
test rdi, rdi
je 0x14001bdf2
mov rcx, qword [rdi]
test rcx, rcx
je 0x14001bdf2
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rbx, qword [r14]
mov rax, qword [r14 + 8]
cmp rbx, rax
je 0x14001bf13
cmp rbp, qword [rbx]
je 0x14001be15
add rbx, 0x18
cmp rbx, rax
jne 0x14001be02
jmp 0x14001bf13
test r15b, r15b
je 0x14001bee4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0x10], eax
xor ecx, ecx
call fcn.14017eb90
mov qword [rbx + 8], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x14001bee4
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x70]
call fcn.140015760
nop
lea rcx, [rsp + 0x70]
call fcn.1400030a0
test al, al
jne 0x14001beda
lea rcx, [rsp + 0x70]
call fcn.1400030b0
mov rcx, rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14001beda
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x58], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x58]
mov r8d, 8
lea rdx, [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x70]
call fcn.140002550
test rdi, rdi
je 0x14001beff
mov rcx, qword [rdi]
test rcx, rcx
je 0x14001bef7
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rsp + 0x60], r12
mov rcx, rbp
test r15b, r15b
je 0x14001bf0b
mov dl, 1
jmp 0x14001bf0d
xor edx, edx
call fcn.140015300
nop
test rdi, rdi
je 0x14001bf2b
mov rcx, qword [rdi]
test rcx, rcx
je 0x14001bf26
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x60], r12
test rsi, rsi
je 0x14001bf43
mov rcx, qword [rsi]
test rcx, rcx
je 0x14001bf3e
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x50], r12
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.140158860
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret