Function at 0x459f04
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.0042e1c4
lea ecx, [ebp - 8]
call fcn.0042e1c4
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp word [eax], bx
mov edi, 0x80000001
mov dword [ebp - 0x20], ebx
jne 0x459f32
mov dword [ebp + 0xc], ebx
mov esi, dword [ebp + 8]
cmp word [esi], bx
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x459fb1
push 5
push esi
push str.HKCU_
call fcn.0042996a
add esp, 0xc
test al, al
je 0x459f5a
add esi, 0xa
jmp 0x459fa8
push 0x13
push esi
push str.HKEY_CURRENT_USER_
call fcn.0042996a
add esp, 0xc
test al, al
je 0x459f73
add esi, 0x24
jmp 0x459fa8
push 5
push esi
push str.HKLM_
call fcn.0042996a
add esp, 0xc
test al, al
je 0x459f8c
add esi, 0xa
jmp 0x459fa3
push 0x13
push esi
push str.HKEY_LOCAL_MACHINE_
call fcn.0042996a
add esp, 0xc
test al, al
je 0x459fa8
add esi, 0x26
mov edi, 0x80000002
mov dword [ebp - 0x20], 2
jmp 0x459fcc
mov eax, dword [ebp - 0x20]
cmp eax, 3
jae 0x45a1d2
shl eax, 2
mov edi, dword [eax + 0x48c5d4]
mov esi, dword [eax + 0x48c5c8]
lea eax, [ebp - 4]
push eax
movzx eax, word [0x49ab68]
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 0x45a1b5
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 0x45a1bd
mov eax, dword [ebp - 0x24]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x30]
call fcn.0042e1e2
mov eax, dword [ebp - 0x28]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042e1e2
cmp dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
jle 0x45a197
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 0x45a188
cmp word [edi], bx
je 0x45a188
cmp dword [ebp + 0xc], ebx
je 0x45a0af
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x45a188
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x30]
shr eax, 1
push str.PATH
mov word [esi + eax*2], bx
call fcn.0042999a
test al, al
pop ecx
pop ecx
je 0x45a0fb
mov eax, dword [ebp - 0x1c]
cmp word [eax], bx
je 0x45a0f3
mov eax, dword [ebp - 0xc]
cmp word [eax], bx
je 0x45a0e8
push 0x48c5bc
lea ecx, [ebp - 0xc]
call fcn.0042e232
push dword [ebp - 0x1c]
lea ecx, [ebp - 0xc]
call fcn.0042e232
mov esi, dword [ebp - 0xc]
mov edi, 0x48c5b0
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push esi
mov ecx, 0x49aed0
call fcn.00436312
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp byte [ebp + 0xb], bl
je 0x45a188
mov dword [ebp - 0x14], ebx
mov esi, dword [ebp - 0x14]
lea esi, [esi + 0x48568c]
mov eax, dword [esi]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x45a17e
push 0x48c5a8
lea ecx, [ebp - 0x10]
call fcn.0043a4ba
push dword [esi]
lea ecx, [ebp - 0x10]
call fcn.0042e232
push 0x48c52c
lea ecx, [ebp - 0x10]
call fcn.0042e232
push dword [ebp - 8]
lea ecx, [ebp - 0x10]
call fcn.0042e232
push 1
push ebx
push ebx
push dword [ebp - 0x10]
mov ecx, 0x49aed0
call fcn.00446740
lea ecx, [ebp - 0x10]
call fcn.00428a48
add dword [ebp - 0x14], 8
cmp dword [ebp - 0x14], 0x40
jb 0x45a11f
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jl 0x45a054
lea ecx, [ebp - 0x1c]
call fcn.00428a48
lea ecx, [ebp - 0x30]
call fcn.00428a48
cmp dword [ebp - 4], ebx
je 0x45a1b5
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x20]
jmp 0x459fb1
cmp dword [ebp - 4], ebx
je 0x45a1cb
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
mov ebx, esi
jmp 0x45a20c
cmp dword [ebp + 0xc], ebx
je 0x45a220
push dword [ebp + 0xc]
push str.PATH
call fcn.0042999a
test al, al
pop ecx
pop ecx
je 0x45a220
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov ecx, 0x49aed0
call fcn.00436312
push dword [ebp - 8]
push 0x48c5b0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 8]
call fcn.00428a48
lea ecx, [ebp - 0xc]
call fcn.00428a48
mov eax, ebx
jmp 0x45a232
lea ecx, [ebp - 8]
call fcn.00428a48
lea ecx, [ebp - 0xc]
call fcn.00428a48
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret