Function at 0x1012799
Capabilities:
Check processdebugport
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x478
mov eax, dword [0x10150c4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x414]
push eax
call fcn.010122e5
test eax, eax
jne 0x1012803
mov eax, dword [0x10150c0]
cmp eax, 0x10150c0
je 0x1012a47
test byte [eax + 0x1c], 8
je 0x1012a47
cmp byte [eax + 0x19], 2
jb 0x1012a47
push dword [ebp + 8]
push 0x100ab80
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002f89
jmp 0x1012a47
push esi
mov esi, dword [ebp + 8]
push edi
push esi
xor edi, edi
push edi
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x418], eax
cmp eax, edi
je 0x1012a11
lea ecx, [ebp - 0x424]
push ecx
push 4
lea ecx, [ebp - 0x41c]
push ecx
push 7
push eax
mov dword [ebp - 0x41c], edi
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
cmp eax, edi
jl 0x10129ce
lea eax, [ebp - 0x420]
push eax
push 0x2000000
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10129a3
push 0x44
pop esi
push esi
lea eax, [ebp - 0x478]
push edi
push eax
call sub.msvcrt.dll_memset
push dword [ebp + 8]
xor eax, eax
lea edi, [ebp - 0x434]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x414]
push eax
push 0x1012a64
lea eax, [ebp - 0x20c]
push ebx
push eax
mov dword [ebp - 0x478], esi
call fcn.01002691
xor eax, eax
add esp, 0x20
mov esi, 0x10150c0
mov edi, 0x100ab80
cmp dword [ebp - 0x41c], eax
je 0x10128fc
mov eax, dword [0x10150c0]
cmp eax, esi
je 0x10128e8
test byte [eax + 0x1c], 8
je 0x10128e8
cmp byte [eax + 0x19], 2
jb 0x10128e8
push dword [ebp + 8]
push edi
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002f89
push 0x1012a58
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.010018e7
xor eax, eax
lea ecx, [ebp - 0x434]
push ecx
lea ecx, [ebp - 0x478]
push ecx
push eax
push eax
push eax
push eax
push eax
push eax
lea ecx, [ebp - 0x20c]
push ecx
push eax
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x1012963
mov eax, dword [0x10150c0]
cmp eax, esi
je 0x101294b
test byte [eax + 0x1c], 8
je 0x101294b
cmp byte [eax + 0x19], 4
jb 0x101294b
push edi
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010015b6
push dword [ebp - 0x430]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x434]
call esi
jmp 0x1012995
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x10150c0]
cmp ecx, esi
je 0x1012995
test byte [ecx + 0x1c], 8
je 0x1012995
cmp byte [ecx + 0x19], 2
jb 0x1012995
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x11
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100abe1
push dword [ebp - 0x420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1012a03
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x10150c0]
cmp ecx, 0x10150c0
je 0x1012a03
test byte [ecx + 0x1c], 8
je 0x1012a03
cmp byte [ecx + 0x19], 2
jb 0x1012a03
push eax
push esi
push 0x100ab80
push 0x12
jmp 0x10129f8
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, dword [0x10150c0]
cmp ecx, 0x10150c0
je 0x1012a03
test byte [ecx + 0x1c], 8
je 0x1012a03
cmp byte [ecx + 0x19], 2
jb 0x1012a03
push eax
push esi
push 0x100ab80
push 0x13
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100b8d6
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1012a45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x10150c0]
cmp ecx, 0x10150c0
je 0x1012a45
test byte [ecx + 0x1c], 8
je 0x1012a45
cmp byte [ecx + 0x19], 2
jb 0x1012a45
push eax
push esi
push 0x100ab80
push 0x14
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100b8d6
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.010015a4
leave
ret 4