Function at 0x427d70
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push fcn.0043cf60
lea eax, [ebp - 8]
lea edi, [ebp + 4]
push eax
add edi, 0xfffffffc
push edi
call fcn.00420780
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push 0x428590
push eax
push edi
call fcn.00420780
mov esi, dword [ebp + 0x1c]
add esp, 0x18
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], 0
test esi, esi
je 0x427ddf
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push eax
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x427ddf
push str.failed_getting_active_user_token
push 0x360003
call fcn.004241a0
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x427df0
xor ecx, ecx
cmp dword [eax], ecx
cmove eax, ecx
mov dword [ebp + 0x10], eax
push 1
push eax
call fcn.004285c0
add esp, 8
test eax, eax
je 0x427e17
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
add eax, 0x1610
push eax
push str.invalid_redir:__s
jmp 0x427fbb
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x427e29
xor eax, eax
cmp dword [ebx], eax
cmove ebx, eax
mov dword [ebp + 0xc], ebx
cmp dword [ebp + 0x14], 0
je 0x427f82
test ebx, ebx
jne 0x427e56
test esi, esi
je 0x427f82
push 0
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
jne 0x427e65
mov dword [ebp - 4], eax
jmp 0x427eb0
test esi, esi
jne 0x427e3f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov dword [ebp - 4], eax
jmp 0x427e68
mov eax, dword [ebp - 4]
test eax, eax
je 0x427eb0
nop dword [eax]
cmp word [eax], 0
je 0x427eb0
push eax
push edi
call fcn.00420c80
push 0
push dword [eax]
push dword [ebp - 8]
call fcn.0043c7d0
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 0x427e94
sub ecx, esi
lea eax, [edx + 2]
sar ecx, 1
lea eax, [eax + ecx*2]
mov dword [ebp - 4], eax
test eax, eax
jne 0x427e70
test ebx, ebx
je 0x427f7d
nop dword [eax + eax]
mov ebx, dword [ebx]
test ebx, ebx
je 0x427f7d
mov edi, dword [ebp - 8]
mov dword [ebp - 0x14], edi
mov byte [ebp + 0x1f], 0
cmp dword [edi], 0
jne 0x427ee2
push edi
call fcn.0043cfa0
add esp, 4
push 0x3d
push ebx
call fcn.0053f150
mov esi, eax
add esp, 8
test esi, esi
je 0x427ef7
sub esi, ebx
jmp 0x427f0d
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x427f00
sub esi, ecx
mov byte [ebp + 0x1f], 1
mov edi, dword [edi]
mov eax, dword [edi]
test eax, eax
je 0x427f5a
push esi
push ebx
push eax
call fcn.00548090
add esp, 0xc
test eax, eax
jne 0x427f2c
mov eax, dword [edi]
cmp byte [eax + esi], 0x3d
je 0x427f36
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x427f15
test eax, eax
je 0x427f5a
cmp byte [ebp + 0x1f], 0
jne 0x427f4c
push ebx
push edi
call fcn.00421840
add esp, 8
jmp 0x427f6e
push edi
push dword [ebp - 0x14]
call fcn.0043cf10
add esp, 8
jmp 0x427f6e
cmp byte [ebp + 0x1f], 0
jne 0x427f6e
push 0
push ebx
push dword [ebp - 0x14]
call fcn.0043c7d0
add esp, 0xc
mov ebx, dword [ebp + 0xc]
add ebx, 4
mov dword [ebp + 0xc], ebx
jne 0x427ec0
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
push 0
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.0043bba0
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.004281f0
add esp, 0x28
mov esi, eax
pop ebx
test esi, esi
jne 0x427fca
mov eax, dword [ebp - 0xc]
push dword [eax]
push str.failed_CreateProcess__s_:__m
push 0x360003
call fcn.004241a0
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
call fcn.00443830
add esp, 4
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret