Function at 0x403990
Capabilities:
Create thread
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9448
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x174
push ebx
push esi
push edi
push 0x100
xor edi, edi
lea eax, [ebp - 0x180]
push edi
push eax
mov esi, ecx
mov byte [ebp - 0xd], 0
call fcn.004c9b50
add esp, 0xc
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x3c], 0x14
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], 0xcccccccc
mov ecx, dword [esi]
push edi
push ecx
mov dword [ebp - 4], edi
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [esi]
push 0x965
push edx
call dword [sym.imp.USER32.dll_IsDlgButtonChecked]
neg eax
sbb eax, eax
push 2
neg eax
push 0xffffffffffffffff
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 4]
push 0x100c
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, eax
cmp ebx, edi
jl 0x403cdd
mov ecx, dword [esi + 4]
push 2
push ebx
push 0x100c
push ecx
mov edi, ebx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x80]
push ecx
mov ebx, eax
xor eax, eax
push edi
mov dword [ebp - 0x14], edx
mov edx, dword [esi + 4]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x78], eax
push 0x1073
lea eax, [ebp - 0x180]
push edx
mov dword [ebp - 0x1c], 0x20
mov dword [ebp - 0x68], 0x7f
mov dword [ebp - 0x6c], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xa
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x180]
push ecx
call fcn.004c9edf
add esp, 0xc
mov dword [ebp - 0x20], eax
test eax, eax
je 0x403ac4
lea edx, [ebp - 0x180]
push 0x2a
push edx
call fcn.004c9bca
add esp, 8
mov dword [ebp - 0x28], eax
test eax, eax
je 0x403ac4
push 0xa
lea ecx, [ebp - 0x28]
push ecx
add eax, 2
push eax
call fcn.004c9edf
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov ecx, dword [esi + 4]
lea eax, [ebp - 0x80]
push eax
push edi
push 0x1073
lea edx, [ebp - 0x180]
push ecx
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x68], 0x80
mov dword [ebp - 0x6c], edx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x4e49c8
lea edx, [ebp - 0x180]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x403b0e
mov dword [ebp - 0x18], 1
jmp 0x403b2b
push 0x4e49d0
lea eax, [ebp - 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x403b2b
mov dword [ebp - 0x18], 2
mov eax, dword [esi + 4]
lea edx, [ebp - 0x80]
push edx
push edi
push 0x1073
lea ecx, [ebp - 0x180]
push eax
mov dword [ebp - 0x78], 5
mov dword [ebp - 0x68], 0x80
mov dword [ebp - 0x6c], ecx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp word [ebp - 0x180], 0x30
jne 0x403b81
cmp word [ebp - 0x17e], 0x78
jne 0x403b81
push 0x10
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x17c]
push edx
call fcn.004c9edf
add esp, 0xc
jmp 0x403b83
xor eax, eax
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x24], eax
je 0x403cdd
cmp dword [ebp - 0x1c], 0
je 0x403cdd
cmp dword [ebp - 0x18], 0
je 0x403cdd
test eax, eax
je 0x403cdd
cmp dword [ebp - 0x3c], 0
je 0x403bf2
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x38]
jg 0x403bcf
cmp eax, 0x100
jge 0x403bc6
mov eax, 0x100
push eax
lea ecx, [ebp - 0x3c]
call fcn.00445bd0
mov ecx, dword [ebp - 0x38]
mov eax, ecx
inc ecx
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x2c]
lea edx, [ebp - 0x24]
push edx
lea eax, [eax + eax*4]
lea edx, [ecx + eax*4]
push edx
call fcn.004c9f70
add esp, 0xc
test ebx, ebx
jge 0x403a26
cmp dword [ebp - 0x38], 0
je 0x403cdd
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x24]
xor edi, edi
push eax
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x24], edi
call fcn.00402dd0
mov ecx, esi
call fcn.00402d50
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], edi
cmp eax, edi
jne 0x403c74
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp - 0x180]
push str.ConEmu_Attach__PID_u__TID_u
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
lea edx, [ebp - 0x180]
push edx
push edi
push 0xffffffffffffffff
push str.Parms.detach___failed
call fcn.004263e0
add esp, 0x24
jmp 0x403cdd
lea ecx, [ebp - 0x44]
push ecx
push edi
push eax
push 0x403920
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
cmp esi, edi
jne 0x403cce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edx, [ebp - 0x180]
push str.ConEmu_Attach__PID_u__TID_u
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
lea eax, [ebp - 0x180]
push eax
push edi
push ebx
push str.Cant_start_attach_thread
call fcn.004263e0
add esp, 0x24
jmp 0x403cd2
mov byte [ebp - 0xd], 1
cmp esi, edi
je 0x403cdd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c]
pop edi
pop esi
mov dword [ebp - 4], 0xffffffff
pop ebx
test eax, eax
je 0x403cf7
push eax
call fcn.0044c4f0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret