Function at 0x401f90
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1df4
call fcn.004b0790
xor eax, eax
push esi
push 0x40
xor esi, esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xa0]
push esi
push eax
mov byte [ebp - 1], 0
mov dword [ebp - 0xa4], 0x44
call fcn.004b03e0
push 0x38
lea ecx, [ebp - 0x5c]
push esi
push ecx
mov dword [ebp - 0x60], 0x3c
call fcn.004b03e0
mov ecx, dword [ebp + 8]
add esp, 0x18
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0xffffffff
cmp ecx, esi
je 0x40244c
push edi
mov edi, dword [ebp + 0xc]
cmp edi, esi
je 0x40244b
push ebx
mov ebx, dword [ebp + 0x10]
cmp ebx, esi
je 0x40244a
mov eax, dword [ebp + 0x14]
cmp eax, esi
je 0x40244a
mov edx, dword [0x50b3a4]
cmp byte [edx + 0x127d2], 0
mov esi, dword [ebp + 0x18]
je 0x402061
push esi
push eax
push ebx
push edi
push ecx
lea eax, [ebp - 0x1a4]
push str.CAttachDlg::StartAttach_HWNDx_08X__PID_u__Bits_u__Type_u__AltMode_u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
push 1
push 1
lea ecx, [ebp - 0x1a4]
push ecx
mov ecx, dword [0x50b39c]
call fcn.00405100
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x1df4]
push edx
push ecx
call fcn.004251f0
add esp, 8
test eax, eax
je 0x4020c7
push 0x30
push 0x12
call fcn.004248c0
mov ecx, dword [0x50b384]
mov edx, dword [ebp - 0x1de0]
push 0
push 0
push ecx
push eax
push edx
mov dword [ebp - 8], eax
call fcn.00425110
add esp, 0x1c
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4020b2
cmp dword [eax], 0x34
jb 0x4020b2
cmp dword [eax + 0x30], 0
jne 0x4023bd
lea eax, [ebp - 8]
push eax
call fcn.004247c0
lea ecx, [ebp - 0xc]
push ecx
call fcn.004247c0
add esp, 8
push edi
push 0x4c0c18
lea edx, [ebp - 0x734]
push str._spipeConEmuHk_u
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0
push 3
call fcn.00441aa0
push eax
push 0
push 0xc0000000
lea eax, [ebp - 0x734]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x402120
cmp eax, 0xffffffff
je 0x402120
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
jmp 0x40234e
mov ecx, dword [0x50b39c]
add ecx, 0x5c8
push ecx
lea edx, [ebp - 0x52c]
push edx
call fcn.00401a70
add esp, 8
mov eax, 0x4c0bcc
cmp ebx, 0x40
je 0x40214b
mov eax, 0x4c0bb0
push eax
push 0x144
lea eax, [ebp - 0x52c]
push eax
call fcn.00401880
test esi, esi
je 0x40218f
cmp dword [ebp + 0x14], 1
jne 0x40218f
mov ecx, dword [0x50b384]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push eax
push edi
lea edx, [ebp - 0x2a4]
push str.__ATTACH__CONPID_u__GID_u__GHWND_08X
push edx
call ebx
add esp, 0x14
jmp 0x4021ad
push edi
lea eax, [ebp - 0x2a4]
push str.__INJECT_u
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
xor esi, esi
xor ecx, ecx
cmp dword [ebp + 0x14], 2
mov dword [ebp - 0x78], 1
mov word [ebp - 0x74], cx
jne 0x4021cc
mov ecx, dword [0x50b39c]
push edi
call fcn.004171a0
push edi
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40224f
call edi
mov edx, dword [0x50b384]
mov eax, esi
neg eax
sbb eax, eax
and eax, 0xffff8000
add eax, 0x8000
or eax, 0x140
mov dword [ebp - 0x5c], eax
mov eax, dword [0x50b39c]
lea ecx, [ebp - 0x52c]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x58], edx
lea ecx, [ebp - 0x60]
lea edx, [ebp - 0x2a4]
add eax, 0x5c8
push ecx
mov dword [ebp - 0x54], str.runas
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 2
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
setne al
test al, al
je 0x402294
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x20], edx
jmp 0x402290
mov edx, esi
neg edx
lea eax, [ebp - 0x20]
push eax
sbb edx, edx
lea ecx, [ebp - 0xa4]
push ecx
push 0
push 0
and edx, 0x7fffff0
add edx, 0x10
or edx, 0x20
push edx
push 0
push 0
push 0
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0x52c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne al
test al, al
jne 0x402302
call edi
mov edi, eax
mov eax, str.injection
test esi, esi
jne 0x4022a6
mov eax, str.console
lea edx, [ebp - 0x2a4]
push edx
lea ecx, [ebp - 0x52c]
push ecx
push eax
lea edx, [ebp - 0xd3c]
push str.Cant_start__s_server_n_s__s
push edx
call ebx
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x1a4]
push str.ConEmu_Attach__PID_u__TID_u
push eax
call ebx
push 0
lea ecx, [ebp - 0x1a4]
push ecx
push 0
lea edx, [ebp - 0xd3c]
push edi
push edx
call fcn.004200b0
add esp, 0x24
jmp 0x40244a
test esi, esi
jne 0x4023bd
mov eax, dword [ebp - 0x20]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x10]
push ecx
push edx
mov dword [ebp - 0x10], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x402341
push eax
call esi
cmp dword [ebp - 0x10], 0x81
jne 0x40244a
push 0x40
push 0x36
call fcn.004248c0
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
add esp, 8
mov dword [ebp - 8], eax
call esi
cmp dword [ebp + 0x14], 2
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x30], eax
mov edx, dword [ebp - 8]
mov eax, dword [0x50b384]
mov dword [edx + 0x34], eax
jne 0x402385
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x38], edx
mov eax, dword [0x50b384]
mov ecx, dword [ebp - 8]
push 0
push 0
push eax
push 0x1f4
push ecx
lea edx, [ebp - 0x734]
push edx
call fcn.00424c30
add esp, 0x18
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4023c6
mov ecx, dword [eax]
mov edx, dword [ebp - 8]
cmp ecx, dword [edx]
jb 0x4023c6
cmp dword [eax + 0x30], 0
je 0x4023c6
mov byte [ebp - 1], 1
jmp 0x40244a
lea eax, [ebp - 0x934]
push str.Failed_to_start_console_server_in_the_remote_process
push eax
call fcn.00401ad0
mov eax, dword [ebp - 0x24]
add esp, 8
test eax, eax
je 0x4023fc
cmp eax, 0xffffffff
je 0x4023fc
push str._nHooks_already_was_set
push 0xff
lea ecx, [ebp - 0x934]
push ecx
call fcn.00401880
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call esi
push eax
lea edx, [ebp - 0x1a4]
push str.ConEmu_Attach__PID_u__TID_u
push edx
call ebx
mov eax, dword [ebp - 0xc]
add esp, 0x10
test eax, eax
je 0x40242c
mov ecx, dword [eax]
mov edx, dword [ebp - 8]
cmp ecx, dword [edx]
jb 0x40242c
mov eax, dword [eax + 0x34]
jmp 0x40242f
or eax, 0xffffffff
push 0
lea ecx, [ebp - 0x1a4]
push ecx
push 0
push eax
lea edx, [ebp - 0x934]
push edx
call fcn.004200b0
add esp, 0x14
pop ebx
pop edi
lea eax, [ebp - 8]
push eax
call fcn.004247c0
lea ecx, [ebp - 0xc]
push ecx
call fcn.004247c0
mov al, byte [ebp - 1]
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret