Function at 0x40eb10
Capabilities:
Connect pipe
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc88
mov eax, dword [0x4900e8]
test eax, eax
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [esp + 0xb], 0
je 0x40eb3d
push esi
push str.WinMainClient_WtsStateProcessing_is_called_with_state__u
call fcn.0040aac0
add esp, 8
xor eax, eax
mov ecx, 0x188
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
lea eax, [esi - 1]
cmp eax, 7
ja case.0x40eb56.3
jmp dword [eax*4 + 0x40eee8]
mov ecx, 0x491840
call fcn.00415a10
cmp dword [0x491098], 8
jb case.0x40eb56.3
call fcn.00409f20
jmp 0x40ecac
cmp esi, 8
jne 0x40eb8d
mov ecx, 0x493450
call fcn.00415a10
mov ecx, dword [0x4910d8]
test ecx, ecx
je 0x40eb9c
call fcn.004177f0
cmp esi, 8
jne 0x40ebae
call fcn.0044e4f0
test eax, eax
je case.0x40eb56.3
xor eax, eax
mov ecx, 0x188
lea edi, [esp + 0x670]
rep stosd dword es:[edi], eax
mov eax, dword [0x491164]
mov dword [esp + 0x680], eax
xor eax, eax
push eax
mov ecx, 0xb
mov dword [esp + 0x67c], ecx
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x24]
push ecx
push 0x2c
lea edx, [esp + 0x30]
push edx
push 0x620
lea eax, [esp + 0x684]
push eax
push str..pipeExtEventPipe_Service
mov dword [esp + 0x68c], 0x8001
mov dword [esp + 0x690], 0x620
call dword [sym.imp.KERNEL32.dll_CallNamedPipeA]
test eax, eax
je 0x40ec23
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 1
jne 0x40ec37
mov dword [0x491178], 0
call fcn.0040e8c0
mov eax, dword [0x491178]
test eax, eax
jne 0x40ec5c
cmp esi, 8
jne 0x40ec5c
test dword [0x49109c], 0x8000000
je 0x40ec5c
mov ecx, dword [0x4900f4]
call fcn.00436a60
cmp dword [0x491098], 8
jb case.0x40eb56.3
cmp esi, 1
jne 0x40ec73
call fcn.00409f20
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
lea edx, [esp + 0xc]
mov dword [esp + 0x18], ecx
push edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], 7
call fcn.0044a2f0
mov eax, dword [0x491098]
add esp, 4
cmp eax, 8
jb case.0x40eb56.3
mov eax, dword [0x491078]
test eax, eax
je case.0x40eb56.3
mov byte [esp + 0xb], 1
jmp case.0x40eb56.3
mov ecx, 0x491840
call fcn.00415a30
cmp esi, 2
mov dword [0x493688], esi
je 0x40ecfa
cmp esi, 6
je 0x40ecfa
mov ecx, 0x493450
call fcn.00415a30
mov ecx, dword [0x4910d8]
test ecx, ecx
je 0x40ed24
push 0
call fcn.00417830
jmp 0x40ed24
mov ecx, dword [0x4910d8]
test ecx, ecx
mov dword [0x491178], 1
je 0x40ed15
push 1
call fcn.00417830
mov ecx, dword [0x4910b8]
test ecx, ecx
je 0x40ed24
call fcn.00401fe0
cmp esi, 7
jne 0x40ed6a
call fcn.0044e4f0
test eax, eax
je 0x40ed6a
mov eax, dword [0x491164]
mov dword [esp + 0x60], eax
xor eax, eax
push 1
mov ecx, 0xb
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x24]
push ecx
push 0x2c
lea edx, [esp + 0x30]
push edx
push 0x620
lea eax, [esp + 0x64]
mov dword [esp + 0x6c], 0xd
push eax
jmp 0x40edb0
mov ecx, dword [0x4910d8]
test ecx, ecx
je 0x40ed79
call fcn.00417670
mov ecx, dword [0x491164]
push 1
mov dword [esp + 0x64], ecx
xor eax, eax
lea edx, [esp + 0x24]
push edx
mov ecx, 0xb
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
push 0x2c
lea eax, [esp + 0x30]
push eax
push 0x620
lea ecx, [esp + 0x64]
mov dword [esp + 0x6c], 0xc
push ecx
push str..pipeExtEventPipe_Service
mov dword [esp + 0x70], 0x620
mov dword [esp + 0x6c], 0x8001
call dword [sym.imp.KERNEL32.dll_CallNamedPipeA]
test eax, eax
je 0x40edd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.00428c40
mov al, byte [esp + 0xb]
test al, al
mov dword [0x493688], esi
je 0x40eec8
mov eax, dword [0x4957fc]
test eax, eax
je 0x40eec8
xor edx, edx
mov dword [esp + 0x10], edx
xor eax, eax
mov dword [esp + 0x14], edx
mov ecx, 0x188
lea edi, [esp + 0x670]
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], edx
push edx
mov ecx, 0xb
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov eax, dword [0x491164]
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], edx
push ecx
lea edx, [esp + 0x678]
push edx
push str..pipeExtEventPipe_Service
mov dword [esp + 0x1c], 0
mov dword [esp + 0x688], 0x3f
mov dword [esp + 0x690], eax
call fcn.00409c00
add esp, 0x10
test eax, eax
jne 0x40ee7f
test dword [0x4900e8], 0x10000
je 0x40eea7
push str.PowerXpressSwitch:_get_defer_switch_from_global_service_fails__n
call fcn.0040aac0
add esp, 4
jmp 0x40eea7
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x10]
cmp eax, 2
je 0x40eeb5
cmp eax, 1
jne 0x40eee1
lea edx, [esp + 0xc]
push edx
call fcn.00441a80
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test dword [0x4900e8], 0x10000
je 0x40eee1
push str.Not_ready_to_switch_yet__will_switch_later_when_iGPU_driver_initialized__n
call fcn.0040aac0
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret