Function at 0x47f2d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4de4b0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x526f10]
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.004ad3ae
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x47f31a
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.0046da40
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 0x47f4eb
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 0x47f392
push 0x104
lea ecx, [ebp - 0x18]
call fcn.0042251a
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.004bbacb
add esp, 8
cmp eax, ebx
jl 0x47f4e1
cmp eax, dword [esi - 8]
jg 0x47f4e1
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, ebx
je 0x47f4ab
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x50856c
call fcn.004247ec
push ecx
lea edi, [esi - 0x10]
mov dword [ebp - 0x20], esp
mov ebx, esp
push edi
mov byte [ebp - 4], 3
call fcn.00425445
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 2
call fcn.00471eb0
add esp, 0xc
test eax, eax
jne 0x47f4ab
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.0046da40
add esp, 0xc
call fcn.0047f260
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 0x47f454
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 0x47f471
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 0x47f497
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 0x508570
push ecx
call fcn.0046da40
add esp, 0xc
call fcn.0047f260
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 0x47f522
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.0046da40
add esp, 0xc
call fcn.0047f260
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 0x47f52e
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 0x47f54e
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 0x47f574
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