Function at 0x18002ad49
Capabilities:
Write file on windows

Disassembly:
test rdx, rdx
je 0x18002afa7
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 [0x180122010]
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 0x18002adad
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002adad
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
cmp rax, rcx
je 0x18002ade9
nop dword [rax]
cmp rbp, qword [rax]
je 0x18002add0
add rax, 0x18
cmp rax, rcx
jne 0x18002adc0
jmp 0x18002ade9
lea r8, [rsp + 0x50]
mov rdx, rbp
mov rcx, r14
call fcn.18002afb0
movzx r15d, al
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x18002ae04
mov rcx, qword [rsi]
test rcx, rcx
je 0x18002adfc
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 0x18002ae22
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002ae22
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rbx, qword [r14]
mov rax, qword [r14 + 8]
cmp rbx, rax
je 0x18002af4c
cmp rbp, qword [rbx]
je 0x18002ae45
add rbx, 0x18
cmp rbx, rax
jne 0x18002ae32
jmp 0x18002af4c
test r15b, r15b
je 0x18002af1d
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 0x18002af1d
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x70]
call fcn.1800283e0
nop
cmp qword [rsp + 0x80], 0
je 0x18002af13
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 0x18002af13
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.180003470
test rdi, rdi
je 0x18002af38
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002af30
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rsp + 0x60], r12
mov rcx, rbp
test r15b, r15b
je 0x18002af44
mov dl, 1
jmp 0x18002af46
xor edx, edx
call fcn.180027f90
nop
test rdi, rdi
je 0x18002af64
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002af5f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x60], r12
test rsi, rsi
je 0x18002af7c
mov rcx, qword [rsi]
test rcx, rcx
je 0x18002af77
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x50], r12
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1800ba9e0
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