Function at 0x4551e0
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.0042c809
lea ecx, [ebp - 8]
call fcn.0042c809
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp word [eax], bx
mov edi, 0x80000001
mov dword [ebp - 0x20], ebx
jne 0x45520e
mov dword [ebp + 0xc], ebx
mov esi, dword [ebp + 8]
cmp word [esi], bx
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x45528d
push 5
push esi
push str.HKCU_
call fcn.00428263
add esp, 0xc
test al, al
je 0x455236
add esi, 0xa
jmp 0x455284
push 0x13
push esi
push str.HKEY_CURRENT_USER_
call fcn.00428263
add esp, 0xc
test al, al
je 0x45524f
add esi, 0x24
jmp 0x455284
push 5
push esi
push str.HKLM_
call fcn.00428263
add esp, 0xc
test al, al
je 0x455268
add esi, 0xa
jmp 0x45527f
push 0x13
push esi
push str.HKEY_LOCAL_MACHINE_
call fcn.00428263
add esp, 0xc
test al, al
je 0x455284
add esi, 0x26
mov edi, 0x80000002
mov dword [ebp - 0x20], 2
jmp 0x4552a8
mov eax, dword [ebp - 0x20]
cmp eax, 3
jae 0x4554ae
shl eax, 2
mov edi, dword [eax + 0x4881cc]
mov esi, dword [eax + 0x4881c0]
lea eax, [ebp - 4]
push eax
movzx eax, word [0x496b68]
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 0x455491
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 0x455499
mov eax, dword [ebp - 0x24]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x30]
call fcn.0042c827
mov eax, dword [ebp - 0x28]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042c827
cmp dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
jle 0x455473
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 0x455464
cmp word [edi], bx
je 0x455464
cmp dword [ebp + 0xc], ebx
je 0x45538b
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x455464
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x30]
shr eax, 1
push 0x4881b8
mov word [esi + eax*2], bx
call fcn.00428293
test al, al
pop ecx
pop ecx
je 0x4553d7
mov eax, dword [ebp - 0x1c]
cmp word [eax], bx
je 0x4553cf
mov eax, dword [ebp - 0xc]
cmp word [eax], bx
je 0x4553c4
push 0x4881b4
lea ecx, [ebp - 0xc]
call fcn.0042c877
push dword [ebp - 0x1c]
lea ecx, [ebp - 0xc]
call fcn.0042c877
mov esi, dword [ebp - 0xc]
mov edi, 0x4881a8
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push esi
mov ecx, 0x496eb8
call fcn.0043c527
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp byte [ebp + 0xb], bl
je 0x455464
mov dword [ebp - 0x14], ebx
mov esi, dword [ebp - 0x14]
lea esi, [esi + 0x4815dc]
mov eax, dword [esi]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x45545a
push 0x4881a0
lea ecx, [ebp - 0x10]
call fcn.004365ba
push dword [esi]
lea ecx, [ebp - 0x10]
call fcn.0042c877
push 0x488124
lea ecx, [ebp - 0x10]
call fcn.0042c877
push dword [ebp - 8]
lea ecx, [ebp - 0x10]
call fcn.0042c877
push 1
push ebx
push ebx
push dword [ebp - 0x10]
mov ecx, 0x496eb8
call fcn.004431c6
lea ecx, [ebp - 0x10]
call fcn.00427365
add dword [ebp - 0x14], 8
cmp dword [ebp - 0x14], 0x40
jb 0x4553fb
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c]
jl 0x455330
lea ecx, [ebp - 0x1c]
call fcn.00427365
lea ecx, [ebp - 0x30]
call fcn.00427365
cmp dword [ebp - 4], ebx
je 0x455491
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x20]
jmp 0x45528d
cmp dword [ebp - 4], ebx
je 0x4554a7
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
mov ebx, esi
jmp 0x4554e8
cmp dword [ebp + 0xc], ebx
je 0x4554fc
push dword [ebp + 0xc]
push 0x4881b8
call fcn.00428293
test al, al
pop ecx
pop ecx
je 0x4554fc
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov ecx, 0x496eb8
call fcn.0043c527
push dword [ebp - 8]
push 0x4881a8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 8]
call fcn.00427365
lea ecx, [ebp - 0xc]
call fcn.00427365
mov eax, ebx
jmp 0x45550e
lea ecx, [ebp - 8]
call fcn.00427365
lea ecx, [ebp - 0xc]
call fcn.00427365
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret