Function at 0x14002f0c0
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 [0x1400ec028]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp rcx, 0x10
ja 0x14002f334
lea rax, [rbx - 1]
test rbx, rax
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14002f66f
mov r15, qword [0x1400f24b0]
test r15, r15
je 0x14002f672
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r12, r12
je 0x14002f138
bsr rcx, r12
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400da260]
mov cl, byte [rdx + rcx]
mov rbp, r12
shr rbp, cl
and ebp, 7
lea rcx, [0x1400da2b0]
mov rcx, qword [rcx + rdx*8]
and rcx, r12
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400d9a40]
movzx r14d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r15], 2
je 0x14002f67f
cmp byte [r15 + 2], 0
je 0x14002f697
mov ebx, dword [0x1400f5420]
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 0x14002f556
cmp rbx, 2
jb 0x14002f6d8
inc qword [rbx + 0x5a0]
cmp word [0x1400ef230], r14w
jb 0x14002f265
mov rsi, r14
shl rsi, 4
mov rbp, rbx
add rbp, rsi
mov rdi, qword [rbx + rsi]
test rdi, rdi
je 0x14002f524
inc qword [rbx + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14002f4fe
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14002f750
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 0x14002f273
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140066890
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 0x14002f2c4
jmp 0x14002f56a
pause
dec eax
jne 0x14002f29f
add ebx, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebx, 0x3e8
jl 0x14002f291
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
je 0x14002f30b
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002f4f7
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14002f750
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14002f244
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.140040570
mov rdi, rax
jmp 0x14002f2fd
mov r14, qword [0x1400f24b0]
test r14, r14
je 0x14002f755
lea rsi, [rbx - 1]
test rbx, rsi
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14002f762
cmp rbx, 0x100001
jae 0x14002f765
cmp rbx, 0x4001
jb 0x14002f37f
cmp r12, 0xf0001
jae 0x14002f7a4
cmp rbx, 0x4000
ja 0x14002f658
cmp r12, rbx
jae 0x14002f505
mov r15, rbx
mov ebx, 0x4000
cmp r15, r12
jb 0x14002f798
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r15, r15
je 0x14002f3c7
bsr rcx, r15
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x1400da260]
mov cl, byte [rdx + rcx]
mov rbp, r15
shr rbp, cl
and ebp, 7
lea rcx, [0x1400da2b0]
mov rcx, qword [rcx + rdx*8]
and rcx, r15
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400d9a40]
movzx r13d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r14], 2
je 0x14002f768
mov qword [rsp + 0x38], rsi
cmp byte [r14 + 2], 0
je 0x14002f6f0
cmp rbx, 0x4000
ja 0x14002f6f0
mov esi, dword [0x1400f5420]
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 0x14002f638
cmp rsi, 2
jb 0x14002f780
inc qword [rsi + 0x5a0]
cmp word [0x1400ef230], r13w
jb 0x14002f645
mov rbp, r13
shl rbp, 4
mov r12, rsi
add r12, rbp
mov rdi, qword [rsi + rbp]
test rdi, rdi
je 0x14002f579
inc qword [rsi + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14002f563
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14002f750
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 0x14002f59f
test qword [rsp + 0x38], rdi
je 0x14002f244
int3
xor ecx, ecx
jmp 0x14002f2f6
xor eax, eax
jmp 0x14002f221
mov rax, r12
dec rax
je 0x14002f54f
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
jmp 0x14002f395
inc qword [rbx + 0x5b8]
inc qword [rbx + 0x5b0]
mov rcx, rbx
mov rdx, r14
call fcn.140054c40
mov rdi, qword [rbp]
test rdi, rdi
jne 0x14002f1ff
jmp 0x14002f273
mov ecx, 0x40
jmp 0x14002f515
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14002f1bf
xor eax, eax
jmp 0x14002f4c2
mov eax, edi
test edi, edi
jg 0x14002f29f
jmp 0x14002f2a7
inc qword [rsi + 0x5b8]
inc qword [rsi + 0x5b0]
mov rcx, rsi
mov rdx, r13
call fcn.140054c40
mov rdi, qword [r12]
test rdi, rdi
jne 0x14002f4a0
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 0x14002f5f8
jmp 0x14002f660
pause
dec eax
jne 0x14002f5d3
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x14002f5c4
mov rcx, r12
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
jne 0x14002f725
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.140040570
mov rdi, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14002f4e9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14002f460
inc qword [rsi + 0x5c0]
inc qword [rsi + 0x5b0]
jmp 0x14002f59f
mov r15, r12
jmp 0x14002f3a6
mov eax, edi
test edi, edi
jg 0x14002f5d3
jmp 0x14002f5db
int3
call fcn.1400ae110
mov r15, rax
jmp 0x14002f117
mov al, byte [0x1400ef228]
cmp al, 2
jne 0x14002f193
call fcn.1400b0070
jmp 0x14002f193
lea rsi, [r14 + r14*4]
lea r14, [r15 + 8]
mov rcx, r14
call fcn.140050790
mov rax, qword [r15 + rsi*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
jne 0x14002f2cf
lea rcx, [r15 + rsi*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
jmp 0x14002f321
lea r8, [rsp + 0x40]
mov rcx, r15
mov edx, r14d
call fcn.1400343e0
mov rdi, rax
jmp 0x14002f23f
lea r12, [r14 + 8]
mov rcx, r12
call fcn.140050790
lea rcx, [r13*4]
add rcx, r13
cmp rbx, 0x4000
ja 0x14002f7a7
mov rax, qword [r14 + rcx*8 + 0x10]
mov rdi, qword [rax]
test rdi, rdi
je 0x14002f7a7
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14002f7a0
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14002f750
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
jmp 0x14002f62a
call fcn.14008fb00
call fcn.1400ae110
mov r14, rax
jmp 0x14002f344
int3
int3
mov al, byte [0x1400ef228]
cmp al, 2
jne 0x14002f422
call fcn.1400b0070
jmp 0x14002f422
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, r13d
call fcn.1400343e0
mov rdi, rax
jmp 0x14002f4e0
mov rcx, r12
call fcn.1400b4370
xor ecx, ecx
jmp 0x14002f744
int3
lea rcx, [r14 + rcx*8]
add rcx, 0x10
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
jmp 0x14002f619