Function at 0x406360
Capabilities:
Query environment variable
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd58
mov eax, dword [0x42b008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0xd48], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xd44], eax
xor eax, eax
push 0x4253a0
mov word [ebp - 0x30c], ax
lea eax, [ebp - 0xd18]
push 0x400
push eax
call fcn.00411a06
push esi
lea eax, [ebp - 0xd18]
push 0x400
push eax
call fcn.00411a6a
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xd1c]
add esp, 0x18
push eax
push 0x20019
push 0
lea eax, [ebp - 0xd18]
push eax
push SysReAllocString
call ebx
test eax, eax
je 0x406443
push str.Wow6432NodeTypeLib_
lea eax, [ebp - 0xd18]
push 0x400
push eax
call fcn.00411a06
push esi
lea eax, [ebp - 0xd18]
push 0x400
push eax
call fcn.00411a6a
add esp, 0x18
lea eax, [ebp - 0xd1c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xd18]
push eax
push SysReAllocString
call ebx
test eax, eax
je 0x406443
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b5ff
mov esp, ebp
pop ebp
ret 0xc
push edi
xor esi, esi
mov dword [ebp - 0xd34], 0x80
lea eax, [ebp - 0xd58]
mov dword [ebp - 0xd30], 0x40
push eax
push esi
push esi
push esi
lea eax, [ebp - 0xd30]
mov dword [ebp - 0xd3c], esi
push eax
lea eax, [ebp - 0x104]
push eax
push esi
push dword [ebp - 0xd1c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4066aa
lea eax, [ebp - 0xd20]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0xd1c]
call ebx
test eax, eax
jne 0x406669
xor esi, esi
mov dword [ebp - 0xd2c], 0x40
lea eax, [ebp - 0xd50]
mov dword [ebp - 0xd38], esi
push eax
push esi
push esi
push esi
lea eax, [ebp - 0xd2c]
push eax
lea eax, [ebp - 0x84]
push eax
push esi
push dword [ebp - 0xd20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40665b
nop word [eax + eax]
lea eax, [ebp - 0xd28]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0xd20]
call ebx
test eax, eax
jne 0x40661a
lea eax, [ebp - 0xd24]
push eax
push 0x20019
push 0
push str.win32
push dword [ebp - 0xd28]
call ebx
test eax, eax
je 0x406567
lea eax, [ebp - 0xd24]
push eax
push 0x20019
push 0
push str.win64
push dword [ebp - 0xd28]
call ebx
test eax, eax
jne 0x406612
lea eax, [ebp - 0xd34]
mov dword [ebp - 0xd34], 0x105
push eax
lea eax, [ebp - 0x30c]
push eax
lea eax, [ebp - 0xd40]
push eax
push 0
push 0
push dword [ebp - 0xd24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40660a
mov eax, dword [ebp - 0xd40]
cmp eax, 1
je 0x4065e2
cmp eax, 2
jne 0x40660a
push 0x104
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4065e2
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x30c]
push 0x104
push eax
call fcn.00411a06
add esp, 0xc
push dword [ebp - 0xd44]
lea eax, [ebp - 0x30c]
push eax
push dword [ebp - 0xd48]
call fcn.004066f0
mov esi, eax
test esi, esi
jg 0x4066c7
mov esi, dword [ebp - 0xd38]
push dword [ebp - 0xd24]
call edi
push dword [ebp - 0xd28]
call edi
lea eax, [ebp - 0xd50]
mov dword [ebp - 0xd2c], 0x40
push eax
push 0
push 0
push 0
lea eax, [ebp - 0xd2c]
inc esi
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0xd38], esi
push eax
push esi
push dword [ebp - 0xd20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x406500
push dword [ebp - 0xd20]
call edi
mov esi, dword [ebp - 0xd3c]
lea eax, [ebp - 0xd58]
mov dword [ebp - 0xd30], 0x40
push eax
push 0
push 0
push 0
lea eax, [ebp - 0xd30]
inc esi
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 0xd3c], esi
push eax
push esi
push dword [ebp - 0xd1c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x406493
push dword [ebp - 0xd1c]
call edi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b5ff
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp - 0xd24]
call edi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b5ff
mov esp, ebp
pop ebp
ret 0xc