Function at 0x180078800
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 [0x1802247b8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, rdx
mov rsi, rcx
cmp qword [rcx + 0x30], 0
je 0x18007884a
xor edx, edx
call fcn.180078dc0
mov rcx, qword [rsi + 0xe8]
test rcx, rcx
je 0x180078862
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 0x180078881
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078881
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdx, [rbp - 0x11]
mov rcx, rsi
call fcn.180079150
nop
lea rdx, [rbp - 0x31]
mov rcx, rsi
call fcn.180079200
nop
xor r12d, r12d
cmp qword [rbp - 1], r12
je 0x180078cef
cmp qword [rbp - 0x21], r12
je 0x180078cef
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 0x180078ce9
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 0x180078cc5
test rbx, rbx
je 0x18007895a
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078953
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 0x1800789d4
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x51], rbx
test rbx, rbx
je 0x180078990
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078990
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x1800789a3
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 0x180078ca8
mov r12b, 1
xor r13b, r13b
test eax, eax
je 0x180078b26
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.180047970
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 0x180078aad
mov eax, dword [rbp - 0x61]
cmp dword [rbp - 0x5d], eax
jne 0x180078aad
mov r12, qword [rbp - 0x41]
cmp r14, r12
je 0x180078afd
mov rcx, r15
call fcn.180079790
mov qword [rbp - 0x59], 0
sub r12, r14
je 0x180078a95
nop dword [rax]
nop dword [rax + rax]
mov r8, r15
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x49]
call fcn.1800899c0
mov r14, qword [rbp - 0x49]
test al, al
je 0x180078a95
mov rax, qword [rbp - 0x41]
sub rax, r14
cmp qword [rbp - 0x59], rax
jb 0x180078a70
movzx r13d, r13b
mov eax, 1
cmp qword [r15 + 8], 0
cmove r13d, eax
movzx r12d, al
jmp 0x180078b00
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 0x180078af8
call fcn.180139b7c
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rbp - 0x71], r12
xor r12b, r12b
jmp 0x180078b00
mov r12b, 1
test r14, r14
je 0x180078b1d
mov rcx, r14
call fcn.180139b7c
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], 0
test r12b, r12b
je 0x180078c03
mov qword [rbp - 0x59], rbx
test rbx, rbx
je 0x180078b3e
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078b3e
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 0x180078b9d
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078b99
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x59], r12
test r14b, r14b
je 0x180078c06
lea r14, [rsi + 0x20]
mov rcx, r14
call fcn.180079790
cmp qword [rsi + 0x18], 0
je 0x180078c65
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.180079cb0
cmp r14, r12
je 0x180078c62
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 0x180078c62
xor r12d, r12d
mov qword [rbp - 0x59], rbx
test rbx, rbx
je 0x180078c1e
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078c1e
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x180078c31
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 0x180078c65
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078c5c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x59], r12
jmp 0x180078c65
xor r12d, r12d
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13b, r13b
je 0x180078d37
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 0x180078ca4
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078ca4
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov dword [rsi + 0x38], r12d
test rbx, rbx
je 0x180078d37
mov rcx, qword [rbx]
test rcx, rcx
je 0x180078cbf
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x51], r12
jmp 0x180078d37
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 0x180078d37
mov qword [rsi + 0x30], r12
jmp 0x180078d37
lea rbx, [rsi + 0x20]
mov rcx, rbx
call fcn.180079790
cmp qword [rsi + 0x18], r12
je 0x180078d37
mov rdx, qword [r15]
add rsi, 0x10
mov r9, qword [rsi]
mov r8, qword [r9]
mov rcx, r15
call fcn.18007a030
cmp rbx, rsi
je 0x180078d37
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 0x180078d47
mov rcx, qword [rbp - 0x31]
call fcn.180139b7c
mov qword [rbp - 0x19], 7
mov qword [rbp - 0x21], r12
mov word [rbp - 0x31], r12w
cmp qword [rbp + 7], 8
jb 0x180078d68
mov rcx, qword [rbp - 0x11]
call fcn.180139b7c
mov qword [rbp + 7], 7
mov qword [rbp - 1], r12
mov word [rbp - 0x11], r12w
test rdi, rdi
je 0x180078d90
mov rcx, qword [rdi]
test rcx, rcx
je 0x180078d8c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0xf], r12
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180139310
mov rbx, qword [rsp + 0x140]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret