Function at 0x18002e710
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 [rbp - 0x69], 0xfffffffffffffffe
mov qword [rsp + 0x140], rbx
mov rax, qword [0x1800fb008]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, rdx
mov rsi, rcx
cmp qword [rcx + 0x30], 0
je 0x18002e75a
xor edx, edx
call fcn.18002ecd0
mov rcx, qword [rsi + 0xe8]
test rcx, rcx
je 0x18002e772
mov rax, qword [rcx]
mov rdx, qword [rsi + 0xf0]
call qword [rax]
lea rbx, [rsi + 8]
mov rdi, rbx
mov qword [rbp + 0xf], rbx
test rbx, rbx
je 0x18002e791
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002e791
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdx, [rbp - 0x11]
mov rcx, rsi
call fcn.18002f060
nop
lea rdx, [rbp - 0x31]
mov rcx, rsi
call fcn.18002f110
nop
xor r12d, r12d
cmp qword [rbp - 1], r12
je 0x18002ebff
cmp qword [rbp - 0x21], r12
je 0x18002ebff
lea rcx, [rbp - 0x31]
cmp qword [rbp - 0x19], 8
cmovae rcx, qword [rbp - 0x31]
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 0x18002ebf9
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, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rbp - 0x51], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x18002ebd5
test rbx, rbx
je 0x18002e86a
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002e863
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r12
mov qword [rbp + 0xf], r12
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x61], eax
cmp eax, 0x1400000
jbe 0x18002e8e4
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x51], rbx
test rbx, rbx
je 0x18002e8a0
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002e8a0
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x18002e8b3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rbp - 0x31]
cmp qword [rbp - 0x19], 8
cmovae rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [rsi + 0x38], r12d
jmp 0x18002ebb8
mov r12b, 1
xor r13b, r13b
test eax, eax
je 0x18002ea36
xor r12d, r12d
mov dword [rbp - 0x5d], r12d
xor eax, eax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], r12
mov byte [rsp + 0x40], al
mov edx, dword [rbp - 0x61]
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x49]
call fcn.180008e00
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x5d]
mov r8d, dword [rbp - 0x61]
mov r14, qword [rbp - 0x49]
mov rdx, r14
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18002e9bd
mov eax, dword [rbp - 0x61]
cmp dword [rbp - 0x5d], eax
jne 0x18002e9bd
mov r12, qword [rbp - 0x41]
cmp r14, r12
je 0x18002ea0d
mov rcx, r15
call fcn.18002f550
mov qword [rbp - 0x59], 0
sub r12, r14
je 0x18002e9a5
nop dword [rax]
nop dword [rax + rax]
mov r8, r15
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x49]
call fcn.18003b200
mov r14, qword [rbp - 0x49]
test al, al
je 0x18002e9a5
mov rax, qword [rbp - 0x41]
sub rax, r14
cmp qword [rbp - 0x59], rax
jb 0x18002e980
movzx r13d, r13b
mov eax, 1
cmp qword [r15 + 8], 0
cmove r13d, eax
movzx r12d, al
jmp 0x18002ea10
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rbp - 0x71], r12
mov rcx, r14
mov r14, r12
mov qword [rbp - 0x49], r12
mov qword [rsp + 0x48], rcx
mov rax, qword [rbp - 0x41]
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x79], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x39], r12
mov qword [rbp - 0x71], rax
test rcx, rcx
je 0x18002ea08
call fcn.18008861c
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rbp - 0x71], r12
xor r12b, r12b
jmp 0x18002ea10
mov r12b, 1
test r14, r14
je 0x18002ea2d
mov rcx, r14
call fcn.18008861c
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], 0
test r12b, r12b
je 0x18002eb13
mov qword [rbp - 0x59], rbx
test rbx, rbx
je 0x18002ea4e
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002ea4e
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [rbp - 0x61]
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]
xor eax, eax
mov dword [rbp - 0x5d], eax
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x5d]
lea r8d, [rax + 4]
lea rdx, [rbp - 0x61]
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_WriteFile]
movzx r14d, r12b
test eax, eax
mov r12d, 0
cmove r14d, r12d
test rbx, rbx
je 0x18002eaad
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002eaa9
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x59], r12
test r14b, r14b
je 0x18002eb16
lea r14, [rsi + 0x20]
mov rcx, r14
call fcn.18002f550
cmp qword [rsi + 0x18], 0
je 0x18002eb75
lea r12, [rsi + 0x10]
mov r9, qword [r12]
mov qword [rsp + 0x20], r9
mov r9, qword [r9]
mov r8, qword [r15]
lea rdx, [rbp - 0x59]
mov rcx, r15
call fcn.18002f740
cmp r14, r12
je 0x18002eb72
mov rcx, qword [r14]
mov rax, qword [r12]
mov qword [r14], rax
mov qword [r12], rcx
mov rcx, qword [r14 + 8]
mov rax, qword [r12 + 8]
mov qword [r14 + 8], rax
mov qword [r12 + 8], rcx
jmp 0x18002eb72
xor r12d, r12d
mov qword [rbp - 0x59], rbx
test rbx, rbx
je 0x18002eb2e
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002eb2e
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x18002eb41
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 0x31]
cmp qword [rbp - 0x19], 8
cmovae rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x18002eb75
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002eb6c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x59], r12
jmp 0x18002eb75
xor r12d, r12d
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13b, r13b
je 0x18002ec47
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rbp - 0x51], rbx
test rbx, rbx
je 0x18002ebb4
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002ebb4
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x18002ec47
mov rcx, qword [rbx]
test rcx, rcx
je 0x18002ebcf
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x51], r12
jmp 0x18002ec47
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x30], r12
lea rcx, [rbp - 0x31]
cmp qword [rbp - 0x19], 8
cmovae rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x18002ec47
mov qword [rsi + 0x30], r12
jmp 0x18002ec47
lea rbx, [rsi + 0x20]
mov rcx, rbx
call fcn.18002f550
cmp qword [rsi + 0x18], r12
je 0x18002ec47
mov rdx, qword [r15]
add rsi, 0x10
mov r9, qword [rsi]
mov r8, qword [r9]
mov rcx, r15
call fcn.18002f830
cmp rbx, rsi
je 0x18002ec47
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
cmp qword [rbp - 0x19], 8
jb 0x18002ec57
mov rcx, qword [rbp - 0x31]
call fcn.18008861c
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r12
mov word [rbp - 0x31], r12w
cmp qword [rbp + 7], 8
jb 0x18002ec78
mov rcx, qword [rbp - 0x11]
call fcn.18008861c
mov qword [rbp + 7], 7
mov qword [rbp - 1], r12
mov word [rbp - 0x11], r12w
test rdi, rdi
je 0x18002eca0
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002ec9c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0xf], r12
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180087ea0
mov rbx, qword [rsp + 0x140]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret