Function at 0x409750
Capabilities:
Enumerate disk volumes
Get disk information via ioctl
Get disk size
Get storage device properties
Query or enumerate registry value
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x452074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x400
mov edi, edx
mov dword [ebp - 0x184], ecx
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x180], ebx
test ebx, ebx
je 0x409847
xor esi, esi
mov ecx, str.SYSTEMCurrentControlSetServicescdromEnum
cmp dword [ebp - 0x184], esi
mov eax, str.SYSTEMCurrentControlSetServicesdiskEnum
mov dword [ebp - 0x144], esi
cmovne eax, ecx
lea ecx, [ebp - 0x140]
push ecx
push 1
push esi
push eax
push 0x80000002
mov dword [ebp - 0x188], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40980e
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], 4
push eax
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x158]
push eax
push esi
push str.Count
push dword [ebp - 0x140]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x140]
mov esi, dword [ebp - 0x144]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x409813
mov eax, 1
xor ecx, ecx
test eax, eax
push 0x24d8
cmove ecx, esi
push ecx
mov dword [ebp - 0x13c], ecx
call dword [sym.imp.msvcrt.dll_calloc]
mov edx, eax
add esp, 8
mov dword [ebp - 0x158], edx
mov dword [edi], edx
test edx, edx
jne 0x40985a
push ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041abcf
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x13c]
xor edi, edi
mov dword [ebp - 0x144], edi
test esi, esi
je 0x409dd5
cmp dword [ebp - 0x184], edi
lea ebx, [edx + 0x224]
mov ecx, str..PhysicalDrive_u
mov eax, str..CdRom_u
cmovne ecx, eax
mov dword [ebp - 0x148], ecx
nop
mov eax, dword [0x448f14]
xorps xmm0, xmm0
movq qword [ebp - 0x154], xmm0
movlpd qword [ebp - 0x178], xmm0
movups xmm0, xmmword [str..PhysicalDrive4294967295]
push edi
push ecx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
movups xmmword [ebp - 0x2c], xmm0
push 0x1c
movq xmm0, qword [0x448f0c]
push eax
mov dword [ebp - 0x14c], 0
movq qword [ebp - 0x1c], xmm0
call fcn.00401e40
add esp, 0x10
lea eax, [ebp - 0x2c]
push 0
push 4
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x17c], esi
test esi, esi
je 0x409dae
cmp esi, 0xffffffff
je 0x409dae
push 0
lea eax, [ebp - 0x170]
mov dword [ebp - 0x154], 0
push eax
push 8
lea eax, [ebp - 0x178]
mov dword [ebp - 0x150], 0
push eax
push 0xc
lea eax, [ebp - 0x154]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x409da7
mov eax, dword [ebp - 0x174]
cmp eax, 0x28
jb 0x409da7
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 4
mov dword [ebp - 0x140], edi
test edi, edi
je 0x409da1
push 0
lea eax, [ebp - 0x170]
push eax
push dword [ebp - 0x174]
lea eax, [ebp - 0x154]
push edi
push 0xc
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x409d97
push 0
lea eax, [ebp - 0x16c]
xorps xmm0, xmm0
push eax
push 8
lea eax, [ebp - 0x168]
movlpd qword [ebp - 0x160], xmm0
push eax
push 0
push 0
push 0x7405c
push esi
movlpd qword [ebp - 0x168], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4099ef
mov eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x164]
jmp 0x4099fb
mov ecx, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x160]
push dword [ebp - 0x144]
mov dword [ebx - 0x21c], eax
mov dword [ebx - 0x218], ecx
movzx eax, byte [edi + 8]
mov byte [ebx - 0x214], al
movzx eax, byte [edi + 0xa]
mov dword [ebx - 0x210], eax
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x208], eax
mov ax, word [0x448d98]
movq xmm0, qword [str.4294967295]
mov word [ebp - 8], ax
movzx eax, byte [0x448d9a]
push 0x444d3c
mov byte [ebp - 6], al
lea eax, [ebp - 0x10]
push 0xb
push eax
movq qword [ebp - 0x10], xmm0
call fcn.00401e40
mov edx, dword [ebp - 0x188]
lea eax, [ebp - 0x10]
push eax
call fcn.0040b0e0
mov dword [ebx - 0x20c], eax
add esp, 0x14
mov eax, dword [edi + 0xc]
test eax, eax
je 0x409aeb
add eax, edi
lea esi, [ebx - 0x208]
push eax
push 0x104
push esi
call fcn.0041f560
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409a98
sub ecx, edi
je 0x409ac5
dec ecx
mov edi, 0x209
add ecx, esi
sub edi, ebx
nop dword [eax]
mov al, byte [ecx]
cmp al, 0x20
je 0x409aba
cmp al, 9
jne 0x409ac5
mov byte [ecx], 0
dec ecx
lea eax, [ecx + edi]
test eax, eax
jne 0x409ab0
mov al, byte [edx]
cmp al, 0x20
je 0x409acf
cmp al, 9
jne 0x409ad2
inc edx
jmp 0x409ac5
test al, al
je 0x409ae2
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x409ad8
mov edi, dword [ebp - 0x140]
mov byte [esi], 0
mov eax, dword [edi + 0x10]
test eax, eax
je 0x409b6b
add eax, edi
lea esi, [ebx - 0x104]
push eax
push 0x104
push esi
call fcn.0041f560
mov ecx, esi
add esp, 0xc
mov edx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409b14
sub ecx, edi
je 0x409b45
dec ecx
mov edi, 0x105
add ecx, esi
sub edi, ebx
nop dword [eax]
mov al, byte [ecx]
cmp al, 0x20
je 0x409b3a
cmp al, 9
jne 0x409b45
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x409b30
mov al, byte [edx]
cmp al, 0x20
je 0x409b4f
cmp al, 9
jne 0x409b52
inc edx
jmp 0x409b45
test al, al
je 0x409b62
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x409b58
mov edi, dword [ebp - 0x140]
mov byte [esi], 0
mov eax, dword [edi + 0x14]
test eax, eax
je 0x409be6
add eax, edi
push eax
push 0x104
push ebx
call fcn.0041f560
mov ecx, ebx
add esp, 0xc
mov edx, ebx
mov esi, ebx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409b90
sub ecx, edi
je 0x409bc0
dec ecx
mov edi, 1
add ecx, ebx
sub edi, ebx
mov al, byte [ecx]
cmp al, 0x20
je 0x409baf
cmp al, 9
jne 0x409bc0
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x409ba5
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x409bca
cmp al, 9
jne 0x409bcd
inc edx
jmp 0x409bc0
test al, al
je 0x409bdd
sub edx, ebx
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x409bd3
mov edi, dword [ebp - 0x140]
mov byte [esi], 0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x409c66
add eax, edi
lea esi, [ebx + 0x104]
push eax
push 0x104
push esi
call fcn.0041f560
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 0x409c10
sub ecx, edi
je 0x409c40
dec ecx
mov edi, 1
add ecx, esi
sub edi, esi
mov al, byte [ecx]
cmp al, 0x20
je 0x409c2f
cmp al, 9
jne 0x409c40
mov byte [ecx], 0
dec ecx
lea eax, [edi + ecx]
test eax, eax
jne 0x409c25
nop word [eax + eax]
mov al, byte [edx]
cmp al, 0x20
je 0x409c4a
cmp al, 9
jne 0x409c4d
inc edx
jmp 0x409c40
test al, al
je 0x409c5d
sub edx, esi
mov byte [esi], al
inc esi
mov al, byte [edx + esi]
test al, al
jne 0x409c53
mov edi, dword [ebp - 0x140]
mov byte [esi], 0
cmp dword [ebp - 0x184], 0
je 0x409c7e
mov dword [ebx - 0x224], 3
jmp 0x409d91
mov esi, dword [ebp - 0x180]
push 0x400
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x140], 0x400
lea eax, [ebp - 0x15c]
xorps xmm0, xmm0
movlpd qword [ebp - 0x160], xmm0
push 0
push eax
push 0
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x160], eax
cmp eax, 0xffffffff
jne 0x409cd9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x409d91
push 0
lea eax, [ebp - 0x140]
push eax
push dword [ebp - 0x140]
push esi
push dword [ebp - 0x17c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409d91
mov eax, 0xaa55
cmp word [esi + 0x1fe], ax
jne 0x409d5d
mov ecx, dword [ebp - 0x180]
lea edx, [ebx + 0x210]
mov dword [ebx - 0x224], 1
mov eax, dword [esi + 0x1b8]
xor esi, esi
mov dword [ebx + 0x20c], eax
add ecx, 0x1c2
mov eax, dword [ecx + 4]
mov dword [edx], eax
cmp byte [ecx], 0xee
je 0x409d4d
inc esi
add edx, 4
add ecx, 0x10
cmp esi, 4
jl 0x409d35
jmp 0x409d57
mov dword [ebx - 0x224], 2
mov esi, dword [ebp - 0x180]
mov eax, dword [esi + 0x200]
cmp eax, dword [str.EFI_PART__C]
jne 0x409d91
mov eax, dword [esi + 0x204]
cmp eax, dword [0x427fc4]
jne 0x409d91
movups xmm0, xmmword [esi + 0x238]
mov dword [ebx - 0x224], 2
movups xmmword [ebx + 0x220], xmm0
mov esi, dword [ebp - 0x17c]
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
mov edi, dword [ebp - 0x144]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x13c]
inc edi
mov ecx, dword [ebp - 0x148]
add ebx, 0x24d8
mov dword [ebp - 0x144], edi
cmp edi, esi
jb 0x409890
mov ebx, dword [ebp - 0x180]
push ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
lea eax, [ebp - 0x138]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
mov edi, eax
cmp edi, 0xffffffff
je 0x409f7e
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextVolumeA]
lea ecx, [ebp - 0x138]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409e10
sub ecx, edx
cmp ecx, 1
jb 0x409e2f
cmp byte [ebp + ecx - 0x139], 0x5c
jne 0x409e2f
mov byte [ebp + ecx - 0x139], al
push 0
push 0
push 3
push 0
push 3
push 0
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x409f5a
cmp esi, 0xffffffff
je 0x409f5a
push 0
lea eax, [ebp - 0x148]
mov dword [ebp - 0x148], 0
push eax
push 0xc
lea eax, [ebp - 0x154]
mov dword [ebp - 0x14c], 0
push eax
push 0
push 0
push 0x2d1080
xorps xmm0, xmm0
push esi
movq qword [ebp - 0x154], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je case.0x409ec9.4
mov eax, dword [ebp - 0x150]
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x154]
add eax, 0xfffffffe
cmp eax, 0x31
ja case.0x409ec9.4
movzx eax, byte [eax + 0x409fa0]
jmp dword [eax*4 + 0x409f94]
xor eax, eax
cmp dword [ebp - 0x184], eax
setne al
jmp 0x409ee8
xor eax, eax
cmp dword [ebp - 0x184], eax
sete al
test eax, eax
je case.0x409ec9.4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x170]
mov esi, dword [ebp - 0x13c]
cmp eax, esi
jae 0x409f60
mov esi, dword [ebp - 0x158]
imul ecx, eax, 0x24d8
mov eax, dword [ecx + esi + 0x454]
cmp eax, 0x20
jae 0x409f5a
imul eax, eax, 0x104
lea edx, [ebp - 0x138]
add ecx, 0x458
push edx
push 0x104
add eax, ecx
add eax, esi
push eax
call fcn.0041f560
imul eax, dword [ebp - 0x170], 0x24d8
add esp, 0xc
inc dword [eax + esi + 0x454]
jmp 0x409f5a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x13c]
push 0x104
lea eax, [ebp - 0x138]
push eax
push edi
call ebx
test eax, eax
jne 0x409e02
push edi
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041abcf
mov esp, ebp
pop ebp
ret