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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100359cb
mov eax, dword fs:[0]
push eax
mov eax, 0x1a3c
call fcn.1003366c
mov eax, dword [0x100440b0]
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 ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1968], eax
test ebx, ebx
jne 0x1001af5d
mov eax, 0x80070057
jmp 0x1001b382
xor esi, esi
mov dword [ebx], esi
test eax, eax
jne 0x1001af6d
or dword [ebx], 0xffffffff
jmp 0x1001b380
mov edi, esi
push eax
push dword [edi*8 + 0x1003dd80]
call fcn.10018d09
pop ecx
pop ecx
test eax, eax
je 0x1001af93
mov eax, dword [ebp - 0x1968]
inc edi
cmp edi, 0xf
jb 0x1001af6f
jmp 0x1001b380
mov edi, dword [edi*8 + 0x1003dd84]
test edi, edi
je 0x1001b380
push ecx
lea eax, [ebp - 0x1948]
mov dword [ebp - 0x1958], esi
push eax
lea eax, [ebp - 0x1958]
mov dword [ebp - 0x1954], esi
push eax
xor edx, edx
mov dword [ebp - 0x1950], esi
mov ecx, edi
mov dword [ebp - 0x194c], esi
call fcn.10018d09
test eax, eax
js 0x1001afe3
mov eax, dword [ebp - 0x1958]
mov dword [ebx], eax
jmp 0x1001b380
lea eax, [ebp - 0x1984]
mov edx, edi
push eax
push ecx
xor ecx, ecx
call fcn.10018d09
test eax, eax
je 0x1001b018
push ecx
mov ecx, dword [ebp - 0x1980]
lea eax, [ebp - 0x1948]
push eax
lea eax, [ebp - 0x1958]
xor edx, edx
push eax
call fcn.10018d09
test eax, eax
jns 0x1001afd6
xor eax, eax
lea ecx, [ebp - 0x1a48]
mov word [ebp - 0x1948], ax
call fcn.10007b32
push str.c2r32.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
lea ecx, [ebp - 0x1a48]
mov dword [ebp - 0x1990], eax
call fcn.10007bee
cmp dword [ebp - 0x1a44], esi
je 0x1001b077
call dword [ebp - 0x1a44]
test eax, eax
je 0x1001b077
mov dword [ebp - 4], esi
cmp dword [ebp - 0x1a40], 0
je 0x1001b37e
call dword [ebp - 0x1a40]
mov esi, eax
jmp 0x1001b37e
push 0x64
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.10021114
mov edi, dword [ebp - 0x1968]
mov eax, 0x1003e770
add esp, 0xc
mov dword [ebp - 0x195c], eax
cmp dword [eax], esi
je 0x1001b0be
push dword [eax]
push edi
call fcn.10018d09
pop ecx
pop ecx
test eax, eax
je 0x1001b1f2
mov eax, dword [ebp - 0x195c]
add eax, 0x24
mov dword [ebp - 0x195c], eax
jne 0x1001b097
mov edi, dword [ebp - 0x195c]
cmp word [ebp - 0x78], si
je 0x1001b380
push 0x10
pop eax
mov dword [ebp - 0x1968], eax
push eax
push str.SoftwareMicrosoftOffice_i.0CommonInstallRootVirtual
lea eax, [ebp - 0x2e8]
push 0x104
push eax
call fcn.10018d09
add esp, 0x10
test eax, eax
je 0x1001b380
mov eax, esi
mov dword [ebp - 0x1960], esi
mov eax, dword [eax*4 + 0x1003d830]
lea ecx, [ebp - 0x195c]
push ecx
or eax, 1
mov dword [ebp - 0x196c], esi
push eax
push esi
lea eax, [ebp - 0x2e8]
mov dword [ebp - 0x195c], esi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x1964], eax
test eax, eax
jne 0x1001b172
lea eax, [ebp - 0x1970]
mov dword [ebp - 0x1970], 0x64
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x196c]
push eax
push esi
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x195c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x1964], eax
cmp dword [ebp - 0x195c], esi
je 0x1001b186
push dword [ebp - 0x195c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1964], esi
jne 0x1001b21e
cmp dword [ebp - 0x196c], 1
je 0x1001b1a4
cmp dword [ebp - 0x196c], 2
jne 0x1001b21e
cmp dword [ebp - 0x196c], 2
jne 0x1001b219
push 0x104
lea eax, [ebp - 0x4f0]
push eax
lea eax, [ebp - 0xe0]
push eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x1001b219
push 0xffffffffffffffff
lea eax, [ebp - 0x4f0]
push eax
lea eax, [ebp - 0xe0]
push 0x32
push eax
call fcn.10018d09
xor ecx, ecx
add esp, 0x10
cmp eax, 0x50
setne cl
jmp 0x1001b220
mov edi, dword [ebp - 0x195c]
cmp dword [edi + 0x1c], esi
je 0x1001b0c4
push 0xffffffffffffffff
push dword [edi + 0x1c]
lea eax, [ebp - 0x78]
push 0x32
push eax
call fcn.10018d09
add esp, 0x10
jmp 0x1001b0c4
xor ecx, ecx
inc ecx
jmp 0x1001b220
mov ecx, esi
test ecx, ecx
jne 0x1001b255
mov eax, dword [ebp - 0x1960]
inc eax
mov dword [ebp - 0x1960], eax
cmp eax, 3
jb 0x1001b101
mov eax, dword [ebp - 0x1968]
dec eax
mov dword [ebp - 0x1968], eax
cmp eax, 0xe
jae 0x1001b0d7
jmp 0x1001b380
cmp dword [edi + 0x20], esi
je 0x1001b378
push dword [ebp - 0x1968]
lea eax, [ebp - 0x6f8]
push str.SoftwareMicrosoftOffice_i.0ClickToRunStoreApplications
push 0x104
push eax
call fcn.10018d09
add esp, 0x10
test eax, eax
je 0x1001b378
mov eax, dword [ebp - 0x1960]
mov ecx, dword [edi + 0x20]
mov dword [ebp - 0x1978], ecx
mov dword [ebp - 0x1960], esi
mov eax, dword [eax*4 + 0x1003d830]
mov dword [ebp - 0x1964], esi
test ecx, ecx
je 0x1001b378
lea ecx, [ebp - 0x1964]
or eax, 1
push ecx
push eax
push esi
lea eax, [ebp - 0x6f8]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x1001b307
lea eax, [ebp - 0x1974]
mov dword [ebp - 0x1974], 0x1048
push eax
lea eax, [ebp - 0x1948]
push eax
lea eax, [ebp - 0x1960]
push eax
push esi
push dword [ebp - 0x1978]
push dword [ebp - 0x1964]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp dword [ebp - 0x1964], esi
je 0x1001b31b
push dword [ebp - 0x1964]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x1001b378
cmp dword [ebp - 0x1960], 1
je 0x1001b331
cmp dword [ebp - 0x1960], 2
jne 0x1001b378
cmp dword [ebp - 0x1960], 2
jne 0x1001b378
push 0x104
lea eax, [ebp - 0x900]
push eax
lea eax, [ebp - 0x1948]
push eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x1001b378
push 0xffffffffffffffff
lea eax, [ebp - 0x900]
push eax
lea eax, [ebp - 0x1948]
push 0x824
push eax
call fcn.10018d09
add esp, 0x10
mov esi, dword [ebp - 0x1968]
mov dword [ebx], esi
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.1001eea4
leave
ret 0xc