Function at 0x1400596f0
Capabilities:
Get disk size
Get file size

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x2a0
mov qword [rax + 0x10], rbx
xor edi, edi
mov qword [rax - 0x10], rbp
mov qword [rax - 0x18], rsi
mov rsi, rdx
mov qword [rax - 0x28], r13
mov r13d, r9d
mov qword [rax - 0x30], r14
lea ebp, [rdi + 1]
mov qword [rax - 0x38], r15
mov r14d, r8d
mov dword [rax + 0x18], edi
xor r15b, r15b
mov rax, qword [rsp + 0x2d8]
mov dword [rsp + 0x2b0], 0x80
mov qword [rax], rdi
mov rbx, qword [rcx + 8]
test rbx, rbx
je 0x14005976e
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x14005975b
movzx r15d, bpl
jmp 0x14005976e
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
movzx r15d, r15b
cmovne r15d, ebp
mov qword [rsp + 0x288], r12
test r14d, 0x3fffffff
jne 0x140059a7b
test r13d, 0xdfffffff
jne 0x140059a7b
mov ecx, dword [rsp + 0x2d0]
lea eax, [rcx - 1]
cmp eax, 4
ja 0x140059a7b
mov eax, 0x80000000
mov r12d, edi
test eax, r14d
cmovne r12d, eax
and r14d, 0x40000000
je 0x1400597c0
bts r12d, 0x1e
cmp ecx, ebp
je 0x1400597eb
cmp ecx, 2
jne 0x1400597cd
mov ebp, ecx
jmp 0x1400597eb
cmp ecx, 3
jne 0x1400597d6
mov ebp, ecx
jmp 0x1400597eb
cmp ecx, 4
jne 0x1400597df
mov ebp, ecx
jmp 0x1400597eb
mov eax, 5
mov ebp, edi
cmp ecx, eax
cmove ebp, eax
and r13d, 0x20000000
je 0x14005992d
test r14d, r14d
mov eax, 0x20000080
mov ecx, 0xa0000080
cmovne eax, ecx
mov dword [rsp + 0x2b0], eax
test rsi, rsi
je 0x14005986b
lea r8, [rsp + 0x40]
mov edx, 0x105
mov rcx, rsi
call fcn.1400accd8
mov ecx, eax
test eax, eax
js 0x140059870
mov rax, qword [rsp + 0x40]
lea rbx, [rsi + rax*2]
cmp rbx, rsi
jbe 0x14005985f
nop word [rax + rax]
movzx eax, word [rbx - 2]
lea rcx, [rbx - 2]
cmp ax, 0x5c
je 0x14005985c
cmp ax, 0x2f
je 0x14005985c
mov rbx, rcx
cmp rcx, rsi
ja 0x140059840
cmp rbx, rsi
jne 0x140059886
mov eax, 0x7b
jmp 0x140059a80
mov ecx, 0x80070057
mov rax, rdi
mov qword [rsp + 0x40], rax
test ecx, ecx
jns 0x140059831
mov eax, 0x7b
jmp 0x140059a80
sub rbx, rsi
lea rcx, [rsp + 0x60]
mov edx, 0x105
sar rbx, 1
mov r8d, 0x7fffffff
call fcn.1400ace08
test eax, eax
js 0x1400598ca
cmp rbx, 0x7ffffffe
ja 0x1400598ca
mov r9, rsi
mov qword [rsp + 0x20], rbx
xor r8d, r8d
lea rcx, [rsp + 0x60]
mov edx, 0x105
call fcn.1400acae4
jmp 0x1400598cf
mov word [rsp + 0x60], di
lea rax, [rsp + 0x48]
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x2c0]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x140059922
mov ecx, dword [rsp + 0x2c0]
lea eax, [rcx - 1]
cmp eax, 0x1ffff
ja 0x140059918
xor edx, edx
mov eax, 0x20000
div ecx
test edx, edx
je 0x14005992d
mov eax, 0x452
jmp 0x140059a80
mov dword [rsp + 0x2c0], 0x1000
mov eax, dword [rsp + 0x2b0]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov edx, r12d
mov dword [rsp + 0x28], eax
mov rcx, rsi
mov dword [rsp + 0x20], ebp
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
test r15b, r15b
je 0x140059965
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
xor r15b, r15b
cmp rsi, 0xffffffffffffffff
jne 0x140059976
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140059a80
lea rdx, [0x1401336e4]
mov ecx, 0x38
call fcn.1400af704
mov rbx, rax
test rax, rax
jne 0x1400599a0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rbx + 8]
jmp 0x140059a80
mov qword [rax], rsi
test r13d, r13d
je 0x140059a5a
lea rdx, [rsp + 0x2b0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400599e0
lea edx, [rax + 0x38]
mov rcx, rbx
call fcn.1400aee84
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140059a80
mov rax, qword [rsp + 0x2b0]
mov qword [rbx + 0x28], rax
mov dword [rbx + 0x14], 0x1000
nop dword [rax]
nop word [rax + rax]
mov ecx, dword [rbx + 0x14]
mov r8d, dword [rsp + 0x2c0]
cmp ecx, r8d
jb 0x140059a1b
xor edx, edx
mov eax, ecx
div r8d
test edx, edx
je 0x140059a23
lea eax, [rcx + rcx]
mov dword [rbx + 0x14], eax
jmp 0x140059a00
mov edx, dword [rbx + 0x14]
lea eax, [rdx + 0x20000]
mov ecx, eax
mov dword [rbx + 0x10], eax
call fcn.1400bcea0
mov qword [rbx + 8], rax
test rax, rax
jne 0x140059a62
lea edx, [rax + 0x38]
mov rcx, rbx
call fcn.1400aee84
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 8
jmp 0x140059a80
mov qword [rax + 8], rdi
mov qword [rax + 0x28], rdi
mov rax, qword [rsp + 0x2d8]
mov qword [rbx + 0x18], rdi
mov qword [rbx + 0x20], rdi
mov qword [rbx + 0x30], rdi
mov qword [rax], rbx
jmp 0x140059a82
mov eax, 0x57
mov edi, eax
mov r14, qword [rsp + 0x278]
test r15b, r15b
mov r15, qword [rsp + 0x270]
mov r13, qword [rsp + 0x280]
mov r12, qword [rsp + 0x288]
mov rsi, qword [rsp + 0x290]
mov rbp, qword [rsp + 0x298]
mov rbx, qword [rsp + 0x2b8]
je 0x140059ac5
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, edi
add rsp, 0x2a0
pop rdi
ret