Function at 0x180168630
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xe0
mov qword [rbp - 0x71], 0xfffffffffffffffe
mov qword [rsp + 0x120], rbx
mov rax, qword [0x1804cc010]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, rdx
mov rbx, rcx
xor eax, eax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
xor r15d, r15d
mov qword [rbp - 0x49], r15
mov qword [rbp - 0x41], r15
mov qword [rbp - 0x39], r15
lea rdx, [rbp - 0x49]
call fcn.180167b60
test al, al
jne 0x18016869e
xor dil, dil
mov rbx, qword [rbp - 0x49]
jmp 0x1801688d9
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
movdqa xmmword [rbp - 9], xmm0
movdqa xmmword [rbp + 7], xmm0
mov qword [rbp + 0x17], r15
mov dword [rbp + 0x1f], 0xffffffff
mov rax, qword [rbx + 0x40]
cmp qword [rbx + 0x38], rax
je 0x1801686fd
lea rdx, [rbx + 0x38]
lea rcx, [rbp - 0x29]
call fcn.18016a7d0
lea rdx, [rbx + 0x50]
lea rcx, [rbp - 0x11]
call fcn.18016a7d0
lea rdx, [rbx + 0x68]
lea rcx, [rbp + 7]
call fcn.18016a7d0
mov eax, dword [rbx + 0x80]
mov dword [rbp + 0x1f], eax
lea r8, [rbp - 0x49]
lea rdx, [rbp - 0x29]
call fcn.180167230
mov rbx, qword [rbp - 0x49]
test al, al
jne 0x18016871a
xor dil, dil
jmp 0x1801688cf
xor eax, eax
mov qword [rbp - 0x61], rax
mov qword [rbp - 0x59], rax
mov qword [rbp - 0x51], rax
mov qword [rbp - 0x61], r15
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x51], r15
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x29]
call fcn.180166570
mov rax, qword [rbp - 0x59]
cmp qword [rbp - 0x61], rax
je 0x180168883
mov rcx, rsi
call fcn.180174240
test al, al
je 0x180168883
mov dword [rbp - 0x69], r15d
mov rdi, qword [rbp - 0x59]
mov rdx, qword [rbp - 0x61]
sub rdi, rdx
mov rax, qword [rsi]
test rax, rax
je 0x180168883
test rdx, rdx
je 0x180168883
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180168883
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x69]
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180168883
mov ecx, dword [rbp - 0x69]
cmp edi, ecx
jne 0x180168883
mov eax, dword [rbp - 0x59]
sub eax, dword [rbp - 0x61]
cmp ecx, eax
jne 0x180168883
mov rdi, qword [rbp - 0x41]
mov eax, edi
sub eax, ebx
mov dword [rbp - 0x31], eax
mov rax, qword [rsi]
test rax, rax
je 0x180168883
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180168883
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x69]
mov r8d, 4
lea rdx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180168883
cmp dword [rbp - 0x69], 4
jne 0x180168883
cmp rbx, rdi
je 0x180168852
mov r14, rdi
sub r14, rbx
mov rax, qword [rsi]
test rax, rax
je 0x180168883
test rbx, rbx
je 0x180168883
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180168883
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x69]
mov r8d, r14d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180168883
mov eax, dword [rbp - 0x69]
cmp r14d, eax
jne 0x180168883
sub edi, ebx
cmp eax, edi
jne 0x180168883
mov qword [rbp - 0x79], r15
cmp qword [rsi], 0
je 0x18016887e
lea r9, [rbp - 0x79]
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, rsi
call fcn.1801741c0
test al, al
je 0x18016887e
mov rdx, qword [rbp - 0x79]
mov rcx, rsi
call fcn.1801742f0
mov dil, 1
jmp 0x180168886
xor dil, dil
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x1801688cf
mov rdx, qword [rbp - 0x51]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1801688be
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1801688be
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x61], xmm0
mov qword [rbp - 0x51], r15
lea rcx, [rbp - 0x29]
call fcn.180168c60
nop
test rbx, rbx
je 0x180168921
mov rdx, qword [rbp - 0x39]
sub rdx, rbx
mov rax, rbx
cmp rdx, 0x1000
jb 0x18016890d
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18016890d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.180386950
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], r15
movzx eax, dil
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1803868f0
mov rbx, qword [rsp + 0x120]
add rsp, 0xe0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret