Function at 0x405c29
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1e00
call fcn.004f4290
mov eax, dword [0x5836e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1d60], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x1d68], eax
xor ebx, ebx
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x1d64], eax
lea edi, [ebp - 0x1d80]
xor eax, eax
mov dword [ebp - 0x1e00], 0x44
stosd dword es:[edi], eax
push 0x40
push ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1dfc]
push eax
call fcn.004f5a90
push 0x38
lea eax, [ebp - 0x1db8]
mov dword [ebp - 0x1dbc], 0x3c
push ebx
push eax
call fcn.004f5a90
or dword [ebp - 0x1d5c], 0xffffffff
add esp, 0x18
mov dword [ebp - 0x1d54], ebx
mov dword [ebp - 0x1d58], ebx
mov dword [ebp - 0x1d6c], ebx
mov dword [ebp - 0x1d70], ebx
cmp dword [ebp - 0x1d60], ebx
je 0x40625f
test esi, esi
je 0x40625f
cmp dword [ebp - 0x1d68], ebx
je 0x40625f
cmp dword [ebp + 0x14], ebx
je 0x40625f
mov ecx, dword [0x5a23ec]
push 1
call fcn.004673c5
mov edi, dword [ebp - 0x1d64]
test eax, eax
je 0x405d41
push dword [ebp + 0x1c]
lea eax, [ebp - 0x104]
push edi
push dword [ebp + 0x14]
push dword [ebp - 0x1d68]
push esi
push dword [ebp - 0x1d60]
push str.CAttachDlg::StartAttach_HWNDx_08X__PID_u__Bits_u__Type_u__AltMode_u__Leave_u
push eax
call fcn.00401133
mov ecx, dword [0x5a22a0]
lea eax, [ebp - 0x104]
add esp, 0x20
push 1
push 1
push eax
call fcn.00410feb
lea eax, [ebp - 0x1d50]
push eax
push dword [ebp - 0x1d60]
call fcn.004e6218
pop ecx
pop ecx
test eax, eax
je 0x405db5
push 0x30
push 0x12
call fcn.004e5df2
push ebx
push ebx
push ebx
push dword [0x5a22a4]
mov dword [ebp - 0x1d54], eax
push eax
push dword [ebp - 0x1d3c]
call fcn.004e6070
add esp, 0x20
mov dword [ebp - 0x1d58], eax
test eax, eax
je 0x405d9b
cmp dword [eax], 0x34
jb 0x405d9b
cmp dword [eax + 0x30], ebx
je 0x405d9b
mov bl, 1
jmp 0x40625f
lea eax, [ebp - 0x1d54]
push eax
call fcn.004e5ccc
lea eax, [ebp - 0x1d58]
push eax
call fcn.004e5ccc
pop ecx
pop ecx
push esi
push 0x5231fc
lea eax, [ebp - 0x40c]
push 0x523200
push eax
call fcn.00403bcb
add esp, 0x10
push ebx
push ebx
push 3
call fcn.004e4204
push eax
push ebx
push 0xc0000000
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1d64], eax
test eax, eax
je 0x405e43
cmp eax, 0xffffffff
je 0x405e43
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x44
push 0x12
call fcn.004e5df2
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
pop ecx
pop ecx
mov dword [ebp - 0x1d54], eax
call esi
mov ecx, dword [ebp - 0x1d54]
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x1d54]
mov eax, dword [0x5a22a4]
mov dword [ecx + 0x34], eax
mov eax, dword [ebp - 0x1d54]
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 0x40], ecx
jmp 0x406154
push esi
push 0x5231fc
lea eax, [ebp - 0x40c]
push str._spipeConEmuHk_u
push eax
call fcn.00403bcb
add esp, 0x10
push ebx
push ebx
push 3
call fcn.004e4204
push eax
push ebx
push 0xc0000000
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1d6c], eax
test eax, eax
je 0x405e95
cmp eax, 0xffffffff
je 0x405e95
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406103
mov eax, dword [0x5a22a0]
add eax, 0xea4
push eax
push 0x144
lea eax, [ebp - 0x894]
push eax
call fcn.00401a0b
cmp dword [ebp - 0x1d68], 0x40
mov ecx, 0x523280
mov eax, 0x523260
cmovne eax, ecx
push eax
push 0x144
lea eax, [ebp - 0x894]
push eax
call fcn.004019cd
test edi, edi
je 0x405f05
cmp dword [ebp + 0x14], 1
jne 0x405f05
push dword [0x5a22a4]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push esi
lea eax, [ebp - 0x204]
push str.__ATTACH__CONPID_u__GID_u__GHWND_08X
push eax
call fcn.00401133
add esp, 0x14
jmp 0x405f1c
push esi
lea eax, [ebp - 0x204]
push str.__INJECT_u
push eax
call fcn.00401133
add esp, 0xc
mov edi, ebx
xor eax, eax
mov dword [ebp - 0x1dd4], 1
cmp dword [ebp + 0x14], 2
mov word [ebp - 0x1dd0], ax
jne 0x405f41
mov ecx, dword [0x5a22a0]
push esi
call fcn.0040d460
push esi
push ebx
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1d70], eax
test eax, eax
jne 0x405fe4
call esi
mov eax, dword [0x5a22a4]
mov ecx, 0x140
mov dword [ebp - 0x1db4], eax
test edi, edi
mov eax, 0x8140
mov dword [ebp - 0x1db0], str.runas
cmovne eax, ecx
mov dword [ebp - 0x1da0], 2
mov dword [ebp - 0x1db8], eax
lea eax, [ebp - 0x894]
mov dword [ebp - 0x1dac], eax
lea eax, [ebp - 0x204]
mov dword [ebp - 0x1da8], eax
mov eax, dword [0x5a22a0]
add eax, 0xea4
mov dword [ebp - 0x1da4], eax
lea eax, [ebp - 0x1dbc]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
setne cl
test eax, eax
je 0x406020
mov eax, dword [ebp - 0x1d84]
mov dword [ebp - 0x1d80], eax
jmp 0x406020
lea eax, [ebp - 0x1d80]
mov ecx, 0xc000020
push eax
lea eax, [ebp - 0x1e00]
test edi, edi
push eax
push ebx
push ebx
mov eax, 0x4000030
cmovne eax, ecx
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x894]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne cl
test cl, cl
jne 0x406097
call esi
mov esi, eax
mov ecx, str.console
lea eax, [ebp - 0x204]
test edi, edi
push eax
lea eax, [ebp - 0x894]
push eax
mov eax, str.injection
cmove eax, ecx
push eax
lea eax, [ebp - 0xc9c]
push str.Cant_start__s_server_n_s__s
push eax
call fcn.00403be4
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x104]
push str.ConEmu_Attach__PID_u__TID_u
push eax
call fcn.00401133
push ebx
lea eax, [ebp - 0x104]
push eax
push ebx
lea eax, [ebp - 0xc9c]
push esi
push eax
call fcn.00420ad9
add esp, 0x24
jmp 0x406249
test edi, edi
jne 0x406194
push 0xffffffffffffffff
push dword [ebp - 0x1d80]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
or dword [ebp - 0x1d5c], 0xffffffff
lea eax, [ebp - 0x1d5c]
push eax
push dword [ebp - 0x1d80]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x1d80]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1d7c], ebx
je 0x4060e7
push dword [ebp - 0x1d7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1d5c], 0x81
je 0x406103
cmp dword [ebp - 0x1d5c], 0x90
jne 0x406249
push 0x44
push 0x36
call fcn.004e5df2
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
pop ecx
pop ecx
mov dword [ebp - 0x1d54], eax
call esi
cmp dword [ebp + 0x14], 2
mov ecx, dword [ebp - 0x1d54]
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x1d54]
mov eax, dword [0x5a22a4]
mov dword [ecx + 0x34], eax
mov eax, dword [ebp - 0x1d54]
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 0x40], ecx
jne 0x406154
mov eax, dword [ebp - 0x1d54]
mov ecx, dword [ebp - 0x1d60]
mov dword [eax + 0x38], ecx
push ebx
push ebx
push ebx
push dword [0x5a22a4]
lea eax, [ebp - 0x40c]
push 0x1f4
push dword [ebp - 0x1d54]
push eax
call fcn.004e5b10
mov edx, eax
add esp, 0x1c
mov dword [ebp - 0x1d58], edx
test edx, edx
je 0x40619b
mov eax, dword [ebp - 0x1d54]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jb 0x40619b
cmp dword [edx + 0x30], ebx
je 0x40619b
mov bl, 1
jmp 0x406249
push str.Failed_to_start_console_server_in_the_remote_process
mov edi, 0xff
lea eax, [ebp - 0x60c]
push edi
push eax
call fcn.00401a0b
mov eax, dword [ebp - 0x1d64]
test eax, eax
je 0x4061d3
cmp eax, 0xffffffff
je 0x4061d3
push str._nFar_ConEmu_plugin_was_loaded
push edi
lea eax, [ebp - 0x60c]
push eax
call fcn.004019cd
mov eax, dword [ebp - 0x1d6c]
test eax, eax
je 0x4061f4
cmp eax, 0xffffffff
je 0x4061f4
push str._nHooks_already_were_set
push edi
lea eax, [ebp - 0x60c]
push eax
call fcn.004019cd
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call esi
push eax
lea eax, [ebp - 0x104]
push str.ConEmu_Attach__PID_u__TID_u
push eax
call fcn.00401133
mov edx, dword [ebp - 0x1d58]
add esp, 0x10
test edx, edx
je 0x40622d
mov eax, dword [ebp - 0x1d54]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jb 0x40622d
mov eax, dword [edx + 0x34]
jmp 0x406230
or eax, 0xffffffff
push ebx
lea ecx, [ebp - 0x104]
push ecx
push ebx
push eax
lea eax, [ebp - 0x60c]
push eax
call fcn.00420ad9
add esp, 0x14
mov eax, dword [ebp - 0x1d70]
test eax, eax
je 0x40625f
cmp eax, 0xffffffff
je 0x40625f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1d54]
push eax
call fcn.004e5ccc
lea eax, [ebp - 0x1d58]
push eax
call fcn.004e5ccc
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f4166
leave
ret