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
cmp eax, 0x8afa8c1d
xchg dword [esi - 0x55f8dd10], ecx
nop
inc esp
mov dword [0x3d8b6d4a], eax
in al, dx
adc dword [edx], ebx
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
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
into
cld
invalid
call fcn.00436550
test al, al
je 0x401ef6
pop edx
and byte [ebx - 0x2b], bl
loop 0x401ece
cdq
xchg esp, eax
into
add eax, 0x91a667ad
invalid
call fcn.00436390
test al, al
je 0x401f1d
jae 0x401f3b
mov al, al
lodsb al, byte [esi]
pop esp
lds edi, [eax - 0x6c96646e]
popfd
sbb esi, ebp
sahf
invalid
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
push ss
add byte [ecx + 0x627a40], ah
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
call 0x4540aaf6
int3
call fcn.00436400
test al, al
je 0x401fd2
jmp 0x401fed
call fcn.004364e0
test al, al
je 0x401ffa
sahf
xchg dword [edx - 0x219b3091], edi
das
fbstp tbyte [eax - 0x5cdaf4ab]
in al, 0xb7
stc
invalid
ja 0x402026
enter 0x7cb9, 0x7f
and eax, dword [esi]
or esi, dword [edx + 0x68142c9f]
or al, 0x10
add byte [eax], al
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
call 0x8b407a3c
invalid
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