Function at 0x407490
Capabilities:
Create process on windows
Print debug messages

Disassembly:
sub esp, 0x488
mov eax, dword [0x489320]
xor eax, esp
mov dword [esp + 0x484], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x40e
mov edi, ecx
lea ecx, [esp + 0x86]
xor eax, eax
push ebx
push ecx
mov esi, edx
mov dword [esp + 0x30], ebx
mov word [esp + 0x8c], ax
call fcn.004560e0
push 1
lea edx, [esp + 0x90]
push 0x478ed0
push edx
call fcn.00453172
push 0x104
lea eax, [esp + 0x9c]
push edi
push eax
call fcn.0045487a
push 1
lea ecx, [esp + 0xa8]
push 0x478ed0
push ecx
call fcn.0045487a
add esp, 0x30
cmp esi, ebx
je 0x40753b
push 1
lea edx, [esp + 0x84]
push 0x479d78
push edx
call fcn.0045487a
push pe_nt_image_headers32
lea eax, [esp + 0x90]
push esi
push eax
call fcn.0045487a
add esp, 0x18
push 0x44
lea ecx, [esp + 0x3c]
push ebx
push ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
call fcn.004560e0
xor eax, eax
add esp, 0xc
push str.userenv.dll
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x44], 0x479d7c
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
test ebp, ebp
je 0x4075ae
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateEnvironmentBlock
push ebp
call esi
push str.DestroyEnvironmentBlock
push ebp
mov ebx, eax
call esi
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x49c]
push edx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40761b
lea eax, [esp + 0x18]
push eax
push 0xf00ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x407605
lea edi, [esp + 0x10]
call fcn.00407420
test eax, eax
jne 0x407610
push str._RPS_LUAGetElevatedToken_fail
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x40762c
push str._RPS_OpenProcessToken_fail
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x40762c
push str._RPS_OpenProcess_fail
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x407660
mov ecx, dword [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x1c]
push edx
call ebx
test eax, eax
je 0x407651
mov dword [esp + 0x20], 0x400
push str._RPS_CreateEnvironmentBlock
jmp 0x407665
mov dword [esp + 0x14], 0
push str.__RPS_CreateEnvironmentBlock______FAILED
jmp 0x407665
push str.__RPS_FAILED___GetProcAddress_CreateEnvironmentBlock_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x3c]
push ecx
push 0
push edx
mov edx, dword [esp + 0x20]
push eax
push 0
push 0
push 0
lea ecx, [esp + 0xa0]
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x4076ad
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push eax
call esi
jmp 0x4076b1
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4076c4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4076c4
push eax
call ecx
test ebp, ebp
je 0x4076cf
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4076da
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4076e5
push eax
call esi
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov ecx, dword [esp + 0x494]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045300b
add esp, 0x488
ret