Function at 0x582c20
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x589fda
mov eax, dword fs:[0]
push eax
sub esp, 0x67c
mov eax, dword [0x5ed130]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 0x8000
jne 0x58309c
mov eax, dword [0x604be0]
and eax, 1
jne 0x582c88
mov ecx, dword [0x604be0]
or ecx, 1
mov dword [0x604be0], ecx
mov ecx, 0x604bc4
call fcn.00401550
push 0x58d760
call fcn.0043fdef
add esp, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov dword [ebp - 0x688], eax
cmp dword [ebp - 0x688], 2
je 0x582caf
cmp dword [ebp - 0x688], 5
je 0x582db2
jmp 0x58309c
mov ecx, 0x604bc4
call fcn.00401720
movzx ecx, al
test ecx, ecx
jne 0x582dad
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x124], edx
mov eax, dword [0x5df600]
mov dword [ebp - 0x120], eax
mov ecx, dword [str.A:.]
mov dword [ebp - 0x11c], ecx
mov dx, word [0x5df608]
mov word [ebp - 0x118], dx
mov al, byte [0x5df60a]
mov byte [ebp - 0x116], al
push 0xfd
push 0
lea ecx, [ebp - 0x115]
push ecx
call fcn.0043fa10
add esp, 0xc
mov dword [ebp - 0x12c], 0
mov edx, dword [ebp - 0x124]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x128], eax
jmp 0x582d3d
mov ecx, dword [ebp - 0x12c]
add ecx, 1
mov dword [ebp - 0x12c], ecx
cmp dword [ebp - 0x12c], 0x20
jae 0x582dad
mov edx, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x12c]
shr edx, cl
cmp edx, 1
jne 0x582dab
movsx eax, byte [ebp - 0x12c]
add eax, 0x41
mov byte [ebp - 0x120], al
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
jne 0x582dab
movsx edx, byte [ebp - 0x12c]
add edx, 0x41
mov byte [ebp - 0x11c], dl
mov ecx, 0x604bc4
call fcn.00401700
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.00401fe0
mov ecx, eax
call fcn.005828d0
jmp 0x582dad
jmp 0x582d2e
jmp 0x58309c
mov ecx, 0x604bc4
call fcn.004016a0
mov ecx, dword [ebp + 0xc]
add ecx, 0x20
push ecx
lea edx, [ebp - 0x56c]
push edx
call fcn.00441010
add esp, 8
push 0x23
lea eax, [ebp - 0x56c]
push eax
call fcn.00406640
add esp, 8
mov dword [ebp - 0x168], eax
cmp dword [ebp - 0x168], 0
jne 0x582df7
jmp 0x58309c
mov ecx, dword [ebp - 0x168]
mov byte [ecx], 0
mov edx, dword [ebp - 0x168]
add edx, 1
mov dword [ebp - 0x168], edx
mov eax, dword [ebp - 0x168]
push eax
call fcn.004417d0
add esp, 4
push 0x23
lea ecx, [ebp - 0x56c]
push ecx
call fcn.00406620
add esp, 8
mov dword [ebp - 0x168], eax
cmp dword [ebp - 0x168], 0
jne 0x582e43
jmp 0x58309c
mov edx, dword [ebp - 0x168]
mov byte [edx], 0
push str.USBSTOR
lea eax, [ebp - 0x56c]
push eax
call fcn.004413c9
add esp, 8
test eax, eax
je 0x582e69
jmp 0x58309c
lea ecx, [ebp - 0x56c]
push ecx
lea ecx, [ebp - 0x164]
call fcn.00401580
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x168]
mov byte [edx], 0x23
push 0x5c
push 0x23
lea eax, [ebp - 0x56c]
push eax
call fcn.0057e1e0
add esp, 0xc
push 6
push 0
lea ecx, [ebp - 0x164]
call fcn.00401700
push eax
push 0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0xffffffff
jne 0x582edc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x164]
call fcn.00401600
jmp 0x58309c
lea ecx, [ebp - 0x148]
push ecx
lea edx, [ebp - 0x56c]
push edx
lea eax, [ebp - 0x16c]
push eax
call fcn.00581b10
add esp, 0xc
test eax, eax
je 0x58307d
mov dword [ebp - 0x578], 0
mov cl, byte [0x5db217]
mov byte [ebp - 0x684], cl
push 0x103
push 0
lea edx, [ebp - 0x683]
push edx
call fcn.0043fa10
add esp, 0xc
mov dword [ebp - 0x574], 0
jmp 0x582f48
mov eax, dword [ebp - 0x578]
add eax, 1
mov dword [ebp - 0x578], eax
cmp dword [ebp - 0x578], 3
jge 0x582f94
lea ecx, [ebp - 0x574]
push ecx
push 0x104
lea edx, [ebp - 0x684]
push edx
lea eax, [ebp - 0x570]
push eax
push 0xc
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp - 0x16c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x582f87
jmp 0x582f94
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x582f39
cmp dword [ebp - 0x578], 3
jl 0x582fbe
mov ecx, 0x604bc4
call fcn.004016a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x164]
call fcn.00401600
jmp 0x58309c
movsx eax, byte [ebp - 0x684]
test eax, eax
je 0x582fda
lea ecx, [ebp - 0x684]
push ecx
mov ecx, 0x604bc4
call fcn.00401640
mov byte [ebp - 0x56c], 0
lea edx, [ebp - 0x574]
push edx
push 0x104
lea eax, [ebp - 0x56c]
push eax
lea ecx, [ebp - 0x570]
push ecx
push 1
lea edx, [ebp - 0x148]
push edx
mov eax, dword [ebp - 0x16c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
push 0x5c
lea ecx, [ebp - 0x56c]
push ecx
call fcn.00406620
add esp, 8
add eax, 1
mov dword [ebp - 0x168], eax
push 0x5f
push 0x26
mov edx, dword [ebp - 0x168]
push edx
call fcn.0057e1e0
add esp, 0xc
push 0x5f
push 0x5c
mov eax, dword [ebp - 0x168]
push eax
call fcn.0057e1e0
add esp, 0xc
push 0x5df614
mov ecx, 0x604bc4
call fcn.00401660
mov ecx, dword [ebp - 0x168]
push ecx
mov ecx, 0x604bc4
call fcn.00401660
push 0x29
mov ecx, 0x604bc4
call fcn.00401680
mov edx, dword [ebp - 0x16c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x164]
call fcn.00401600
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043dd0c
mov esp, ebp
pop ebp
ret