Function at 0x401b50
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2cec
call fcn.00571b70
mov eax, dword [0x627a40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x2ce4], ecx
call fcn.00436160
test al, al
je 0x401b89
inc ebx
int1
invalid
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor esi, esi
mov dword [ebp - 0x2ce0], esi
nop word [eax + eax]
push esi
lea eax, [ebp - 0x408]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x408]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401ec2
push 0x2710
xorps xmm0, xmm0
mov dword [ebp - 0x2cdc], 0
lea eax, [ebp - 0x2b18]
movq qword [ebp - 0x2b24], xmm0
push 0
push eax
mov dword [ebp - 0x2b1c], 0
mov dword [ebp - 0x2b24], 0
mov dword [ebp - 0x2b20], 0
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x2cdc]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2b18]
push eax
push 0xc
lea eax, [ebp - 0x2b24]
push eax
push 0x2d1400
push ebx
call edi
test eax, eax
je 0x401ea7
push 0x80
lea eax, [ebp - 0x208]
push 0
push eax
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x80
push 0
push eax
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x88]
push 0x80
push 0
push eax
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x188]
push 0x80
push 0
push eax
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x88]
push eax
push 0
push dword [ebp - 0x2b0c]
lea eax, [ebp - 0x2b18]
push eax
call fcn.00401890
lea eax, [ebp - 0x108]
push eax
push 0
push dword [ebp - 0x2b08]
lea eax, [ebp - 0x2b18]
push eax
call fcn.00401890
lea eax, [ebp - 0x188]
push eax
push 0
push dword [ebp - 0x2b04]
lea eax, [ebp - 0x2b18]
push eax
call fcn.00401890
lea eax, [ebp - 0x208]
push eax
push 1
push dword [ebp - 0x2b00]
lea eax, [ebp - 0x2b18]
push eax
call fcn.00401890
push 0x1a0
lea eax, [ebp - 0x2cd0]
mov dword [ebp - 0x2b30], 0
xorps xmm0, xmm0
push 0
push eax
movlpd qword [ebp - 0x2cd8], xmm0
call fcn.00576f50
lea ecx, [ebp - 0x88]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401d50
sub ecx, edx
je 0x401d75
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x88]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2cb1], al
test al, al
jne 0x401d60
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401d80
sub ecx, edx
je 0x401dc5
lea edx, [ebp - 0x108]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x401d93
lea edi, [ebp - 0x2cb0]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401da3
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x2ce0]
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x188]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2bb1], al
test al, al
jne 0x401dd0
xor eax, eax
nop word [eax + eax]
mov cl, byte [ebp + eax - 0x208]
lea eax, [eax + 1]
mov byte [ebp + eax - 0x2c31], cl
test cl, cl
jne 0x401df0
lea eax, [ebp - 0x2c30]
push eax
call fcn.004020f0
lea eax, [ebp - 0x2cb0]
push eax
call fcn.004020f0
lea eax, [ebp - 0x2bb0]
push eax
call fcn.004020f0
push 0x2710
lea eax, [ebp - 0x2b18]
push 0
push eax
call fcn.00576f50
add esp, 0xc
lea eax, [ebp - 0x2cdc]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2b18]
push eax
push 0
push 0
push 0x700a0
push ebx
call edi
test eax, eax
je 0x401ec2
mov eax, dword [ebp - 0x2b00]
mov ecx, 2
mov dword [ebp - 0x2cd8], eax
mov eax, dword [ebp - 0x2afc]
mov dword [ebp - 0x2cd4], eax
xor eax, eax
cmp dword [ebp - 0x2b10], 0xc
cmove eax, ecx
mov ecx, dword [ebp - 0x2ce4]
mov dword [ebp - 0x2b30], eax
lea eax, [ebp - 0x2cd8]
push eax
call fcn.00402650
sub bl, dl
invalid
add byte [eax], al
jmp 0x401ebb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.00401750
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
mov dword [ebp - 0x2ce0], esi
cmp esi, 0x10
jl 0x401ba0
call fcn.00436550
test al, al
je 0x401ef6
enter 0xfffffffffffff957, 0x4e
pop es
jbe 0x401eb8
jp 0x401ea3
pushal
test eax, 0xd8431d65
jge 0x401f34
add dword [ebx + eax*2 + 0x61], esi
ret 0xcf53
call fcn.00436390
test al, al
je 0x401f1d
push ss
and bh, byte [ecx + 0xe]
sub edi, dword [eax + edx]
outsd dx, dword [esi]
inc edx
sti
jp 0x401e9b
fmul dword [ebx + 0x7f263b6b]
add eax, 0x19367088
push ebp
fnstcw word [eax - 0x26d7a553]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00570ea9
mov esp, ebp
pop ebp
ret
and al, 0x14
add byte [eax], al
call fcn.00571b70
mov eax, dword [0x627a40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x100
mov dword [ebp - 0x1424], ecx
mov dword [ebp - 0x141c], 0
mov dword [ebp - 0x1420], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
test eax, eax
jne 0x401f8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nERROR:_Could_not_SetPriorityClass__LastError:__d_n
call fcn.00401750
add esp, 8
call fcn.004366a0
test al, al
je 0x401fab
inc eax
push 0x18
mov al, byte [0x126e6550]
xlatb
outsb dx, byte [esi]
adc dl, bh
mov byte [0x732ce488], al
aas
cmp eax, 0x1fe8dc0d
call fcn.00436400
test al, al
je 0x401fd2
salc
mov edx, 0xaae9378f
lea ecx, [edi]
in eax, 0xac
imul eax, dword [esi], 0xffffffa2
jb 0x401f9d
scasd eax, dword es:[edi]
scasd eax, dword es:[edi]
lds ecx, [ebx + 0xeb213d9]
mov byte [0xfd553957], al
dec ebx
and ch, al
or dword [ebp + 3], eax
add byte [eax + eax*8 - 0x597ce08c], al
xchg esi, eax
or dh, byte [ecx]
pop ds
sbb cl, byte [esi + 0x55]
call fcn.004364e0
test al, al
je 0x401ffa
and dword [esi + 0x1f310a96], 0x1a
dec esi
push ebp
xchg edx, eax
stc
or ch, byte [edx]
adc dword [esi], esi
int3
push 0x100c
lea eax, [ebp - 0x1418]
push 0
push eax
call fcn.00576f50
add esp, 0xc
push 0
push 0x4000000
push 0
push 0
push 0
push 0
push str..IDE21201.VXD
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402057
push 0
lea eax, [ebp - 0x1420]
push eax
push 4
lea eax, [ebp - 0x1418]
push eax
push 0
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
lea edi, [ebp - 0x140c]
nop
cmp byte [ebp + esi - 0x1414], 0
je 0x4020b5
mov eax, esi
shr eax, 1
cmp byte [ebp + eax - 0x1418], 0
je 0x4020b5
xor eax, eax
mov edx, edi
nop dword [eax]
movzx ecx, word [edx]
lea edx, [edx + 2]
mov dword [ebp + eax*4 - 0x408], ecx
inc eax
cmp eax, 0x100
jl 0x402080
lea eax, [ebp - 0x408]
push eax
push ecx
mov ecx, dword [ebp - 0x1424]
call fcn.00402250
mov ebx, 1
mov dword [ebp - 0x141c], ebx
jmp 0x4020bb
mov ebx, dword [ebp - 0x141c]
inc esi
add edi, 0x200
cmp esi, 8
jb 0x402060
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00570ea9
mov esp, ebp
pop ebp
ret