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

Disassembly:
mov eax, 0x114c
call fcn.0054e7e0
mov eax, dword [0x5c9040]
xor eax, esp
mov dword [esp + 0x1144], eax
push ebx
push ebp
push esi
push edi
mov ebp, 0x80
mov dword [esp + 0x1c], edx
push ebp
xor edi, edi
lea eax, [esp + 0x54]
xorps xmm0, xmm0
xor esi, esi
and dword [esp + 0x18], esi
mov ebx, ecx
push edi
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.0051c010
add esp, 0xc
lea eax, [esp + 0xd0]
push ebp
push edi
push eax
call fcn.0051c010
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [esp + 0x1c]
add esp, 0xc
xor ecx, ecx
mov dword [esp + 0x10], ecx
push ecx
push eax
push 8
lea eax, [esp + 0x2c]
push eax
push ecx
push ecx
push 0x7405c
push ebx
call ebp
test eax, eax
jne 0x4fd2d5
push str.DeviceIoControl:IOCTL_DISK_GET_LENGTH_INFO_error:
push str.os_get_disk_info_imp
push 0x75
push str.srcliblibpaloswindowsos_disk.c
push 0x5a9534
push pe_nt_image_headers32
push eax
call fcn.004e8a0a
add esp, 0x1c
and dword [esp + 0x10], esi
lea eax, [esp + 0x38]
push 0x18
push 0
push eax
call fcn.0051c010
add esp, 0xc
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push 0x18
lea eax, [esp + 0x44]
push eax
push ecx
push ecx
push 0x70000
push ebx
call ebp
test eax, eax
jne 0x4fd34b
push str.DeviceIoControl:IOCTL_DISK_GET_DRIVE_GEOMETRY_error:
push str.os_get_disk_info_imp
push 0x83
push str.srcliblibpaloswindowsos_disk.c
push 0x5a9534
push pe_nt_image_headers32
push 0
call fcn.004e8a0a
add esp, 0x1c
or eax, 0xffffffff
mov ecx, dword [esp + 0x1154]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051b034
add esp, 0x114c
ret
push 0xc
lea eax, [esp + 0x30]
push 0
push eax
call fcn.0051c010
add esp, 0xc
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
push 0x1000
push eax
lea eax, [esp + 0x158]
push eax
call fcn.0051c010
add esp, 0xc
lea eax, [esp + 0x10]
push 0
push eax
push 0xfff
lea eax, [esp + 0x15c]
push eax
push 0xc
lea eax, [esp + 0x40]
push eax
push 0x2d1400
push ebx
call ebp
test eax, eax
jne 0x4fd3b7
push str.DeviceIoControl:IOCTL_STORAGE_QUERY_PROPERTY_error:
push str.os_get_disk_info_imp
push 0x93
jmp 0x4fd316
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x168]
mov ebx, dword [esp + 0x15c]
mov ebp, dword [esp + 0x160]
mov dword [esp + 0x18], eax
cmp edx, 0x1000
jae 0x4fd65b
mov byte [esp + edx + 0x150], 0
test ebx, ebx
je 0x4fd406
cmp ebx, edx
jae 0x4fd406
lea eax, [esp + 0x150]
add eax, ebx
push eax
call fcn.00520660
mov edx, dword [esp + 0x14]
mov esi, eax
pop ecx
test ebp, ebp
je 0x4fd426
cmp ebp, edx
jae 0x4fd426
lea eax, [esp + 0x150]
add eax, ebp
push eax
call fcn.00520660
mov edx, dword [esp + 0x14]
pop ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4fd448
cmp eax, edx
jae 0x4fd448
lea ecx, [esp + 0x150]
add eax, ecx
push eax
call fcn.00520660
mov edx, dword [esp + 0x14]
mov edi, eax
pop ecx
mov ecx, dword [esp + 0x14]
add ecx, esi
je 0x4fd509
test esi, esi
je 0x4fd4b8
lea eax, [ebx + esi]
cmp eax, edx
ja 0x4fd4b8
lea eax, [esp + 0x150]
add eax, ebx
push esi
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0051c650
mov ecx, 0x80
add esp, 0xc
cmp esi, ecx
jae 0x4fd65b
lea eax, [esi - 1]
mov byte [esp + esi + 0x50], 0
test eax, eax
js 0x4fd4a6
cmp byte [esp + eax + 0x50], 0x20
jne 0x4fd49c
sub eax, 1
jns 0x4fd490
test eax, eax
js 0x4fd4a6
inc eax
mov byte [esp + eax + 0x50], 0x20
inc eax
cmp eax, ecx
jae 0x4fd65b
mov edx, dword [esp + 0x10]
mov byte [esp + eax + 0x50], 0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4fd509
lea eax, [ecx + ebp]
cmp eax, edx
ja 0x4fd509
push ecx
lea eax, [esp + 0x154]
add eax, ebp
push eax
lea eax, [esp + 0x58]
push eax
call fcn.00537c10
add esp, 0xc
lea eax, [esp + 0x50]
push eax
call fcn.00520660
pop ecx
jmp 0x4fd4f3
cmp byte [esp + eax + 0x50], 0x20
jne 0x4fd4f8
sub eax, 1
jns 0x4fd4ec
inc eax
cmp eax, 0x80
jae 0x4fd65b
mov byte [esp + eax + 0x50], 0
test edi, edi
je 0x4fd5e4
push 0x7f
pop eax
cmp edi, eax
lea ecx, [esp + 0x150]
cmova edi, eax
mov eax, dword [esp + 0x18]
add eax, ecx
push edi
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.0051c650
add esp, 0xc
cmp edi, 0x80
jae 0x4fd65b
mov byte [esp + edi + 0xd0], 0
mov edi, 0x4f00a5
push ecx
mov edx, edi
lea ecx, [esp + 0xd4]
call fcn.004f0008
pop ecx
lea ecx, [esp + 0xd0]
call fcn.004f2af5
mov esi, eax
test esi, esi
je 0x4fd58f
push ecx
push esi
mov edx, 0x80
lea ecx, [esp + 0xd8]
call fcn.004ea31a
pop ecx
pop ecx
mov ecx, esi
call fcn.004ebe45
push ecx
mov edx, edi
lea ecx, [esp + 0xd4]
call fcn.004f0008
pop ecx
lea eax, [esp + 0xd0]
push eax
call fcn.00520660
mov esi, eax
xor edx, edx
pop ecx
test esi, esi
je 0x4fd5e4
mov cl, byte [esp + edx + 0xd0]
cmp cl, 0x40
jle 0x4fd5c6
cmp cl, 0x5b
jl 0x4fd5d5
lea eax, [ecx - 0x61]
cmp al, 0x19
jbe 0x4fd5d5
sub cl, 0x30
cmp cl, 9
ja 0x4fd5dc
inc edx
cmp edx, esi
jb 0x4fd5b5
jmp 0x4fd5e4
mov byte [esp + 0xd0], 0
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x4fd654
mov eax, dword [esp + 0x20]
mov edx, 0x80
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x188], eax
mov eax, dword [esp + 0x4c]
mov dword [ebx + 0x180], eax
lea eax, [esp + 0x50]
push ecx
mov dword [ebx + 0x18c], ecx
lea ecx, [ebx + 0x80]
push eax
call fcn.004ea31a
pop ecx
lea eax, [esp + 0xd4]
mov edx, 0x80
push eax
lea ecx, [ebx + 0x100]
call fcn.004ea31a
pop ecx
mov ecx, dword [esp + 0x170]
call fcn.004fd15d
push eax
push 0x40
lea ecx, [ebx + 0x40]
pop edx
call fcn.004ea31a
pop ecx
pop ecx
xor eax, eax
jmp 0x4fd332
call fcn.0051b3b0
int3