Function at 0x140007240
Capabilities:
Connect pipe
Create thread

Disassembly:
push rdi
sub rsp, 0x280
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x290], rbx
mov rax, qword [0x140047088]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor edi, edi
nop
mov ecx, 0x30
call fcn.14000b9a4
mov qword [rsp + 0x48], rax
xor ecx, ecx
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rcx
mov rcx, rax
call fcn.140009ea0
mov rbx, rax
mov qword [rsp + 0x60], rax
mov ecx, dword [0x140049c98]
mov dword [rsp + 0x58], ecx
inc ecx
mov dword [0x140049c98], ecx
lea rcx, [0x140049c70]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rdx, [rsp + 0x58]
call fcn.1400086f0
lea rcx, [0x140049c70]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x1400072fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
cmp eax, 0x217
jne 0x140007301
mov r9d, edi
movzx eax, byte [0x140049c68]
test al, al
jne 0x14000747e
test r9d, r9d
jne 0x14000739c
lea ecx, [r9 + 0x10]
call fcn.14000b9a4
movups xmm0, xmmword [rsp + 0x58]
movups xmmword [rax], xmm0
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rax
lea r8, [0x140007590]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
test rax, rax
jne 0x14000738e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.CreateThread___failed.___d_
mov edx, 0x100
lea rcx, [rsp + 0x70]
call fcn.140006a80
mov rcx, qword [0x140049c58]
test rcx, rcx
je 0x14000738e
lea r9, [rsp + 0x70]
lea r8, str.treadstone::TsClientCommandProcessor::WaitAndProcessLoop
lea edx, [rbx + 2]
call fcn.140002760
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140007270
lea r8, str.The_client_could_not_connect_the_pipe.___d_
mov edx, 0x100
lea rcx, [rsp + 0x70]
call fcn.140006a80
mov rcx, qword [0x140049c58]
test rcx, rcx
je 0x1400073d4
lea r9, [rsp + 0x70]
lea r8, str.treadstone::TsClientCommandProcessor::WaitAndProcessLoop
mov edx, 2
call fcn.140002760
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1400073f6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], rdi
mov rcx, rbx
call fcn.1400079c0
lea rcx, [0x140049c70]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
mov r10, qword [0x140049ca8]
mov rdx, r10
mov r9, qword [0x140049ca0]
sub rdx, r9
sar rdx, 4
test rdx, rdx
je 0x140007444
mov rax, rdi
mov r8d, dword [rsp + 0x58]
add rax, rax
cmp r8d, dword [r9 + rax*8]
je 0x140007444
inc ecx
mov eax, ecx
cmp rax, rdx
jb 0x140007432
mov qword [rsp + 0x50], r9
shl rcx, 4
add rcx, r9
mov qword [rsp + 0x68], rcx
lea rdx, [rcx + 0x10]
sub r10, rdx
mov r8, r10
call fcn.14000e2a0
sub qword [0x140049ca8], 0x10
lea rcx, [0x140049c70]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140007270
lea rcx, [rsp + 0x58]
call fcn.1400078e0
mov byte [0x140049c68], 0
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14000b980
mov rbx, qword [rsp + 0x290]
add rsp, 0x280
pop rdi
ret