Function at 0x402640
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x433448
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push ebp
push esi
push edi
mov eax, dword [0x442758]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
xor ebx, ebx
push 0x40
lea eax, [esp + 0x40]
push ebx
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x44], ebx
call fcn.0041ef50
add esp, 0xc
xor eax, eax
push ebx
push str.Progman
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.shell32.dll
mov dword [esp + 0x24], ebx
call edi
push str.advapi32.dll
mov esi, eax
call edi
cmp esi, ebx
mov edi, eax
je 0x402880
cmp edi, ebx
je 0x40287d
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.IsUserAnAdmin
push esi
mov dword [esp + 0x40], 0x44
call ebp
push str.CreateProcessWithTokenW
push edi
mov dword [esp + 0x24], eax
call ebp
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x40270a
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push edi
call esi
jmp 0x40288b
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4026f9
call eax
test eax, eax
je 0x4026f9
push ebx
push str.Progman
call dword [sym.imp.USER32.dll_FindWindowW]
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [esp + 0x20]
push edx
push ebx
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
cmp ebp, ebx
je 0x4026f9
lea eax, [esp + 0x14]
push eax
push 0x2000000
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], ebx
je 0x4026f9
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push 1
push 3
push ebx
push 0x2000000
push edx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov ebp, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
je 0x4026f9
mov ecx, dword [esp + 0x90]
push ecx
lea ecx, [esp + 0x94]
call fcn.00401db0
mov dword [esp + 0x84], ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
mov ebp, eax
mov eax, dword [edx - 0xc]
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x90], edx
lea edx, [esp + 0x3c]
push edx
push ebx
push ebp
push 0x400
push eax
lea ecx, [esp + 0xa8]
call fcn.00401c40
mov ecx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0xa4]
push eax
push ebx
push ecx
call dword [esp + 0x48]
push 0xffffffffffffffff
lea ecx, [esp + 0x94]
mov dword [esp + 0x20], eax
call fcn.004028b0
cmp ebp, ebx
je 0x402823
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov edx, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebp
cmp dword [esp + 0x1c], ebx
jne 0x402850
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push edi
call esi
lea ecx, [esp + 0x90]
call fcn.00401170
jmp 0x40288b
mov eax, dword [esp + 0x28]
push eax
call ebp
mov ecx, dword [esp + 0x2c]
push ecx
call ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push edi
call esi
lea ecx, [esp + 0x90]
call fcn.00401170
mov eax, 1
jmp 0x40288d
push esi
jmp 0x402885
cmp edi, ebx
je 0x40288b
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 8