Function at 0x47641e
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.0043717e
lea ecx, [ebp - 8]
call fcn.0043717e
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp word [eax], bx
mov edi, 0x80000001
mov dword [ebp - 0x20], ebx
jne 0x47644c
mov dword [ebp + 0xc], ebx
mov esi, dword [ebp + 8]
cmp word [esi], bx
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x4764cb
push 5
push esi
push str.HKCU_
call fcn.00432c59
add esp, 0xc
test al, al
je 0x476474
add esi, 0xa
jmp 0x4764c2
push 0x13
push esi
push str.HKEY_CURRENT_USER_
call fcn.00432c59
add esp, 0xc
test al, al
je 0x47648d
add esi, 0x24
jmp 0x4764c2
push 5
push esi
push str.HKLM_
call fcn.00432c59
add esp, 0xc
test al, al
je 0x4764a6
add esi, 0xa
jmp 0x4764bd
push 0x13
push esi
push str.HKEY_LOCAL_MACHINE_
call fcn.00432c59
add esp, 0xc
test al, al
je 0x4764c2
add esi, 0x26
mov edi, 0x80000002
mov dword [ebp - 0x20], 2
jmp 0x4764e6
mov eax, dword [ebp - 0x20]
cmp eax, 3
jae 0x4766fa
shl eax, 2
mov edi, dword [eax + 0x4a1880]
mov esi, dword [eax + 0x4a1874]
lea eax, [ebp - 4]
push eax
movzx eax, word [0x4afb70]
or eax, 0xf003f
push eax
push ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [ebp - 4], ebx
je 0x4766dd
push ebx
push ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
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 0x4766e5
mov eax, dword [ebp - 0x24]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.0043719c
mov eax, dword [ebp - 0x28]
lea eax, [eax*4 + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.0043719c
cmp dword [ebp - 0x30], ebx
mov dword [ebp - 0x1c], ebx
jle 0x4766bf
mov eax, dword [ebp - 0x24]
shl eax, 2
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x28]
shl eax, 2
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
mov word [eax], bx
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x38]
push ebx
push ebx
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x4766b0
mov eax, dword [ebp - 0x18]
cmp word [eax], bx
je 0x4766b0
cmp dword [ebp + 0xc], ebx
je 0x4765cd
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4766b0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
shr eax, 1
mov word [ecx + eax*2], bx
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
push eax
push str.PATH
mov dword [ebp - 0x2c], eax
call fcn.00432c89
test al, al
pop ecx
pop ecx
je 0x476625
mov eax, dword [ebp - 0x10]
cmp word [eax], bx
je 0x47661b
mov eax, dword [ebp - 0xc]
cmp word [eax], bx
je 0x476610
push 0x4a1868
lea ecx, [ebp - 0xc]
call fcn.004371ec
push dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
call fcn.004371ec
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x2c], 0x4a185c
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push esi
mov ecx, 0x4aff28
call fcn.0043eb92
push dword [ebp - 8]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp byte [ebp + 0xb], bl
je 0x4766b0
xor edi, edi
push dword [ebp - 0x2c]
lea esi, [edi + 0x498a34]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4766a8
push 0x4a1854
lea ecx, [ebp - 0x14]
call fcn.004419bc
push dword [esi]
lea ecx, [ebp - 0x14]
call fcn.004371ec
push 0x4a0c3c
lea ecx, [ebp - 0x14]
call fcn.004371ec
push dword [ebp - 8]
lea ecx, [ebp - 0x14]
call fcn.004371ec
push 1
push ebx
push ebx
push dword [ebp - 0x14]
mov ecx, 0x4aff28
call fcn.0044fb51
lea ecx, [ebp - 0x14]
call fcn.00431c4c
add edi, 8
cmp edi, 0x40
jb 0x47664a
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x30]
jl 0x47656e
lea ecx, [ebp - 0x10]
call fcn.00431c4c
lea ecx, [ebp - 0x18]
call fcn.00431c4c
cmp dword [ebp - 4], ebx
je 0x4766dd
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x20]
jmp 0x4764cb
cmp dword [ebp - 4], ebx
je 0x4766f3
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
mov ebx, esi
jmp 0x476734
cmp dword [ebp + 0xc], ebx
je 0x476748
push dword [ebp + 0xc]
push str.PATH
call fcn.00432c89
test al, al
pop ecx
pop ecx
je 0x476748
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov ecx, 0x4aff28
call fcn.0043eb92
push dword [ebp - 8]
push 0x4a185c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 8]
call fcn.00431c4c
lea ecx, [ebp - 0xc]
call fcn.00431c4c
mov eax, ebx
jmp 0x47675a
lea ecx, [ebp - 8]
call fcn.00431c4c
lea ecx, [ebp - 0xc]
call fcn.00431c4c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret