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

Disassembly:
mov eax, 0x114c
call fcn.0042b760
mov eax, dword [section..data]
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.00411470
push ebp
lea eax, [esp + 0xe0]
push edi
push eax
call fcn.00411470
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [esp + 0x28]
add esp, 0x18
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 0x40e2a3
push str.DeviceIoControl:IOCTL_DISK_GET_LENGTH_INFO_error:
push str.os_get_disk_info_imp
push 0x75
push str.srcliblibpaloswindowsos_disk.c
push 0x432f04
push 0x108
push eax
call fcn.0040f171
add esp, 0x1c
and dword [esp + 0x10], esi
lea eax, [esp + 0x38]
push 0x18
push 0
push eax
call fcn.00411470
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 0x40e319
push str.DeviceIoControl:IOCTL_DISK_GET_DRIVE_GEOMETRY_error:
push str.os_get_disk_info_imp
push 0x83
push str.srcliblibpaloswindowsos_disk.c
push 0x432f04
push 0x108
push 0
call fcn.0040f171
add esp, 0x1c
or eax, 0xffffffff
mov ecx, dword [esp + 0x1154]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00410199
add esp, 0x114c
ret
push 0xc
lea eax, [esp + 0x30]
push 0
push eax
call fcn.00411470
xor eax, eax
push 0x1000
push eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x164]
push eax
call fcn.00411470
add esp, 0x18
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 0x40e382
push str.DeviceIoControl:IOCTL_STORAGE_QUERY_PROPERTY_error:
push str.os_get_disk_info_imp
push 0x93
jmp 0x40e2e4
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 0x40e625
mov byte [esp + edx + 0x150], 0
test ebx, ebx
je 0x40e3d1
cmp ebx, edx
jae 0x40e3d1
lea eax, [esp + 0x150]
add eax, ebx
push eax
call fcn.004176c0
mov edx, dword [esp + 0x14]
mov esi, eax
pop ecx
test ebp, ebp
je 0x40e3f1
cmp ebp, edx
jae 0x40e3f1
lea eax, [esp + 0x150]
add eax, ebp
push eax
call fcn.004176c0
mov edx, dword [esp + 0x14]
pop ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40e413
cmp eax, edx
jae 0x40e413
lea ecx, [esp + 0x150]
add eax, ecx
push eax
call fcn.004176c0
mov edx, dword [esp + 0x14]
mov edi, eax
pop ecx
mov ecx, dword [esp + 0x14]
add ecx, esi
je 0x40e4d3
test esi, esi
je 0x40e483
lea eax, [ebx + esi]
cmp eax, edx
ja 0x40e483
lea eax, [esp + 0x150]
add eax, ebx
push esi
push eax
lea eax, [esp + 0x58]
push eax
call fcn.00410ef0
mov ecx, 0x80
add esp, 0xc
cmp esi, ecx
jae 0x40e625
lea eax, [esi - 1]
mov byte [esp + esi + 0x50], 0
test eax, eax
js 0x40e471
cmp byte [esp + eax + 0x50], 0x20
jne 0x40e467
sub eax, 1
jns 0x40e45b
test eax, eax
js 0x40e471
inc eax
mov byte [esp + eax + 0x50], 0x20
inc eax
cmp eax, ecx
jae 0x40e625
mov edx, dword [esp + 0x10]
mov byte [esp + eax + 0x50], 0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40e4d3
lea eax, [ecx + ebp]
cmp eax, edx
ja 0x40e4d3
push ecx
lea eax, [esp + 0x154]
add eax, ebp
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0041b690
lea eax, [esp + 0x5c]
push eax
call fcn.004176c0
add esp, 0x10
jmp 0x40e4bd
cmp byte [esp + eax + 0x50], 0x20
jne 0x40e4c2
sub eax, 1
jns 0x40e4b6
inc eax
cmp eax, 0x80
jae 0x40e625
mov byte [esp + eax + 0x50], 0
test edi, edi
je 0x40e5ae
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.00410ef0
add esp, 0xc
cmp edi, 0x80
jae 0x40e625
mov byte [esp + edi + 0xd0], 0
mov edi, 0x409960
push ecx
mov edx, edi
lea ecx, [esp + 0xd4]
call fcn.004098c3
pop ecx
lea ecx, [esp + 0xd0]
call fcn.0040eea8
mov esi, eax
test esi, esi
je 0x40e559
push ecx
push esi
mov edx, 0x80
lea ecx, [esp + 0xd8]
call fcn.00408ae8
pop ecx
pop ecx
mov ecx, esi
call fcn.004087c0
push ecx
mov edx, edi
lea ecx, [esp + 0xd4]
call fcn.004098c3
lea eax, [esp + 0xd4]
push eax
call fcn.004176c0
mov esi, eax
xor edx, edx
pop ecx
pop ecx
test esi, esi
je 0x40e5ae
mov cl, byte [esp + edx + 0xd0]
cmp cl, 0x40
jle 0x40e590
cmp cl, 0x5b
jl 0x40e59f
lea eax, [ecx - 0x61]
cmp al, 0x19
jbe 0x40e59f
sub cl, 0x30
cmp cl, 9
ja 0x40e5a6
inc edx
cmp edx, esi
jb 0x40e57f
jmp 0x40e5ae
mov byte [esp + 0xd0], 0
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x40e61e
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.00408ae8
pop ecx
lea eax, [esp + 0xd4]
mov edx, 0x80
push eax
lea ecx, [ebx + 0x100]
call fcn.00408ae8
pop ecx
mov ecx, dword [esp + 0x170]
call fcn.0040e12e
push eax
push 0x40
lea ecx, [ebx + 0x40]
pop edx
call fcn.00408ae8
pop ecx
pop ecx
xor eax, eax
jmp 0x40e300
call fcn.004102ca
int3