Function at 0x180208ba9
Capabilities:
Write file on windows

Disassembly:
test rdx, rdx
je 0x180208e06
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xa0
mov qword [rax - 0x70], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov rax, qword [0x1804610b0]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rbp, rdx
mov r14, rcx
xor r12d, r12d
xor r15b, r15b
mov qword [rsp + 0x40], r12
lea rdi, [rcx + 0x18]
mov rsi, rdi
mov qword [rsp + 0x40], rdi
test rdi, rdi
je 0x180208c0e
mov rcx, qword [rdi]
test rcx, rcx
je 0x180208c0e
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
cmp rax, rcx
je 0x180208c49
nop word [rax + rax]
cmp rbp, qword [rax]
je 0x180208c30
add rax, 0x18
cmp rax, rcx
jne 0x180208c20
jmp 0x180208c49
lea r8, [rsp + 0x40]
mov rdx, rbp
mov rcx, r14
call fcn.180208e10
movzx r15d, al
mov rsi, qword [rsp + 0x40]
test rsi, rsi
je 0x180208c64
mov rcx, qword [rsi]
test rcx, rcx
je 0x180208c5c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x48], rdi
test rdi, rdi
je 0x180208c82
mov rcx, qword [rdi]
test rcx, rcx
je 0x180208c82
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rbx, qword [r14]
mov rax, qword [r14 + 8]
cmp rbx, rax
je 0x180208dab
cmp rbp, qword [rbx]
je 0x180208ca5
add rbx, 0x18
cmp rbx, rax
jne 0x180208c92
jmp 0x180208dab
test r15b, r15b
je 0x180208d7c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0x10], eax
xor ecx, ecx
call fcn.1802a9178
mov qword [rbx + 8], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x180208d7c
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x70]
call fcn.180203ae0
nop
cmp qword [rsp + 0x80], 0
je 0x180208d72
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 0x180208d72
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x60], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x60]
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.1800338a0
test rdi, rdi
je 0x180208d97
mov rcx, qword [rdi]
test rcx, rcx
je 0x180208d8f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rsp + 0x48], r12
mov rcx, rbp
test r15b, r15b
je 0x180208da3
mov dl, 1
jmp 0x180208da5
xor edx, edx
call fcn.180203690
nop
test rdi, rdi
je 0x180208dc3
mov rcx, qword [rdi]
test rcx, rcx
je 0x180208dbe
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x48], r12
test rsi, rsi
je 0x180208ddb
mov rcx, qword [rsi]
test rcx, rcx
je 0x180208dd6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x40], r12
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1802994c0
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