Function at 0x1400824d0
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 [0x14016ca00]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rsi, rdx
mov rdi, rcx
cmp qword [rcx + 0x28], 0
je 0x14008251a
xor edx, edx
call fcn.140082a20
mov rcx, qword [rdi + 0xe0]
test rcx, rcx
je 0x140082532
mov rax, qword [rcx]
mov rdx, qword [rdi + 0xe8]
call qword [rax]
xor eax, eax
mov qword [rbp - 0x31], rax
mov rdx, rdi
lea rcx, [rbp - 0x31]
call fcn.140015bf0
nop
lea rdx, [rbp - 9]
mov rcx, rdi
call fcn.140082d90
nop
lea rdx, [rbp - 0x29]
mov rcx, rdi
call fcn.140082e40
nop
xor r14d, r14d
cmp qword [rbp + 7], r14
je 0x140082957
cmp qword [rbp - 0x19], r14
je 0x140082957
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
mov qword [rsp + 0x30], r14
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 [rdi + 0x28], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140082951
lea rcx, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae rcx, qword [rbp - 9]
mov qword [rsp + 0x30], r14
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 r13, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14008292d
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x14008261b
mov rcx, qword [rcx]
test rcx, rcx
je 0x140082617
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp - 0x31], r14
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x59], eax
cmp eax, 0x1400000
jbe 0x140082699
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbp - 0x51], rax
mov rdx, rdi
lea rcx, [rbp - 0x51]
call fcn.140015bf0
nop
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x14008265f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x28], r14
lea rcx, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae rcx, qword [rbp - 9]
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 [rdi + 0x30], r14d
lea rcx, [rbp - 0x51]
call fcn.140015c20
jmp 0x14008299f
mov r12b, 1
xor r15b, r15b
test eax, eax
je 0x1400827de
mov dword [rbp - 0x51], r14d
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], r14
mov byte [rsp + 0x40], al
mov edx, dword [rbp - 0x59]
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x49]
call fcn.140075490
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x51]
mov r8d, dword [rbp - 0x59]
mov rbx, qword [rbp - 0x49]
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140082769
mov eax, dword [rbp - 0x59]
cmp dword [rbp - 0x51], eax
jne 0x140082769
mov r14, qword [rbp - 0x41]
cmp rbx, r14
je 0x1400827b9
mov rcx, rsi
call fcn.140081960
mov qword [rbp - 0x61], 0
cmp r14, rbx
je 0x140082755
nop word [rax + rax]
mov r8, rsi
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x49]
call fcn.14008dd50
mov rbx, qword [rbp - 0x49]
test al, al
je 0x140082755
mov rax, qword [rbp - 0x41]
sub rax, rbx
cmp qword [rbp - 0x61], rax
jb 0x140082730
movzx r15d, r15b
mov eax, 1
cmp qword [rsi + 8], 0
cmove r15d, eax
jmp 0x1400827b9
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rbp - 0x71], r14
mov rcx, rbx
mov rbx, r14
mov qword [rbp - 0x49], rbx
mov qword [rsp + 0x48], rcx
mov rax, qword [rbp - 0x41]
mov qword [rbp - 0x41], r14
mov qword [rbp - 0x79], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x71], rax
test rcx, rcx
je 0x1400827b4
call fcn.1400bd20c
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rbp - 0x71], r14
xor r12b, r12b
jmp 0x1400827bc
xor r14d, r14d
test rbx, rbx
je 0x1400827d5
mov rcx, rbx
call fcn.1400bd20c
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov qword [rbp - 0x39], r14
test r12b, r12b
je 0x140082899
xor eax, eax
mov qword [rbp - 0x61], rax
mov rdx, rdi
lea rcx, [rbp - 0x61]
call fcn.140015bf0
nop
mov eax, dword [rbp - 0x59]
mov dword [rdi + 0x30], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x51], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x51]
mov r8d, 4
lea rdx, [rbp - 0x59]
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
movzx ebx, r12b
test eax, eax
cmove ebx, r14d
lea rcx, [rbp - 0x61]
call fcn.140015c20
test bl, bl
je 0x140082899
lea rbx, [rdi + 0x18]
mov rcx, rbx
call fcn.140081960
cmp qword [rdi + 0x10], 0
je 0x1400828e5
lea r14, [rdi + 8]
mov r9, qword [r14]
mov qword [rsp + 0x20], r9
mov r9, qword [r9]
mov r8, qword [rsi]
lea rdx, [rbp - 0x61]
mov rcx, rsi
call fcn.1400831e0
cmp rbx, r14
je 0x1400828e2
mov rcx, qword [rbx]
mov rax, qword [r14]
mov qword [rbx], rax
mov qword [r14], rcx
mov rcx, qword [rbx + 8]
mov rax, qword [r14 + 8]
mov qword [rbx + 8], rax
mov qword [r14 + 8], rcx
jmp 0x1400828e2
xor eax, eax
mov qword [rbp - 0x61], rax
mov rdx, rdi
lea rcx, [rbp - 0x61]
call fcn.140015bf0
nop
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x1400828bf
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x28], r14
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [rdi + 0x30], r14d
lea rcx, [rbp - 0x61]
call fcn.140015c20
jmp 0x1400828e5
xor r14d, r14d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15b, r15b
je 0x14008299f
lea rcx, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae rcx, qword [rbp - 9]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov qword [rbp - 0x61], rax
mov rdx, rdi
lea rcx, [rbp - 0x61]
call fcn.140015bf0
nop
mov dword [rdi + 0x30], r14d
lea rcx, [rbp - 0x61]
call fcn.140015c20
jmp 0x14008299f
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x28], r14
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x14008299f
mov qword [rdi + 0x28], r14
jmp 0x14008299f
lea rbx, [rdi + 0x18]
mov rcx, rbx
call fcn.140081960
cmp qword [rdi + 0x10], r14
je 0x14008299f
mov rdx, qword [rsi]
add rdi, 8
mov r9, qword [rdi]
mov r8, qword [r9]
mov rcx, rsi
call fcn.1400832d0
cmp rbx, rdi
je 0x14008299f
mov rcx, qword [rbx]
mov rax, qword [rdi]
mov qword [rbx], rax
mov qword [rdi], rcx
mov rcx, qword [rbx + 8]
mov rax, qword [rdi + 8]
mov qword [rbx + 8], rax
mov qword [rdi + 8], rcx
cmp qword [rbp - 0x11], 8
jb 0x1400829af
mov rcx, qword [rbp - 0x29]
call fcn.1400bd20c
mov qword [rbp - 0x11], 7
mov qword [rbp - 0x19], r14
mov word [rbp - 0x29], r14w
cmp qword [rbp + 0xf], 8
jb 0x1400829d0
mov rcx, qword [rbp - 9]
call fcn.1400bd20c
mov qword [rbp + 0xf], 7
mov qword [rbp + 7], r14
mov word [rbp - 9], r14w
lea rcx, [rbp - 0x31]
call fcn.140015c20
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400bcae0
mov rbx, qword [rsp + 0x140]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret