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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
mov eax, dword [0x100400b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ecx
push str.SOFTWAREMicrosoftOffice_d.0CommonInstallRoot
lea eax, [ebp - 0x204]
mov ebx, edx
push 0x100
push eax
call fcn.1000972c
add esp, 0x10
test eax, eax
je 0x100136ab
xor edi, edi
and dword [ebp - 0x61c], 0
and dword [ebp - 0x618], 0
mov eax, dword [edi + 0x10039c94]
mov esi, dword [ebp + 8]
test ebx, ebx
je 0x10013583
test esi, esi
je 0x10013583
lea ecx, [ebp - 0x618]
or eax, 1
push ecx
push eax
push 0
lea eax, [ebp - 0x204]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x10013514
mov eax, dword [ebp + 8]
add eax, eax
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x620]
push eax
push ebx
lea eax, [ebp - 0x61c]
push eax
push esi
push str.Path
push dword [ebp - 0x618]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp dword [ebp - 0x618], 0
je 0x10013529
push dword [ebp - 0x618]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x10013591
cmp dword [ebp - 0x61c], 1
je 0x1001353f
cmp dword [ebp - 0x61c], 2
jne 0x10013591
cmp dword [ebp - 0x61c], 2
jne 0x10013589
push 0x104
lea eax, [ebp - 0x40c]
push eax
push ebx
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x10013589
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x40c]
push 0xffffffffffffffff
push eax
push esi
push ebx
call fcn.1000972c
xor ecx, ecx
add esp, 0x10
cmp eax, 0x50
setne cl
jmp 0x10013585
xor ecx, ecx
test ecx, ecx
je 0x10013594
xor eax, eax
inc eax
jmp 0x100136ad
mov esi, dword [ebp + 8]
add edi, 4
cmp edi, 0xc
jb 0x1001349a
xor edi, edi
and dword [ebp - 0x618], 0
and dword [ebp - 0x61c], 0
mov eax, dword [edi + 0x10039c94]
test ebx, ebx
je 0x10013690
test esi, esi
je 0x10013690
lea ecx, [ebp - 0x61c]
or eax, 1
push ecx
push eax
push 0
lea eax, [ebp - 0x204]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x10013619
mov eax, dword [ebp + 8]
add eax, eax
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x620]
push eax
push ebx
lea eax, [ebp - 0x618]
push eax
push esi
push str.OfficeBin
push dword [ebp - 0x61c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp dword [ebp - 0x61c], 0
je 0x1001362e
push dword [ebp - 0x61c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x1001369c
cmp dword [ebp - 0x618], 1
je 0x10013644
cmp dword [ebp - 0x618], 2
jne 0x1001369c
cmp dword [ebp - 0x618], 2
jne 0x10013589
push 0x104
lea eax, [ebp - 0x614]
push eax
push ebx
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x10013589
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x614]
push 0xffffffffffffffff
push eax
push esi
push ebx
call fcn.1000972c
xor ecx, ecx
add esp, 0x10
cmp eax, 0x50
setne cl
jmp 0x10013692
xor ecx, ecx
test ecx, ecx
jne 0x10013589
jmp 0x1001369f
mov esi, dword [ebp + 8]
add edi, 4
cmp edi, 0xc
jb 0x100135a2
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001c65c
leave
ret 4