Function at 0x140082240
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xd0
mov qword [rbp - 0x51], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14016ca00]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rdi, rcx
xor eax, eax
mov qword [rbp - 0x31], rax
mov rdx, rcx
lea rcx, [rbp - 0x31]
call fcn.140015bf0
nop
cmp qword [rdi + 0x28], 0
jne 0x140082496
lea rdx, [rbp - 0x11]
mov rcx, rdi
call fcn.140082d90
nop
xor r12d, r12d
cmp qword [rbp - 1], r12
je 0x140082475
xor eax, eax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x49], r12
mov qword [rbp - 0x41], r12
xor r8d, r8d
xor edx, edx
call fcn.140081ad0
mov qword [rbp - 0x49], rax
lea rbx, [rdi + 8]
lea rcx, [rbp - 0x49]
cmp rcx, rbx
je 0x140082461
mov r15, qword [rbx]
mov qword [rbp - 0x49], r15
mov qword [rbx], rax
mov rsi, qword [rbx + 8]
mov qword [rbp - 0x41], rsi
mov qword [rbx + 8], r12
test rsi, rsi
je 0x140082461
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
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 r14, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140082442
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x14008235f
mov rcx, qword [rcx]
test rcx, rcx
je 0x14008235b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x31], r12
xor eax, eax
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x19], rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r12
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x49]
call fcn.14008d870
xor eax, eax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xf], xmm0
mov qword [rbp + 0x1f], r12
lea r9d, [rax + 2]
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rsi, qword [rbp - 0x29]
mov rax, qword [rbp - 0x21]
cmp rsi, rax
je 0x1400823e2
mov dword [rbp - 0x39], r12d
sub rax, rsi
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x39]
mov r8d, eax
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14008241d
xor eax, eax
mov qword [rbp - 0x39], rax
mov rdx, rdi
lea rcx, [rbp - 0x39]
call fcn.140015bf0
nop
mov r8, qword [rbx]
mov r9, qword [rbp - 0x49]
mov qword [rsp + 0x20], r9
mov r9, qword [r9]
mov r8, qword [r8]
lea rdx, [rbp - 0x59]
mov rcx, rbx
call fcn.1400831e0
nop
lea rcx, [rbp - 0x39]
call fcn.140015c20
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rsi, rsi
je 0x140082461
mov rcx, rsi
call fcn.1400bd20c
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r12
jmp 0x140082461
lea rax, [rbp - 0x49]
cmp rbx, rax
je 0x140082461
mov rax, qword [rbx]
mov qword [rbx], r15
mov qword [rbp - 0x49], rax
mov rax, qword [rbx + 8]
mov qword [rbx + 8], rsi
mov qword [rbp - 0x41], rax
lea rcx, [rbp - 0x49]
call fcn.140081960
nop
mov rcx, qword [rbp - 0x49]
call fcn.1400bd20c
nop
cmp qword [rbp + 7], 8
jb 0x140082485
mov rcx, qword [rbp - 0x11]
call fcn.1400bd20c
mov qword [rbp + 7], 7
mov qword [rbp - 1], r12
mov word [rbp - 0x11], r12w
lea rcx, [rbp - 0x31]
call fcn.140015c20
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400bcae0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret