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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x48]
push edi
mov edi, dword [ebp + 0xc]
mov ebx, edx
push ecx
push str..PhysicalDrive_d
push 0x40
push eax
mov dword [ebp - 0x78], 1
call fcn.00401100
add esp, 0x10
lea eax, [ebp - 0x48]
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x74], eax
cmp eax, 0xffffffff
jne 0x402575
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x48]
push eax
push str.CreateFileA__s_failed__u_n
push 1
call fcn.00401a20
mov eax, dword [ebp - 0x78]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x4c]
push ecx
push 8
lea ecx, [ebp - 0x58]
push ecx
push 0
push 0
push 0x7405c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4025c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IOCTL_DISK_GET_LENGTH_INFO_failed__u_n
push 1
call fcn.00401a20
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4025d0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x4c]
push 0
push eax
push 8
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x64], 0
push eax
push 0xc
lea eax, [ebp - 0x64]
mov dword [ebp - 0x60], 0
push eax
push 0x2d1400
push dword [ebp - 0x74]
call ebx
test eax, eax
jne 0x40261f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IOCTL_STORAGE_QUERY_PROPERTY_failed__u_n
push 1
call fcn.00401a20
add esp, 0xc
jmp 0x402797
mov eax, dword [ebp - 0x68]
push eax
cmp eax, 0x28
jae 0x40263c
push str.DevDescHeader.size_invalid__u_n
push 1
call fcn.00401a20
add esp, 0xc
jmp 0x402797
call fcn.00425f1b
add esp, 4
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x40265f
push str.malloc_failed_n
push 1
call fcn.00401a20
add esp, 8
jmp 0x402797
push 0
lea ecx, [ebp - 0x4c]
push ecx
push dword [ebp - 0x68]
push eax
push 0xc
lea eax, [ebp - 0x64]
push eax
push 0x2d1400
push dword [ebp - 0x74]
call ebx
test eax, eax
jne 0x402698
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IOCTL_STORAGE_QUERY_PROPERTY_failed__u_n
push 1
call fcn.00401a20
add esp, 0xc
jmp 0x40278c
mov ecx, dword [ebp - 0x70]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x402713
test esi, esi
je 0x402713
add eax, ecx
push eax
push 0x80
push esi
call fcn.0042939d
mov ecx, esi
add esp, 0xc
mov edx, esi
lea ebx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4026c0
sub ecx, ebx
je 0x4026f0
dec ecx
mov ebx, 1
add ecx, esi
sub ebx, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x4026df
cmp al, 9
jne 0x4026f0
mov byte [ecx], 0
dec ecx
lea eax, [ebx + ecx]
test eax, eax
jne 0x4026d5
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x4026fa
cmp al, 9
jne 0x4026fd
inc edx
jmp 0x4026f0
test al, al
je 0x40270d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x402703
mov ecx, dword [ebp - 0x70]
mov byte [esi], 0
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x402785
test edi, edi
je 0x402785
add eax, ecx
push eax
push 0x80
push edi
call fcn.0042939d
mov ecx, edi
add esp, 0xc
mov edx, edi
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402736
sub ecx, esi
je 0x402765
dec ecx
mov esi, 1
add ecx, edi
sub esi, edi
nop dword [eax + eax]
mov al, byte [ecx]
cmp al, 0x20
je 0x40275a
cmp al, 9
jne 0x402765
mov byte [ecx], 0
dec ecx
lea eax, [esi + ecx]
test eax, eax
jne 0x402750
mov al, byte [edx]
cmp al, 0x20
je 0x40276f
cmp al, 9
jne 0x402772
inc edx
jmp 0x402765
test al, al
je 0x402782
sub edx, edi
mov byte [edi], al
inc edi
mov al, byte [edx + edi]
test al, al
jne 0x402778
mov byte [edi], 0
mov dword [ebp - 0x78], 0
push dword [ebp - 0x70]
call fcn.00425f00
add esp, 4
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x78]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret