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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444a6b
mov eax, dword fs:[0]
push eax
sub esp, 0x73c
mov eax, dword [0x45e554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x748], ecx
lea ecx, [ebp - 0x738]
push eax
call fcn.004022b0
xor eax, eax
mov dword [ebp - 4], 0
mov word [ebp - 0x110], ax
mov eax, dword [ebp - 0x738]
cmp dword [eax - 0xc], 0
jne 0x410071
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
jmp 0x41041d
push str.CLSID
lea ecx, [ebp - 0x738]
call fcn.0040e1f0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x734]
push eax
push 0x20019
push 0
push dword [ebp - 0x738]
push SysReAllocStringLen
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x41010a
lea eax, [ebp - 0x73c]
mov dword [ebp - 0x73c], 0x80
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x740]
push eax
push 0
push 0
push dword [ebp - 0x734]
call edi
test eax, eax
jne 0x410102
cmp dword [ebp - 0x740], 1
jne 0x410102
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x110]
push 0x40
push eax
call fcn.00435038
add esp, 0xc
push dword [ebp - 0x734]
call esi
lea ecx, [ebp - 0x110]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410113
sub ecx, edx
sar ecx, 1
je 0x41040d
push str.CLSID_
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.00435038
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.0043509c
add esp, 0xc
lea eax, [ebp - 0x744]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x210]
push eax
push SysReAllocStringLen
call ebx
test eax, eax
je 0x4101e0
push str.Wow6432NodeCLSID_
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.00435038
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.0043509c
add esp, 0xc
lea eax, [ebp - 0x744]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x210]
push eax
push SysReAllocStringLen
call ebx
test eax, eax
je 0x4101e0
lea ecx, [ebp - 0x738]
call fcn.00402410
jmp 0x410432
lea eax, [ebp - 0x734]
push eax
push 0x20019
push 0
push str.TypeLib
push dword [ebp - 0x744]
call ebx
test eax, eax
jne 0x41025d
lea eax, [ebp - 0x73c]
mov dword [ebp - 0x73c], 0x80
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x740]
push eax
push 0
push 0
push dword [ebp - 0x734]
call edi
test eax, eax
jne 0x410405
cmp dword [ebp - 0x740], 1
jne 0x410405
push dword [ebp - 0x748]
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.0040f9a0
jmp 0x4103fb
lea eax, [ebp - 0x734]
push eax
push 0x20019
push 0
push str.InprocServer32
push dword [ebp - 0x744]
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x410348
lea eax, [ebp - 0x73c]
mov dword [ebp - 0x73c], 0x105
push eax
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x740]
push eax
push 0
push 0
push dword [ebp - 0x734]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410340
mov eax, dword [ebp - 0x740]
cmp eax, 1
je 0x410301
cmp eax, 2
jne 0x410340
push 0x104
lea eax, [ebp - 0x730]
push eax
lea eax, [ebp - 0x520]
push eax
call edi
test eax, eax
je 0x410301
lea eax, [ebp - 0x730]
push eax
lea eax, [ebp - 0x520]
push 0x104
push eax
call fcn.00435038
add esp, 0xc
push dword [ebp - 0x748]
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.0040fda0
mov edi, eax
test edi, edi
jle 0x41033a
push dword [ebp - 0x734]
call esi
lea ecx, [ebp - 0x738]
call fcn.00402410
mov eax, edi
jmp 0x410434
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x734]
call esi
lea eax, [ebp - 0x734]
push eax
push 0x20019
push 0
push str.LocalServer32
push dword [ebp - 0x744]
call ebx
test eax, eax
jne 0x41040d
lea eax, [ebp - 0x73c]
mov dword [ebp - 0x73c], 0x105
push eax
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x740]
push eax
push 0
push 0
push dword [ebp - 0x734]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410405
mov eax, dword [ebp - 0x740]
cmp eax, 1
je 0x4103e2
cmp eax, 2
jne 0x410405
push 0x104
lea eax, [ebp - 0x730]
push eax
lea eax, [ebp - 0x520]
push eax
call edi
test eax, eax
je 0x4103e2
lea eax, [ebp - 0x730]
push eax
lea eax, [ebp - 0x520]
push 0x104
push eax
call fcn.00435038
add esp, 0xc
push dword [ebp - 0x748]
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.0040fda0
mov edi, eax
test edi, edi
jg 0x410320
push dword [ebp - 0x734]
call esi
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x738]
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x410432
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042b520
mov esp, ebp
pop ebp
ret 8