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

Disassembly:
push 0xffffffffffffffff
push 0x42b35b
mov eax, dword fs:[0]
push eax
sub esp, 0x55c
mov eax, dword [0x43a1f0]
xor eax, esp
mov dword [esp + 0x558], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43a1f0]
xor eax, esp
push eax
lea eax, [esp + 0x570]
mov dword fs:[0], eax
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x588]
mov eax, dword [esp + 0x584]
mov esi, dword [esp + 0x580]
mov dword [esp + 0x40], ecx
xor edx, edx
push str.TypeLib_
lea ecx, [esp + 0x18]
mov dword [esp + 0x40], eax
mov word [esp + 0x15c], dx
call fcn.00405960
mov dword [esp + 0x578], 0
test esi, esi
jne 0x406fb7
xor eax, eax
jmp 0x406fcf
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406fc0
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402620
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
push ecx
push SysReAllocStringLen
call edi
test eax, eax
je 0x407071
push str.Wow6432NodeTypeLib_
lea ecx, [esp + 0x18]
call fcn.00403180
test esi, esi
jne 0x407012
xor eax, eax
jmp 0x407026
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407017
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.00402620
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push 0x20019
push 0
push eax
push SysReAllocStringLen
call edi
test eax, eax
je 0x407071
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x578], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4072ab
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x1c]
push 0
push 0
push 0
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x6c]
push eax
push 0
mov esi, 0x40
push ecx
mov dword [esp + 0x50], 0x80
mov dword [esp + 0x48], esi
mov dword [esp + 0x54], 0
call ebp
test eax, eax
jne 0x407281
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push 0x20019
push 0
lea eax, [esp + 0x64]
push eax
push ecx
call edi
test eax, eax
jne 0x40724f
xor ebx, ebx
lea edx, [esp + 0x50]
push edx
mov edx, dword [esp + 0x20]
push ebx
push ebx
push ebx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xec]
push ecx
push ebx
push edx
mov dword [esp + 0x4c], esi
call ebp
test eax, eax
jne 0x407244
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x24]
push eax
push 0x20019
push 0
lea ecx, [esp + 0xe4]
push ecx
push edx
call edi
test eax, eax
jne 0x407217
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
push 0x20019
push 0
push str.win32
push ecx
call edi
test eax, eax
je 0x407160
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x20]
push edx
push 0x20019
push 0
push str.win64
push eax
call edi
test eax, eax
jne 0x40720c
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x15c]
push edx
lea eax, [esp + 0x40]
push eax
push 0
push 0
push ecx
mov dword [esp + 0x48], 0x105
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407201
mov eax, dword [esp + 0x38]
cmp eax, 1
je 0x4071d7
cmp eax, 2
jne 0x407201
push 0x104
lea edx, [esp + 0x364]
push edx
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4071d7
lea ecx, [esp + 0x360]
push ecx
lea edx, [esp + 0x15c]
push 0x104
push edx
call fcn.0041a96c
add esp, 0xc
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x15c]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
call fcn.00406390
mov esi, eax
test esi, esi
jg 0x4072e3
mov esi, 0x40
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x50]
push edx
mov edx, dword [esp + 0x20]
push 0
push 0
push 0
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xec]
push ecx
inc ebx
push ebx
push edx
mov dword [esp + 0x4c], esi
call ebp
test eax, eax
je 0x407101
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x48]
push ecx
push 0
push 0
push 0
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x6c]
inc eax
push ecx
push eax
push edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x48], esi
call ebp
test eax, eax
je 0x4070b6
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x578], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4072b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x570]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x558]
xor ecx, esp
call fcn.0041a730
add esp, 0x568
ret 0xc
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x578], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407319
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x4072b9