Function at 0x401170
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402280
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp eax, 1
jl 0x40149e
mov edx, dword [ecx + 4]
mov dword [ebp - 0x90], edx
cmp eax, 2
jle 0x40136c
mov edi, dword [ecx + 8]
xorps xmm0, xmm0
mov esi, edi
mov dword [ebp - 0x1c], edi
movups xmmword [ebp - 0x8c], xmm0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 0
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4011e1
sub esi, ecx
sar esi, 1
cmp esi, 0x7ffffffe
ja 0x4014bb
cmp esi, 7
ja 0x40122d
mov dword [ebp - 0x7c], esi
lea eax, [ebp - 0x8c]
add esi, esi
mov dword [ebp - 0x78], 7
push esi
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x8c], ax
jmp 0x4012cc
mov edi, esi
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x40124a
mov eax, 0x7fffffff
mov dword [ebp - 0x18], 0x7ffffffe
add eax, eax
jmp 0x40126e
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
mov dword [ebp - 0x18], edi
lea eax, [edi + 1]
cmp eax, 0x7fffffff
ja 0x4014c0
add eax, eax
cmp eax, 0x1000
jb 0x401295
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x4014c0
push ecx
call fcn.00401532
add esp, 4
test eax, eax
je 0x401357
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x4012a8
test eax, eax
je 0x4012a6
push eax
call fcn.00401532
add esp, 4
mov edi, eax
jmp 0x4012a8
xor edi, edi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x7c], esi
add esi, esi
push esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x8c], edi
push edi
mov dword [ebp - 0x78], eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
mov dword [ebp - 4], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [ebp - 0x78], 7
lea esi, [ebp - 0x8c]
mov dword [ebp - 0x18], eax
cmova esi, dword [ebp - 0x8c]
mov dword [eax], 0
lea eax, [ebp - 0x1c]
push 0xa
push eax
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
add esp, 0xc
mov edi, eax
cmp esi, dword [ebp - 0x1c]
jne 0x401315
push str.invalid_stoul_argument
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const__]
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0x22
jne 0x401328
push str.stoul_argument_out_of_range
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const__]
mov ecx, dword [ebp - 0x78]
cmp ecx, 7
jbe 0x401367
mov edx, dword [ebp - 0x8c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40135d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40135d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00401562
add esp, 8
cmp edi, 0xffffffff
jne 0x40137d
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
cmp edi, 0xffffffff
je 0x40149e
xorps xmm0, xmm0
mov dword [ebp - 0x14], edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x70], 0
push eax
push 2
movlpd qword [ebp - 0x68], xmm0
mov esi, 0x30
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
movlpd qword [ebp - 0x40], xmm0
movlpd qword [ebp - 0x38], xmm0
mov dword [ebp - 0x74], 0x44
mov dword [ebp - 0x6c], str.winsta0default
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4013ea
lea eax, [esi - 0x2f]
jmp 0x4014a0
lea eax, [ebp - 0x20]
push eax
push 1
push 1
push 0
push 0x2000000
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x401410
mov eax, 3
jmp 0x4014a0
push 4
lea eax, [ebp - 0x14]
push eax
push 0xc
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x40142c
mov eax, 4
jmp 0x4014a0
push 1
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x401450
mov eax, dword [ebp - 0x18]
mov esi, 0x430
jmp 0x401455
xor eax, eax
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x74]
push ecx
push 0
push eax
push esi
push 0
push 0
push 0
push dword [ebp - 0x90]
push 0
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push dword [ebp - 0x20]
test eax, eax
jne 0x40148c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 6
jmp 0x4014a0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x2c]
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401524
mov esp, ebp
pop ebp
ret
call fcn.00401160
call fcn.004010c0
int3