Function at 0x47d600
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc520
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x523f10]
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.004ab443
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x47d64a
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.0046bd30
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 0x47d81b
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 0x47d6c2
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00422527
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.004b9b5b
add esp, 8
cmp eax, ebx
jl 0x47d811
cmp eax, dword [esi - 8]
jg 0x47d811
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, ebx
je 0x47d7db
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x506124
call fcn.004247eb
push ecx
lea edi, [esi - 0x10]
mov dword [ebp - 0x20], esp
mov ebx, esp
push edi
mov byte [ebp - 4], 3
call fcn.0042545f
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 2
call fcn.004701a0
add esp, 0xc
test eax, eax
jne 0x47d7db
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.0046bd30
add esp, 0xc
call fcn.0047d590
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 0x47d784
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 0x47d7a1
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 0x47d7c7
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 0x506128
push ecx
call fcn.0046bd30
add esp, 0xc
call fcn.0047d590
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 0x47d852
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.0046bd30
add esp, 0xc
call fcn.0047d590
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 0x47d85e
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 0x47d87e
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 0x47d8a4
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