Function at 0x1400d1c30
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, 0x38
mov r15, rdx
mov rdi, rcx
mov rax, qword [0x1401f5028]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x1400d1e7b
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x1400d214e
mov r12, qword [0x1401fec50]
test r12, r12
je 0x1400d2151
mov eax, 0x40
mov ecx, 0x40
test r15, r15
je 0x1400d1c9e
bsr rcx, r15
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1401d6a10]
mov cl, byte [rax + rcx]
mov rdx, r15
shr rdx, cl
and edx, 7
lea rcx, [0x1401d6a60]
mov rcx, qword [rcx + rax*8]
and rcx, r15
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401d61f8]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r12 + 2], 0
je 0x1400d21dd
mov edi, dword [0x1402003c0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test ebx, ebx
jne 0x1400d20c4
cmp rdi, 1
jbe 0x1400d2239
add qword [rdi + 0x298], 1
cmp r13w, 0x29
jb 0x1400d1df0
add qword [rdi + 0x2b8], 1
add qword [rdi + 0x2a8], 1
lea rax, [r13*4]
add rax, r13
lea rsi, [r12 + rax*8]
add rsi, 0x10
lea r14, [r12 + 8]
mov edi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, r14
call rbp
test al, al
jne 0x1400d1d99
jmp 0x1400d2013
pause
dec eax
jne 0x1400d1d77
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r13d
cmp ebx, 0x3e8
jl 0x1400d1d69
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [rsi]
mov rbp, qword [rax]
test rbp, rbp
je 0x1400d1e58
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbp]
test rcx, rcx
jne 0x1400d1e43
xor ecx, ecx
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400f32c0
mov rax, rbp
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, r13
shl rsi, 4
mov rbx, rdi
add rbx, rsi
cmp qword [rdi + rsi], 0
je 0x1400d1fdf
inc qword [rdi + 0x2a0]
mov rbp, qword [rbx]
mov rax, qword [rbp]
test rax, rax
je 0x1400d1fd1
mov rcx, rax
not rcx
cmp qword [rbp + 8], rcx
jne 0x1400d22af
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbx], rax
test rbp, rbp
jne 0x1400d1dcf
jmp 0x1400d1d3d
mov rdx, rcx
not rdx
cmp qword [rbp + 8], rdx
je 0x1400d1dbc
jmp 0x1400d22af
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r12
xor r8d, r8d
mov r9, r15
call fcn.1400c21b0
mov rbp, rax
jmp 0x1400d1dc6
mov r14, qword [0x1401fec50]
test r14, r14
je 0x1400d22b8
lea r12, [rdi - 1]
test rdi, r12
sete al
test rdi, rdi
setne cl
test cl, al
je 0x1400d2344
cmp r15, rdi
jae 0x1400d1fb2
cmp rdi, r15
jb 0x1400d2347
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x1401d6a10]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x1401d6a60]
mov rcx, qword [rcx + rax*8 + 0x208]
and rcx, rdi
lea rax, [rdx + rax*8]
add rax, 0x208
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401d61f8]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x1400d234f
mov esi, dword [0x1402003c0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r13, rax
test ebx, ebx
jne 0x1400d20f1
cmp r13, 1
jbe 0x1400d239f
inc qword [r13 + 0x298]
cmp r15w, 0x29
jae 0x1400d2022
mov rsi, r15
shl rsi, 4
mov rbx, r13
add rbx, rsi
cmp qword [r13 + rsi], 0
je 0x1400d2109
inc qword [r13 + 0x2a0]
mov rbp, qword [rbx]
mov rax, qword [rbp]
test rax, rax
je 0x1400d2102
mov rcx, rax
not rcx
cmp qword [rbp + 8], rcx
jne 0x1400d22af
bswap rax
dec byte [r13 + rsi + 8]
mov qword [rbx], rax
test rbp, rbp
je 0x1400d2030
test r12, rbp
je 0x1400d1dcf
int3
mov rax, r15
dec rax
je 0x1400d1fd8
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov edi, 1
shl rdi, cl
jmp 0x1400d1eac
xor eax, eax
jmp 0x1400d1e2f
mov ecx, 0x40
jmp 0x1400d1fc2
movdqu xmm0, xmmword [rdi + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [rdi + 0x2a8], xmm0
mov rcx, rdi
mov rdx, r13
call fcn.1400c2020
mov rbp, qword [rbx]
test rbp, rbp
jne 0x1400d1e12
jmp 0x1400d1d3d
mov eax, edi
test edi, edi
jg 0x1400d1d77
jmp 0x1400d1d7f
inc qword [r13 + 0x2b8]
inc qword [r13 + 0x2a8]
lea rax, [r15 + r15*4]
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r15, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r13
test al, al
jne 0x1400d2083
jmp 0x1400d213f
pause
dec eax
jne 0x1400d205d
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400d204e
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [rsi]
mov rbp, qword [rax]
test rbp, rbp
je 0x1400d20d1
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbp]
test rcx, rcx
je 0x1400d20fe
mov rdx, rcx
not rdx
cmp qword [rbp + 8], rdx
jne 0x1400d22af
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400d1fa6
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400d1d10
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.1400c21b0
mov rbp, rax
jmp 0x1400d20b6
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400d1f36
xor ecx, ecx
jmp 0x1400d20ac
xor eax, eax
jmp 0x1400d1f92
movdqu xmm0, xmmword [r13 + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [r13 + 0x2a8], xmm0
mov rcx, r13
mov rdx, r15
call fcn.1400c2020
mov rbp, qword [rbx]
test rbp, rbp
jne 0x1400d1f75
jmp 0x1400d2030
mov eax, ebx
test ebx, ebx
jg 0x1400d205d
jmp 0x1400d2065
int3
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1401fec58], cl
jne 0x1400d2153
mov r12, qword [0x1401fec50]
test r12, r12
jne 0x1400d21d1
mov dword [0x1401fec60], 0x1000000
lea r12, [0x1401fec60]
mov byte [0x1401fec66], 1
mov byte [0x140200098], 0
mov qword [0x140200170], 0
lea rcx, [0x1401fec68]
mov r8d, 0x1408
xor edx, edx
call fcn.1400f5b50
lea rcx, [0x1402000a0]
mov r8d, 0xca
xor edx, edx
call fcn.1400f5b50
mov rcx, r12
mov edx, 0x1010100
call fcn.1400e93c0
mov qword [0x1401fec50], r12
mov byte [0x1401fec58], 0
jmp 0x1400d1c87
lea rax, [r13*4]
add rax, r13
lea rsi, [r12 + rax*8]
add rsi, 0x10
lea r14, [r12 + 8]
mov edi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, r14
call rbp
test al, al
jne 0x1400d1d99
jmp 0x1400d23c6
pause
dec eax
jne 0x1400d221b
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r13d
cmp ebx, 0x3e8
jl 0x1400d2209
jmp 0x1400d1d90
je 0x1400d1d3d
mov byte [r12 + 2], 0
mov rcx, r12
call fcn.1400e9130
mov r14, rax
mov byte [r12 + 2], 1
inc qword [rax + 0x298]
cmp r13w, 0x29
jae 0x1400d23dd
mov rdi, r13
shl rdi, 4
mov rsi, r14
add rsi, rdi
cmp qword [r14 + rdi], 0
je 0x1400d23f0
inc qword [r14 + 0x2a0]
mov rbp, qword [rsi]
mov rax, qword [rbp]
test rax, rax
je 0x1400d22b4
mov rcx, rax
not rcx
cmp qword [rbp + 8], rcx
jne 0x1400d22af
bswap rax
dec byte [r14 + rdi + 8]
mov qword [rsi], rax
jmp 0x1400d1e39
call 0x140152a70
xor eax, eax
jmp 0x1400d229f
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1401fec58], cl
jne 0x1400d22ba
mov r14, qword [0x1401fec50]
test r14, r14
jne 0x1400d2338
mov dword [0x1401fec60], 0x1000000
lea r14, [0x1401fec60]
mov byte [0x1401fec66], 1
mov byte [0x140200098], 0
mov qword [0x140200170], 0
lea rcx, [0x1401fec68]
mov r8d, 0x1408
xor edx, edx
call fcn.1400f5b50
lea rcx, [0x1402000a0]
mov r8d, 0xca
xor edx, edx
call fcn.1400f5b50
mov rcx, r14
mov edx, 0x1010100
call fcn.1400e93c0
mov qword [0x1401fec50], r14
mov byte [0x1401fec58], 0
jmp 0x1400d1e8b
int3
mov rcx, r15
call fcn.140152a90
lea rax, [r15 + r15*4]
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r15, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r13
test al, al
jne 0x1400d2083
jmp 0x1400d23d5
pause
dec eax
jne 0x1400d237d
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400d236d
jmp 0x1400d207a
je 0x1400d2030
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.1400e9130
mov r13, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
jmp 0x1400d1f47
mov eax, edi
test edi, edi
jg 0x1400d221b
jmp 0x1400d2223
mov eax, ebx
test ebx, ebx
jg 0x1400d237d
jmp 0x1400d2385
inc qword [r14 + 0x2b8]
inc qword [r14 + 0x2a8]
jmp 0x1400d1d3d
movdqu xmm0, xmmword [r14 + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [r14 + 0x2a8], xmm0
mov rcx, r14
mov rdx, r13
call fcn.1400c2020
mov rbp, qword [rsi]
test rbp, rbp
jne 0x1400d228a
jmp 0x1400d1d3d