Function at 0x1010630
Capabilities:
Create pipe
Create thread
Terminate thread

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov ebx, 1
push ebx
lea eax, [esp + 0x24]
push eax
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
xor ebp, ebp
push ebp
push ebp
push ebx
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x14]
push ecx
push 0x4e20
push 0x1000
push 0x1000
push 0xff
push 6
push 0x40080003
lea edx, [esp + 0x3c]
push eax
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10107d2
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov eax, dword [esi + 0xc]
push ebp
push ebp
push 3
lea edx, [esp + 0x20]
push edx
push ebp
push 0xc0000000
push eax
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x10106eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x10108ba
mov eax, dword [esi + 0xc]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x10108ba
jmp 0x10106a9
push ebp
push ebp
lea eax, [esp + 0x18]
push eax
mov ebx, 2
push edi
mov dword [esi + 8], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x101071f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [esi + 8], ebx
je 0x101073a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 0x1c
mov dword [esi + 0x24], edi
call fcn.0108e46c
add esp, 4
cmp eax, ebp
je 0x101076d
mov dword [eax], 0x1001d08
mov dword [eax + 4], ebp
mov dword [eax + 8], 0x11
mov dword [eax + 0xc], ebp
mov dword [eax + 0x10], ebp
mov dword [eax + 0x14], ebp
mov dword [eax + 0x18], 0xa
jmp 0x101076f
xor eax, eax
cmp eax, ebp
mov dword [esi + 0x34], eax
jne 0x101078c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, esi
mov dword [esi + 0x28], 0xffffffff
call fcn.01013000
test eax, eax
jne 0x1010866
mov ecx, dword [esi + 0x34]
cmp ecx, ebp
je 0x10107b0
mov edx, dword [ecx]
push 1
call dword [edx + 4]
mov eax, dword [esi + 0x24]
cmp eax, 0xffffffff
je 0x10108ba
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 0x1c
mov dword [esi + 8], ebx
call fcn.0108e46c
add esp, 4
cmp eax, ebp
je 0x1010805
mov dword [eax], 0x1001d08
mov dword [eax + 4], ebp
mov dword [eax + 8], 0x11
mov dword [eax + 0xc], ebp
mov dword [eax + 0x10], ebp
mov dword [eax + 0x14], ebp
mov dword [eax + 0x18], 0xa
jmp 0x1010807
xor eax, eax
cmp eax, ebp
mov dword [esi + 0x2c], eax
jne 0x1010824
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push ebp
push ebp
push esi
push 0x100f930
push ebp
push ebp
mov dword [esi + 0x28], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebp
mov dword [esi + 0x24], eax
jne 0x1010861
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x2c]
cmp ecx, ebp
je 0x10108ba
mov eax, dword [ecx]
push ebx
call dword [eax + 4]
pop edi
mov dword [esi + 8], 3
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebx, 2
push ebp
push ebp
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebp
mov dword [esi + 0x14], eax
jne 0x10108c1
mov eax, dword [esi + 8]
cmp eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x101088e
mov ecx, dword [esi + 0x34]
cmp ecx, ebp
je 0x10108b7
jmp 0x10108b0
cmp eax, 1
jne 0x10108b7
mov eax, dword [esi + 0x24]
cmp eax, ebp
je 0x10108a9
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x24]
push eax
call ebx
mov ecx, dword [esi + 0x2c]
cmp ecx, ebp
je 0x10108b7
mov edx, dword [ecx]
push 1
call dword [edx + 4]
push edi
call ebx
mov dword [esi + 8], 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret