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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b91db
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x4e50cc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x248], 0
test eax, eax
je 0x486266
push 0x207
lea eax, [ebp - 0x21b]
mov byte [ebp - 0x21c], 0
push 0
push eax
call sub.MSVCR120.dll_memset
xor eax, eax
mov dword [ebp - 0x240], 0
add esp, 0xc
mov dword [ebp - 0x238], 0
mov ebx, 0x206
mov dword [ebp - 0x220], 7
lea esi, [ebp - 0x21c]
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x238]
push eax
push 0x20219
push 0
push dword [ebp - 0x244]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4861dc
mov edi, edi
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], ebx
push eax
push esi
lea eax, [ebp - 0x240]
push eax
push 0
push 0x4d13f8
push dword [ebp - 0x238]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x486153
cmp eax, 0xea
jne 0x4861dc
lea eax, [ebp - 0x21c]
add ebx, ebx
cmp esi, eax
je 0x48611d
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
lea eax, [ebx + 2]
push eax
call fcn.004a594a
add esp, 4
mov esi, eax
lea eax, [ebp - 0x238]
push eax
push 0x20219
push 0
push dword [ebp - 0x244]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4860d0
jmp 0x4861dc
mov eax, dword [ebp - 0x23c]
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x23c]
mov byte [eax + esi + 1], 0
mov eax, dword [ebp - 0x240]
cmp eax, 1
jne 0x48618f
cmp word [esi], 0
jne 0x48617d
xor ecx, ecx
jmp 0x4861cf
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x486182
jmp 0x4861cb
cmp eax, 2
jne 0x4861dc
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push ebx
cmovae eax, dword [ebp - 0x234]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [esi], 0
jne 0x4861bb
xor ecx, ecx
jmp 0x4861cf
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4861c0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x234]
call fcn.00402ddd
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x4861ed
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x21c]
cmp esi, eax
je 0x486201
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
mov edx, dword [ebp - 0x220]
cmp edx, 8
jae 0x486250
mov eax, dword [ebp - 0x224]
inc eax
je 0x486258
add eax, eax
push eax
lea eax, [ebp - 0x234]
push eax
push edi
call dword [sym.imp.MSVCR120.dll_memmove]
mov edx, dword [ebp - 0x220]
add esp, 0xc
mov ecx, dword [ebp - 0x224]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], edx
jmp 0x486284
mov ecx, dword [ebp - 0x234]
mov dword [edi], ecx
mov ecx, dword [ebp - 0x224]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], edx
jmp 0x486284
xor eax, eax
mov dword [edi + 0x14], 7
push eax
mov dword [edi + 0x10], 0
push 0x4c431c
mov word [edi], ax
call fcn.00402ddd
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret