Function at 0x40d9b0
Capabilities:
Get disk size
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x80
lea eax, [ebp - 0x88]
mov ebx, ecx
push 0
push eax
mov dword [ebp - 0x2bc], ebx
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x80
push 0
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x188]
push 0x80
push 0
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x208]
push 0x80
push 0
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x288]
push dword [ebx + 4]
push str..PhysicalDrive_d
push 0x80
push eax
call fcn.00401010
add esp, 0x10
lea eax, [ebp - 0x288]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2c0], eax
cmp eax, 0xffffffff
jne 0x40da99
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x288]
push eax
push 0xffffffffffffffff
push str.Create_file_Handle:_p__s_status:_u
call fcn.00414ac0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea ecx, [ebp - 0x2b8]
push 0
push ecx
push 8
lea ecx, [ebp - 0x2d8]
push ecx
push 0
push 0
push 0x7405c
push eax
call esi
test eax, eax
jne 0x40dae8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl_IOCTL_DISK_GET_LENGTH_INFO_failed_error:_u
call fcn.00414ac0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
mov edi, dword [ebx + 0x10]
mov edx, dword [ebp - 0x2d8]
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebp - 0x2d4]
cmp edi, edx
jne fcn.0040e0fe
cmp ecx, eax
jne fcn.0040e0fe
mov edi, dword [ebp - 0x2c0]
lea eax, [ebp - 0x2b8]
push 0
push eax
push 8
lea eax, [ebp - 0x2cc]
mov dword [ebp - 0x294], 0
push eax
push 0xc
lea eax, [ebp - 0x294]
mov dword [ebp - 0x290], 0
push eax
push 0x2d1400
push edi
call esi
test eax, eax
jne 0x40db6b
push dword [ebp - 0x2b8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl1_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
push edi
jmp fcn.0040e118
mov eax, dword [ebp - 0x2c8]
push eax
cmp eax, 0x28
jae 0x40db8a
push str.Invalid_DevDescHeader.Size:_u
call fcn.00414ac0
add esp, 8
push edi
jmp fcn.0040e118
call fcn.0042442e
mov edi, eax
add esp, 4
mov dword [ebp - 0x2c4], edi
test edi, edi
jne 0x40dbc4
push dword [ebp - 0x2c8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_malloc_error:_u_len:_u
call fcn.00414ac0
mov ebx, dword [ebp - 0x2c0]
add esp, 0xc
push ebx
jmp fcn.0040e118
mov ebx, dword [ebp - 0x2c0]
lea eax, [ebp - 0x2b8]
push 0
push eax
push dword [ebp - 0x2c8]
lea eax, [ebp - 0x294]
push edi
push 0xc
push eax
push 0x2d1400
push ebx
call esi
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x40dc1d
push dword [ebp - 0x2b8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl2_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
push edi
call fcn.0042422d
add esp, 4
jmp fcn.0040e0cb
push 0
lea eax, [ebp - 0x2b8]
mov dword [ebp - 0x28c], 0
push eax
push 0x1c
lea eax, [ebp - 0x2b0]
mov dword [ebp - 0x294], 6
push eax
push 0xc
lea eax, [ebp - 0x294]
mov dword [ebp - 0x290], 0
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x298], 0
push 0x2d1400
push ebx
movups xmmword [ebp - 0x2b0], xmm0
movq qword [ebp - 0x2a0], xmm0
call esi
mov dword [ebp - 0x2b4], eax
test eax, eax
jne 0x40dc9e
push dword [ebp - 0x2b8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl3_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
mov esi, dword [ebp - 0x2bc]
mov bh, byte [edi + 8]
mov ecx, dword [ebp - 0x29c]
mov edx, dword [ebp - 0x2a0]
mov bl, byte [esi + 0x18]
cmp bl, bh
jne 0x40e097
movzx eax, byte [edi + 0xa]
cmp dword [esi + 0x1c], eax
jne 0x40e097
mov eax, dword [esi + 0x220]
cmp eax, dword [edi + 0x1c]
jne 0x40e097
cmp dword [esi + 0x224], edx
jne 0x40e097
cmp dword [esi + 0x228], ecx
jne 0x40e097
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40ddcb
add eax, edi
push eax
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.004241d3
lea edx, [ebp - 0x88]
add esp, 0xc
mov ecx, edx
mov esi, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dd21
sub ecx, edi
je 0x40dd48
lea eax, [ebp + ecx - 0x89]
mov bl, byte [eax]
cmp bl, 0x20
je 0x40dd3f
cmp bl, 9
jne 0x40dd48
mov byte [eax], 0
dec eax
sub ecx, 1
jne 0x40dd33
mov al, byte [edx]
cmp al, 0x20
je 0x40dd52
cmp al, 9
jne 0x40dd55
inc edx
jmp 0x40dd48
test al, al
je 0x40dd6b
lea ecx, [ebp - 0x88]
sub edx, ecx
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40dd61
mov ebx, dword [ebp - 0x2bc]
lea ecx, [ebp - 0x88]
mov byte [esi], 0
lea esi, [ebx + 0x20]
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40dda0
test dl, dl
je 0x40dd9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40dda0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40dd80
xor eax, eax
jmp 0x40dda5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40ddc3
lea eax, [ebp - 0x88]
push eax
push esi
push str.VendorId_not_match___s__s_
call fcn.00414ac0
add esp, 0xc
jmp fcn.0040e0cb
mov edi, dword [ebp - 0x2c4]
jmp 0x40ddcd
mov ebx, esi
mov eax, dword [edi + 0x10]
test eax, eax
je 0x40deaa
add eax, edi
push eax
lea eax, [ebp - 0x108]
push 0x80
push eax
call fcn.004241d3
lea edx, [ebp - 0x108]
add esp, 0xc
mov ecx, edx
mov esi, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40de00
sub ecx, edi
je 0x40de27
lea eax, [ebp + ecx - 0x109]
mov bl, byte [eax]
cmp bl, 0x20
je 0x40de1e
cmp bl, 9
jne 0x40de27
mov byte [eax], 0
dec eax
sub ecx, 1
jne 0x40de12
mov al, byte [edx]
cmp al, 0x20
je 0x40de31
cmp al, 9
jne 0x40de34
inc edx
jmp 0x40de27
test al, al
je 0x40de4a
lea ecx, [ebp - 0x108]
sub edx, ecx
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40de40
mov ebx, dword [ebp - 0x2bc]
lea ecx, [ebp - 0x108]
mov byte [esi], 0
lea esi, [ebx + 0xa0]
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40de81
test dl, dl
je 0x40de7d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40de81
add eax, 2
add ecx, 2
test dl, dl
jne 0x40de61
xor eax, eax
jmp 0x40de86
sbb eax, eax
or eax, 1
test eax, eax
je 0x40dea4
lea eax, [ebp - 0x108]
push eax
push esi
push str.ProductId_not_match___s__s_
call fcn.00414ac0
add esp, 0xc
jmp fcn.0040e0cb
mov edi, dword [ebp - 0x2c4]
mov eax, dword [edi + 0x14]
test eax, eax
je 0x40df99
add eax, edi
push eax
lea eax, [ebp - 0x188]
push 0x80
push eax
call fcn.004241d3
lea edx, [ebp - 0x188]
add esp, 0xc
mov ecx, edx
mov esi, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dee0
sub ecx, edi
je 0x40df10
lea eax, [ebp + ecx - 0x189]
mov bl, byte [eax]
cmp bl, 0x20
je 0x40defe
cmp bl, 9
jne 0x40df07
mov byte [eax], 0
dec eax
sub ecx, 1
jne 0x40def2
mov ebx, dword [ebp - 0x2bc]
nop dword [eax]
mov al, byte [edx]
cmp al, 0x20
je 0x40df1a
cmp al, 9
jne 0x40df1d
inc edx
jmp 0x40df10
test al, al
je 0x40df3a
lea ecx, [ebp - 0x188]
sub edx, ecx
nop dword [eax]
mov byte [esi], al
inc esi
mov al, byte [esi + edx]
test al, al
jne 0x40df30
mov byte [esi], 0
lea ecx, [ebp - 0x188]
lea esi, [ebx + 0x120]
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40df70
test dl, dl
je 0x40df6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40df70
add eax, 2
add ecx, 2
test dl, dl
jne 0x40df50
xor eax, eax
jmp 0x40df75
sbb eax, eax
or eax, 1
test eax, eax
je 0x40df93
lea eax, [ebp - 0x188]
push eax
push esi
push str.ProductRev_not_match___s__s_
call fcn.00414ac0
add esp, 0xc
jmp fcn.0040e0cb
mov edi, dword [ebp - 0x2c4]
mov eax, dword [edi + 0x18]
test eax, eax
je 0x40e080
add eax, edi
push eax
lea eax, [ebp - 0x208]
push 0x80
push eax
call fcn.004241d3
lea edx, [ebp - 0x208]
add esp, 0xc
mov ecx, edx
mov esi, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dfc8
sub ecx, edi
je 0x40e000
lea eax, [ebp + ecx - 0x209]
nop word [eax + eax]
mov bl, byte [eax]
cmp bl, 0x20
je 0x40dfec
cmp bl, 9
jne 0x40dff5
mov byte [eax], 0
dec eax
sub ecx, 1
jne 0x40dfe0
mov ebx, dword [ebp - 0x2bc]
nop dword [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x40e00a
cmp al, 9
jne 0x40e00d
inc edx
jmp 0x40e000
test al, al
je 0x40e02a
lea ecx, [ebp - 0x208]
sub edx, ecx
nop dword [eax]
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40e020
mov byte [esi], 0
lea ecx, [ebp - 0x208]
lea esi, [ebx + 0x1a0]
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40e060
test dl, dl
je 0x40e05c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40e060
add eax, 2
add ecx, 2
test dl, dl
jne 0x40e040
xor eax, eax
jmp 0x40e065
sbb eax, eax
or eax, 1
test eax, eax
je 0x40e080
lea eax, [ebp - 0x208]
push eax
push esi
push str.ProductRev_not_match___s__s_
call fcn.00414ac0
add esp, 0xc
jmp fcn.0040e0cb
push dword [ebx + 4]
push str.PhyDrive_d_ALL_match__now_continue
call fcn.00414ac0
add esp, 8
mov esi, 1
jmp fcn.0040e0d1
movzx eax, byte [edi + 0xa]
push ecx
push dword [esi + 0x228]
push edx
push dword [esi + 0x224]
call dword [ebp - 0x75]
push ebp
mov ebp, esp