Function at 0x46bf70
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [0x521104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [0x528c70]
lea ecx, [ebp - 0x450]
push esi
push edi
xorps xmm0, xmm0
mov dword [ebp - 0x45c], 0
xor eax, eax
mov byte [ebp - 0x455], 0
push 0x13
movups xmmword [ebp - 0x438], xmm0
push str.SoftwareMicrosoft_
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
movups xmmword [ebp - 0x450], xmm0
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x43c], eax
call fcn.0040a370
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x46c00b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x45c], eax
cmp dword [ebp - 0x428], 0
je 0x46c11e
movzx ecx, word [0x528ba8]
lea eax, [ebp - 0x450]
neg ecx
lea edx, [ebp - 0x454]
push edx
sbb ecx, ecx
cmp dword [ebp - 0x43c], 8
cmovae eax, dword [ebp - 0x450]
and ecx, 0x100
or ecx, 1
push ecx
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x45c], eax
test eax, eax
jne 0x46c224
cmp dword [ebp - 0x424], 8
lea ecx, [ebp - 0x41c]
push ecx
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x41c], 0x208
push ecx
lea ecx, [ebp - 0x420]
push ecx
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push 0
push eax
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x45c], eax
test eax, eax
jne 0x46c112
mov eax, dword [ebp - 0x41c]
shr eax, 1
mov dword [ebp - 0x41c], eax
cmp eax, 0x104
jne 0x46c0d6
mov dword [ebp - 0x41c], 0x103
mov eax, 0x206
jmp 0x46c0e3
add eax, eax
cmp eax, 0x208
jae 0x46c251
xor ecx, ecx
cmp dword [ebp - 0x420], 2
mov word [ebp + eax - 0x210], cx
jne 0x46c112
lea eax, [ebp - 0x210]
push 0x25
push eax
call fcn.004a6c78
add esp, 8
test eax, eax
je 0x46c112
mov byte [ebp - 0x455], 1
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x45c], 0
jne 0x46c224
xor eax, eax
mov word [ebp - 0xa], ax
cmp byte [ebp - 0x455], al
je 0x46c1fd
push 0x104
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x46c1d3
cmp esi, 0x104
ja 0x46c173
lea eax, [esi - 1]
push eax
lea eax, [ebp - 0x418]
jmp 0x46c21c
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b0190
mov edi, eax
add esp, 4
test edi, edi
je 0x46c1d9
push esi
push edi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x46c1c2
cmp eax, esi
ja 0x46c1c8
lea eax, [esi - 1]
mov ecx, ebx
push eax
push edi
call fcn.0040a090
push edi
call fcn.004b01a0
add esp, 4
jmp 0x46c224
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call fcn.004b01a0
add esp, 4
jmp 0x46c1d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x46c1e3
mov eax, dword [ebx]
lea ecx, [ebp - 0x210]
cmp ecx, eax
je 0x46c224
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46c1f0
jmp 0x46c211
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46c206
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.0040a090
lea ecx, [ebp - 0x450]
call fcn.0040a450
lea ecx, [ebp - 0x438]
call fcn.0040a450
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x45c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a389b
mov esp, ebp
pop ebp
ret
call fcn.004a3a4a
int3