Function at 0x47d5e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push fcn.00492070
lea eax, [ebp - 8]
lea edi, [ebp + 4]
push eax
add edi, 0xfffffffc
push edi
call fcn.00475ff0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push 0x47ddf0
push eax
push edi
call fcn.00475ff0
mov esi, dword [ebp + 0x1c]
add esp, 0x18
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], 0
test esi, esi
je 0x47d64f
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push eax
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x47d64f
push str.failed_getting_active_user_token
push 0x360003
call fcn.00479a10
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x47d660
xor ecx, ecx
cmp dword [eax], ecx
cmove eax, ecx
mov dword [ebp + 0x10], eax
push 1
push eax
call fcn.0047de20
add esp, 8
test eax, eax
je 0x47d687
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
add eax, 0x1610
push eax
push str.invalid_redir:__s
jmp 0x47d82b
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x47d699
xor eax, eax
cmp dword [ebx], eax
cmove ebx, eax
mov dword [ebp + 0xc], ebx
cmp dword [ebp + 0x14], 0
je 0x47d7f2
test ebx, ebx
jne 0x47d6c6
test esi, esi
je 0x47d7f2
push 0
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
jne 0x47d6d5
mov dword [ebp - 4], eax
jmp 0x47d720
test esi, esi
jne 0x47d6af
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov dword [ebp - 4], eax
jmp 0x47d6d8
mov eax, dword [ebp - 4]
test eax, eax
je 0x47d720
nop dword [eax]
cmp word [eax], 0
je 0x47d720
push eax
push edi
call fcn.004764f0
push 0
push dword [eax]
push dword [ebp - 8]
call fcn.004918e0
mov edx, dword [ebp - 4]
add esp, 0x14
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x47d704
sub ecx, esi
lea eax, [edx + 2]
sar ecx, 1
lea eax, [eax + ecx*2]
mov dword [ebp - 4], eax
test eax, eax
jne 0x47d6e0
test ebx, ebx
je 0x47d7ed
nop dword [eax + eax]
mov ebx, dword [ebx]
test ebx, ebx
je 0x47d7ed
mov edi, dword [ebp - 8]
mov dword [ebp - 0x14], edi
mov byte [ebp + 0x1f], 0
cmp dword [edi], 0
jne 0x47d752
push edi
call fcn.004920b0
add esp, 4
push 0x3d
push ebx
call fcn.00594b30
mov esi, eax
add esp, 8
test esi, esi
je 0x47d767
sub esi, ebx
jmp 0x47d77d
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x47d770
sub esi, ecx
mov byte [ebp + 0x1f], 1
mov edi, dword [edi]
mov eax, dword [edi]
test eax, eax
je 0x47d7ca
push esi
push ebx
push eax
call fcn.0059dfb0
add esp, 0xc
test eax, eax
jne 0x47d79c
mov eax, dword [edi]
cmp byte [eax + esi], 0x3d
je 0x47d7a6
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x47d785
test eax, eax
je 0x47d7ca
cmp byte [ebp + 0x1f], 0
jne 0x47d7bc
push ebx
push edi
call fcn.004770b0
add esp, 8
jmp 0x47d7de
push edi
push dword [ebp - 0x14]
call fcn.00492020
add esp, 8
jmp 0x47d7de
cmp byte [ebp + 0x1f], 0
jne 0x47d7de
push 0
push ebx
push dword [ebp - 0x14]
call fcn.004918e0
add esp, 0xc
mov ebx, dword [ebp + 0xc]
add ebx, 4
mov dword [ebp + 0xc], ebx
jne 0x47d730
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
push 0
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00490cb0
push dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
push dword [ebp + 0x18]
push 1
push dword [ebp + 0x10]
push ebx
push 0
push dword [eax]
call fcn.0047da50
add esp, 0x28
mov esi, eax
pop ebx
test esi, esi
jne 0x47d83a
mov eax, dword [ebp - 0xc]
push dword [eax]
push str.failed_CreateProcess__s_:__m
push 0x360003
call fcn.00479a10
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
call fcn.00498940
add esp, 4
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret