Function at 0x4726c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf9f0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4eec64]
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.004964ca
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x47270a
push 0x80004005
call fcn.00421000
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.00462190
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 0x4728db
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 0x472782
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00421527
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.004a4afb
add esp, 8
cmp eax, ebx
jl 0x4728d1
cmp eax, dword [esi - 8]
jg 0x4728d1
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, ebx
je 0x47289b
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x4da088
call fcn.00423456
push ecx
lea edi, [esi - 0x10]
mov dword [ebp - 0x20], esp
mov ebx, esp
push edi
mov byte [ebp - 4], 3
call fcn.00423fab
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 2
call fcn.00466680
add esp, 0xc
test eax, eax
jne 0x47289b
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.00462190
add esp, 0xc
call fcn.00472650
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 0x472844
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 0x472861
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 0x472887
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 str.IsSystemProcess:__USERNAME_s__secondary_envvar_check_:_albeit_HKCUSoftwareVOSs_presence__this_is_a_SYSTEM_process_
push ecx
call fcn.00462190
add esp, 0xc
call fcn.00472650
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 0x472912
push 0x80070057
call fcn.00421000
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.00462190
add esp, 0xc
call fcn.00472650
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 0x47291e
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 0x47293e
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 0x472964
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