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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4456a1
mov eax, dword fs:[0]
push eax
sub esp, 0xb4c
mov eax, dword [0x460554]
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 dword [ebp - 0xb50], ecx
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push str.winmgmts
push edi
mov dword [ebp - 0xb48], eax
call fcn.00431501
add esp, 8
test eax, eax
je 0x40e6fa
push edi
lea ecx, [ebp - 0xb38]
call fcn.00402550
xor eax, eax
mov dword [ebp - 4], 0
mov word [ebp - 0x218], ax
mov word [ebp - 0x518], ax
mov eax, dword [ebp - 0xb38]
cmp dword [eax - 0xc], 0
jne 0x40e0cf
lea edx, [eax - 0x10]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jmp 0x40e6f0
push str.CLSID
lea ecx, [ebp - 0xb38]
call fcn.0040ea50
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xb2c]
push eax
push 0x20019
push 0
push dword [ebp - 0xb38]
push SysReAllocString
call ebx
or esi, 0xffffffff
test eax, eax
jne 0x40e16e
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x200
push eax
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e15b
cmp dword [ebp - 0xb34], 1
jne 0x40e15b
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0x518]
push 0x40
push eax
call fcn.00435a1f
add esp, 0xc
push dword [ebp - 0xb2c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x40e332
push edi
lea ecx, [ebp - 0xb44]
call fcn.00402550
push str.CurVer
lea ecx, [ebp - 0xb44]
mov byte [ebp - 4], 1
call fcn.0040ea50
lea eax, [ebp - 0xb54]
push eax
push 0x20019
push 0
push dword [ebp - 0xb44]
push SysReAllocString
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40e311
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x200
push eax
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb54]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e311
cmp dword [ebp - 0xb34], 1
jne 0x40e311
lea eax, [ebp - 0xb28]
push eax
lea ecx, [ebp - 0xb40]
call fcn.00402550
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xb40]
cmp dword [eax - 0xc], 0
jne 0x40e265
or esi, 0xffffffff
mov byte [ebp - 4], 1
lea edx, [eax - 0x10]
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e23b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, esi
mov edx, dword [ebp - 0xb44]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e6d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e6d8
push str.CLSID
lea ecx, [ebp - 0xb40]
call fcn.0040ea50
lea eax, [ebp - 0xb3c]
push eax
push 0x20019
push 0
push dword [ebp - 0xb40]
push SysReAllocString
call ebx
test eax, eax
jne 0x40e2f0
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x200
push eax
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb3c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e2e8
cmp dword [ebp - 0xb34], 1
jne 0x40e2e8
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0x518]
push 0x40
push eax
call fcn.00435a1f
add esp, 0xc
push dword [ebp - 0xb3c]
call edi
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0xb40]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e311
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, esi
mov edx, dword [ebp - 0xb44]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e332
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.CLSID_
lea eax, [ebp - 0x318]
push 0x80
push eax
call fcn.00435a1f
add esp, 0xc
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x318]
push 0x80
push eax
call fcn.00435a83
add esp, 0xc
lea eax, [ebp - 0xb4c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x318]
push eax
push SysReAllocString
call ebx
test eax, eax
jne 0x40e6d8
lea eax, [ebp - 0xb2c]
push eax
push 0x20019
push 0
push str.TypeLib
push dword [ebp - 0xb4c]
call ebx
test eax, eax
jne 0x40e440
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x80
push eax
lea eax, [ebp - 0xb28]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e6d0
cmp dword [ebp - 0xb34], 1
jne 0x40e6d0
push dword [ebp - 0xb2c]
call edi
push dword [ebp - 0xb48]
mov ecx, dword [ebp - 0xb50]
lea eax, [ebp - 0xb28]
push eax
call fcn.0040daa0
mov dword [ebp - 4], 0xffffffff
mov edi, eax
mov edx, dword [ebp - 0xb38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x40e597
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
jmp 0x40e6fc
lea eax, [ebp - 0xb2c]
push eax
push 0x20019
push 0
push str.InprocServer32
push dword [ebp - 0xb4c]
call ebx
test eax, eax
jne 0x40e5a6
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x105
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e59e
mov eax, dword [ebp - 0xb34]
cmp eax, 1
je 0x40e4e6
cmp eax, 2
jne 0x40e59e
push 0x104
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40e4e6
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00435a1f
add esp, 0xc
push dword [ebp - 0xb2c]
call edi
lea eax, [ebp - 0xb54]
push eax
push 2
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.OLEAUT32.dll_SystemTimeToVariantTime]
test eax, eax
js 0x40e573
mov eax, dword [ebp - 0xb54]
lea edx, [ebp - 0xb3c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jne 0x40e573
mov ebx, dword [ebp - 0xb50]
mov edi, dword [ebx + 0x5c]
test edi, edi
je 0x40e548
mov ecx, dword [ebp - 0xb3c]
mov edx, dword [edi]
push eax
movzx eax, word [ecx + 0x1a]
push eax
movzx eax, word [ecx + 0x18]
push eax
push ecx
push edi
call dword [edx + 0x24]
test eax, eax
jne 0x40e573
mov edi, dword [ebx + 0x6c]
test edi, edi
je 0x40e56c
mov ecx, dword [ebp - 0xb3c]
movzx eax, word [ecx + 0x1a]
mov edx, dword [edi]
push 0
push eax
movzx eax, word [ecx + 0x18]
push eax
push ecx
push edi
call dword [edx + 0x24]
test eax, eax
jne 0x40e573
mov edi, 1
jmp 0x40e575
xor edi, edi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xb38]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x40e597
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
jmp 0x40e6fc
push dword [ebp - 0xb2c]
call edi
lea eax, [ebp - 0xb2c]
push eax
push 0x20019
push 0
push str.LocalServer32
push dword [ebp - 0xb4c]
call ebx
test eax, eax
jne 0x40e6d8
lea eax, [ebp - 0xb30]
mov dword [ebp - 0xb30], 0x105
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xb34]
push eax
push 0
push 0
push dword [ebp - 0xb2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e6d0
mov eax, dword [ebp - 0xb34]
cmp eax, 1
je 0x40e64c
cmp eax, 2
jne 0x40e6d0
push 0x104
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40e64c
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00435a1f
add esp, 0xc
push dword [ebp - 0xb2c]
call edi
lea eax, [ebp - 0xb58]
push eax
push 2
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.OLEAUT32.dll_SystemTimeToVariantTime]
test eax, eax
js 0x40e573
mov eax, dword [ebp - 0xb58]
lea edx, [ebp - 0xb48]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jne 0x40e573
mov ebx, dword [ebp - 0xb50]
mov edi, dword [ebx + 0x5c]
test edi, edi
je 0x40e6ba
mov ecx, dword [ebp - 0xb48]
mov edx, dword [edi]
push eax
movzx eax, word [ecx + 0x1a]
push eax
movzx eax, word [ecx + 0x18]
push eax
push ecx
push edi
call dword [edx + 0x24]
test eax, eax
jne 0x40e573
mov edi, dword [ebx + 0x6c]
test edi, edi
je 0x40e56c
mov ecx, dword [ebp - 0xb48]
jmp 0x40e555
push dword [ebp - 0xb2c]
call edi
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xb38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x40e6fa
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.0042c635
mov esp, ebp
pop ebp
ret 8