Function at 0x1004e7a1
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
xor eax, eax
push esi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
call fcn.1003c826
test al, al
je 0x1004e7d8
push ebx
push ebp
pop ebp
pop ebp
push esi
pop edi
pop esi
pop edx
pop edx
push ebp
push ebp
pop esp
push ebp
push ebp
push esi
push edx
push esp
pop ebp
pop ebx
push edi
pop esp
pop edx
push ecx
pop edi
pop eax
pop edi
call fcn.1003c93a
test al, al
je 0x1004e7fa
push esi
pop esp
push esp
pop ebx
push edi
pop ecx
push ebx
push esi
pop ebx
pop esi
push ecx
push eax
pop edi
pop eax
pop esi
push esi
pop esi
pop ecx
push ebx
pop edi
pop ebp
push edi
pop eax
pop ebx
pop eax
call fcn.1003c86b
test al, al
je 0x1004e81f
pop eax
push esi
pop ebp
pop edx
push edi
pop eax
push ecx
push edx
pop esp
pop edi
pop ebx
push esi
push ebx
pop eax
push ebx
pop eax
push esi
pop ebp
pop ebp
push edx
push edi
pop ebx
pop edi
pop esi
push ebp
pop ebp
pop ebp
push ebx
lea eax, [ebp - 0xc]
mov esi, 0xf01ff
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
xor ebx, ebx
test eax, eax
je 0x1004e921
lea eax, [ebp - 0x14]
push eax
push 1
push 1
push ebx
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x1004e921
push str.Kernel32.dll
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x1004e8a4
push str.WTSGetActiveConsoleSessionId
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004e89d
call eax
push 4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 0xc
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x1004e924
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.1003ca09
test al, al
je 0x1004e8cd
pop ebx
push esi
push esp
pop eax
pop ebp
pop eax
push ebx
push ebx
push ebp
pop esi
pop esi
push ecx
pop ecx
push edi
pop esp
push edx
push edi
pop edx
pop edx
pop esp
push edx
push edx
pop ebp
pop edx
push esp
pop edx
pop edi
pop esp
push edi
pop esp
xor ebx, ebx
push str.Wtsapi32.dll
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x1004eae0
push str.WTSQueryUserToken
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004e9a2
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push ecx
push dword [ebp - 0x18]
call eax
push ebx
push dword [ebp - 0x10]
lea eax, [ebp - 8]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
push dword [ebp - 0x10]
test eax, eax
jne 0x1004e99c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], ebx
call fcn.1003cb1d
test al, al
je 0x1004e948
pop esp
pop esi
pop esp
pop edx
push eax
pop edx
push edx
push eax
pop esp
pop edx
push esi
push ebp
pop esi
push esi
push esi
pop eax
pop edi
pop edx
pop edi
push edi
push esp
push esp
push ecx
pop edx
push esp
push edi
pop edi
call fcn.1003c9c4
test al, al
je 0x1004e96a
push ebx
push edx
push ebp
pop ebx
pop edi
pop edi
push esp
pop eax
pop eax
pop esp
push edi
push eax
pop ecx
pop ebp
push ecx
pop esi
push eax
pop esi
push esp
pop edx
push edx
push ebx
pop edx
push ecx
pop esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1004e97d
cmp eax, 0xffffffff
je 0x1004e97d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x1004e990
cmp ecx, 0xffffffff
je 0x1004e990
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1003c826
test al, al
je 0x1004e9c0
pop ebp
pop edi
push esi
push ebp
push esi
push esp
push esi
pop ebp
pop ebp
push eax
pop ebx
push esp
pop ebx
push esp
pop eax
push ebx
pop esi
pop ebp
push esp
pop eax
push ecx
call fcn.1003c574
test al, al
je 0x1004e9db
pop eax
pop edx
push edx
pop esi
pop ecx
push eax
push eax
pop edx
push esi
push edx
push esp
push edx
pop ebx
push esi
push ecx
push esi
pop ecx
pop edi
call fcn.1003ca09
test al, al
je 0x1004e9fe
pop ecx
push ecx
push edx
pop edx
push edi
push esi
pop ecx
pop esp
pop esp
push esp
push edx
push edx
push ecx
pop edx
push eax
pop edx
push esi
pop eax
push ebp
push edi
pop ecx
push eax
pop eax
pop eax
pop eax
push edx
push 0x44
pop esi
push esi
xor ebx, ebx
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.10056120
push 0x10
lea eax, [ebp - 0x28]
push ebx
push eax
call fcn.10056120
add esp, 0x18
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x64], str.WinSta0Default
mov dword [ebp - 0x40], 1
push 5
pop eax
mov word [ebp - 0x3c], ax
call fcn.1003c826
test al, al
je 0x1004ea58
push ebx
push ebp
pop ebp
pop ebp
push esi
pop edi
pop esi
pop edx
pop edx
push ebp
push ebp
pop esp
push ebp
push ebp
push esi
push edx
push esp
pop ebp
pop ebx
push edi
pop esp
pop edx
push ecx
pop edi
pop eax
pop edi
call fcn.1003c93a
test al, al
je 0x1004ea7a
push esi
pop esp
push esp
pop ebx
push edi
pop ecx
push ebx
push esi
pop ebx
pop esi
push ecx
push eax
pop edi
pop eax
pop esi
push esi
pop esi
pop ecx
push ebx
pop edi
pop ebp
push edi
pop eax
pop ebx
pop eax
call fcn.1003c86b
test al, al
je 0x1004ea9f
pop eax
push esi
pop ebp
pop edx
push edi
pop eax
push ecx
push edx
pop esp
pop edi
pop ebx
push esi
push ebx
pop eax
push ebx
pop eax
push esi
pop ebp
pop ebp
push edx
push edi
pop ebx
pop edi
pop esi
push ebp
pop ebp
pop ebp
push ebx
lea eax, [ebp - 0x28]
xor ebx, ebx
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push dword [ebp - 8]
push 0x430
push ebx
push ebx
push ebx
push dword [ebp + 8]
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x1004e921
cmp dword [ebp - 8], ebx
je 0x1004ead7
push dword [ebp - 8]
call sub.USERENV.dll_DestroyEnvironmentBlock
mov byte [ebp - 4], 1
jmp 0x1004e924
push ebx
push dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
jne 0x1004e9a2
push dword [ebp - 0xc]
jmp 0x1004e91b