Function at 0x486d20
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f74d0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5470b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
call fcn.004c31da
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x486d6a
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x10]
push str.SoftwareVOS_s
push edx
call fcn.00475230
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
push 1
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
push ebx
push ecx
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x486f3b
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x486de2
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00422524
mov esi, dword [ebp - 0x18]
push 0x104
push esi
push str.USERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004d1e4b
add esp, 8
cmp eax, ebx
jl 0x486f31
cmp eax, dword [esi - 8]
jg 0x486f31
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, ebx
je 0x486efb
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x524524
call fcn.004247f5
push ecx
lea edi, [esi - 0x10]
mov dword [ebp - 0x20], esp
mov ebx, esp
push edi
mov byte [ebp - 4], 3
call fcn.00425486
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 2
call fcn.004796a0
add esp, 0xc
test eax, eax
jne 0x486efb
push ecx
mov edx, esp
mov dword [ebp - 0x20], esp
push esi
push str.IsSystemProcess:_USERNAME_s__secondary_envvar_check_:_this_is_indeed_a_USER_process
push edx
call fcn.00475230
add esp, 0xc
call fcn.00486cb0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486ea4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486ec1
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486ee7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push esi
push 0x524528
push ecx
call fcn.00475230
add esp, 0xc
call fcn.00486cb0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x486f72
push 0x80070057
call fcn.00422000
mov edx, dword [ebp - 0x10]
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push edx
push str.IsSystemProcess:_cannot_access_HKCU_s__this_is_a_SYSTEM_process
push ecx
call fcn.00475230
add esp, 0xc
call fcn.00486cb0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486f7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
or edx, 0xffffffff
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486f9e
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x486fc4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret