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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0xb8], edx
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.00401010
add esp, 0x10
lea eax, [ebp - 0x88]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0xbc], edi
call esi
push eax
lea eax, [ebp - 0x88]
push eax
push edi
push str.Create_file_Handle:_p__s_status:_u
call fcn.00414ac0
add esp, 0x10
cmp edi, 0xffffffff
je 0x4179b7
push 0
lea eax, [ebp - 0xb4]
push eax
push 8
lea eax, [ebp - 0xc8]
push eax
push 0
push 0
push 0x7405c
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call edi
test eax, eax
jne 0x4179cd
call esi
push eax
push str.DeviceIoControl_IOCTL_DISK_GET_LENGTH_INFO_failed_error:_u
call fcn.00414ac0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xc4]
push dword [ebp - 0xc8]
push ebx
push str.PHYSICALDRIVE_d_size__llu_bytes
call fcn.00414ac0
add esp, 0x10
mov dword [ebp - 0x94], 0
lea eax, [ebp - 0xb4]
mov dword [ebp - 0x90], 0
push 0
push eax
push 8
lea eax, [ebp - 0xd0]
push eax
push 0xc
lea eax, [ebp - 0x94]
push eax
push 0x2d1400
push dword [ebp - 0xbc]
call edi
test eax, eax
jne 0x417a53
push dword [ebp - 0xb4]
call esi
push eax
push str.DeviceIoControl1_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xcc]
push eax
cmp eax, 0x28
jae 0x417a82
push str.Invalid_DevDescHeader.Size:_u
call fcn.00414ac0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
call fcn.0042442e
add esp, 4
mov dword [ebp - 0xc0], eax
test eax, eax
jne 0x417ac0
push dword [ebp - 0xcc]
call esi
push eax
push str.failed_to_malloc_error:_u_len:_u
call fcn.00414ac0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0xb4]
push ecx
push dword [ebp - 0xcc]
push eax
push 0xc
lea eax, [ebp - 0x94]
push eax
push 0x2d1400
push dword [ebp - 0xbc]
call edi
test eax, eax
jne 0x417b24
push dword [ebp - 0xb4]
call esi
push eax
push str.DeviceIoControl2_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
push dword [ebp - 0xc0]
call fcn.0042422d
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0xb4]
mov dword [ebp - 0x8c], 0
push eax
push 0x1c
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x94], 6
push eax
push 0xc
lea eax, [ebp - 0x94]
mov dword [ebp - 0x90], 0
push eax
push 0x2d1400
push dword [ebp - 0xbc]
xorps xmm0, xmm0
mov dword [ebp - 0x98], 0
movups xmmword [ebp - 0xb0], xmm0
movq qword [ebp - 0xa0], xmm0
call edi
test eax, eax
jne 0x417ba0
push dword [ebp - 0xb4]
call esi
push eax
push str.DeviceIoControl3_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
mov edx, dword [ebp - 0xb8]
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xc4]
mov dword [edx + 4], ebx
mov ebx, dword [ebp - 0xc0]
mov dword [edx + 0x10], eax
mov dword [edx + 0x14], ecx
mov al, byte [ebx + 8]
mov byte [edx + 0x18], al
movzx eax, byte [ebx + 0xa]
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x1c]
mov dword [edx + 0x220], eax
mov eax, dword [ebp - 0xa0]
mov dword [edx + 0x224], eax
mov eax, dword [ebp - 0x9c]
mov dword [edx + 0x228], eax
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x417c66
add eax, ebx
lea esi, [edx + 0x20]
push eax
push 0x80
push esi
call fcn.004241d3
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417c11
sub ecx, edi
je 0x417c40
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x417c30
cmp al, 9
jne 0x417c40
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x417c26
nop dword [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x417c4a
cmp al, 9
jne 0x417c4d
inc edx
jmp 0x417c40
test al, al
je 0x417c5d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x417c53
mov edx, dword [ebp - 0xb8]
mov byte [esi], 0
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x417ce0
add eax, ebx
lea esi, [edx + 0xa0]
push eax
push 0x80
push esi
call fcn.004241d3
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417c90
sub ecx, edi
je 0x417cc0
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x417caf
cmp al, 9
jne 0x417cc0
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x417ca5
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x417cca
cmp al, 9
jne 0x417ccd
inc edx
jmp 0x417cc0
test al, al
je 0x417cdd
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x417cd3
mov byte [esi], 0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x417d60
mov esi, dword [ebp - 0xb8]
add eax, ebx
push eax
add esi, 0x120
push 0x80
push esi
call fcn.004241d3
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417d10
sub ecx, edi
je 0x417d40
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x417d2f
cmp al, 9
jne 0x417d40
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x417d25
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x417d4a
cmp al, 9
jne 0x417d4d
inc edx
jmp 0x417d40
test al, al
je 0x417d5d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [esi + edx]
test al, al
jne 0x417d53
mov byte [esi], 0
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x417de0
mov esi, dword [ebp - 0xb8]
add eax, ebx
push eax
add esi, 0x1a0
push 0x80
push esi
call fcn.004241d3
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417d90
sub ecx, edi
je 0x417dc0
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x417daf
cmp al, 9
jne 0x417dc0
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x417da5
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x417dca
cmp al, 9
jne 0x417dcd
inc edx
jmp 0x417dc0
test al, al
je 0x417ddd
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [esi + edx]
test al, al
jne 0x417dd3
mov byte [esi], 0
push ebx
call fcn.0042422d
add esp, 4
push dword [ebp - 0xbc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret