Function at 0x1801f6670
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x180717100]
xor rax, rsp
mov qword [rbp - 8], rax
mov r13, rcx
mov rcx, qword [rdx]
test rcx, rcx
je 0x1801f6778
cmp dword [rcx + 8], 5
jne 0x1801f6778
mov rax, qword [rcx]
call qword [rax + 0x48]
mov r12, rax
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
mov r14d, 3
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], reloc.WS2_32.dll_ntohs
mov ecx, dword [0x18032eee8]
mov word [rbp - 0x30], cx
movzx ecx, byte [0x18032eeea]
mov byte [rbp - 0x2e], cl
mov byte [rbp - 0x2d], 0
mov r15, qword [rax]
mov rbx, qword [r15 + 8]
mov rsi, r15
cmp byte [rbx + 0x19], 0
jne 0x1801f673f
nop dword [rax + rax]
lea rcx, [rbx + 0x20]
mov rdi, qword [rcx + 0x10]
cmp qword [rcx + 0x18], 0xf
jbe 0x1801f6712
mov rcx, qword [rcx]
mov r8, rdi
cmp rdi, r14
cmova r8, r14
lea rdx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f6859
js 0x1801f6862
mov rsi, rbx
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
je 0x1801f6700
cmp byte [rsi + 0x19], 0
jne 0x1801f6778
lea rdx, [rsi + 0x20]
mov rbx, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x1801f6757
mov rdx, qword [rdx]
cmp rbx, r14
cmovb r14, rbx
mov r8, r14
lea rcx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f686b
jns 0x1801f6875
lea rax, [fcn.1801f5730]
mov qword [rbp - 0x30], rax
lea rax, str.Handshake_error
mov qword [rbp - 0x28], rax
mov eax, 0x3f0
mov word [rbp - 0x20], ax
mov qword [rbp - 0x18], r13
mov rsi, qword [r13 + 0x110]
mov rax, qword [rsi + 0x10]
lea rbx, [rax + 0x28]
xor edi, edi
test rax, rax
cmove rbx, rdi
mov ecx, dword [0x180725558]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1801f67d6
cmp qword [rax], rbx
je 0x1801f6b7f
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x1801f67c4
lea rdx, [rbp - 0x30]
mov ecx, 0x58
call fcn.1801e2240
mov rdx, rax
mov qword [rax + 0x20], rdi
lea rax, [0x180202450]
mov qword [rdx + 0x28], rax
mov qword [rdx], rdi
mov qword [rdx + 8], rdi
mov qword [rdx + 0x10], rdi
mov qword [rdx + 0x18], rdi
mov dword [rdx + 0x30], edi
mov rcx, qword [rbp - 0x30]
mov qword [rdx + 0x38], rcx
mov rcx, qword [rbp - 0x28]
mov qword [rdx + 0x40], rcx
movzx eax, word [rbp - 0x20]
mov word [rdx + 0x48], ax
mov rax, qword [rbp - 0x18]
mov qword [rdx + 0x50], rax
mov rcx, qword [rsi + 0x10]
lock inc dword [rcx + 0x30]
call fcn.1801e25b0
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.18027f010
mov rbx, qword [rsp + 0xa0]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp rdi, r14
jae 0x1801f6733
mov rbx, qword [rbx + 0x10]
jmp 0x1801f6739
cmp rbx, 3
ja 0x1801f6778
cmp rsi, r15
je 0x1801f6778
mov rcx, qword [rsi + 0x40]
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x1801f688f
lock inc dword [rax + 8]
mov qword [rbp - 0x30], rcx
mov rbx, qword [rsi + 0x48]
mov qword [rbp - 0x28], rbx
mov rax, qword [rcx]
call qword [rax + 0x20]
lea rcx, [r13 + 0x518]
cmp rcx, rax
je 0x1801f68c4
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0xf
jbe 0x1801f68bb
mov rax, qword [rax]
mov rdx, rax
call fcn.18004be80
nop
test rbx, rbx
je 0x1801f68f5
mov edi, 0xffffffff
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1801f68f5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x1801f68f5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
mov r14d, listen
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], reloc.WS2_32.dll_ntohs
movsd xmm0, qword [str.pingInterval]
movsd qword [rbp - 0x30], xmm0
mov eax, dword [0x18032eec0]
mov dword [rbp - 0x28], eax
mov byte [rbp - 0x24], 0
mov r15, qword [r12]
mov rbx, qword [r15 + 8]
mov rsi, r15
cmp byte [rbx + 0x19], 0
jne 0x1801f697f
nop dword [rax]
lea rcx, [rbx + 0x20]
mov rdi, qword [rcx + 0x10]
cmp qword [rcx + 0x18], 0xf
jbe 0x1801f6952
mov rcx, qword [rcx]
mov r8, rdi
cmp rdi, r14
cmova r8, r14
lea rdx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f6aa0
js 0x1801f6aa9
mov rsi, rbx
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
je 0x1801f6940
cmp byte [rsi + 0x19], 0
jne 0x1801f69b8
lea rdx, [rsi + 0x20]
mov rbx, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x1801f6997
mov rdx, qword [rdx]
cmp rbx, r14
cmovb r14, rbx
mov r8, r14
lea rcx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f6ab2
jns 0x1801f6abc
mov dword [r13 + 0x5f8], 0x61a8
xor edi, edi
mov dword [rbp - 0x24], edi
mov r14d, listen
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], reloc.WS2_32.dll_ntohs
movsd xmm0, qword [str.pingTimeout]
movsd qword [rbp - 0x30], xmm0
movzx eax, word [0x18032eed0]
mov word [rbp - 0x28], ax
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [rbp - 0x26], al
mov byte [rbp - 0x25], dil
mov rsi, qword [r12]
mov rbx, qword [rsi + 8]
cmp byte [rbx + 0x19], dil
jne 0x1801f6a4f
nop
lea rcx, [rbx + 0x20]
mov rdi, qword [rcx + 0x10]
cmp qword [rcx + 0x18], 0xf
jbe 0x1801f6a22
mov rcx, qword [rcx]
mov r8, rdi
cmp rdi, r14
cmova r8, r14
lea rdx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f6b07
js 0x1801f6b10
mov rsi, rbx
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
je 0x1801f6a10
cmp byte [rsi + 0x19], 0
jne 0x1801f6a88
lea rdx, [rsi + 0x20]
mov rbx, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x1801f6a67
mov rdx, qword [rdx]
cmp rbx, r14
cmovb r14, rbx
mov r8, r14
lea rcx, [rbp - 0x30]
call fcn.1802c0540
test eax, eax
je 0x1801f6b19
jns 0x1801f6b23
mov dword [r13 + 0x5fc], 0xea60
mov rcx, r13
call fcn.1801f71b0
jmp 0x1801f6835
cmp rdi, r14
jae 0x1801f6973
mov rbx, qword [rbx + 0x10]
jmp 0x1801f6979
cmp rbx, 0xc
ja 0x1801f69b8
cmp rsi, r15
je 0x1801f69b8
mov rcx, qword [rsi + 0x40]
cmp dword [rcx + 8], 0
jne 0x1801f69b8
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x1801f6ae0
lock inc dword [rax + 8]
mov qword [rbp - 0x30], rcx
mov rax, qword [rsi + 0x48]
mov qword [rbp - 0x28], rax
mov rax, qword [rcx]
call qword [rax + select]
mov dword [r13 + 0x5f8], eax
lea rcx, [rbp - 0x30]
call fcn.18005a710
jmp 0x1801f69c3
cmp rdi, r14
jae 0x1801f6a43
mov rbx, qword [rbx + 0x10]
jmp 0x1801f6a49
cmp rbx, 0xb
ja 0x1801f6a88
cmp rsi, qword [r12]
je 0x1801f6a88
mov rcx, qword [rsi + 0x40]
cmp dword [rcx + 8], 0
jne 0x1801f6a88
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x1801f6b48
lock inc dword [rax + 8]
mov qword [rbp - 0x30], rcx
mov rbx, qword [rsi + 0x48]
mov qword [rbp - 0x28], rbx
mov rax, qword [rcx]
call qword [rax + select]
mov dword [r13 + 0x5fc], eax
test rbx, rbx
je 0x1801f6a93
mov rcx, rbx
call fcn.18005b900
mov rcx, r13
call fcn.1801f71b0
jmp 0x1801f6835
cmp qword [rax + 8], rdi
je 0x1801f67d6
nop
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x30]
call fcn.18020e790
nop
nop
jmp 0x1801f6835