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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r9
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1410]
mov eax, 0x1510
call fcn.140249800
sub rsp, rax
mov rbx, qword [rbp + 0x1460]
lea r10, [r9 - 0x1000]
add rbx, 0xfff
mov r13, r8
and rbx, 0xfffffffffffff000
mov rsi, rdx
add r10, rbx
mov qword [rsp + 0x58], rbx
mov r14, rcx
cmp r10, r9
jb 0x140058d80
mov r8d, dword [rdx + 0xe3c0]
lea r9, [0x1403efb80]
xor ecx, ecx
mov dword [rsp + 0x44], ecx
mov r15, qword [r9 + r8*8]
cmp r15, r10
jae 0x14005863d
movabs rdi, 0x7000000000000000
movabs r11, 0x6fffffffffffffff
nop dword [rax]
bsr rax, rdi
inc ecx
xor edx, edx
mov dword [rsp + 0x44], ecx
inc r8d
mov dword [rsp + 0x60], eax
lea ecx, [rax + 1]
cmp ecx, 0xe
lea eax, [rcx - 0xe]
mov ecx, reloc.WS2_32.dll_inet_ntoa
cmovae edx, eax
test edx, edx
je 0x14005861b
lea ecx, [rdx + 0xb]
mov rax, r11
shr rax, cl
and eax, 3
lea eax, [rax + rdx*4]
cmp r8d, eax
jae 0x140058d80
mov r15, qword [r9 + r8*8]
mov ecx, dword [rsp + 0x44]
cmp r15, r10
jb 0x1400585f0
mov rdx, qword [rsi + 0xe3b8]
mov rcx, r14
call fcn.14007bd20
mov rdi, rax
test rax, rax
je 0x140058d80
mov rax, qword [r13 + 8]
lea rcx, [0x14028e180]
mov byte [rsp + 0x40], 0
mov r12d, 1
mov byte [rbp + 0x1460], 0
nop
mov qword [rsp + 0x50], rax
nop
cmp rax, rcx
jne 0x1400586ba
mov eax, dword [r13]
mov r9d, 0x1000
mov dword [rsp + 0x30], eax
mov r8, r15
lea rax, [rbp + 0x1460]
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, r14
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call fcn.14007a100
mov rdx, rax
jmp 0x140058d69
test r14, r14
jne 0x1400589a7
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 qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x48]
test rbx, rbx
jne 0x14005898e
mov ecx, 0xa50
call fcn.140026730
mov rbx, rax
test rax, rax
je 0x1400590bc
xor ecx, ecx
mov byte [rax], r14b
xor eax, eax
mov qword [rsp + 0x78], rcx
xorps xmm0, xmm0
mov qword [rbp - 0x80], rcx
mov qword [rbp - 0x78], rcx
xor edx, edx
mov qword [rbp - 0x70], rcx
mov r8d, 0xb0
mov qword [rbp - 0x68], rcx
mov qword [rbp - 0x60], rcx
mov qword [rbp - 0x58], rcx
mov qword [rbp - 0x50], rcx
mov qword [rbp - 0x48], rcx
mov qword [rbp - 0x40], rcx
mov qword [rbp - 0x38], rcx
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x18], rcx
mov qword [rbp - 0x10], rcx
mov qword [rbp - 8], rcx
mov qword [rbp], rcx
mov qword [rbp + 0x38], rcx
mov qword [rbp + 0x50], rcx
mov qword [rbp + 0x58], rcx
mov qword [rbp + 0x60], rcx
mov qword [rbp + 0x68], rcx
lea rcx, [rbp + 0x70]
mov word [rsp + 0x70], r14w
mov dword [rbp + 8], 0x3e8
mov dword [rbp + 0xc], 0x3e8
mov word [rbp + 0x10], 0xffff
movups xmmword [rbp + 0x12], xmm0
mov dword [rbp + 0x32], eax
movups xmmword [rbp + 0x22], xmm0
mov word [rbp + 0x36], ax
mov qword [rbp + 0x40], rax
mov byte [rbp + 0x48], al
call fcn.14027e650
xor ecx, ecx
mov qword [rbp + 0x120], r12
mov qword [rbp + 0x128], rcx
mov qword [rbp + 0x138], rcx
mov qword [rbp + 0x148], rcx
mov qword [rbp + 0x158], rcx
mov qword [rbp + 0x168], rcx
mov qword [rbp + 0x178], rcx
mov qword [rbp + 0x188], rcx
mov qword [rbp + 0x198], rcx
mov qword [rbp + 0x1a8], rcx
mov qword [rbp + 0x1b8], rcx
mov qword [rbp + 0x1c8], rcx
mov qword [rbp + 0x1d8], rcx
mov qword [rbp + 0x1e8], rcx
mov qword [rbp + 0x1f8], rcx
mov qword [rbp + 0x208], rcx
mov qword [rbp + 0x218], rcx
mov qword [rbp + 0x228], rcx
mov qword [rbp + 0x238], rcx
mov qword [rbp + 0x248], rcx
mov qword [rbp + 0x130], r12
mov qword [rbp + 0x140], r12
mov qword [rbp + 0x150], r12
mov qword [rbp + 0x160], r12
mov qword [rbp + 0x170], r12
mov qword [rbp + 0x180], r12
mov qword [rbp + 0x190], r12
mov qword [rbp + 0x1a0], r12
mov qword [rbp + 0x1b0], r12
mov qword [rbp + 0x1c0], r12
mov qword [rbp + 0x1d0], r12
mov qword [rbp + 0x1e0], r12
mov qword [rbp + 0x1f0], r12
mov qword [rbp + 0x200], r12
mov qword [rbp + 0x210], r12
mov qword [rbp + 0x220], r12
mov qword [rbp + 0x230], r12
mov qword [rbp + 0x240], r12
mov qword [rbp + 0x250], r12
xor eax, eax
mov qword [rbp + 0x258], rcx
mov qword [rbp + 0x268], rcx
xor edx, edx
mov qword [rbp + 0x278], rcx
mov r8d, 0x6d8
mov qword [rbp + 0x288], rcx
mov qword [rbp + 0x298], rcx
mov qword [rbp + 0x2a8], rcx
mov qword [rbp + 0x2b0], rcx
mov qword [rbp + 0x2b8], rcx
mov qword [rbp + 0x2c0], rcx
mov qword [rbp + 0x2c8], rcx
lea rcx, [rbp + 0x2d0]
mov dword [rbp + 0x2a1], eax
mov word [rbp + 0x2a5], ax
mov byte [rbp + 0x2a7], al
mov qword [rbp + 0x260], r12
mov qword [rbp + 0x270], r12
mov qword [rbp + 0x280], r12
mov qword [rbp + 0x290], r12
mov byte [rbp + 0x2a0], 6
call fcn.14027e650
lea rcx, [rbx + 8]
mov qword [rbp + 0x9a8], r14
lea rdx, [rsp + 0x70]
mov byte [rbp + 0x9b0], r14b
mov r8d, 0xa48
call fcn.14027dfb0
mov ecx, dword [0x1405f78c0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400590ce
lea rcx, [rbx + 8]
cmp byte [rcx + 0x330], 0
je 0x1400589aa
xor edx, edx
call fcn.140026d50
mov rcx, rax
jmp 0x1400589aa
mov rcx, r14
inc byte [rcx + 1]
cmp byte [rcx + 0x330], 0
jne 0x1400589bb
call fcn.140027910
mov eax, dword [r13]
mov r9d, 0x1000
mov dword [rsp + 0x30], eax
mov r8, r15
lea rax, [rbp + 0x1460]
xor edx, edx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x50]
mov rcx, rax
call qword [rax]
mov qword [rsp + 0x48], rax
mov rdx, rax
test r14, r14
jne 0x140058d4e
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 qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x50]
test rbx, rbx
jne 0x140058d30
mov ecx, 0xa50
call fcn.140026730
mov rbx, rax
test rax, rax
je 0x1400590bc
xor ecx, ecx
mov byte [rax], r14b
xor eax, eax
mov qword [rbp + 0x9c8], rcx
xorps xmm0, xmm0
mov qword [rbp + 0x9d0], rcx
mov qword [rbp + 0x9d8], rcx
xor edx, edx
mov qword [rbp + 0x9e0], rcx
mov r8d, 0xb0
mov qword [rbp + 0x9e8], rcx
mov qword [rbp + 0x9f0], rcx
mov qword [rbp + 0x9f8], rcx
mov qword [rbp + 0xa00], rcx
mov qword [rbp + 0xa08], rcx
mov qword [rbp + 0xa10], rcx
mov qword [rbp + 0xa18], rcx
mov qword [rbp + 0xa20], rcx
mov qword [rbp + 0xa28], rcx
mov qword [rbp + 0xa30], rcx
mov qword [rbp + 0xa38], rcx
mov qword [rbp + 0xa40], rcx
mov qword [rbp + 0xa48], rcx
mov qword [rbp + 0xa50], rcx
mov qword [rbp + 0xa88], rcx
mov qword [rbp + 0xaa0], rcx
mov qword [rbp + 0xaa8], rcx
mov qword [rbp + 0xab0], rcx
mov qword [rbp + 0xab8], rcx
lea rcx, [rbp + 0xac0]
mov word [rbp + 0x9c0], r14w
mov dword [rbp + 0xa58], 0x3e8
mov dword [rbp + 0xa5c], 0x3e8
mov word [rbp + 0xa60], 0xffff
movups xmmword [rbp + 0xa62], xmm0
mov dword [rbp + 0xa82], eax
movups xmmword [rbp + 0xa72], xmm0
mov word [rbp + 0xa86], ax
mov qword [rbp + 0xa90], rax
mov byte [rbp + 0xa98], al
call fcn.14027e650
xor ecx, ecx
mov qword [rbp + 0xb70], r12
mov qword [rbp + 0xb78], rcx
mov qword [rbp + 0xb88], rcx
mov qword [rbp + 0xb98], rcx
mov qword [rbp + 0xba8], rcx
mov qword [rbp + 0xbb8], rcx
mov qword [rbp + 0xbc8], rcx
mov qword [rbp + 0xbd8], rcx
mov qword [rbp + 0xbe8], rcx
mov qword [rbp + 0xbf8], rcx
mov qword [rbp + 0xc08], rcx
mov qword [rbp + 0xc18], rcx
mov qword [rbp + 0xc28], rcx
mov qword [rbp + 0xc38], rcx
mov qword [rbp + 0xc48], rcx
mov qword [rbp + 0xc58], rcx
mov qword [rbp + 0xc68], rcx
mov qword [rbp + 0xc78], rcx
mov qword [rbp + 0xc88], rcx
mov qword [rbp + 0xc98], rcx
mov qword [rbp + 0xb80], r12
mov qword [rbp + 0xb90], r12
mov qword [rbp + 0xba0], r12
mov qword [rbp + 0xbb0], r12
mov qword [rbp + 0xbc0], r12
mov qword [rbp + 0xbd0], r12
mov qword [rbp + 0xbe0], r12
mov qword [rbp + 0xbf0], r12
mov qword [rbp + 0xc00], r12
mov qword [rbp + 0xc10], r12
mov qword [rbp + 0xc20], r12
mov qword [rbp + 0xc30], r12
mov qword [rbp + 0xc40], r12
mov qword [rbp + 0xc50], r12
mov qword [rbp + 0xc60], r12
mov qword [rbp + 0xc70], r12
mov qword [rbp + 0xc80], r12
mov qword [rbp + 0xc90], r12
mov qword [rbp + 0xca0], r12
xor eax, eax
mov qword [rbp + 0xca8], rcx
mov qword [rbp + 0xcb8], rcx
xor edx, edx
mov qword [rbp + 0xcc8], rcx
mov r8d, 0x6d8
mov qword [rbp + 0xcd8], rcx
mov qword [rbp + 0xce8], rcx
mov qword [rbp + 0xcf8], rcx
mov qword [rbp + 0xd00], rcx
mov qword [rbp + 0xd08], rcx
mov qword [rbp + 0xd10], rcx
mov qword [rbp + 0xd18], rcx
lea rcx, [rbp + 0xd20]
mov dword [rbp + 0xcf1], eax
mov word [rbp + 0xcf5], ax
mov byte [rbp + 0xcf7], al
mov qword [rbp + 0xcb0], r12
mov qword [rbp + 0xcc0], r12
mov qword [rbp + 0xcd0], r12
mov qword [rbp + 0xce0], r12
mov byte [rbp + 0xcf0], 6
call fcn.14027e650
lea rcx, [rbx + 8]
mov qword [rbp + 0x13f8], r14
lea rdx, [rbp + 0x9c0]
mov byte [rbp + 0x1400], r14b
mov r8d, 0xa48
call fcn.14027dfb0
mov ecx, dword [0x1405f78c0]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400590ce
lea rax, [rbx + 8]
cmp byte [rax + 0x330], 0
je 0x140058d47
xor edx, edx
mov rcx, rax
call fcn.140026d50
mov rdx, qword [rsp + 0x48]
jmp 0x140058d51
mov rax, r14
sub byte [rax + 1], r12b
jne 0x140058d64
mov rcx, rax
call fcn.140027910
mov rdx, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
test rdx, rdx
jne 0x140058db7
mov rdx, qword [rsi + 0xe3b8]
mov r8, rdi
mov rcx, r14
call fcn.14007be30
lea rcx, [rsi + 0xe408]
mov byte [rsi + 0xe410], 0
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor eax, eax
lea r11, [rsp + 0x1510]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lock xadd qword [rsi + 0xf238], r12
movzx ecx, byte [rbp + 0x1460]
mov r9d, 0xe8
movzx eax, byte [rsp + 0x40]
and rcx, 0xfffffffffffffffd
mov r8d, dword [rsi + 0xe39c]
and qword [rdi + 0x10], 0xfff
and r8, 0xfffffffffe800fff
and qword [rdi], 0xfffffffffe800000
or qword [rdi + 0x10], r15
mov qword [rdi + 8], rdx
mov edx, eax
or rdx, 0x20001d00
mov qword [rdi + 0x20], r12
shl rdx, 2
or rdx, rcx
mov byte [rsp + 0x20], 0
shl rdx, 0xd
mov rcx, r14
or rdx, r8
mov r8, rdi
or qword [rdi], rdx
mov rdx, qword [rsi + 0xe3b0]
call fcn.14002b3d0
test al, al
jne 0x140058d6e
mov eax, dword [rdi]
shr rax, 0xd
test al, 1
je 0x140058e4c
mov rax, qword [rbp + 0x1470]
mov byte [rax], 1
mov rax, qword [rdi + 8]
mov r8, qword [rbp + 0x1458]
and rax, 0xfffffffffffff000
mov rdx, qword [rdi + 0x10]
and rdx, 0xfffffffffffff000
lea rcx, [rax - 1]
add rcx, rbx
neg rbx
and rcx, rbx
sub rcx, rax
lea rax, [rcx + r8]
cmp rdx, rax
jb 0x140058d80
sub rdx, rcx
xor ebx, ebx
mov r15, rdx
xor r12d, r12d
sub r15, r8
test rcx, rcx
je 0x140058ecf
mov byte [rsp + 0x30], 1
mov r9, rdi
mov qword [rsp + 0x28], rdx
mov r8, r13
mov qword [rsp + 0x20], rcx
mov rdx, rsi
mov rcx, r14
mov rbx, rdi
call fcn.140059980
mov rdi, rax
test rax, rax
jne 0x140058ec8
mov rdi, rbx
jmp 0x140058f28
mov r8, qword [rbp + 0x1458]
test r15, r15
je 0x140058f5e
mov byte [rsp + 0x30], 1
mov r9, rdi
mov qword [rsp + 0x28], r15
mov rdx, rsi
mov qword [rsp + 0x20], r8
mov rcx, r14
mov r8, r13
call fcn.140059980
mov r12, rax
test rax, rax
jne 0x140058f5e
test rbx, rbx
je 0x140058f1f
lea r9, [rsi + 0x97d8]
mov qword [rsp + 0x20], rbx
mov r8, r13
mov rdx, rsi
mov rcx, r14
call fcn.1400592a0
test rdi, rdi
je 0x140058d80
mov rdx, qword [rsi + 0xe3b0]
mov r8, rdi
mov rcx, r14
call fcn.14002b110
lea r9, [rsi + 0x97d8]
mov byte [rsp + 0x28], 1
mov r8, r13
mov qword [rsp + 0x20], rdi
mov rdx, rsi
mov rcx, r14
call fcn.140059d00
jmp 0x140058d80
test rbx, rbx
je 0x140058f7d
lea r9, [rsi + 0x97d8]
mov qword [rsp + 0x20], rbx
mov r8, r13
mov rdx, rsi
mov rcx, r14
call fcn.1400592a0
test r12, r12
je 0x140058f9c
lea r9, [rsi + 0x97d8]
mov qword [rsp + 0x20], r12
mov r8, r13
mov rdx, rsi
mov rcx, r14
call fcn.1400592a0
mov rax, qword [rbp + 0x1470]
cmp byte [rax], 0
je 0x140059030
mov rax, qword [rdi]
shr rax, 0xd
test al, 1
jne 0x140059030
mov r9, qword [rdi + 0x10]
mov rdx, r13
mov r8, qword [rdi + 8]
and r9, 0xfffffffffffff000
mov qword [rsp + 0x28], r9
and r8, 0xfffffffffffff000
mov rcx, r14
mov qword [rsp + 0x20], 0
call fcn.1400563f0
mov rdx, qword [rdi]
mov rcx, rdx
shr rcx, 0xd
test cl, 1
jne 0x140059003
test al, al
je 0x140059003
btr rdx, 0xd
mov qword [rdi], rdx
jmp 0x14005900f
bts rdx, 0xd
mov qword [rdi], rdx
test al, al
je 0x140059030
lea r9, [rsi + 0x97d8]
mov qword [rsp + 0x20], rdi
mov r8, r13
mov rdx, rsi
mov rcx, r14
call fcn.1400592a0
jmp 0x140058d80
mov eax, dword [rsi + 0xe3c4]
mov ecx, dword [rsp + 0x44]
inc ecx
add ecx, dword [rsi + 0xe3c0]
cmp ecx, eax
cmova ecx, eax
mov dword [rsi + 0xe3c0], ecx
lea rcx, [rsi + 0xe408]
mov byte [rsi + 0xe410], 0
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp byte [rbp + 0x1468], 0
je 0x1400590b4
mov rax, qword [rdi]
shr rax, 0xf
test al, 1
jne 0x1400590b4
mov r8, qword [rdi + 0x10]
lea rdx, [0x14028e180]
mov rcx, qword [rdi + 8]
and r8, 0xfffffffffffff000
mov rax, qword [r13 + 8]
and rcx, 0xfffffffffffff000
nop
nop
cmp rax, rdx
jne 0x1400590ad
mov rdx, r8
call fcn.14007a1a0
mov rax, rdi
jmp 0x140058d96
xor edx, edx
call fcn.14027e650
mov rax, rdi
jmp 0x140058d96
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