Function at 0x180297130
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xf0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x140], rbx
mov rax, qword [0x18066dcd8]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r14, rdx
mov rsi, rcx
xor r12d, r12d
cmp qword [rcx + 0x30], r12
je 0x18029717d
xor edx, edx
call fcn.1802977d0
mov rcx, qword [rsi + 0xe8]
test rcx, rcx
je 0x180297195
mov rax, qword [rcx]
mov rdx, qword [rsi + 0xf0]
call qword [rax]
mov qword [rbp - 9], r12
lea rbx, [rsi + 8]
mov rdi, rbx
mov qword [rbp - 9], rbx
test rbx, rbx
je 0x1802971b8
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802971b8
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdx, [rbp - 1]
mov rcx, rsi
call fcn.180297c40
nop
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.180297d40
nop
cmp qword [rbp + 0xf], 0
je 0x180297697
cmp qword [rbp - 0x19], 0
je 0x180297697
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 0x30], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x180297691
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rcx, qword [rbp - 1]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
mov qword [rbp - 0x31], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x18029766d
test rbx, rbx
je 0x180297290
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297289
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rbp - 9], r12
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x79], eax
cmp eax, 0x1400000
jbe 0x18029732d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x71], r12
mov qword [rbp - 0x71], rbx
test rbx, rbx
je 0x1802972ce
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802972ce
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x1802972e1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rcx, qword [rbp - 1]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x1802976e0
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297324
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x71], r12
jmp 0x1802976e0
mov r15b, 1
xor r13b, r13b
test eax, eax
je 0x1802974c6
mov dword [rbp - 0x71], r12d
xor eax, eax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x49], r12
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], r12
mov byte [rsp + 0x40], al
mov edx, dword [rbp - 0x79]
lea rax, [rbp - 0x49]
mov qword [rbp - 0x69], rax
lea rax, [rsp + 0x40]
mov qword [rbp - 0x61], rax
movaps xmm0, xmmword [rbp - 0x69]
movdqa xmmword [rbp - 0x69], xmm0
lea r8, [rbp - 0x69]
lea rcx, [rbp - 0x49]
call fcn.1800db0d0
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x71]
mov r8d, dword [rbp - 0x79]
mov rdx, qword [rbp - 0x49]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1802973ae
mov eax, dword [rbp - 0x79]
cmp dword [rbp - 0x71], eax
je 0x180297414
mov qword [rbp - 0x69], r12
mov qword [rbp - 0x61], r12
mov qword [rbp - 0x59], r12
lea rdx, [rbp - 0x69]
lea rcx, [rbp - 0x49]
call fcn.180196d60
nop
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x180297411
mov rdx, qword [rbp - 0x59]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180297400
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180297400
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x69], xmm0
mov qword [rbp - 0x59], r12
xor r15b, r15b
mov rax, qword [rbp - 0x41]
cmp qword [rbp - 0x49], rax
je 0x180297474
mov rcx, r14
call fcn.180297e00
mov qword [rbp - 0x69], r12
mov rax, qword [rbp - 0x41]
cmp rax, qword [rbp - 0x49]
je 0x180297462
nop dword [rax]
nop dword [rax + rax]
mov r8, r14
lea rdx, [rbp - 0x69]
lea rcx, [rbp - 0x49]
call fcn.1802a3120
test al, al
je 0x180297462
mov rax, qword [rbp - 0x41]
sub rax, qword [rbp - 0x49]
cmp qword [rbp - 0x69], rax
jb 0x180297440
movzx r13d, r13b
mov eax, 1
cmp qword [r14 + 8], 0
cmove r13d, eax
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x1802974bd
mov rdx, qword [rbp - 0x39]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1802974ac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1802974ac
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], r12
test r15b, r15b
je 0x180297606
mov qword [rbp - 0x69], r12
mov qword [rbp - 0x69], rbx
test rbx, rbx
je 0x1802974e2
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802974e2
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [rbp - 0x79]
mov dword [rsi + 0x38], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x71], r12d
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x71]
mov r8d, 4
lea rdx, [rbp - 0x79]
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_WriteFile]
movzx r15d, r15b
test eax, eax
cmove r15d, r12d
test rbx, rbx
je 0x18029753c
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297538
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x69], r12
test r15b, r15b
je 0x180297606
lea r15, [rsi + 0x20]
mov rcx, r15
call fcn.180297e00
cmp qword [rsi + 0x18], 0
je 0x18029759f
lea r12, [rsi + 0x10]
mov r9, qword [r12]
mov qword [rsp + 0x20], r9
mov r9, qword [r9]
mov r8, qword [r14]
lea rdx, [rbp - 0x69]
mov rcx, r14
call fcn.180297f80
cmp r15, r12
je 0x18029759c
mov rcx, qword [r15]
mov rax, qword [r12]
mov qword [r15], rax
mov qword [r12], rcx
mov rcx, qword [r15 + 8]
mov rax, qword [r12 + 8]
mov qword [r15 + 8], rax
mov qword [r12 + 8], rcx
xor r12d, r12d
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13b, r13b
je 0x1802976e0
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rcx, qword [rbp - 1]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rbp - 0x31], r12
mov qword [rbp - 0x31], rbx
test rbx, rbx
je 0x1802975e2
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802975e2
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x1802976e0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1802975fd
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x31], r12
jmp 0x1802976e0
mov qword [rbp - 0x69], r12
mov qword [rbp - 0x69], rbx
test rbx, rbx
je 0x180297622
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297622
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x180297635
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x18029759f
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297664
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x69], r12
jmp 0x18029759f
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1802976e0
mov qword [rsi + 0x30], r12
jmp 0x1802976e0
lea rbx, [rsi + 0x20]
mov rcx, rbx
call fcn.180297e00
cmp qword [rsi + 0x18], 0
je 0x1802976e0
mov rdx, qword [r14]
add rsi, 0x10
mov r9, qword [rsi]
mov r8, qword [r9]
mov rcx, r14
call fcn.180298010
cmp rbx, rsi
je 0x1802976e0
mov rcx, qword [rbx]
mov rax, qword [rsi]
mov qword [rbx], rax
mov qword [rsi], rcx
mov rcx, qword [rbx + 8]
mov rax, qword [rsi + 8]
mov qword [rbx + 8], rax
mov qword [rsi + 8], rcx
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x180297723
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18029771e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18029771e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
mov qword [rbp - 0x19], r12
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r12w
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x180297777
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180297772
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180297772
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
mov qword [rbp + 0xf], r12
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r12w
test rdi, rdi
je 0x18029779f
mov rcx, qword [rdi]
test rcx, rcx
je 0x18029779b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 9], r12
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.18042cdf0
mov rbx, qword [rsp + 0x140]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret