Function at 0x140005540
Capabilities:
Get disk information

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x100
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x150], rbx
mov rax, qword [0x140197b10]
xor rax, rsp
mov qword [rsp + 0xf0], rax
mov r15d, r8d
mov rsi, rdx
mov r12, rcx
xor r13d, r13d
mov dword [rsp + 0x48], r13d
call fcn.1400da76c
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x1400055a7
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rax
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], rax
movzx eax, word [rsi]
test ax, ax
je 0x14000562c
cmp word [rsi + 2], 0x3a
jne 0x14000562c
cmp word [rsi + 4], 0
jne 0x14000562c
mov word [rsp + 0x60], ax
mov eax, 0x3a
mov word [rsp + 0x62], ax
mov eax, 0x5c
mov word [rsp + 0x64], ax
mov word [rsp + 0x66], r13w
lea rsi, [rsp + 0x60]
mov dword [rsp + 0x38], 0x40
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x4c]
mov r8d, 0x40
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
xor eax, eax
or rbp, 0xffffffffffffffff
mov rcx, rbp
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x1400056eb
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140005779
cmp dword [rdx + 0x10], eax
jge 0x1400056be
cmp dword [rbx - 0xc], eax
jge 0x1400056b1
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x140005779
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400056d4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
jmp 0x140005779
mov r14d, dword [rbx - 0x10]
lea r13, [rsp + 0x70]
sub r13, rbx
sar r13, 1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14000571c
mov edx, edi
lea rcx, [rsp + 0x40]
call fcn.140001da0
mov rbx, qword [rsp + 0x40]
cmp r13, r14
ja 0x140005740
movsxd rax, edi
lea r14, [rax + rax]
lea r8, [rbx + r13*2]
movsxd rdx, dword [rbx - 0xc]
add rdx, rdx
mov r9, r14
mov rcx, rbx
call fcn.14010c284
jmp 0x14000575e
movsxd rax, edi
lea r14, [rax + rax]
movsxd rdx, dword [rbx - 0xc]
add rdx, rdx
mov r9, r14
lea r8, [rsp + 0x70]
mov rcx, rbx
call fcn.14010bce0
test edi, edi
js 0x140005a4b
cmp edi, dword [rbx - 0xc]
jg 0x140005a4b
mov dword [rbx - 0x10], edi
xor eax, eax
mov word [r14 + rbx], ax
lea rdx, [0x14013f310]
lea rcx, [rsp + 0x40]
call fcn.140004b90
test al, al
je 0x1400057c0
lea rcx, [rbx - 0x18]
call fcn.140001e00
add rax, 0x18
mov qword [r12], rax
lock xadd dword [rbx - 8], ebp
dec ebp
test ebp, ebp
jg 0x1400057b8
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r12
jmp 0x140005a56
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
cmp eax, 5
ja case.default.0x1400057e5
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x5a84]
add rcx, rdx
jmp rcx
test r15d, r15d
je case.default.0x1400057e5
mov rax, qword [0x140199ba8]
cmp dword [rax], 0
jne case.default.0x1400057e5
lea rdx, [0x14013f388]
mov rcx, r12
call fcn.140005480
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], ebp
dec ebp
test ebp, ebp
jg 0x140005828
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r12
jmp 0x140005a56
mov rdx, qword [0x14019a468]
lea rcx, [rdx - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je case.default.0x1400057e5
cmp dword [rdi + 0x10], 0
jl 0x140005885
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140005885
call fcn.140001e00
mov rbx, rax
mov ecx, ebp
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140005877
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rbx, 0x18
mov qword [rsp + 0x40], rbx
jmp case.default.0x1400057e5
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140002570
mov rbx, qword [rsp + 0x40]
jmp case.default.0x1400057e5
mov rdx, qword [0x14019a478]
lea rcx, [rdx - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je case.default.0x1400057e5
cmp dword [rdi + 0x10], 0
jl 0x1400058f2
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400058f2
call fcn.140001e00
mov rbx, rax
mov ecx, ebp
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400058e4
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rbx, 0x18
mov qword [rsp + 0x40], rbx
jmp case.default.0x1400057e5
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140002570
mov rbx, qword [rsp + 0x40]
jmp case.default.0x1400057e5
mov rdx, qword [0x14019a488]
lea rcx, [rdx - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je case.default.0x1400057e5
cmp dword [rdi + 0x10], 0
jl 0x14000595c
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x14000595c
call fcn.140001e00
mov rbx, rax
mov ecx, ebp
lock xadd dword [rdi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140005951
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rbx, 0x18
mov qword [rsp + 0x40], rbx
jmp case.default.0x1400057e5
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140002570
mov rbx, qword [rsp + 0x40]
jmp case.default.0x1400057e5
xor eax, eax
mov rcx, rbp
lea rdi, str.CD_ROM
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.CD_ROM
lea rcx, [rsp + 0x40]
call fcn.140002570
mov rbx, qword [rsp + 0x40]
jmp case.default.0x1400057e5
xor eax, eax
mov rcx, rbp
lea rdi, str.RAMDISK
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.RAMDISK
lea rcx, [rsp + 0x40]
call fcn.140002570
mov rbx, qword [rsp + 0x40]
xor eax, eax
lea rdi, [0x14014f7a8]
mov rsi, rbx
mov ecx, 1
repe cmpsw word [rsi], word [rdi]
je 0x1400059e6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x140005a1e
lea rcx, [rbx - 0x18]
call fcn.140001e00
add rax, 0x18
mov qword [r12], rax
lock xadd dword [rbx - 8], ebp
dec ebp
test ebp, ebp
jg 0x140005a19
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r12
jmp 0x140005a56
lea rdx, [0x14014f7a8]
mov rcx, r12
call fcn.140005480
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], ebp
dec ebp
test ebp, ebp
jg 0x140005a46
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, r12
jmp 0x140005a56
mov ecx, 0x80070057
call fcn.140001000
nop
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.14010bcc0
mov rbx, qword [rsp + 0x150]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret