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

Disassembly:
push 0xb4c
mov eax, 0x43ed42
call fcn.004265cd
mov dword [ebp - 0xb4c], ecx
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push str.winmgmts
push esi
mov dword [ebp - 0xb58], eax
call fcn.0042af5d
pop ecx
pop ecx
test eax, eax
jne 0x40a03f
xor eax, eax
jmp 0x40a4ab
push esi
lea ecx, [ebp - 0xb3c]
call fcn.00401fad
xor eax, eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov word [ebp - 0x21c], ax
mov word [ebp - 0x51c], ax
mov eax, dword [ebp - 0xb3c]
cmp dword [eax - 0xc], ebx
jne 0x40a075
lea ecx, [eax - 0x10]
call fcn.00402052
jmp 0x40a038
push str.CLSID
lea ecx, [ebp - 0xb3c]
call fcn.0040a76c
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xb34]
push eax
push 0x20019
push ebx
push dword [ebp - 0xb3c]
push SysReAllocString
call edi
test eax, eax
jne 0x40a10e
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x200
push eax
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a0fb
cmp dword [ebp - 0xb30], 1
jne 0x40a0fb
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0x51c]
push 0x40
push eax
call fcn.0042f3c2
add esp, 0xc
push dword [ebp - 0xb34]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
jmp 0x40a285
push esi
lea ecx, [ebp - 0xb44]
call fcn.00401fad
push str.CurVer
lea ecx, [ebp - 0xb44]
mov byte [ebp - 4], 1
call fcn.0040a76c
lea eax, [ebp - 0xb54]
push eax
push 0x20019
push ebx
push dword [ebp - 0xb44]
push SysReAllocString
call edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40a274
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x200
push eax
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb54]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a274
cmp dword [ebp - 0xb30], 1
jne 0x40a274
lea eax, [ebp - 0xb2c]
push eax
lea ecx, [ebp - 0xb40]
call fcn.00401fad
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xb40]
cmp dword [eax - 0xc], 0
jne 0x40a1de
lea ecx, [eax - 0x10]
call fcn.00402052
mov ecx, dword [ebp - 0xb44]
lea ecx, [ecx - 0x10]
call fcn.00402052
mov ecx, dword [ebp - 0xb3c]
lea ecx, [ecx - 0x10]
jmp 0x40a06e
push str.CLSID
lea ecx, [ebp - 0xb40]
call fcn.0040a76c
lea eax, [ebp - 0xb50]
push eax
push 0x20019
push ebx
push dword [ebp - 0xb40]
push SysReAllocString
call edi
test eax, eax
jne 0x40a266
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x200
push eax
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb50]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a25e
cmp dword [ebp - 0xb30], 1
jne 0x40a25e
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0x51c]
push 0x40
push eax
call fcn.0042f3c2
add esp, 0xc
push dword [ebp - 0xb50]
call esi
mov ecx, dword [ebp - 0xb40]
lea ecx, [ecx - 0x10]
call fcn.00402052
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0xb44]
lea ecx, [ecx - 0x10]
call fcn.00402052
push str.CLSID_
lea eax, [ebp - 0x31c]
push 0x80
push eax
call fcn.0042f3c2
add esp, 0xc
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x31c]
push 0x80
push eax
call fcn.0042f60f
add esp, 0xc
lea eax, [ebp - 0xb48]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x31c]
push eax
push SysReAllocString
call edi
test eax, eax
jne 0x40a49b
lea eax, [ebp - 0xb34]
push eax
push 0x20019
push ebx
push str.TypeLib
push dword [ebp - 0xb48]
call edi
test eax, eax
jne 0x40a361
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x80
push eax
lea eax, [ebp - 0xb2c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a493
cmp dword [ebp - 0xb30], 1
jne 0x40a493
push dword [ebp - 0xb34]
call esi
push dword [ebp - 0xb58]
mov ecx, dword [ebp - 0xb4c]
lea eax, [ebp - 0xb2c]
push eax
call fcn.00409cd5
jmp 0x40a41e
lea eax, [ebp - 0xb34]
push eax
push 0x20019
push ebx
push str.InprocServer32
push dword [ebp - 0xb48]
call edi
test eax, eax
jne 0x40a42a
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x105
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a422
cmp dword [ebp - 0xb30], 1
je 0x40a3c6
cmp dword [ebp - 0xb30], 2
jne 0x40a422
cmp dword [ebp - 0xb30], 2
jne 0x40a404
mov edi, 0x104
lea eax, [ebp - 0x72c]
push edi
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40a404
lea eax, [ebp - 0x72c]
push eax
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.0042f3c2
add esp, 0xc
push dword [ebp - 0xb34]
call esi
mov ecx, dword [ebp - 0xb4c]
lea eax, [ebp - 0x21c]
push eax
call fcn.0040a4b3
mov ebx, eax
jmp 0x40a49b
push dword [ebp - 0xb34]
call esi
lea eax, [ebp - 0xb34]
push eax
push 0x20019
push ebx
push str.LocalServer32
push dword [ebp - 0xb48]
call edi
test eax, eax
jne 0x40a49b
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xb38], 0x105
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0xb30]
push eax
push ebx
push ebx
push dword [ebp - 0xb34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a493
cmp dword [ebp - 0xb30], 1
je 0x40a3c6
cmp dword [ebp - 0xb30], 2
je 0x40a3cf
push dword [ebp - 0xb34]
call esi
mov ecx, dword [ebp - 0xb3c]
lea ecx, [ecx - 0x10]
call fcn.00402052
mov eax, ebx
call fcn.00426577
ret 8