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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1a3c
call fcn.1002fb29
mov eax, dword [0x100400b0]
xor eax, esp
mov dword [esp + 0x1a38], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test eax, eax
jne 0x10018d36
mov eax, 0x80070057
jmp 0x100190e2
xor esi, esi
mov dword [eax], esi
test ebx, ebx
jne 0x10018d46
or dword [eax], 0xffffffff
jmp 0x100190e0
mov edi, esi
push ebx
push dword [edi*8 + 0x1003a1e0]
call fcn.100170a8
pop ecx
pop ecx
test eax, eax
je 0x10018d66
inc edi
cmp edi, 0xf
jb 0x10018d48
jmp 0x100190e0
mov edi, dword [edi*8 + 0x1003a1e4]
test edi, edi
je 0x100190e0
push ecx
lea eax, [esp + 0x9fc]
mov dword [esp + 0xfc], esi
push eax
lea eax, [esp + 0x100]
mov dword [esp + 0x104], esi
push eax
xor edx, edx
mov dword [esp + 0x10c], esi
mov ecx, edi
mov dword [esp + 0x110], esi
call fcn.100170a8
test eax, eax
jns 0x100190d3
lea eax, [esp + 0x2c]
mov edx, edi
push eax
push ecx
xor ecx, ecx
call fcn.100170a8
test eax, eax
je 0x10018dea
push ecx
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x9fc]
push eax
lea eax, [esp + 0x100]
xor edx, edx
push eax
call fcn.100170a8
test eax, eax
jns 0x100190d3
xor eax, eax
lea ecx, [esp + 0x38]
mov word [esp + 0x9f8], ax
call fcn.10007912
push str.c2r32.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
lea ecx, [esp + 0x38]
mov dword [esp + 0xf0], eax
call fcn.100079ce
cmp dword [esp + 0x3c], esi
je 0x10018e3b
call dword [esp + 0x3c]
test eax, eax
je 0x10018e3b
cmp dword [esp + 0x40], esi
je 0x100190cb
call dword [esp + 0x40]
mov esi, eax
jmp 0x100190cb
push 0x64
lea eax, [esp + 0x10c]
push esi
push eax
call fcn.1001e894
add esp, 0xc
mov edi, 0x1003abd0
cmp dword [edi], esi
je 0x10018e88
push dword [edi]
push ebx
call fcn.100170a8
pop ecx
pop ecx
test eax, eax
je 0x10018e6c
add edi, 0x24
jne 0x10018e53
jmp 0x10018e88
cmp dword [edi + 0x1c], esi
je 0x10018e88
push 0xffffffffffffffff
push dword [edi + 0x1c]
lea eax, [esp + 0x110]
push 0x32
push eax
call fcn.100170a8
add esp, 0x10
cmp word [esp + 0x108], si
je 0x100190e0
push 0x10
pop ebx
push ebx
push str.SoftwareMicrosoftOffice_i.0CommonInstallRootVirtual
lea eax, [esp + 0x1e0]
push 0x104
push eax
call fcn.100170a8
add esp, 0x10
test eax, eax
je 0x100190e0
mov eax, esi
mov dword [esp + 0xc], esi
mov eax, dword [eax*4 + 0x10039c94]
lea ecx, [esp + 0x14]
push ecx
or eax, 1
mov dword [esp + 0x1c], esi
push eax
push esi
lea eax, [esp + 0x1e4]
mov dword [esp + 0x20], esi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10018f27
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x64
push eax
lea eax, [esp + 0x174]
push eax
lea eax, [esp + 0x20]
push eax
push esi
lea eax, [esp + 0x118]
push eax
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x14], esi
je 0x10018f37
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x10], esi
jne 0x10018f9b
cmp dword [esp + 0x18], 1
je 0x10018f4b
cmp dword [esp + 0x18], 2
jne 0x10018f9b
cmp dword [esp + 0x18], 2
jne 0x10018fc2
push 0x104
lea eax, [esp + 0x3e4]
push eax
lea eax, [esp + 0x178]
push eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x10018fc2
push 0xffffffffffffffff
lea eax, [esp + 0x3e4]
push eax
lea eax, [esp + 0x178]
push 0x32
push eax
call fcn.100170a8
xor ecx, ecx
add esp, 0x10
cmp eax, 0x50
setne cl
jmp 0x10018f9d
mov ecx, esi
test ecx, ecx
jne 0x10018fc2
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, 3
jb 0x10018ec2
dec ebx
cmp ebx, 0xe
jae 0x10018e99
jmp 0x100190e0
cmp dword [edi + 0x20], esi
je 0x100190c9
push ebx
push str.SoftwareMicrosoftOffice_i.0ClickToRunStoreApplications
lea eax, [esp + 0x5f0]
push 0x104
push eax
call fcn.100170a8
add esp, 0x10
test eax, eax
je 0x100190c9
mov eax, dword [esp + 0xc]
mov ecx, dword [edi + 0x20]
mov dword [esp + 0x28], ecx
mov dword [esp + 0xc], esi
mov eax, dword [eax*4 + 0x10039c94]
mov dword [esp + 0x10], esi
test ecx, ecx
je 0x100190c9
lea ecx, [esp + 0x10]
or eax, 1
push ecx
push eax
push esi
lea eax, [esp + 0x5f4]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x1001905e
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x1048
push eax
lea eax, [esp + 0x9fc]
push eax
lea eax, [esp + 0x14]
push eax
push esi
push dword [esp + 0x38]
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp dword [esp + 0x10], esi
je 0x1001906e
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x100190c9
cmp dword [esp + 0xc], 1
je 0x10019080
cmp dword [esp + 0xc], 2
jne 0x100190c9
cmp dword [esp + 0xc], 2
jne 0x100190c9
push 0x104
lea eax, [esp + 0x7f4]
push eax
lea eax, [esp + 0xa00]
push eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x100190c9
push 0xffffffffffffffff
lea eax, [esp + 0x7f4]
push eax
lea eax, [esp + 0xa00]
push 0x824
push eax
call fcn.100170a8
add esp, 0x10
mov esi, ebx
mov ecx, dword [esp + 0x1c]
mov dword [ecx], esi
jmp 0x100190e0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0xf8]
mov dword [ecx], eax
xor eax, eax
mov ecx, dword [esp + 0x1a44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1001c65c
mov esp, ebp
pop ebp
ret 0xc