Function at 0x140018600
Capabilities:
Set thread local storage value

Disassembly:
test rcx, rcx
je 0x14001886c
push rbx
sub rsp, 0x50
mov qword [rsp + 0x60], rbp
mov rbx, rcx
mov qword [rsp + 0x68], rsi
lea rcx, str.master
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r13
call fcn.140016370
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r13d, 1
mov rcx, rax
mov edx, r13d
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [0x140233490]
lea rdx, [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov r11, qword [rbx + 0xd0]
test r11, r11
je 0x140018688
xor edx, edx
mov rcx, rbx
call r11
xor ecx, ecx
mov qword [rsp + 0x70], rdi
call fcn.1400754a0
mov r12, qword [rbx + 0x10]
xor ebp, ebp
mov qword [rbx + 0x70], rax
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x14001873b
nop dword [rax]
mov r8d, ebp
cmp dword [rbx + 0x18], ebp
jbe 0x1400186e2
mov r9, rbp
mov rdx, r12
nop
mov rax, qword [rbx + 8]
inc r8d
add rdx, 0x10
mov rcx, qword [r9 + rax]
mov word [rdx - 8], r13w
add r9, 0x30
mov qword [rdx - 0x10], rcx
cmp r8d, dword [rbx + 0x18]
jb 0x1400186c0
mov edx, dword [rbx + 0x18]
mov r8d, 0xc8
mov rcx, r12
call fcn.140009730
test eax, eax
jle 0x140018730
mov edi, ebp
cmp dword [rbx + 0x18], ebp
jbe 0x140018730
lea rsi, [r12 + 0xa]
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140018725
test byte [rsi], r13b
je 0x140018725
mov eax, edi
mov rdx, rbx
lea rcx, [rax + rax*2]
shl rcx, 4
add rcx, qword [rbx + 8]
call fcn.1400111d0
inc edi
add rsi, 0x10
cmp edi, dword [rbx + 0x18]
jb 0x140018703
mov eax, dword [rbx + 0x28]
test eax, eax
je 0x1400186b0
mov r13, qword [rsp + 0x40]
mov esi, ebp
cmp dword [rbx + 0x18], ebp
jbe 0x140018775
mov rdi, rbp
nop word [rax + rax]
mov rcx, qword [rbx + 8]
mov rcx, qword [rdi + rcx]
call qword [sym.imp.WS2_32.dll_closesocket]
mov r11, qword [rbx + 8]
inc esi
mov qword [rdi + r11], 0xffffffffffffffff
add rdi, 0x30
cmp esi, dword [rbx + 0x18]
jb 0x140018750
mov rcx, qword [rbx + 8]
call fcn.1400733f0
mov rcx, qword [rbx + 0x10]
mov qword [rbx + 8], rbp
call fcn.1400733f0
mov rcx, qword [rbx + 0x30]
or edx, 0xffffffff
mov qword [rbx + 0x10], rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, ebp
cmp dword [rbx + 0x40], ebp
jbe 0x1400187e7
mov rdi, rbp
mov r12, rbp
nop dword [rax]
mov rcx, qword [rbx + 0x58]
mov rcx, qword [r12 + rcx]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x50]
cmp byte [rdi + rcx + 0x2a], bpl
je 0x1400187d8
mov rcx, qword [rdi + rcx]
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
inc esi
add r12, 8
add rdi, 0x30
cmp esi, dword [rbx + 0x40]
jb 0x1400187b0
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov r11d, dword [rbx + 0x40]
mov r12, qword [rsp + 0x48]
test r11d, r11d
je 0x140018838
mov edi, r11d
mov rax, qword [rbx + 0x48]
cmp qword [rax + rbp], 0
je 0x14001882f
mov rsi, qword [rax + rbp]
or edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x14001882f
test eax, eax
jne 0x14001882f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbp, 8
dec rdi
jne 0x140018802
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x140233490]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov dword [rbx + 0x28], 2
add rsp, 0x50
pop rbx
repz ret