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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x18066dcd8]
xor rax, rsp
mov qword [rbp + 0x2f], rax
movzx esi, dl
mov rdi, rcx
xor r13d, r13d
mov dword [rbp - 0x29], r13d
test dl, dl
je 0x180297833
mov rcx, qword [rcx + 0xe8]
test rcx, rcx
je 0x180297833
mov rax, qword [rcx]
mov rdx, qword [rdi + 0xf0]
call qword [rax + 8]
mov qword [rbp + 0x27], r13
lea rbx, [rdi + 8]
mov qword [rbp + 0x27], rbx
test rbx, rbx
je 0x180297853
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297853
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
test sil, sil
je 0x180297af1
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x39], xmm0
xor r8d, r8d
xor edx, edx
call fcn.180297f20
mov rcx, rax
mov qword [rbp - 0x39], rax
lea rdx, [rdi + 0x20]
lea rax, [rbp - 0x39]
cmp rdx, rax
je 0x18029789c
mov rax, qword [rdx]
mov qword [rdx], rcx
mov qword [rbp - 0x39], rax
mov rcx, qword [rdx + 8]
mov rax, qword [rbp - 0x31]
mov qword [rdx + 8], rax
mov qword [rbp - 0x31], rcx
lea rcx, [rbp - 0x39]
call fcn.180297e00
nop
mov edx, 0x88
mov rcx, qword [rbp - 0x39]
call fcn.18042ce14
nop
lea rdx, [rdi + 0x40]
lea rcx, [rbp - 0x11]
call fcn.18007e500
mov r12d, 1
mov dword [rbp - 0x29], r12d
cmp dword [rdi + 0x38], 0
jbe 0x180297a93
cmp qword [rbp - 1], 0
je 0x180297a93
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
mov qword [rsp + 0x30], r13
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 rsi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x180297a93
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
mov edx, dword [rdi + 0x38]
cmp eax, edx
sete r15b
jbe 0x180297a52
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
sub r14d, dword [rdi + 0x38]
mov dword [rbp - 0x19], r13d
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], r13
mov byte [rbp - 0x49], al
lea rax, [rbp + 0xf]
mov qword [rbp - 0x39], rax
lea rax, [rbp - 0x49]
mov qword [rbp - 0x31], rax
movaps xmm0, xmmword [rbp - 0x39]
movdqa xmmword [rbp - 0x39], xmm0
mov edx, r14d
lea r8, [rbp - 0x39]
lea rcx, [rbp + 0xf]
call fcn.1800db0d0
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x19]
mov r8d, r14d
mov rdx, qword [rbp + 0xf]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180297a06
cmp dword [rbp - 0x19], r14d
jne 0x180297a06
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x15], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x15]
mov r8d, r14d
mov rdx, qword [rbp + 0xf]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180297a06
cmp dword [rbp - 0x15], r14d
jne 0x180297a09
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x180297a09
mov r15b, 1
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x180297a52
mov rdx, qword [rbp + 0x1f]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180297a41
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180297a41
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 + 0xf], xmm0
mov qword [rbp + 0x1f], r13
test r15b, r15b
je 0x180297a71
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15b, r15b
je 0x180297a93
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
and r12d, 0xfffffffe
mov dword [rbp - 0x29], r12d
mov rdx, qword [rbp + 7]
cmp rdx, 8
jb 0x180297ade
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180297ad9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180297ad9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
mov qword [rbp - 1], r13
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r13w
jmp 0x180297b62
cmp qword [rdi + 0x28], 0
je 0x180297b62
lea rcx, [rdi + 0x10]
mov rdx, qword [rcx]
lea rsi, [rdi + 0x20]
mov r9, qword [rsi]
mov r8, qword [r9]
call fcn.180298010
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x39], xmm0
xor r8d, r8d
xor edx, edx
call fcn.180297f20
mov rcx, rax
mov qword [rbp - 0x39], rax
lea rax, [rbp - 0x39]
cmp rsi, rax
je 0x180297b4a
mov rax, qword [rsi]
mov qword [rsi], rcx
mov qword [rbp - 0x39], rax
mov rcx, qword [rsi + 8]
mov rax, qword [rbp - 0x31]
mov qword [rsi + 8], rax
mov qword [rbp - 0x31], rcx
lea rcx, [rbp - 0x39]
call fcn.180297e00
nop
mov edx, 0x88
mov rcx, qword [rbp - 0x39]
call fcn.18042ce14
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x180297bf0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x30], r13
lea rdx, [rbp - 0x11]
mov rcx, rdi
call fcn.180297d40
nop
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
mov rdx, qword [rbp + 7]
cmp rdx, 8
jb 0x180297bde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180297bd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180297bd9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18042ce14
movdqa xmm0, xmmword [0x1805bf050]
movdqu xmmword [rbp - 1], xmm0
mov word [rbp - 0x11], r13w
mov dword [rdi + 0x38], r13d
test rbx, rbx
je 0x180297c0b
mov rcx, qword [rbx]
test rcx, rcx
je 0x180297c07
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0x27], r13
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.18042cdf0
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret