Function at 0x406280
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
mov eax, dword [0x472004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
push 0x1a
push 0
push 0
push 0x46481c
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x258], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
mov dword [ebp - 0x228], 0x1c
lea eax, [ebp - 0x228]
mov dword [ebp - 0x268], ebx
push eax
xor esi, esi
push esi
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x406344
push esi
push 0x46481c
call fcn.004056b0
mov edi, eax
add esp, 8
mov dword [ebp - 0x264], edi
cmp edi, 0xffffffff
je 0x406330
push 0
lea eax, [ebp - 0x274]
push eax
push 0xc
lea eax, [ebp - 0x234]
push eax
push 0
push 0
push 0x2d1080
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x230]
je 0x406371
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x228]
inc esi
push eax
push esi
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4062e1
mov ebx, dword [ebp - 0x244]
mov esi, dword [ebp - 0x248]
push dword [ebp - 0x268]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
mov edx, ebx
xor ecx, ebp
pop ebx
call fcn.0040a46c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
je 0x4063d6
cmp eax, 1
je 0x4063d6
cmp eax, 0x11
je 0x4063d6
push dword [ebp - 0x214]
call fcn.00405310
push dword [ebp - 0x214]
cdq
mov esi, eax
mov edi, edx
call fcn.00405240
cdq
mov ebx, 0x63
mov ecx, eax
add esp, 8
mov eax, edx
mul ebx
push dword [ebp - 0x264]
mov ebx, eax
mov eax, ecx
mov ecx, 0x63
mul ecx
add ebx, edx
add eax, esi
mov dword [ebp - 0x240], eax
mov esi, eax
adc ebx, edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406350
push 0
push dword [ebp - 0x214]
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
push 0
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDW]
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00406650
mov ecx, edx
add esp, 8
mov dword [ebp - 0x238], ecx
mov ebx, eax
mov dword [ebp - 0x240], ebx
xorps xmm0, xmm0
movlpd qword [ebp - 0x248], xmm0
test ecx, ecx
jne 0x40645c
cmp ebx, 0x64
ja 0x40645c
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x23c], eax
jmp 0x406568
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x23c], eax
mov eax, ebx
mov edx, 0xe147ae15
mul edx
mov edi, 0x47ae147a
mov dword [ebp - 0x248], eax
mov esi, edx
mov eax, ebx
mul edi
mov edi, eax
mov dword [ebp - 0x250], edx
mov eax, ecx
mov ecx, 0xe147ae15
mul ecx
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp - 0x238]
mov edx, 0x47ae147a
mul edx
add ecx, esi
mov esi, dword [ebp - 0x240]
mov dword [ebp - 0x254], eax
adc ebx, 0
mov dword [ebp - 0x244], edx
mov edx, dword [ebp - 0x254]
add edi, ecx
mov ecx, dword [ebp - 0x250]
adc ecx, 0
mov dword [ebp - 0x270], edi
xor eax, eax
add ebx, ecx
mov ecx, dword [ebp - 0x238]
adc eax, eax
add edx, ebx
mov ebx, dword [ebp - 0x244]
adc ebx, eax
mov eax, dword [ebp - 0x24c]
sub esi, edx
sbb ecx, ebx
shrd esi, ecx, 1
shr ecx, 1
add esi, edx
mov edx, 0x64
adc ecx, ebx
shrd esi, ecx, 6
shr ecx, 6
sub dword [ebp - 0x23c], esi
sbb eax, ecx
mul edx
mov edx, 0x64
mov ebx, eax
mov eax, dword [ebp - 0x23c]
mul edx
add ebx, edx
add eax, dword [ebp - 0x240]
mov dword [ebp - 0x23c], eax
adc ebx, dword [ebp - 0x238]
mov dword [ebp - 0x24c], ebx
mov ebx, esi
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x238], ecx
test ecx, ecx
ja 0x406474
jb 0x406568
cmp ebx, 0x64
ja 0x406474
mov eax, ebx
mov edx, 0xe147ae15
mul edx
mov edi, 0x47ae147a
mov dword [ebp - 0x270], eax
mov esi, edx
mov eax, ebx
mul edi
mov edi, eax
mov dword [ebp - 0x244], edx
mov eax, ecx
mov ecx, 0xe147ae15
mul ecx
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp - 0x238]
mov edx, 0x47ae147a
mul edx
add ecx, esi
mov esi, dword [ebp - 0x23c]
mov dword [ebp - 0x254], eax
adc ebx, 0
mov dword [ebp - 0x250], edx
mov edx, dword [ebp - 0x254]
add edi, ecx
mov ecx, dword [ebp - 0x244]
adc ecx, 0
mov dword [ebp - 0x270], edi
xor eax, eax
add ebx, ecx
mov ecx, dword [ebp - 0x238]
adc eax, eax
add edx, ebx
mov ebx, dword [ebp - 0x250]
adc ebx, eax
mov eax, dword [ebp - 0x240]
sub eax, edx
sbb ecx, ebx
shrd eax, ecx, 1
shr ecx, 1
add eax, edx
adc ecx, ebx
shrd eax, ecx, 6
shr ecx, 6
sub esi, eax
mov eax, dword [ebp - 0x24c]
sbb eax, ecx
mov ecx, 0x64
mul ecx
mov ebx, eax
mov eax, esi
mul ecx
mov ecx, dword [ebp - 0x260]
add ebx, edx
mov esi, eax
add esi, dword [ebp - 0x240]
adc ebx, dword [ebp - 0x238]
test ecx, ecx
je 0x40663c
mov eax, dword [ebp - 0x258]
mov dword [ecx], eax
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406350