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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov rbx, qword [0x01047b78]
mov r13d, dword [0x01047b68]
mov dword [rsp + 0xb8], r13d
mov rdi, qword [0x01047b88]
mov r8, rbx
mov edx, r13d
lea rcx, [0x010099f0]
call fcn.01012d38
mov r8d, 8
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], r8
lea edx, [r8 - 4]
mov r9, rdx
lea rcx, [0x01009a70]
call fcn.01012d38
mov rdx, rbx
lea rcx, [rdi + 0x18]
call fcn.010217e0
xor ebx, ebx
lea r14d, [rbx + 1]
cmp eax, ebx
je 0x10168ab
mov r14d, ebx
mov rcx, qword [rdi + 0x78]
cmp qword [rcx - 0x10], rbx
je 0x101689d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x101689d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp eax, 0xffffffff
je 0x1016878
lea rax, [rbp + 2]
mov qword [rsp + 0xa0], rax
mov rcx, rax
call fcn.01029e1c
mov rsi, rax
cmp rax, rbx
je 0x1016878
mov r8, qword [rsp + 0xa0]
xor edx, edx
mov rcx, rax
call fcn.01035300
mov dword [rsp + 0xa0], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0xa0]
mov r8d, ebp
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x1016870
cmp dword [rsp + 0xa0], ebp
jne 0x1016870
mov rdx, rsi
lea rcx, [rdi + 0x18]
call fcn.010217e0
mov r14d, eax
mov rcx, rsi
call fcn.01029de4
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rdi + 0x78]
call fcn.010108bc
cmp r14d, ebx
jne 0x10167ac
mov r13d, dword [rsp + 0xb8]
mov r14d, 1
lea rcx, [0x01009b40]
call fcn.01012d38
mov r11, qword [0x01046880]
mov qword [rsp + 0x48], r11
lea rcx, [rsp + 0x48]
call fcn.010108bc
lea r15, [0x01009bac]
cmp dword [rdi + 0x20], 4
jne 0x1016933
lea r8, [rdi + 0x30]
lea rdx, [0x01009bb8]
lea rcx, [rsp + 0xb8]
call fcn.01010d38
mov r8, r15
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010cd0
mov rdx, qword [rax]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rcx, [rsp + 0xa0]
call fcn.01010940
lea rcx, [rsp + 0xb8]
call fcn.01010940
cmp dword [rdi + 0x48], 5
jne 0x1016992
lea r8, [rdi + 0x40]
lea rdx, [0x01009bc8]
lea rcx, [rsp + 0xb8]
call fcn.01010d38
mov r8, r15
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010cd0
mov rdx, qword [rax]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rcx, [rsp + 0xa0]
call fcn.01010940
lea rcx, [rsp + 0xb8]
call fcn.01010940
mov rax, qword [rdi + 0x28]
cmp qword [rax - 0x10], rbx
je 0x10169f5
lea r8, [rdi + 0x28]
lea rdx, [0x01009bd8]
lea rcx, [rsp + 0xb8]
call fcn.01010d38
mov r8, r15
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010cd0
mov rdx, qword [rax]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rcx, [rsp + 0xa0]
call fcn.01010940
lea rcx, [rsp + 0xb8]
call fcn.01010940
mov rax, qword [rdi + 0x30]
cmp qword [rax - 0x10], rbx
je 0x1016a58
lea r8, [rdi + 0x30]
lea rdx, [0x01009be8]
lea rcx, [rsp + 0xb8]
call fcn.01010d38
mov r8, r15
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010cd0
mov rdx, qword [rax]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rcx, [rsp + 0xa0]
call fcn.01010940
lea rcx, [rsp + 0xb8]
call fcn.01010940
mov rax, qword [rdi + 0x50]
cmp qword [rax - 0x10], rbx
je 0x1016abb
lea r8, [rdi + 0x50]
lea rdx, [0x01009bf8]
lea rcx, [rsp + 0xb8]
call fcn.01010d38
mov r8, r15
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010cd0
mov rdx, qword [rax]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.01010dac
lea rcx, [rsp + 0xa0]
call fcn.01010940
lea rcx, [rsp + 0xb8]
call fcn.01010940
cmp dword [rdi + 0x5c], r14d
jne 0x1016ad2
lea rdx, [0x01009c08]
lea rcx, [rsp + 0x48]
call fcn.01010e4c
cmp dword [rdi + 0x60], r14d
jne 0x1016ae9
lea rdx, [0x01009c18]
lea rcx, [rsp + 0x48]
call fcn.01010e4c
cmp dword [rdi + 0x64], r14d
jne 0x1016b00
lea rdx, [0x01009c28]
lea rcx, [rsp + 0x48]
call fcn.01010e4c
cmp dword [rdi + 0x70], ebx
je 0x1016b16
lea rdx, [0x01009c38]
lea rcx, [rsp + 0x48]
call fcn.01010e4c
mov rdx, qword [rsp + 0x48]
lea rcx, [0x010063c4]
call fcn.01012d38
lea rcx, [0x0100e420]
call fcn.01012d38
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xb8]
call fcn.01020fc4
mov r15d, 2
cmp dword [rsp + 0xb8], r14d
jne 0x1016b85
cmp dword [rsp + 0xa0], ebx
jne 0x1016b74
lea rcx, [0x0100e438]
call fcn.01012d38
jmp 0x1016b80
lea rcx, [0x0100e470]
call fcn.01012d38
mov eax, r14d
jmp 0x1016bed
mov eax, dword [rsp + 0x40]
cmp eax, 4
jne 0x1016b9f
lea rcx, [0x0100e4b8]
call fcn.01012d38
mov eax, r15d
jmp 0x1016bed
cmp eax, 3
jne 0x1016bb2
lea rcx, [0x0100e4f8]
call fcn.01012d38
jmp 0x1016be8
cmp eax, 5
jne 0x1016bdc
cmp dword [rsp + 0xa0], ebx
jne 0x1016bce
lea rcx, [0x0100e538]
call fcn.01012d38
jmp 0x1016be8
lea rcx, [0x0100e580]
call fcn.01012d38
jmp 0x1016be8
lea rcx, [0x0100e5d0]
call fcn.01012d38
mov eax, 3
mov dword [rdi + 0xf4], eax
cmp eax, ebx
jne 0x1016c1e
mov dword [0x01047b80], 7
mov dword [0x01047b84], ebx
mov dword [0x01047db4], ebx
lea rcx, [rsp + 0x48]
call fcn.01010940
xor eax, eax
jmp 0x1016db4
cmp eax, r15d
je 0x1016c31
cmp eax, 3
je 0x1016c31
mov dword [rdi + 0xf8], r14d
jmp 0x1016c3c
call fcn.01021054
mov dword [rdi + 0xf8], eax
mov edx, dword [rdi + 0xf8]
lea rcx, [0x01009c50]
call fcn.01012d38
mov dword [rdi + 0x158], r14d
mov rax, qword [rdi + 0x28]
cmp qword [rax - 0x10], rbx
je 0x1016cc9
mov rax, qword [0x01046880]
mov qword [rsp + 0xa0], rax
lea rdx, [rdi + 0x28]
lea rcx, [rsp + 0x40]
call fcn.0101074c
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.01021600
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.01010aec
lea rcx, [rsp + 0xb8]
call fcn.01010940
mov rdx, qword [rsp + 0xa0]
mov ecx, r14d
call fcn.01012e6c
nop
lea rcx, [rsp + 0xa0]
call fcn.01010940
jmp 0x1016cf1
mov rdx, qword [rdi + 0x50]
cmp qword [rdx - 0x10], rbx
je 0x1016cdf
mov ecx, 3
call fcn.01012e6c
jmp 0x1016cf1
mov rdx, qword [rdi + 0x30]
cmp qword [rdx - 0x10], rbx
je 0x1016cf1
mov ecx, r15d
call fcn.01012e6c
cmp dword [rdi + 0x20], 4
jne 0x1016d0b
mov edx, r13d
mov rcx, rdi
call fcn.01016dd4
cmp eax, ebx
jne 0x1016d1c
jmp 0x1016da8
cmp dword [rdi + 0x48], 5
jne 0x1016d1c
mov edx, r13d
mov rcx, rdi
call fcn.01017120
cmp dword [rdi + 0x5c], r14d
jne 0x1016d2d
mov edx, r14d
mov rcx, rdi
call fcn.01019858
cmp dword [rdi + 0x60], r14d
jne 0x1016d3d
xor edx, edx
mov rcx, rdi
call fcn.01019858
cmp dword [rdi + 0x64], r14d
jne 0x1016d5e
mov edx, 4
mov rcx, rdi
call fcn.01019858
mov edx, eax
lea rcx, [0x01009ca0]
call fcn.01012d38
cmp dword [rdi + 0x70], ebx
je 0x1016da5
lea rdx, [rdi + 0x68]
lea rcx, [rsp + 0xa0]
call fcn.0101074c
mov rbx, rax
lea rdx, [rdi + 0x28]
lea rcx, [rsp + 0xb8]
call fcn.0101074c
mov r8, rbx
mov rdx, rax
mov rcx, rdi
call fcn.010198f8
mov edx, eax
lea rcx, [0x01009d20]
call fcn.01012d38
nop
mov ebx, r14d
lea rcx, [rsp + 0x48]
call fcn.01010940
mov eax, ebx
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret