Function at 0x417340
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
push ebx
mov edx, 0x227
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x417347
call fcn.0045e790
mov edx, dword [esp + 0x8a8]
lea ecx, [esp]
call fcn.0044e000
mov dword [esp + 0x1c], 0xffffffff
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push 2
push dword [esp + 0x14]
call fcn.0044f540
call fcn.0044e2d2
add dword [esp], edx
call fcn.0044ff80
lea eax, [esp + 4]
push eax
call fcn.0045e660
push edx
call fcn.0045e620
pop edx
push eax
push 0
push 0
push 3
push 0
push 3
push 0
push edx
call fcn.0045e620
pop edx
push eax
mov edx, 0x469c1e
push edx
call fcn.0045e6f0
mov edx, dword [esp + 0x20]
push edx
call fcn.0045e6f0
call fcn.0044e2d2
add dword [esp], edx
call sub.kernel32.dll_CreateFileW
call fcn.0044e2f0
mov dword [esp + 4], eax
mov ebx, dword [esp + 4]
cmp ebx, 0xffffffff
je 0x4178dc
push 0
lea eax, [esp + 0x2c]
push eax
push 0xc
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0x2d1080
push dword [esp + 0x20]
call sub.kernel32.dll_DeviceIoControl
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x41745e
lea ebp, [esp + 8]
push dword [ebp + 4]
pop eax
mov dword [esp + 0x1c], eax
push dword [esp + 4]
call sub.kernel32.dll_CloseHandle
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
jne 0x417477
xor eax, eax
jmp 0x4178de
push edx
call fcn.0045e620
pop edx
push eax
mov edx, dword [esp + 4]
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e6f0
mov edx, 0x4622e0
push edx
call fcn.0045e6f0
call fcn.0044e2d2
add dword [esp], edx
call sub.kernel32.dll_GetDriveTypeW
call fcn.0044e2f0
mov dword [esp + 0x18], eax
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push 0x104
call fcn.0044f2b0
lea eax, [esp + 0x24]
push eax
call fcn.0045e660
push 0x104
mov eax, dword [esp + 0x24]
push eax
push dword [esp + 8]
call sub.kernel32.dll_QueryDosDeviceW
and eax, eax
je 0x4174f1
xor eax, eax
jmp 0x4174f6
mov eax, 1
and eax, eax
je 0x417501
xor eax, eax
jmp 0x4178de
push 1
mov eax, str.Floppy
push eax
push dword [esp + 0x28]
call fcn.0044f620
and eax, eax
je 0x417520
xor eax, eax
jmp 0x4178de
push dword [esp + 0x18]
mov ebx, 2
cmp ebx, dword [esp]
je 0x417538
mov ebx, 3
cmp ebx, dword [esp]
jne 0x417543
mov ebp, 0x46ff08
mov dword [esp + 0x3c], ebp
jmp 0x41754d
xor eax, eax
add esp, 4
jmp 0x4178de
pop eax
push 0x12
push 0
push 0
push dword [esp + 0x44]
call sub.setupapi.dll_SetupDiGetClassDevsW
mov dword [esp + 0x44], eax
mov ebx, dword [esp + 0x44]
cmp ebx, 0xffffffff
jne 0x41757a
xor eax, eax
jmp 0x4178de
lea ebp, [esp + 0x858]
mov dword [ebp], 0x1c
lea eax, [esp + 0x858]
push eax
push dword [esp + 0x40]
push dword [esp + 0x40]
push 0
push dword [esp + 0x54]
call sub.setupapi.dll_SetupDiEnumDeviceInterfaces
and eax, eax
je 0x4175ae
xor eax, eax
jmp 0x4175b3
mov eax, 1
and eax, eax
je 0x4175bc
jmp 0x4178c5
push 0
lea eax, [esp + 0x44]
push eax
push 0
push 0
lea eax, [esp + 0x868]
push eax
push dword [esp + 0x58]
call sub.setupapi.dll_SetupDiGetDeviceInterfaceDetailW
mov ebx, dword [esp + 0x40]
and ebx, ebx
je 0x4175fc
mov ebx, dword [esp + 0x40]
cmp ebx, 0x804
jg 0x4175fc
mov eax, 1
jmp 0x4175fe
xor eax, eax
and eax, eax
je 0x4178b7
lea ebp, [esp + 0x54]
mov dword [ebp], 6
lea ebp, [esp + 0x874]
mov dword [ebp], 0x1c
lea eax, [esp + 0x874]
push eax
push 0
push dword [esp + 0x48]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x868]
push eax
push dword [esp + 0x58]
call sub.setupapi.dll_SetupDiGetDeviceInterfaceDetailW
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x4178b7
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push 0x400
call fcn.0044f2b0
lea eax, [esp + 0x54]
push eax
call fcn.0045e660
push 0
lea ebp, [esp + 0x878]
push dword [ebp + 0x14]
lea eax, [esp + 0x34]
push eax
call sub.setupapi.dll_CM_Get_Parent
push 0
push 0x400
mov eax, dword [esp + 0x58]
push eax
lea ebp, [esp + 0x880]
push dword [ebp + 0x14]
call sub.setupapi.dll_CM_Get_Device_IDW
push 0
push 0
push 3
push 0
push 3
push 0
lea ebp, [esp + 0x6c]
lea eax, [ebp + 4]
push eax
call sub.kernel32.dll_CreateFileW
mov dword [esp + 0x48], eax
mov ebx, dword [esp + 0x48]
cmp ebx, 0xffffffff
je 0x4178b7
mov dword [esp + 0x28], 0
push 0
lea eax, [esp + 0x2c]
push eax
push 0xc
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0x2d1080
push dword [esp + 0x64]
call sub.kernel32.dll_DeviceIoControl
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x4178ae
mov ebx, dword [esp + 0x1c]
lea ebp, [esp + 8]
cmp ebx, dword [ebp + 4]
jne 0x4178ae
push dword [esp + 0x48]
call sub.kernel32.dll_CloseHandle
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push 0x800
call fcn.0044f2b0
lea eax, [esp + 0x89c]
push eax
call fcn.0045e660
lea eax, [esp + 0x874]
push eax
push dword [esp + 0x40]
push dword [esp + 0x4c]
call sub.setupapi.dll_SetupDiEnumDeviceInfo
mov dword [esp + 0x890], 0
mov dword [esp + 0x894], 0
lea eax, [esp + 0x894]
push eax
push 0x800
mov eax, dword [esp + 0x8a0]
push eax
lea eax, [esp + 0x89c]
push eax
push 0xc
lea eax, [esp + 0x888]
push eax
push dword [esp + 0x5c]
call sub.setupapi.dll_SetupDiGetDeviceRegistryPropertyW
mov edx, dword [esp + 0x898]
xor ecx, ecx
call fcn.0044e300
jne 0x4177fb
cmp dword [esp + 0x8ac], 0
je 0x4177fb
push dword [esp + 0x898]
push dword [esp + 0x8b0]
call fcn.00451693
push dword [esp + 0x44]
call sub.setupapi.dll_SetupDiDestroyDeviceInfoList
push edx
call fcn.0045e620
pop edx
push eax
push 1
mov eax, str.usbstor
push eax
lea ebp, [esp + 0x60]
lea edx, [ebp + 4]
push edx
call fcn.0045e620
pop edx
push eax
push 0x400
push edx
call fcn.0045e880
call fcn.0044e2d2
add dword [esp], edx
call fcn.0044f620
call fcn.0044e2f0
and eax, eax
je 0x417851
mov dword [esp + 0x4c], 1
jmp 0x4178ae
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
push 7
push dword [esp + 0x64]
call fcn.0044f540
call fcn.0044e2d2
add dword [esp], edx
call fcn.0044f5b0
call fcn.0045e850
mov edx, 0x469ac6
pop ecx
push ecx
call fcn.0044e340
mov ecx, eax
call fcn.0044e300
je 0x4178ae
mov dword [esp + 0x4c], 1
push dword [esp + 0x48]
call sub.kernel32.dll_CloseHandle
mov ebx, dword [esp + 0x3c]
inc ebx
mov dword [esp + 0x3c], ebx
jmp 0x417588
push dword [esp + 0x44]
call sub.setupapi.dll_SetupDiDestroyDeviceInfoList
cmp dword [esp + 0x4c], 0
je 0x4178dc
mov eax, 1
jmp 0x4178de
xor eax, eax
push dword [esp + 0x34]
call fcn.0045e7f0
push dword [esp]
call fcn.0045e7f0
push dword [esp + 0x20]
call fcn.0045e7f0
push dword [esp + 0x50]
call fcn.0045e7f0
push dword [esp + 0x898]
call fcn.0045e7f0
add esp, 0x89c
pop ebx
pop ebp
ret 8