Function at 0x1002f990
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100adab6
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x100d65e8]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
push edi
mov eax, dword [0x100d65e8]
xor eax, esp
push eax
lea eax, [esp + 0x2a8]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea ecx, [esp + 0x7c]
mov dword [esp + 0x18], 0
call fcn.1002f100
mov dword [esp + 0x2b0], 0
mov ecx, eax
call fcn.10030120
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x90], 8
jb 0x1002fa1a
push dword [esp + 0x7c]
call fcn.1007d9ed
add esp, 4
xor eax, eax
mov dword [esp + 0x90], 7
mov dword [esp + 0x8c], 0
mov word [esp + 0x7c], ax
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x1002fa54
xor al, al
jmp 0x1002fc31
push 0x40
lea eax, [esp + 0x3c]
xorps xmm0, xmm0
push 0
push eax
mov dword [esp + 0x30], 0
movq qword [esp + 0x34], xmm0
mov dword [esp + 0x3c], 0
call fcn.1007f340
add esp, 0xc
xor eax, eax
push 0x206
push eax
mov word [esp + 0x9c], ax
lea eax, [esp + 0x9e]
push eax
mov dword [esp + 0x40], 0x44
call fcn.1007f340
add esp, 0xc
lea ecx, [esp + 0x7c]
call fcn.1002ef30
mov ecx, eax
mov dword [esp + 0x2b0], 1
cmp dword [ecx + 0x14], 8
jb 0x1002fac4
mov ecx, dword [ecx]
lea edx, [esp + 0x94]
jmp 0x1002fad0
movzx eax, word [ecx]
mov word [edx], ax
lea ecx, [ecx + 2]
lea edx, [edx + 2]
test ax, ax
jne 0x1002fad0
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x90], 8
jb 0x1002fb02
push dword [esp + 0x7c]
call fcn.1007d9ed
add esp, 4
xor eax, eax
mov word [esp + 0x7c], ax
lea eax, [esp + 0x94]
mov dword [esp + 0x3c], eax
xor eax, eax
cmp byte [ebp + 0x10], al
mov edx, 2
setne al
xor ecx, ecx
mov dword [esp + 0x90], 7
mov dword [esp + 0x8c], 0
mov dword [esp + 0x60], 1
mov word [esp + 0x64], ax
mov eax, dword [esi + 0x10]
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1007d096
mov ebx, eax
add esp, 4
mov dword [esp + 0x20], ebx
test ebx, ebx
je 0x1002fa4d
mov eax, dword [esi + 0x10]
inc eax
push eax
push 0
push ebx
call fcn.1007f340
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x1002fb82
mov esi, dword [esi]
push esi
push 0x100bdce0
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x1c]
push 0
push dword [esp + 0x1c]
mov dword [esp + 0x24], 0
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
cmp dword [edi + 0x14], 8
mov byte [esp + 0x17], 1
jb 0x1002fbb8
mov edi, dword [edi]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x38]
push eax
push 0
push dword [esp + 0x28]
push 0x420
push 0
push 0
push 0
push ebx
push edi
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push dword [esp + 0x1c]
mov ebx, eax
neg ebx
sbb bl, bl
and bl, byte [esp + 0x1b]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x28]
mov dword [esp + 0x28], 0
call esi
push dword [esp + 0x18]
mov dword [esp + 0x2c], 0
call esi
push dword [esp + 0x20]
mov dword [esp + 0x1c], 0
call fcn.1007f59b
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x2a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.1007e654
mov esp, ebp
pop ebp
ret