Function at 0x40d1c0
Capabilities:
Get disk information
Get disk size
Get storage device properties
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e4
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x449400]
push ebx
push esi
push edi
mov dword [ebp - 0x2c8], eax
mov edi, 0x41
lea eax, [ebp - 0x2b8]
mov dword [ebp - 0x2cc], 0
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetServicesdiskEnum
push 0x80000002
mov dword [ebp - 0x2c4], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
push esi
push str.SYSTEMCurrentControlSetServicesdiskEnum
push str.RegOpenKeyExA___s__Ret:_ld
call fcn.00414ac0
add esp, 0xc
test esi, esi
jne 0x40d2bd
lea eax, [ebp - 0x2c0]
mov dword [ebp - 0x2c0], 4
push eax
lea eax, [ebp - 0x2bc]
push eax
lea eax, [ebp - 0x2e4]
push eax
push esi
push str.Count
push dword [ebp - 0x2b8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x2bc]
push dword [ebp - 0x2c0]
push eax
push str.Count
push str.RegQueryValueExA___s__ret:_u__Size:_u_Value:_u
call fcn.00414ac0
mov ebx, dword [ebp - 0x2bc]
add esp, 0x14
push dword [ebp - 0x2b8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
push str.GetPhysicalDriveCount:__d
call fcn.00414ac0
add esp, 8
xor eax, eax
test ebx, ebx
jle 0x40d2cf
cmp eax, 0x80
jge 0x40d2cf
mov dword [ebp + eax*4 - 0x288], eax
inc eax
cmp eax, ebx
jl 0x40d2a8
jmp 0x40d2cf
xor eax, eax
mov ebx, eax
push ebx
push str.GetPhysicalDriveCount:__d
call fcn.00414ac0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
push eax
push str.Logical_Drives:_0x_x
mov dword [ebp - 0x2b4], eax
call fcn.00414ac0
mov eax, dword [ebp - 0x2b4]
add esp, 8
test eax, eax
je 0x40d35b
test al, 1
je 0x40d350
xor edx, edx
mov ecx, edi
call fcn.0040d050
mov esi, eax
push esi
push edi
push str._C______d
call fcn.00414ac0
add esp, 0xc
test esi, esi
js 0x40d34a
xor ecx, ecx
test ebx, ebx
jle 0x40d334
nop dword [eax + eax]
cmp dword [ebp + ecx*4 - 0x288], esi
je 0x40d330
inc ecx
cmp ecx, ebx
jl 0x40d320
jmp 0x40d334
cmp ecx, ebx
jl 0x40d34a
push ecx
push str.Add_phy_d_to_list
call fcn.00414ac0
add esp, 8
mov dword [ebp + ebx*4 - 0x288], esi
inc ebx
mov eax, dword [ebp - 0x2b4]
inc edi
shr eax, 1
mov dword [ebp - 0x2b4], eax
jne 0x40d2f3
xor edi, edi
mov dword [ebp - 0x2c0], edi
test ebx, ebx
jle 0x40d996
mov esi, dword [ebp - 0x2c8]
add esi, 0x20
mov dword [ebp - 0x2b8], esi
nop word [eax + eax]
mov eax, dword [ebp - 0x2cc]
cmp eax, 0x80
jae 0x40d898
mov eax, dword [ebp - 0x2c4]
cmp eax, 0xffffffff
je 0x40d3a3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + edi*4 - 0x288]
lea eax, [ebp - 0x88]
push str..PhysicalDrive_d
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 edi, eax
mov dword [ebp - 0x2c4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
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 0x40d87d
push 0
lea eax, [ebp - 0x2b4]
push eax
push 8
lea eax, [ebp - 0x2d8]
push eax
push 0
push 0
push 0x7405c
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40d44b
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
jmp 0x40d87d
push dword [ebp - 0x2d4]
push dword [ebp - 0x2d8]
push dword [ebp - 0x2c0]
push str.PHYSICALDRIVE_d_size__llu_bytes
call fcn.00414ac0
add esp, 0x10
mov dword [ebp - 0x294], 0
lea eax, [ebp - 0x2b4]
mov dword [ebp - 0x290], 0
push 0
push eax
push 8
lea eax, [ebp - 0x2e0]
push eax
push 0xc
lea eax, [ebp - 0x294]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40d4c8
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl1_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
jmp 0x40d87d
mov eax, dword [ebp - 0x2dc]
push eax
cmp eax, 0x28
jae 0x40d4e6
push str.Invalid_DevDescHeader.Size:_u
call fcn.00414ac0
add esp, 8
jmp 0x40d87d
call fcn.0042442e
mov edi, eax
add esp, 4
mov dword [ebp - 0x2bc], edi
test edi, edi
jne 0x40d519
push dword [ebp - 0x2dc]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_malloc_error:_u_len:_u
call fcn.00414ac0
add esp, 0xc
jmp 0x40d87d
push 0
lea eax, [ebp - 0x2b4]
push eax
push dword [ebp - 0x2dc]
lea eax, [ebp - 0x294]
push edi
push 0xc
push eax
push 0x2d1400
push dword [ebp - 0x2c4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40d56f
push dword [ebp - 0x2b4]
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 0x40d87d
push 0
lea eax, [ebp - 0x2b4]
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
push 0x2d1400
push dword [ebp - 0x2c4]
xorps xmm0, xmm0
mov dword [ebp - 0x298], 0
movups xmmword [ebp - 0x2b0], xmm0
movq qword [ebp - 0x2a0], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40d5f3
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl3_error:_u_dwBytes:_u
call fcn.00414ac0
add esp, 0xc
mov eax, dword [ebp - 0x2c0]
mov ecx, dword [ebp - 0x2d4]
mov dword [esi - 0x1c], eax
mov eax, dword [ebp - 0x2d8]
mov dword [esi - 0x10], eax
mov dword [esi - 0xc], ecx
mov al, byte [edi + 8]
mov byte [esi - 8], al
movzx eax, byte [edi + 0xa]
mov dword [esi - 4], eax
mov eax, dword [edi + 0x1c]
mov dword [esi + 0x200], eax
mov eax, dword [ebp - 0x2a0]
mov dword [esi + 0x204], eax
mov eax, dword [ebp - 0x29c]
mov dword [esi + 0x208], eax
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40d6c9
add eax, edi
push eax
push 0x80
push esi
call fcn.004241d3
mov ecx, dword [ebp - 0x2b8]
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d663
sub ecx, edi
je 0x40d695
dec ecx
mov edi, 1
add ecx, dword [ebp - 0x2b8]
sub edi, dword [ebp - 0x2b8]
mov al, byte [ecx]
cmp al, 0x20
je 0x40d68a
cmp al, 9
jne 0x40d695
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x40d680
mov al, byte [edx]
cmp al, 0x20
je 0x40d69f
cmp al, 9
jne 0x40d6a2
inc edx
jmp 0x40d695
test al, al
je 0x40d6ba
sub edx, dword [ebp - 0x2b8]
nop dword [eax]
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40d6b0
mov edi, dword [ebp - 0x2bc]
mov byte [esi], 0
mov esi, dword [ebp - 0x2b8]
mov eax, dword [edi + 0x10]
test eax, eax
je 0x40d746
add eax, edi
sub esi, 0xffffff80
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 0x40d6f0
sub ecx, edi
je 0x40d720
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x40d70f
cmp al, 9
jne 0x40d720
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x40d705
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x40d72a
cmp al, 9
jne 0x40d72d
inc edx
jmp 0x40d720
test al, al
je 0x40d73d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40d733
mov edi, dword [ebp - 0x2bc]
mov byte [esi], 0
mov eax, dword [edi + 0x14]
test eax, eax
je 0x40d7c6
mov esi, dword [ebp - 0x2b8]
add eax, edi
push eax
add esi, 0x100
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 0x40d771
sub ecx, edi
je 0x40d7a0
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x40d790
cmp al, 9
jne 0x40d7a0
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x40d786
nop dword [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x40d7aa
cmp al, 9
jne 0x40d7ad
inc edx
jmp 0x40d7a0
test al, al
je 0x40d7bd
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40d7b3
mov edi, dword [ebp - 0x2bc]
mov byte [esi], 0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x40d846
mov esi, dword [ebp - 0x2b8]
add eax, edi
push eax
add esi, 0x180
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 0x40d7f1
sub ecx, edi
je 0x40d820
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x40d810
cmp al, 9
jne 0x40d820
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x40d806
nop dword [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x40d82a
cmp al, 9
jne 0x40d82d
inc edx
jmp 0x40d820
test al, al
je 0x40d83d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x40d833
mov edi, dword [ebp - 0x2bc]
mov byte [esi], 0
mov esi, dword [ebp - 0x2b8]
inc dword [ebp - 0x2cc]
add esi, 0x4950
push edi
mov dword [ebp - 0x2b8], esi
call fcn.0042422d
add esp, 4
push dword [ebp - 0x2c4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x2c4], 0xffffffff
mov edi, dword [ebp - 0x2c0]
inc edi
mov dword [ebp - 0x2c0], edi
cmp edi, ebx
jl 0x40d380
mov edx, dword [ebp - 0x75]
in al, dx