Function at 0x140017320
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa30]
sub rsp, 0xb30
mov rax, qword [0x1403e4f00]
xor rax, rsp
mov qword [rbp + 0xa28], rax
cmp dword [reloc.WS2_32.dll_closesocket], 0
mov r12, rdx
mov qword [rsp + 0x58], rdx
mov r14, rcx
mov qword [rsp + 0x50], rcx
je 0x140017384
call fcn.14001dc20
test al, al
je 0x140017384
mov ecx, reloc.WS2_32.dll_inet_ntoa
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
jmp 0x140017a64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x1405f78c0]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
lea r15d, [rbx + 1]
test rdi, rdi
jne 0x140017662
mov ecx, 0xa50
call fcn.140026730
mov rdi, rax
test rax, rax
je 0x140017d9a
xorps xmm0, xmm0
mov byte [rax], bl
xor eax, eax
mov word [rbp - 0x40], bx
xor edx, edx
mov dword [rbp + 0x82], eax
mov r8d, 0xb0
mov word [rbp + 0x86], ax
lea rcx, [rbp + 0xc0]
mov qword [rbp + 0x90], rax
mov byte [rbp + 0x98], al
mov qword [rbp - 0x38], rbx
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rbx
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], rbx
mov qword [rbp], rbx
mov qword [rbp + 8], rbx
mov qword [rbp + 0x10], rbx
mov qword [rbp + 0x18], rbx
mov qword [rbp + 0x20], rbx
mov qword [rbp + 0x28], rbx
mov qword [rbp + 0x30], rbx
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x48], rbx
mov qword [rbp + 0x50], rbx
mov dword [rbp + 0x58], 0x3e8
mov dword [rbp + 0x5c], 0x3e8
mov word [rbp + 0x60], 0xffff
movups xmmword [rbp + 0x62], xmm0
mov qword [rbp + 0x88], rbx
movups xmmword [rbp + 0x72], xmm0
mov qword [rbp + 0xa0], rbx
mov qword [rbp + 0xa8], rbx
mov qword [rbp + 0xb0], rbx
mov qword [rbp + 0xb8], rbx
call fcn.14027e650
mov qword [rbp + 0x170], r15
mov qword [rbp + 0x178], rbx
mov qword [rbp + 0x180], r15
mov qword [rbp + 0x188], rbx
mov qword [rbp + 0x190], r15
mov qword [rbp + 0x198], rbx
mov qword [rbp + 0x1a0], r15
mov qword [rbp + 0x1a8], rbx
mov qword [rbp + 0x1b0], r15
mov qword [rbp + 0x1b8], rbx
mov qword [rbp + 0x1c0], r15
mov qword [rbp + 0x1c8], rbx
mov qword [rbp + 0x1d0], r15
mov qword [rbp + 0x1d8], rbx
mov qword [rbp + 0x1e0], r15
mov qword [rbp + 0x1e8], rbx
mov qword [rbp + 0x1f0], r15
mov qword [rbp + 0x1f8], rbx
mov qword [rbp + 0x200], r15
mov qword [rbp + 0x208], rbx
mov qword [rbp + 0x210], r15
mov qword [rbp + 0x218], rbx
mov qword [rbp + 0x220], r15
mov qword [rbp + 0x228], rbx
mov qword [rbp + 0x230], r15
mov qword [rbp + 0x238], rbx
mov qword [rbp + 0x240], r15
mov qword [rbp + 0x248], rbx
mov qword [rbp + 0x250], r15
mov qword [rbp + 0x258], rbx
mov qword [rbp + 0x260], r15
mov qword [rbp + 0x268], rbx
mov qword [rbp + 0x270], r15
mov qword [rbp + 0x278], rbx
mov qword [rbp + 0x280], r15
mov qword [rbp + 0x288], rbx
mov qword [rbp + 0x290], r15
mov qword [rbp + 0x298], rbx
mov qword [rbp + 0x2a0], r15
mov qword [rbp + 0x2a8], rbx
mov qword [rbp + 0x2b0], r15
xor eax, eax
mov qword [rbp + 0x2b8], rbx
xor edx, edx
mov dword [rbp + 0x2f1], eax
mov r8d, 0x6d8
mov word [rbp + 0x2f5], ax
lea rcx, [rbp + 0x320]
mov byte [rbp + 0x2f7], al
mov qword [rbp + 0x2c0], r15
mov qword [rbp + 0x2c8], rbx
mov qword [rbp + 0x2d0], r15
mov qword [rbp + 0x2d8], rbx
mov qword [rbp + 0x2e0], r15
mov qword [rbp + 0x2e8], rbx
mov byte [rbp + 0x2f0], 6
mov qword [rbp + 0x2f8], rbx
mov qword [rbp + 0x300], rbx
mov qword [rbp + 0x308], rbx
mov qword [rbp + 0x310], rbx
mov qword [rbp + 0x318], rbx
call fcn.14027e650
lea rcx, [rdi + 8]
mov qword [rbp + 0x9f8], rbx
lea rdx, [rbp - 0x40]
mov byte [rbp + 0xa00], bl
mov r8d, 0xa48
call fcn.14027dfb0
mov ecx, dword [0x1405f78c0]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140017dac
add rdi, 8
cmp byte [rdi + 0x330], bl
je 0x14001767b
xor edx, edx
mov rcx, rdi
call fcn.140026d50
mov rdi, rax
mov rsi, r12
imul rsi, r14
cmp byte [rdi + 0x330], bl
jne 0x140017a01
lea r8, [0x140000000]
movabs rcx, 0x7000000000000000
mov edx, 4
test rsi, rsi
jne 0x1400176c3
test r14, r14
je 0x1400176f3
test r12, r12
je 0x1400176f3
mov ecx, reloc.WS2_32.dll_inet_ntoa
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140017a64
mov rax, r12
movabs r9, 0xffffffff00000000
or rax, r14
test r9, rax
je 0x1400176ea
xor edx, edx
mov rax, rsi
div r12
cmp rax, r14
jne 0x1400176b3
mov edx, 4
cmp rsi, 0x1000
ja 0x140017706
lea rax, [rsi + 7]
shr rax, 3
movzx r13d, byte [rax + r8 + 0x3f0900]
jmp 0x140017767
cmp rsi, rcx
jbe 0x140017713
mov r13d, 0xe8
jmp 0x140017767
lea rax, [rsi*2 - 1]
test rax, rax
je 0x140017dbe
bsr r9, rax
mov ecx, ebx
cmp r9d, 6
lea eax, [r9 - 6]
cmovae ecx, eax
lea r10d, [rcx*4]
mov ecx, edx
cmp r9d, 7
jb 0x140017749
lea ecx, [r9 - 3]
mov rdx, 0xffffffffffffffff
lea rax, [rsi - 1]
shl rdx, cl
lea r13d, [r10 + 1]
and rdx, rax
shr rdx, cl
and edx, 3
add r13d, edx
cmp r13d, 0xe8
jae 0x1400176b3
mov r12d, r13d
lea rdx, [r8 + 0x3f01c0]
mov rax, qword [rdx + r12*8]
lea rdx, [rdx + r12*8]
lea rcx, [rdi + 0x358]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x38], rdx
test rcx, rcx
je 0x140017981
cmp rsi, 0x3800
ja 0x140017889
lea rax, [r12 + r12*2]
lea r15, [rcx + rax*8]
mov rcx, qword [rcx + rax*8 + 8]
lea rax, [rcx + 8]
mov r14, qword [rcx]
cmp cx, word [r15 + 0x18]
je 0x1400177d1
mov qword [r15 + 8], rax
jmp 0x140017873
cmp cx, word [r15 + 0x1c]
je 0x1400177e6
mov qword [r15 + 8], rax
mov word [r15 + 0x18], ax
jmp 0x140017873
xor edx, edx
mov rcx, rdi
call fcn.140016150
mov qword [rsp + 0x40], rax
mov rcx, rax
test rax, rax
jne 0x140017805
mov r14, rbx
jmp 0x140017999
mov rax, qword [0x1403f69b0]
mov r9d, r13d
mov byte [rsp + 0x20], 1
cmp word [rax + r12*2], bx
jne 0x140017823
mov rdx, rcx
jmp 0x14001798b
lea r8, [r15 + 8]
mov rcx, rdi
lea rdx, [rdi + 0x358]
call fcn.140053ce0
mov rdx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [r15 + 8]
lea r8, [rdi + 0x358]
mov dword [rsp + 0x20], r13d
mov rcx, rdi
call fcn.140052ca0
mov r14, rax
cmp byte [rsp + 0x30], bl
jne 0x14001786e
mov r14, rbx
jmp 0x140017999
mov rdx, qword [rsp + 0x38]
mov r8, qword [rdx]
mov rcx, r14
xor edx, edx
call fcn.14027e650
inc qword [r15 + 0x10]
jmp 0x140017999
cmp rsi, qword [0x1403f6998]
ja 0x140017981
lea rax, [r12 + r12*2]
lea r12, [rcx + rax*8]
mov rcx, qword [rcx + rax*8 + 8]
lea rax, [rcx + 8]
mov r14, qword [rcx]
cmp cx, word [r12 + 0x18]
je 0x1400178b9
mov qword [r12 + 8], rax
jmp 0x1400178cc
cmp cx, word [r12 + 0x1c]
je 0x1400178e3
mov qword [r12 + 8], rax
mov word [r12 + 0x18], ax
mov r8, qword [rdx]
mov rcx, r14
xor edx, edx
call fcn.14027e650
inc qword [r12 + 0x10]
jmp 0x140017999
xor edx, edx
mov rcx, rdi
call fcn.140016150
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x1400178ff
mov r14, rbx
jmp 0x140017999
mov r9d, r13d
mov byte [rsp + 0x20], bl
lea r8, [r12 + 8]
mov rcx, rdi
lea rdx, [rdi + 0x358]
call fcn.140053ce0
movabs rax, 0x7000000000000000
cmp rsi, rax
jbe 0x14001792e
mov r8, rbx
jmp 0x140017964
lea rax, [rsi*2 - 1]
test rax, rax
je 0x140017dbe
bsr rcx, rax
cmp rcx, 7
jae 0x140017950
mov ecx, 4
jmp 0x140017954
add rcx, 0xfffffffffffffffd
shl r15, cl
dec r15
lea r8, [r15 + rsi]
not r15
and r8, r15
mov rdx, qword [rsp + 0x38]
mov r9b, 1
mov rcx, rdi
call fcn.1400521a0
mov r14, rax
test rax, rax
jne 0x140017999
mov r14, rbx
jmp 0x140017999
mov byte [rsp + 0x20], r15b
mov r9d, r13d
xor edx, edx
mov r8, rsi
mov rcx, rdi
call fcn.14004f580
mov r14, rax
test r14, r14
je 0x1400176b3
mov r8, qword [rsp + 0x48]
lea rcx, [rdi + 0x338]
mov qword [rsp + 0x68], rcx
lea rax, [rdi + 8]
mov qword [rsp + 0x70], rax
lea rax, [rdi + 0x10]
mov qword [rsp + 0x78], rax
lea rax, [rdi + 0x340]
mov qword [rbp - 0x80], rax
mov byte [rsp + 0x60], 1
mov rdx, qword [rcx]
lea rax, [r8 + rdx]
mov qword [rcx], rax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rax]
sub rcx, rdx
cmp r8, rcx
jb 0x1400179fc
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140059e70
mov rbx, r14
jmp 0x140017a64
lea rcx, [0x140000000]
test rsi, rsi
jne 0x140017a91
test r14, r14
je 0x140017ac0
test r12, r12
je 0x140017ac0
mov ecx, reloc.WS2_32.dll_inet_ntoa
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x50]
lea r9, [rbp + 0xa10]
mov qword [rbp + 0xa10], rax
mov r8, rbx
mov rax, qword [rsp + 0x58]
mov rdx, rbx
mov qword [rbp + 0xa18], rax
xor eax, eax
mov qword [rbp + 0xa20], rax
lea ecx, [rax + 3]
call fcn.14002ee40
mov rax, rbx
mov rcx, qword [rbp + 0xa28]
xor rcx, rsp
call fcn.140249860
mov rbx, qword [rsp + 0xb80]
add rsp, 0xb30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rax, r12
movabs r9, 0xffffffff00000000
or rax, r14
test r9, rax
je 0x140017ab7
xor edx, edx
mov rax, rsi
div r12
cmp rax, r14
jne 0x140017a23
cmp rsi, 0x1000
ja 0x140017ad3
lea rax, [rsi + 7]
shr rax, 3
movzx r13d, byte [rax + rcx + 0x3f0900]
jmp 0x140017ae5
mov rcx, rsi
call fcn.140020880
mov r13d, eax
lea rcx, [0x140000000]
cmp r13d, 0xe8
jae 0x140017a23
lea r8, [rcx + 0x3f01c0]
mov eax, r13d
lea r8, [r8 + rax*8]
mov rcx, qword [r8]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x48], r8
cmp byte [rdi + 1], bl
jg 0x140017cfd
mov r12, rbx
cmp byte [rdi], bl
je 0x140017b24
lea r12, [rdi + 0x358]
mov qword [rsp + 0x40], r12
mov rdx, rbx
test r12, r12
je 0x140017d1f
cmp rsi, 0x3800
ja 0x140017c0c
lea rax, [rax + rax*2]
mov rcx, qword [r12 + rax*8 + 8]
lea r15, [r12 + rax*8]
lea rax, [rcx + 8]
mov r14, qword [rcx]
cmp cx, word [r15 + 0x18]
je 0x140017b66
mov qword [r15 + 8], rax
jmp 0x140017bf6
cmp cx, word [r15 + 0x1c]
je 0x140017b78
mov qword [r15 + 8], rax
mov word [r15 + 0x18], ax
jmp 0x140017bf6
mov rcx, rdi
call fcn.140016150
mov r14, rax
test rax, rax
jne 0x140017b90
mov r14, rbx
jmp 0x140017d35
mov rax, qword [0x1403f69b0]
mov r9d, r13d
mov ecx, r13d
mov byte [rsp + 0x20], 1
cmp word [rax + rcx*2], bx
mov rcx, rdi
jne 0x140017bb3
mov rdx, r14
jmp 0x140017d2a
lea r8, [r15 + 8]
mov rdx, r12
call fcn.140053ce0
lea rax, [rsp + 0x31]
mov r8, r12
mov qword [rsp + 0x28], rax
lea r9, [r15 + 8]
mov rdx, r14
mov dword [rsp + 0x20], r13d
mov rcx, rdi
call fcn.140052ca0
mov r14, rax
cmp byte [rsp + 0x31], bl
jne 0x140017bf1
mov r14, rbx
jmp 0x140017d35
mov r8, qword [rsp + 0x48]
mov r8, qword [r8]
xor edx, edx
mov rcx, r14
call fcn.14027e650
inc qword [r15 + 0x10]
jmp 0x140017d35
cmp rsi, qword [0x1403f6998]
ja 0x140017d1f
lea rax, [rax + rax*2]
mov rcx, qword [r12 + rax*8 + 8]
lea r12, [r12 + rax*8]
lea rax, [rcx + 8]
mov r14, qword [rcx]
cmp cx, word [r12 + 0x18]
je 0x140017c3c
mov qword [r12 + 8], rax
jmp 0x140017c4f
cmp cx, word [r12 + 0x1c]
je 0x140017c64
mov qword [r12 + 8], rax
mov word [r12 + 0x18], ax
mov r8, qword [r8]
mov rcx, r14
call fcn.14027e650
inc qword [r12 + 0x10]
jmp 0x140017d35
mov rcx, rdi
call fcn.140016150
mov r14, rax
test rax, rax
jne 0x140017c7c
mov r14, rbx
jmp 0x140017d35
mov rdx, qword [rsp + 0x40]
lea r8, [r12 + 8]
mov r9d, r13d
mov byte [rsp + 0x20], bl
mov rcx, rdi
call fcn.140053ce0
movabs rax, 0x7000000000000000
cmp rsi, rax
jbe 0x140017ca9
mov r8, rbx
jmp 0x140017ce2
lea rax, [rsi*2 - 1]
test rax, rax
je 0x140017dbe
bsr rax, rax
cmp rax, 7
jae 0x140017ccb
mov eax, 4
jmp 0x140017ccf
add rax, 0xfffffffffffffffd
mov rcx, rax
shl r15, cl
dec r15
lea r8, [rsi + r15]
not r15
and r8, r15
mov r9b, 1
mov rdx, r14
mov rcx, rdi
call fcn.1400521a0
mov r14, rax
test rax, rax
jne 0x140017d35
mov r14, rbx
jmp 0x140017d35
movzx r8d, r15b
xor edx, edx
mov rcx, rdi
call fcn.140016810
mov rdx, rax
test rax, rax
jne 0x140017d1f
cmp dword [0x1405f7934], ebx
jbe 0x140017a23
mov byte [rsp + 0x20], r15b
mov r9d, r13d
mov rcx, rdi
mov r8, rsi
call fcn.14004f580
mov r14, rax
test r14, r14
je 0x140017a23
mov r8, qword [rsp + 0x38]
lea rcx, [rdi + 0x338]
mov qword [rbp - 0x70], rcx
lea rax, [rdi + 8]
mov qword [rbp - 0x68], rax
lea rax, [rdi + 0x10]
mov qword [rbp - 0x60], rax
lea rax, [rdi + 0x340]
mov qword [rbp - 0x58], rax
mov byte [rbp - 0x78], 1
mov rdx, qword [rcx]
lea rax, [r8 + rdx]
mov qword [rcx], rax
mov rax, qword [rbp - 0x60]
mov rcx, qword [rax]
sub rcx, rdx
cmp r8, rcx
jb 0x140017d92
lea rdx, [rbp - 0x78]
mov rcx, rdi
call fcn.140059e70
mov rbx, r14
jmp 0x140017a2e
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.140024be0
call fcn.14025c5b0
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.140024be0
call fcn.14025c5b0
int3
call fcn.14025c5b0
int3