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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
lea ecx, [ebp - 0xc]
call fcn.0042aeb8
lea ecx, [ebp - 8]
call fcn.0042aeb8
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp word [eax], bx
mov edi, 0x80000001
mov dword [ebp - 0x20], ebx
jne 0x4516f9
mov dword [ebp + 0xc], ebx
mov esi, dword [ebp + 8]
cmp word [esi], bx
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x451778
push 5
push esi
push str.HKCU_
call fcn.00426f79
add esp, 0xc
test al, al
je 0x451721
add esi, 0xa
jmp 0x45176f
push 0x13
push esi
push str.HKEY_CURRENT_USER_
call fcn.00426f79
add esp, 0xc
test al, al
je 0x45173a
add esi, 0x24
jmp 0x45176f
push 5
push esi
push str.HKLM_
call fcn.00426f79
add esp, 0xc
test al, al
je 0x451753
add esi, 0xa
jmp 0x45176a
push 0x13
push esi
push str.HKEY_LOCAL_MACHINE_
call fcn.00426f79
add esp, 0xc
test al, al
je 0x45176f
add esi, 0x26
mov edi, 0x80000002
mov dword [ebp - 0x20], 2
jmp 0x451793
mov eax, dword [ebp - 0x20]
cmp eax, 3
jae 0x451999
shl eax, 2
mov edi, dword [eax + 0x481bb4]
mov esi, dword [eax + 0x481ba8]
lea eax, [ebp - 4]
push eax
movzx eax, word [0x48fb88]
or eax, 0xf003f
push eax
push ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [ebp - 4], ebx
je 0x45197c
push ebx
push ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov esi, eax
cmp esi, ebx
jne 0x451984
mov eax, dword [ebp - 0x24]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x30]
call fcn.0042aed6
mov eax, dword [ebp - 0x28]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042aed6
cmp dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
jle 0x45195e
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x30]
shl eax, 2
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x28]
shl eax, 2
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
push esi
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
push edi
push dword [ebp - 0x18]
mov word [edi], bx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x45194f
cmp word [edi], bx
je 0x45194f
cmp dword [ebp + 0xc], ebx
je 0x451876
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x45194f
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x30]
shr eax, 1
push str.PATH
mov word [esi + eax*2], bx
call fcn.00426fa9
test al, al
pop ecx
pop ecx
je 0x4518c2
mov eax, dword [ebp - 0x1c]
cmp word [eax], bx
je 0x4518ba
mov eax, dword [ebp - 0xc]
cmp word [eax], bx
je 0x4518af
push 0x481b9c
lea ecx, [ebp - 0xc]
call fcn.0042af26
push dword [ebp - 0x1c]
lea ecx, [ebp - 0xc]
call fcn.0042af26
mov esi, dword [ebp - 0xc]
mov edi, 0x481b90
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push esi
mov ecx, 0x48feb8
call fcn.00439f58
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp byte [ebp + 0xb], bl
je 0x45194f
mov dword [ebp - 0x14], ebx
mov esi, dword [ebp - 0x14]
lea esi, [esi + 0x47b51c]
mov eax, dword [esi]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x451945
push 0x481b88
lea ecx, [ebp - 0x10]
call fcn.00434695
push dword [esi]
lea ecx, [ebp - 0x10]
call fcn.0042af26
push 0x481b0c
lea ecx, [ebp - 0x10]
call fcn.0042af26
push dword [ebp - 8]
lea ecx, [ebp - 0x10]
call fcn.0042af26
push 1
push ebx
push ebx
push dword [ebp - 0x10]
mov ecx, 0x48feb8
call fcn.0044094a
lea ecx, [ebp - 0x10]
call fcn.0042602e
add dword [ebp - 0x14], 8
cmp dword [ebp - 0x14], 0x40
jb 0x4518e6
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jl 0x45181b
lea ecx, [ebp - 0x1c]
call fcn.0042602e
lea ecx, [ebp - 0x30]
call fcn.0042602e
cmp dword [ebp - 4], ebx
je 0x45197c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x20]
jmp 0x451778
cmp dword [ebp - 4], ebx
je 0x451992
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
mov ebx, esi
jmp 0x4519d3
cmp dword [ebp + 0xc], ebx
je 0x4519e7
push dword [ebp + 0xc]
push str.PATH
call fcn.00426fa9
test al, al
pop ecx
pop ecx
je 0x4519e7
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov ecx, 0x48feb8
call fcn.00439f58
push dword [ebp - 8]
push 0x481b90
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 8]
call fcn.0042602e
lea ecx, [ebp - 0xc]
call fcn.0042602e
mov eax, ebx
jmp 0x4519f9
lea ecx, [ebp - 8]
call fcn.0042602e
lea ecx, [ebp - 0xc]
call fcn.0042602e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret