Function at 0x582318
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff378
mov dword [ebp - 4], eax
push 0x104
push 0
lea eax, [ebp - 0x13c]
push eax
call fcn.0066c86c
add esp, 0xc
lea edx, [ebp - 0x13c]
push edx
push 0x104
call sub.KERNEL32.DLL_GetLogicalDriveStringsA
mov dword [ebp - 0xc], eax
push 0x1a68
push 0
mov ecx, dword [ebp - 4]
add ecx, 0x340
push ecx
call fcn.0066c86c
add esp, 0xc
xor eax, eax
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp edx, ecx
jge 0x5824ca
lea eax, [ebp - 0x13c]
mov edx, dword [ebp - 8]
add eax, edx
push eax
call sub.KERNEL32.DLL_GetDriveTypeA
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, 2
je 0x5823a2
mov eax, dword [ebp - 0x10]
cmp eax, 3
jne 0x5824ab
mov edx, dword [ebp - 8]
mov cl, byte [ebp + edx - 0x13c]
mov byte [ebp - 0x11], cl
movsx eax, byte [ebp - 0x11]
cmp eax, 0x61
jl 0x5823c5
movsx edx, byte [ebp - 0x11]
cmp edx, 0x7a
jg 0x5823c5
add byte [ebp - 0x11], 0xe0
mov ecx, dword [ebp - 0x10]
cmp ecx, 2
jne 0x5823e7
movsx eax, byte [ebp - 0x11]
cmp eax, 0x41
je 0x5824b9
movsx edx, byte [ebp - 0x11]
cmp edx, 0x42
je 0x5824b9
lea ecx, [ebp - 0x1c]
push ecx
lea eax, [ebp - 0x18]
push eax
mov dl, byte [ebp - 0x11]
push edx
call fcn.00565ca8
add esp, 0xc
test al, al
je 0x5824b9
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jle 0x5824b9
mov eax, dword [ebp - 0x18]
cmp eax, 0x1a
jg 0x5824b9
mov edx, dword [ebp - 0x18]
mov ecx, edx
shl edx, 6
add edx, ecx
mov eax, dword [ebp - 4]
mov dl, byte [eax + edx*4 + 0x23c]
test dl, dl
jne 0x582468
movsx ecx, byte [ebp - 0x11]
push ecx
push 0x5605
call fcn.00402a64
pop ecx
push eax
push 0x814e5a
mov eax, dword [ebp - 0x18]
dec eax
imul edx, eax, 0x104
mov ecx, dword [ebp - 4]
add edx, ecx
add edx, 0x340
push edx
call fcn.00670e94
add esp, 0x10
jmp 0x5824ab
movsx eax, byte [ebp - 0x11]
push eax
push 0x814e62
lea edx, [ebp - 0x340]
push edx
call fcn.00670e94
add esp, 0xc
lea ecx, [ebp - 0x340]
push ecx
mov eax, dword [ebp - 0x18]
dec eax
imul edx, eax, 0x104
mov ecx, dword [ebp - 4]
add edx, ecx
add edx, 0x340
push edx
call fcn.0066c910
add esp, 8
jmp 0x5824ab
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dl, byte [ebp + eax - 0x13c]
test dl, dl
jne 0x5824a8
inc dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jl 0x58237a
push 0x814e67
lea edx, [ebp - 0x340]
push edx
call fcn.00670e94
add esp, 8
xor ecx, ecx
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
mov edx, eax
shl eax, 6
add eax, edx
mov ecx, dword [ebp - 4]
mov al, byte [ecx + eax*4 + 0x340]
test al, al
je 0x5826bd
push dword [ebp - 8]
push 0x814e69
lea edx, [ebp - 0x440]
push edx
call fcn.00670e94
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push SysReAllocStringLen
lea ecx, [ebp - 0x440]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
je 0x582688
push 0
lea edx, [ebp - 0x34]
push edx
push 0x18
lea ecx, [ebp - 0x458]
push ecx
push 0
push 0
push 0x70000
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
je 0x582648
mov eax, dword [ebp - 0x44c]
imul dword [ebp - 0x448]
imul dword [ebp - 0x444]
xor edx, edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
push dword [ebp - 0x454]
push dword [ebp - 0x458]
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.006744e4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
fild qword [ebp - 0x2c]
fld xword [0x5826d0]
fmulp st(1)
fstp qword [ebp - 0x24]
fld qword [ebp - 0x24]
fcomp dword [0x5826dc]
fnstsw ax
sahf
ja 0x5825da
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push 0x814e7d
lea ecx, [ebp - 0x340]
push ecx
call fcn.00670e94
add esp, 0x10
jmp 0x58265c
fld xword [0x5826e0]
fmul qword [ebp - 0x24]
fcomp dword [0x5826ec]
fnstsw ax
sahf
jb 0x582623
fld qword [ebp - 0x24]
fmul dword [0x5826f0]
fld xword [0x5826e0]
fmulp st(1)
fld xword [0x5826e0]
fmulp st(1)
add esp, 0xfffffff8
fstp qword [esp]
push 0x814e88
lea edx, [ebp - 0x340]
push edx
call fcn.00670e94
add esp, 0x10
jmp 0x58265c
fld xword [0x5826e0]
fmul qword [ebp - 0x24]
add esp, 0xfffffff8
fstp qword [esp]
push 0x814e93
lea ecx, [ebp - 0x340]
push ecx
call fcn.00670e94
add esp, 0x10
jmp 0x58265c
push 0x814e9e
lea eax, [ebp - 0x340]
push eax
call fcn.00670e94
add esp, 8
lea edx, [ebp - 0x340]
push edx
imul ecx, dword [ebp - 8], 0x104
mov eax, dword [ebp - 4]
add ecx, eax
add ecx, 0x340
push ecx
call fcn.0066c910
add esp, 8
push dword [ebp - 0x30]
call sub.KERNEL32.DLL_CloseHandle
jmp 0x5826bd
push 0x814ea0
lea edx, [ebp - 0x340]
push edx
call fcn.00670e94
add esp, 8
lea ecx, [ebp - 0x340]
push ecx
imul eax, dword [ebp - 8], 0x104
mov edx, dword [ebp - 4]
add eax, edx
add eax, 0x340
push eax
call fcn.0066c910
add esp, 8
inc dword [ebp - 8]
mov ecx, dword [ebp - 8]
cmp ecx, 0x1a
jl 0x5824e3
mov esp, ebp
pop ebp
ret