Function at 0x140086fc0
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov r12, rdx
mov rbx, rcx
mov rax, qword [0x14021b038]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp rcx, 0x10
ja 0x140087234
lea rax, [rbx - 1]
test rbx, rax
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14008756f
mov r15, qword [0x140224710]
test r15, r15
je 0x140087572
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r12, r12
je 0x140087038
bsr rcx, r12
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1401f9eb0]
mov cl, byte [rdx + rcx]
mov rbp, r12
shr rbp, cl
and ebp, 7
lea rcx, [0x1401f9f00]
mov rcx, qword [rcx + rdx*8]
and rcx, r12
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1401f9690]
movzx r14d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r15], 2
je 0x14008757f
cmp byte [r15 + 2], 0
je 0x140087597
mov ebx, dword [0x140229568]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test edi, edi
jne 0x140087456
cmp rbx, 2
jb 0x1400875d8
inc qword [rbx + 0x5a0]
cmp word [0x14021eb0c], r14w
jb 0x140087165
mov rsi, r14
shl rsi, 4
mov rbp, rbx
add rbp, rsi
mov rdi, qword [rbx + rsi]
test rdi, rdi
je 0x140087424
inc qword [rbx + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x1400873fe
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x140087650
bswap rax
prefetcht0 byte [rax]
dec byte [rbx + rsi + 8]
mov qword [rbp], rax
movzx eax, word [rbx + rsi + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rbx + rsi + 0xa]
sub qword [rbx + 0x590], rax
test rdi, rdi
je 0x140087173
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140111870
mov rax, rdi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
inc qword [rbx + 0x5c0]
inc qword [rbx + 0x5b0]
lea rax, [r14 + r14*4]
lea rsi, [r15 + rax*8]
add rsi, 0x10
lea r14, [r15 + 8]
mov edi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbp
test al, al
jne 0x1400871c4
jmp 0x14008746a
pause
dec eax
jne 0x14008719f
add ebx, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebx, 0x3e8
jl 0x140087191
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
je 0x14008720b
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400873f7
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x140087650
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140087144
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.1400dccb0
mov rdi, rax
jmp 0x1400871fd
mov r14, qword [0x140224710]
test r14, r14
je 0x140087655
lea rsi, [rbx - 1]
test rbx, rsi
sete al
test rbx, rbx
setne cl
test cl, al
je 0x140087662
cmp rbx, 0x100001
jae 0x140087665
cmp rbx, 0x4001
jb 0x14008727f
cmp r12, 0xf0001
jae 0x1400876a4
cmp rbx, 0x4000
ja 0x140087558
cmp r12, rbx
jae 0x140087405
mov r15, rbx
mov ebx, 0x4000
cmp r15, r12
jb 0x140087698
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r15, r15
je 0x1400872c7
bsr rcx, r15
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1401f9eb0]
mov cl, byte [rdx + rcx]
mov rbp, r15
shr rbp, cl
and ebp, 7
lea rcx, [0x1401f9f00]
mov rcx, qword [rcx + rdx*8]
and rcx, r15
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1401f9690]
movzx r13d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r14], 2
je 0x140087668
mov qword [rsp + 0x38], rsi
cmp byte [r14 + 2], 0
je 0x1400875f0
cmp rbx, 0x4000
ja 0x1400875f0
mov esi, dword [0x140229568]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test edi, edi
jne 0x140087538
cmp rsi, 2
jb 0x140087680
inc qword [rsi + 0x5a0]
cmp word [0x14021eb0c], r13w
jb 0x140087545
mov rbp, r13
shl rbp, 4
mov r12, rsi
add r12, rbp
mov rdi, qword [rsi + rbp]
test rdi, rdi
je 0x140087479
inc qword [rsi + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x140087463
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x140087650
bswap rax
prefetcht0 byte [rax]
dec byte [rsi + rbp + 8]
mov qword [r12], rax
movzx eax, word [rsi + rbp + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rsi + rbp + 0xa]
sub qword [rsi + 0x590], rax
test rdi, rdi
je 0x14008749f
test qword [rsp + 0x38], rdi
je 0x140087144
int3
xor ecx, ecx
jmp 0x1400871f6
xor eax, eax
jmp 0x140087121
mov rax, r12
dec rax
je 0x14008744f
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
jmp 0x140087295
inc qword [rbx + 0x5b8]
inc qword [rbx + 0x5b0]
mov rcx, rbx
mov rdx, r14
call fcn.140105740
mov rdi, qword [rbp]
test rdi, rdi
jne 0x1400870ff
jmp 0x140087173
mov ecx, 0x40
jmp 0x140087415
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400870bf
xor eax, eax
jmp 0x1400873c2
mov eax, edi
test edi, edi
jg 0x14008719f
jmp 0x1400871a7
inc qword [rsi + 0x5b8]
inc qword [rsi + 0x5b0]
mov rcx, rsi
mov rdx, r13
call fcn.140105740
mov rdi, qword [r12]
test rdi, rdi
jne 0x1400873a0
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r12, [r14 + 8]
mov edi, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r12
call r13
test al, al
jne 0x1400874f8
jmp 0x140087560
pause
dec eax
jne 0x1400874d3
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x1400874c4
mov rcx, r12
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
jne 0x140087625
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.1400dccb0
mov rdi, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400873e9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140087360
inc qword [rsi + 0x5c0]
inc qword [rsi + 0x5b0]
jmp 0x14008749f
mov r15, r12
jmp 0x1400872a6
mov eax, edi
test edi, edi
jg 0x1400874d3
jmp 0x1400874db
int3
call fcn.140181ea0
mov r15, rax
jmp 0x140087017
mov al, byte [0x14021ead8]
cmp al, 2
jne 0x140087093
call fcn.1401805f0
jmp 0x140087093
lea rsi, [r14 + r14*4]
lea r14, [r15 + 8]
mov rcx, r14
call fcn.1400fcd30
mov rax, qword [r15 + rsi*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
jne 0x1400871cf
lea rcx, [r15 + rsi*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
jmp 0x140087221
lea r8, [rsp + 0x40]
mov rcx, r15
mov edx, r14d
call fcn.1400a2620
mov rdi, rax
jmp 0x14008713f
lea r12, [r14 + 8]
mov rcx, r12
call fcn.1400fcd30
lea rcx, [r13*4]
add rcx, r13
cmp rbx, 0x4000
ja 0x1400876a7
mov rax, qword [r14 + rcx*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
je 0x1400876a7
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400876a0
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x140087650
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
jmp 0x14008752a
call fcn.140141530
call fcn.140181ea0
mov r14, rax
jmp 0x140087244
int3
int3
mov al, byte [0x14021ead8]
cmp al, 2
jne 0x140087322
call fcn.1401805f0
jmp 0x140087322
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, r13d
call fcn.1400a2620
mov rdi, rax
jmp 0x1400873e0
mov rcx, r12
call fcn.14019b340
xor ecx, ecx
jmp 0x140087644
int3
lea rcx, [r14 + rcx*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
jmp 0x140087519