Function at 0x46d1e0
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 [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [0x529ca0]
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.0040aa50
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x46d27b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x45c], eax
cmp dword [ebp - 0x428], 0
je 0x46d38e
movzx ecx, word [0x529bdc]
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 0x46d494
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 0x46d382
mov eax, dword [ebp - 0x41c]
shr eax, 1
mov dword [ebp - 0x41c], eax
cmp eax, 0x104
jne 0x46d346
mov dword [ebp - 0x41c], 0x103
mov eax, 0x206
jmp 0x46d353
add eax, eax
cmp eax, 0x208
jae 0x46d4c1
xor ecx, ecx
cmp dword [ebp - 0x420], 2
mov word [ebp + eax - 0x210], cx
jne 0x46d382
lea eax, [ebp - 0x210]
push 0x25
push eax
call fcn.004a8038
add esp, 8
test eax, eax
je 0x46d382
mov byte [ebp - 0x455], 1
push dword [ebp - 0x454]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x45c], 0
jne 0x46d494
xor eax, eax
mov word [ebp - 0xa], ax
cmp byte [ebp - 0x455], al
je 0x46d46d
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 0x46d443
cmp esi, 0x104
ja 0x46d3e3
lea eax, [esi - 1]
push eax
lea eax, [ebp - 0x418]
jmp 0x46d48c
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b1550
mov edi, eax
add esp, 4
test edi, edi
je 0x46d449
push esi
push edi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x46d432
cmp eax, esi
ja 0x46d438
lea eax, [esi - 1]
mov ecx, ebx
push eax
push edi
call fcn.0040a770
push edi
call fcn.004b1560
add esp, 4
jmp 0x46d494
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call fcn.004b1560
add esp, 4
jmp 0x46d449
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x46d453
mov eax, dword [ebx]
lea ecx, [ebp - 0x210]
cmp ecx, eax
je 0x46d494
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46d460
jmp 0x46d481
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46d476
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.0040a770
lea ecx, [ebp - 0x450]
call fcn.0040ab30
lea ecx, [ebp - 0x438]
call fcn.0040ab30
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x45c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
call fcn.004a4e0a
int3