Function at 0x407700
Capabilities:
Get disk information
Query or enumerate registry value

Disassembly:
mov eax, 0x1714
call fcn.00408200
mov edx, dword [0x40d4f4]
mov eax, dword [str.DosDevices_:]
mov ecx, dword [0x40d4f0]
push ebx
push ebp
mov dword [esp + 0x24], edx
push esi
lea edx, [esp + 0x1c]
push edi
mov dword [esp + 0x24], eax
mov ax, word [0x40d4f8]
mov dword [esp + 0x28], ecx
mov cl, byte [0x40d4fa]
push edx
xor ebp, ebp
push str.SYSTEMMountedDevices
push 0x80000002
mov word [esp + 0x3c], ax
mov byte [esp + 0x3e], cl
mov dword [esp + 0x20], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40785f
mov byte [esp + 0x30], 0x41
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edx, eax
cmp edx, ebp
mov dword [esp + 0x10], edx
je 0x407854
mov edi, 0x40d508
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + ebp + 0x2d4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test dl, 1
rep movsb byte es:[edi], byte [esi]
je 0x407834
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x144]
push ecx
lea eax, [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push 0
push ecx
push edx
mov dword [esp + 0x4c], 3
mov dword [esp + 0x34], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407834
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jbe 0x40781e
mov dl, byte [esp + eax + 0x144]
cmp dl, 0x23
jne 0x40780a
mov edx, eax
shr edx, 1
add edx, ebp
mov byte [esp + edx + 0x2d4], 0x5c
jmp 0x407817
mov esi, eax
shr esi, 1
add esi, ebp
mov byte [esp + esi + 0x2d4], dl
add eax, 2
cmp eax, ecx
jb 0x4077ee
shr ecx, 1
add ecx, ebp
push ebx
mov byte [esp + ecx + 0x2d8], 0
call dword [sym.imp.MSVCRT.dll__strlwr]
add esp, 4
mov dl, byte [esp + 0x30]
add ebp, 0xc8
inc dl
mov byte [esp + 0x30], dl
mov edx, dword [esp + 0x10]
shr edx, 1
mov dword [esp + 0x10], edx
jne 0x40777c
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.Setupapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
test ebp, ebp
jne 0x40787b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1714
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CM_Get_Device_IDA
push ebp
call esi
mov edi, eax
push str.CM_Get_Child
push ebp
mov dword [esp + 0x40], edi
call esi
push str.CM_Get_Sibling
push ebp
mov ebx, eax
call esi
mov ecx, dword [esp + 0x1728]
push 0
lea edx, [esp + 0x1c]
push ecx
push edx
mov dword [esp + 0x1c], eax
call ebx
test eax, eax
jne 0x407915
mov ecx, dword [esp + 0x18]
push eax
lea eax, [esp + 0x44]
push 0x104
push eax
push ecx
call edi
test eax, eax
jne 0x407915
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.MSVCRT.dll__strlwr]
add esp, 4
xor esi, esi
lea edi, [esp + 0x2d4]
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x407908
inc esi
add edi, 0xc8
cmp esi, 0x1a
jb 0x4078e7
jmp 0x407915
mov eax, 1
mov ecx, esi
shl eax, cl
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x1728]
push 0
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [esp + 0x1c]
test eax, eax
jne 0x40799a
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x40]
push eax
push ecx
call ebx
test eax, eax
jne 0x40799a
push eax
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x44]
push 0x104
push edx
push eax
call dword [esp + 0x48]
test eax, eax
jne 0x40799a
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.MSVCRT.dll__strlwr]
add esp, 4
xor esi, esi
lea edi, [esp + 0x2d4]
lea edx, [esp + 0x40]
push edx
push edi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x40798d
inc esi
add edi, 0xc8
cmp esi, 0x1a
jb 0x40796c
jmp 0x40799a
mov eax, 1
mov ecx, esi
shl eax, cl
or dword [esp + 0x14], eax
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1714
ret