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

Disassembly:
push 0xffffffffffffffff
push 0x42bc1b
mov eax, dword fs:[0]
push eax
sub esp, 0x744
mov eax, dword [0x437dd4]
xor eax, esp
mov dword [esp + 0x740], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x437dd4]
xor eax, esp
push eax
lea eax, [esp + 0x758]
mov dword fs:[0], eax
mov eax, dword [esp + 0x768]
mov ebp, dword [esp + 0x76c]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], ebp
call fcn.00401e80
xor eax, eax
mov dword [esp + 0x760], 0
mov word [esp + 0x34], ax
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], 0
jne 0x4059b3
add eax, 0xfffffff0
mov dword [esp + 0x760], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405d66
lea esi, [esp + 0x1c]
call fcn.00408a20
mov edx, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
push edx
push SysReAllocString
call esi
mov edi, 0x80
test eax, eax
jne 0x405a39
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x448]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push eax
mov dword [esp + 0x38], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405a2a
cmp dword [esp + 0x24], 1
jne 0x405a2a
lea ecx, [esp + 0x444]
push ecx
lea edx, [esp + 0x38]
push 0x40
push edx
call fcn.00419f6f
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call ebx
jmp 0x405a3f
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x34]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405a46
sub eax, edx
sar eax, 1
jne 0x405a7b
mov dword [esp + 0x760], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405d66
push str.CLSID_
lea ecx, [esp + 0x138]
push edi
push ecx
call fcn.00419f6f
add esp, 0xc
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x138]
push edi
push eax
call fcn.0041a0ef
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x140]
push edx
push SysReAllocString
call esi
test eax, eax
je 0x405b15
push str.Wow6432NodeCLSID_
lea eax, [esp + 0x138]
push edi
push eax
call fcn.00419f6f
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x138]
push edi
push edx
call fcn.0041a0ef
add esp, 0xc
lea eax, [esp + 0x28]
push eax
push 0x20019
push 0
lea ecx, [esp + 0x140]
push ecx
push SysReAllocString
call esi
test eax, eax
jne 0x405d47
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
push str.TypeLib
push edx
call esi
test eax, eax
jne 0x405b9d
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x448]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push eax
mov dword [esp + 0x38], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405b91
cmp dword [esp + 0x24], 1
jne 0x405b91
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebp
lea edx, [esp + 0x448]
call fcn.004052d0
mov esi, eax
test esi, esi
jle 0x405b91
mov edx, dword [esp + 0x18]
push edx
call ebx
lea ecx, [esp + 0x1c]
call fcn.00409420
mov eax, esi
jmp 0x405d74
mov eax, dword [esp + 0x18]
push eax
call ebx
jmp 0x405d47
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
push str.InprocServer32
push edx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, 0x105
test eax, eax
jne 0x405c79
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x238]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push eax
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405c6e
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x405c37
cmp eax, 2
jne 0x405c6e
push 0x104
lea ecx, [esp + 0x548]
push ecx
lea edx, [esp + 0x23c]
push edx
call ebp
test eax, eax
je 0x405c37
lea eax, [esp + 0x544]
push eax
lea ecx, [esp + 0x238]
push 0x104
push ecx
call fcn.00419f6f
add esp, 0xc
mov edx, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x238]
push eax
lea edi, [esp + 0x3c]
call fcn.004056b0
mov edi, eax
test edi, edi
jle 0x405c6e
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x1c]
call fcn.00409420
mov eax, edi
jmp 0x405d74
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
push str.LocalServer32
push ecx
call esi
test eax, eax
jne 0x405d47
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x238]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push edx
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405d3c
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x405d08
cmp eax, 2
jne 0x405d3c
push 0x104
lea eax, [esp + 0x548]
push eax
lea ecx, [esp + 0x23c]
push ecx
call ebp
test eax, eax
je 0x405d08
lea edx, [esp + 0x544]
push edx
lea eax, [esp + 0x238]
push 0x104
push eax
call fcn.00419f6f
add esp, 0xc
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x238]
push edx
lea edi, [esp + 0x3c]
call fcn.004056b0
mov esi, eax
test esi, esi
jle 0x405d3c
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x1c]
call fcn.00409420
mov eax, esi
jmp 0x405d74
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x760], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405d72
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x758]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x740]
xor ecx, esp
call fcn.004196ca
add esp, 0x750
ret 8