Function at 0x140040590
Capabilities:
Get disk size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
mov qword [rsp + 8], rcx
push rdi
push r14
push r15
sub rsp, 0x60
mov r14, r9
mov r15, r8
mov rbp, rdx
mov rsi, rcx
mov rcx, qword [rcx]
mov eax, dword [rcx - 0x10]
test eax, eax
jne 0x1400405eb
lea rdx, [rcx - 0x18]
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140040807
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x1400407fd
mov edi, 0xffffffff
jmp 0x1400407f3
mov edi, 0xffffffff
cmp eax, 1
jne 0x140040673
movzx ecx, word [rcx]
call fcn.1400f660c
sub ax, 0x41
cmp ax, 0x19
ja 0x140040673
call fcn.140008400
mov r10, qword [rax]
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 0
mov r9d, edi
mov r8d, edi
lea rdx, [0x14013312c]
mov rcx, rax
call qword [r10 + 0x28]
mov rbx, rax
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.140033880
nop
lea rdx, [rbx - 0x18]
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140040673
mov eax, dword [rdx + 0x10]
cmp eax, edi
je 0x140040669
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040673
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, rsi
call fcn.140048c60
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x140040769
nop
mov rcx, qword [rsi]
movsxd r8, dword [rcx - 0x10]
mov rdx, r8
test r8d, r8d
jle 0x1400406d4
mov rax, rdx
lea rcx, [rcx + r8*2]
add rcx, 0xfffffffffffffffe
nop word [rax + rax]
cmp word [rcx], 0x5c
jne 0x1400406d4
dec edx
dec rax
sub rcx, 2
test rax, rax
jg 0x1400406c0
sub r8d, edx
xor edx, edx
mov rcx, rsi
call fcn.140033ba0
mov edx, 0x5c
mov rcx, rsi
call fcn.140033de0
cmp eax, 2
jl 0x1400407ce
lea r8d, [rax + 1]
lea rdx, [rsp + 0x58]
mov rcx, rsi
call fcn.1400351c0
nop
mov rdx, rax
mov rcx, rsi
call fcn.1400333a0
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140040746
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x14004073c
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040746
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x1400406a0
mov rax, qword [rsp + 0xa0]
mov qword [rbp], rax
mov rax, qword [rsp + 0x40]
mov qword [r15], rax
mov rax, qword [rsp + 0x48]
mov qword [r14], rax
mov rdx, qword [rsi]
sub rdx, 0x18
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x1400407b2
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x1400407a8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x1400407b2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov al, 1
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
xor eax, eax
mov qword [rbp], rax
mov qword [r15], rax
mov qword [r14], rax
mov rdx, qword [rsi]
sub rdx, 0x18
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140040807
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x1400407fd
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140040807
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
xor al, al
jmp 0x1400407b4