Function at 0x40521b
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
and dword [ebp - 0x18], 0
push ebx
push esi
push edi
push 0x1c
pop esi
mov dword [ebp - 0x14], ecx
push 6
pop ebx
xor eax, eax
mov ecx, ebx
lea edi, [ebp - 0x60]
mov dword [ebp - 0x64], esi
rep stosd dword es:[edi], eax
mov ecx, ebx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x48], esi
mov edx, 0x47f8d8
rep stosd dword es:[edi], eax
xor edi, edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], 0x455a18
mov dword [ebp - 0x20], 0x47f8e8
mov dword [ebp - 0x1c], 0x47f938
mov dword [ebp - 0x464], ebx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edx
push 0x12
push edi
push edi
push dword [ebp - 8]
mov dword [ebp - 0x10], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x405428
lea eax, [ebp - 0x48]
push eax
push edi
jmp 0x40540a
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0x400
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x405400
push dword [ebp - 0x50]
mov ecx, dword [ebp - 0x14]
call fcn.00401c46
mov esi, eax
cmp esi, edi
je 0x405400
lea eax, [ebp - 0x460]
push eax
lea ebx, [esi + 0xc34]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 4
jbe 0x40534c
push 0x40
lea eax, [esi + 0x12b4]
push eax
lea eax, [esi + 0xc3c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x40534c
push edi
push edi
push 3
push edi
push 3
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x405345
push 0x2e
pop eax
push edi
push edi
push 3
push edi
push 3
push edi
push ebx
mov word [esi + 0xc38], ax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40534c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 4]
cmp ebx, 3
jg 0x4053a8
lea eax, [ebp - 0x460]
push eax
call fcn.00430534
cmp ebx, edi
mov dword [esi + 0x3ab0], eax
jl 0x405385
xor ecx, ecx
inc ecx
cmp ebx, ecx
jle 0x40537f
push 2
pop ecx
cmp ebx, ecx
je 0x40537f
push 3
pop ecx
cmp ebx, ecx
jne 0x405385
mov dword [esi + 0x3ab4], ecx
push eax
mov eax, dword [esi + 0x3ab4]
push dword [eax*4 + 0x4a701c]
lea eax, [esi + 0x108c]
push str._S_i
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp ebx, edi
jl 0x4053de
cmp ebx, 1
jle 0x4053c3
cmp ebx, 2
jne 0x4053de
push dword [esi + 0x3ab0]
push str..CdRom_i
jmp 0x4053ce
push dword [esi + 0x3ab0]
push str..PhysicalDrive_i
lea eax, [esi + 0x104c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esi + 0x104c]
cmp word [eax], di
je 0x4053f9
push 0x40
add esi, 0x1334
push esi
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x10]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x10]
push dword [ebp - 8]
push edi
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x40529b
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
mov eax, dword [ebp + eax*4 - 0x28]
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x405275
pop edi
pop esi
pop ebx
leave
ret