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

Disassembly:
push 0xffffffffffffffff
push 0x427eaa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x678
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25d]
mov byte [esp + 0x25c], 0
mov dword [esp + 0x3c], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x433ed8]
mov dword [esp + 0x18], eax
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x91]
mov byte [esp + 0x90], bl
mov byte [esp + 0x360], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x361]
mov dword [esp + 0x690], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x25c]
push ecx
push 0x104
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
shr eax, 2
lea ecx, [esp + 0x48]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x38], ebx
call fcn.0041b7e0
lea ecx, [esp + 0x60]
mov byte [esp + 0x690], 1
call fcn.0041b7e0
push 0x437b70
lea ecx, [esp + 0x44]
mov byte [esp + 0x694], 2
call fcn.00420a16
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x50]
mov byte [esp + 0x698], 3
call fcn.0041b873
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x68]
call fcn.0041b873
lea eax, [esi + 0x2b54]
xor edx, edx
push 6
push ebx
mov dword [eax], edx
push ebx
push 0x433180
mov dword [eax + 4], edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebp, eax
lea eax, [esp + 0x568]
push eax
push ebp
mov dword [esp + 0x570], 0x11f
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInfoListDetailA]
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], 0x1c
push ecx
push ebx
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x405225
jmp 0x4051bb
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x88]
push 0
push 0
lea edx, [esp + 0x19c]
push 0xc8
push edx
push eax
call dword [esi + 0x2b64]
test eax, eax
je 0x4051e6
mov byte [esp + 0x194], 0
mov ecx, 7
mov edi, str.USBSTOR
lea esi, [esp + 0x194]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405213
mov ecx, dword [esp + 0x50]
lea eax, [esp + 0x194]
push eax
push ecx
lea ecx, [esp + 0x50]
call fcn.0041b9bc
lea edx, [esp + 0x74]
inc ebx
push edx
push ebx
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4051b7
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [0x433ed8]
mov dword [esp + 0x10], eax
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x50]
xor ebp, ebp
xor esi, esi
cmp ecx, ebp
mov byte [esp + 0x690], 5
mov ebx, ecx
jle 0x405303
lea eax, [esp + 0x14]
push esi
push eax
lea ecx, [esp + 0x50]
call fcn.00403060
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x694], 6
call fcn.00420ae1
lea ecx, [esp + 0x14]
mov byte [esp + 0x690], 5
call fcn.004209a8
push 1
push esi
lea ecx, [esp + 0x50]
call fcn.0041bac3
xor edi, edi
cmp esi, ebp
jle 0x4052e4
lea ecx, [esp + 0x30]
push edi
push ecx
lea ecx, [esp + 0x50]
call fcn.00403060
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x694], 7
call fcn.00420ae1
lea ecx, [esp + 0x30]
mov byte [esp + 0x690], 5
call fcn.004209a8
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.0040da1f
add esp, 8
test eax, eax
jl 0x4052e4
inc edi
cmp edi, esi
jl 0x405297
lea ecx, [esp + 0x10]
push 1
push ecx
push edi
lea ecx, [esp + 0x54]
call fcn.0041ba8a
inc esi
cmp esi, ebx
jl 0x405253
mov eax, dword [0x433ed8]
mov dword [esp + 0x20], eax
push 0x437b70
lea ecx, [esp + 0x30]
mov byte [esp + 0x694], 8
call fcn.00420a16
mov eax, dword [esp + 0x50]
xor esi, esi
cmp eax, ebp
mov byte [esp + 0x690], 9
mov edi, eax
jle 0x4053ee
mov bl, 0xb
lea edx, [esp + 0x30]
push esi
push edx
lea ecx, [esp + 0x50]
call fcn.00403060
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x694], 0xa
call fcn.00420ae1
lea ecx, [esp + 0x30]
mov byte [esp + 0x690], 9
call fcn.004209a8
push 0x26
lea ecx, [esp + 0x14]
call fcn.0041b0be
push eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.0041b046
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x694], bl
call fcn.00420ae1
lea ecx, [esp + 0x14]
mov byte [esp + 0x690], 9
call fcn.004209a8
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
push ecx
push edx
call fcn.0040da1f
add esp, 8
test eax, eax
je 0x4053d7
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x68]
lea eax, [esp + 0x10]
inc edx
push eax
push ecx
lea ecx, [esp + 0x68]
mov dword [esp + 0x40], edx
call fcn.0041b9e8
lea edx, [esp + 0x20]
lea ecx, [esp + 0x2c]
push edx
call fcn.00420ae1
inc esi
cmp esi, edi
jl 0x405337
mov eax, dword [0x433ed8]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x24], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x465]
mov byte [esp + 0x464], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x38]
mov byte [esp + 0x690], 0xc
cmp eax, ebp
mov dword [esp + 0x14], ebp
jbe 0x405602
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x30]
push ecx
push edx
lea ecx, [esp + 0x68]
call fcn.00403060
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push str.SYSTEMCurrentControlSetEnum_s
push ecx
mov byte [esp + 0x69c], 0xd
call fcn.0041b42d
add esp, 0xc
lea ecx, [esp + 0x30]
mov byte [esp + 0x690], 0xc
call fcn.004209a8
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x1c]
xor edi, edi
push edx
push 1
push edi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x405697
lea ecx, [esp + 0x28]
lea edx, [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x48]
push edx
push eax
push edi
push str.ParentIdPrefix
push ecx
mov dword [esp + 0x40], 0x104
call ebp
lea edx, [esp + 0x90]
lea eax, [esp + 0x360]
push edx
push 0x4337ec
push eax
call fcn.0040ddf0
mov ecx, dword [esp + 0x28]
add esp, 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x18]
push str.SYSTEMMountedDevices
push edx
mov dword [esp + 0x24], edi
call fcn.0041b42d
mov ecx, dword [esp + 0x20]
add esp, 8
lea eax, [esp + 0x1c]
push eax
push 1
push edi
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x405697
mov ebx, dword [esp + 0x5c]
test ebx, ebx
jle 0x4055d8
lea esi, [esp + 0x25c]
movsx edx, byte [esi]
push edx
lea eax, [esp + 0x28]
push str.DosDevices_c:
push eax
call fcn.0041b42d
add esp, 0xc
lea ecx, [esp + 0x28]
lea edx, [esp + 0x90]
lea eax, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x24]
push eax
push 0
push ecx
push edx
mov dword [esp + 0x40], 0x104
call ebp
mov ecx, dword [esp + 0x28]
push 0
push 0
lea eax, [esp + 0x46c]
push 0x104
push eax
lea edx, [esp + 0xa0]
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x360]
lea ecx, [esp + 0x464]
push eax
push ecx
call fcn.0040dd70
add esp, 8
test eax, eax
jne 0x4055c1
inc edi
add esi, 4
cmp edi, ebx
jl 0x405531
jmp 0x4055d8
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
mov dl, byte [esp + edi*4 + 0x25c]
add eax, 0x2b54
mov byte [eax + ecx], dl
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
inc eax
mov dword [esp + 0x1c], 0
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x405438
xor ebp, ebp
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x3c]
add eax, 0x2b54
mov ebx, 0xffffd4ac
mov edi, eax
sub ebx, esi
mov cl, byte [edi]
xor eax, eax
cmp cl, byte [esi + eax + 0x2b4c]
je 0x40562b
inc eax
cmp eax, 8
jl 0x40561c
cmp eax, 8
jne 0x405657
xor eax, eax
mov dl, byte [esi + eax + 0x2b4c]
test dl, dl
je 0x405645
inc eax
cmp eax, 8
jl 0x405632
jmp 0x405657
push eax
mov byte [esi + eax + 0x2b4c], cl
push ecx
push 1
mov ecx, esi
call fcn.00403190
inc edi
lea ecx, [ebx + edi]
cmp ecx, 8
jl 0x405618
xor edi, edi
mov cl, byte [esi + edi + 0x2b4c]
xor eax, eax
cmp cl, byte [esi + eax + 0x2b54]
je 0x40567a
inc eax
cmp eax, 8
jl 0x40566b
cmp eax, 8
jne 0x405691
push edi
push ebp
push ebp
mov ecx, esi
mov byte [esi + edi + 0x2b4c], 0
call fcn.00403190
inc edi
cmp edi, 8
jl 0x405662
lea ecx, [esp + 0x24]
mov byte [esp + 0x690], 9
call fcn.004209a8
lea ecx, [esp + 0x2c]
mov byte [esp + 0x690], 8
call fcn.004209a8
lea ecx, [esp + 0x20]
mov byte [esp + 0x690], 5
call fcn.004209a8
lea ecx, [esp + 0x34]
mov byte [esp + 0x690], 4
call fcn.004209a8
lea ecx, [esp + 0x10]
mov byte [esp + 0x690], 3
call fcn.004209a8
lea ecx, [esp + 0x40]
mov byte [esp + 0x690], 2
call fcn.004209a8
lea ecx, [esp + 0x60]
mov byte [esp + 0x690], 1
call fcn.0041b813
lea ecx, [esp + 0x48]
mov byte [esp + 0x690], 0
call fcn.0041b813
lea ecx, [esp + 0x18]
mov dword [esp + 0x690], 0xffffffff
call fcn.004209a8
mov ecx, dword [esp + 0x688]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x684
ret