Function at 0x18002ae30
Capabilities:
Write file on windows

Disassembly:
test rdx, rdx
je 0x18002b097
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 [0x180126050]
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 0x18002ae9d
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002ae9d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
cmp rax, rcx
je 0x18002aed9
nop dword [rax]
cmp rbp, qword [rax]
je 0x18002aec0
add rax, 0x18
cmp rax, rcx
jne 0x18002aeb0
jmp 0x18002aed9
lea r8, [rsp + 0x50]
mov rdx, rbp
mov rcx, r14
call fcn.18002b0a0
movzx r15d, al
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x18002aef4
mov rcx, qword [rsi]
test rcx, rcx
je 0x18002aeec
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 0x18002af12
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002af12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rbx, qword [r14]
mov rax, qword [r14 + 8]
cmp rbx, rax
je 0x18002b03c
cmp rbp, qword [rbx]
je 0x18002af35
add rbx, 0x18
cmp rbx, rax
jne 0x18002af22
jmp 0x18002b03c
test r15b, r15b
je 0x18002b00d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0x10], eax
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov qword [rbx + 8], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002b00d
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x70]
call fcn.1800284d0
nop
cmp qword [rsp + 0x80], 0
je 0x18002b003
lea rcx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rcx, qword [rsp + 0x70]
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 0x18002b003
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.180003440
test rdi, rdi
je 0x18002b028
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002b020
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rsp + 0x60], r12
mov rcx, rbp
test r15b, r15b
je 0x18002b034
mov dl, 1
jmp 0x18002b036
xor edx, edx
call fcn.180028080
nop
test rdi, rdi
je 0x18002b054
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002b04f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x60], r12
test rsi, rsi
je 0x18002b06c
mov rcx, qword [rsi]
test rcx, rcx
je 0x18002b067
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x50], r12
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1800bd270
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