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

Disassembly:
push 0xffffffffffffffff
push 0x42b39b
mov eax, dword fs:[0]
push eax
sub esp, 0x73c
mov eax, dword [0x43a1f0]
xor eax, esp
mov dword [esp + 0x738], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43a1f0]
xor eax, esp
push eax
lea eax, [esp + 0x750]
mov dword fs:[0], eax
mov ebp, ecx
mov dword [esp + 0x2c], ebp
mov ecx, dword [esp + 0x764]
mov eax, dword [esp + 0x760]
mov dword [esp + 0x28], ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402140
mov eax, dword [esp + 0x18]
xor edx, edx
mov word [esp + 0x34], dx
mov dword [esp + 0x758], 0
cmp dword [eax - 0xc], edx
je 0x407733
push 0x42e8b4
lea ecx, [esp + 0x1c]
call fcn.00406200
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push edx
push SysReAllocStringLen
call esi
mov edi, 0x80
test eax, eax
jne 0x407427
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x444]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0
push eax
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407418
cmp dword [esp + 0x20], 1
jne 0x407418
lea ecx, [esp + 0x440]
push ecx
lea edx, [esp + 0x38]
push 0x40
push edx
call fcn.0041a96c
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call ebx
jmp 0x40742d
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 0x407434
sub eax, edx
sar eax, 1
je 0x40772f
push str.CLSID_
lea ecx, [esp + 0x138]
push edi
push ecx
call fcn.0041a96c
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x144]
push edi
push eax
call fcn.0041a75e
add esp, 0x18
lea ecx, [esp + 0x24]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x140]
push edx
push SysReAllocStringLen
call esi
test eax, eax
je 0x4074e7
push str.Wow6432NodeCLSID_
lea eax, [esp + 0x138]
push edi
push eax
call fcn.0041a96c
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x144]
push edi
push edx
call fcn.0041a75e
add esp, 0x18
lea eax, [esp + 0x24]
push eax
push 0x20019
push 0
lea ecx, [esp + 0x140]
push ecx
push SysReAllocStringLen
call esi
test eax, eax
je 0x4074e7
lea ecx, [esp + 0x18]
call fcn.00401a40
jmp 0x40775a
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push str.TypeLib
push eax
call esi
test eax, eax
jne 0x407575
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x444]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push 0
push ecx
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407569
cmp dword [esp + 0x20], 1
jne 0x407569
mov edx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x448]
push ecx
mov ecx, ebp
call fcn.00406f30
mov esi, eax
test esi, esi
jle 0x407569
mov edx, dword [esp + 0x14]
push edx
call ebx
lea ecx, [esp + 0x18]
call fcn.00401a40
mov eax, esi
jmp 0x40775c
mov eax, dword [esp + 0x14]
push eax
call ebx
jmp 0x40772f
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
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 0x40765e
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x238]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0
push eax
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40764f
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x407613
cmp eax, 2
jne 0x40764f
push 0x104
lea ecx, [esp + 0x544]
push ecx
lea edx, [esp + 0x23c]
push edx
call ebp
test eax, eax
je 0x407613
lea eax, [esp + 0x540]
push eax
lea ecx, [esp + 0x238]
push 0x104
push ecx
call fcn.0041a96c
add esp, 0xc
mov edx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x238]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x38]
call fcn.00406390
mov edi, eax
test edi, edi
jle 0x40764f
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
call fcn.00401a40
mov eax, edi
jmp 0x40775c
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call edi
jmp 0x407664
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push str.LocalServer32
push edx
call esi
test eax, eax
jne 0x40772f
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x238]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0
push eax
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407728
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x4076f3
cmp eax, 2
jne 0x407728
push 0x104
lea ecx, [esp + 0x544]
push ecx
lea edx, [esp + 0x23c]
push edx
call ebp
test eax, eax
je 0x4076f3
lea eax, [esp + 0x540]
push eax
lea ecx, [esp + 0x238]
push 0x104
push ecx
call fcn.0041a96c
add esp, 0xc
mov edx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x238]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x38]
call fcn.00406390
mov esi, eax
test esi, esi
jle 0x407728
mov edx, dword [esp + 0x14]
push edx
call edi
lea ecx, [esp + 0x18]
call fcn.00401a40
mov eax, esi
jmp 0x40775c
mov eax, dword [esp + 0x14]
push eax
call edi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x758], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40775a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x750]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x738]
xor ecx, esp
call fcn.0041a730
add esp, 0x748
ret 8