Function at 0x180016690
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp - 0x19], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x180035020]
xor rax, rsp
mov qword [rbp + 0x3f], rax
mov rbx, rcx
xor r14d, r14d
mov dword [rbp - 0x29], r14d
cmp qword [rcx + 0x80], r14
je 0x1800166e3
cmp qword [rcx + 0x88], r14
je 0x1800166e3
mov al, 1
jmp 0x180016935
mov ecx, 0x48
call fcn.180021574
mov rdi, rax
mov qword [rbp - 0x21], rax
mov qword [rbp + 0xf], r14
mov qword [rbp + 0x17], r14
mov qword [rbp + 0xf], r14
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r14w
mov r8d, 3
lea rdx, [0x180026e90]
lea rcx, [rbp - 1]
call fcn.180005a20
nop
mov dword [rbp - 0x29], 1
mov byte [rdi], 0
mov qword [rdi + 0x18], r14
mov qword [rdi + 0x20], 7
mov word [rdi + 8], r14w
lea rdx, [rbp - 1]
lea rcx, [rdi + 0x28]
call fcn.1800057e0
nop
cmp qword [rdi + 0x38], 0
jne 0x18001676b
mov r8d, 3
lea rdx, [0x180026f30]
lea rcx, [rdi + 0x28]
call fcn.180005a20
nop
mov qword [rbx + 0x80], rdi
mov eax, 1
and eax, 0xfffffffe
mov dword [rbp - 0x29], eax
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x1800167c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800167bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800167bb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180021994
mov qword [rbp + 0xf], r14
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r14w
mov qword [rbp + 0x2f], r14
mov qword [rbp + 0x37], r14
mov qword [rbp + 0x2f], r14
mov qword [rbp + 0x37], 7
mov word [rbp + 0x1f], r14w
mov rcx, qword [rbx + 0x80]
lea rdx, [rcx + 0x28]
lea r8, [rbp + 0x1f]
call fcn.1800194d0
test al, al
je 0x1800168c4
mov ecx, 8
call fcn.180021574
mov rdi, rax
mov qword [rbp - 0x21], rax
mov ecx, 8
call fcn.180021574
mov qword [rbp - 0x11], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rdi], rax
mov qword [rbx + 0x88], rdi
cmp qword [rdi], 0
je 0x1800168ac
mov dword [rsp + 0x20], 4
mov r9d, 1
mov r8d, 0x40000000
lea rdx, [rbp + 0x1f]
mov rcx, rdi
call fcn.1800192c0
test al, al
je 0x1800168ac
mov word [rbp - 9], 0xbbef
mov byte [rbp - 7], 0xbf
mov dword [rbp - 0x25], r14d
mov rax, qword [rbx + 0x88]
mov rcx, qword [rax]
test rcx, rcx
je 0x1800168dc
mov rcx, qword [rcx]
cmp rcx, 0xffffffffffffffff
je 0x1800168dc
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x25]
mov r8d, 3
lea rdx, [rbp - 9]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1800168dc
cmp dword [rbp - 0x25], 3
sete bl
jmp 0x1800168de
mov rcx, qword [rbx + 0x88]
test rcx, rcx
je 0x1800168bd
call fcn.180014340
mov qword [rbx + 0x88], r14
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x1800168d5
call fcn.1800143b0
mov qword [rbx + 0x80], r14
xor bl, bl
mov rdx, qword [rbp + 0x37]
cmp rdx, 8
jb 0x180016921
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18001691c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18001691c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180021994
mov qword [rbp + 0x2f], r14
mov qword [rbp + 0x37], 7
mov word [rbp + 0x1f], r14w
movzx eax, bl
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.180021550
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret