Function at 0x1400064a0
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 r13, rdx
mov rdi, rcx
mov rax, qword [0x14016e028]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x1400065e0
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x140006c4c
mov r15, qword [0x140175ff8]
test r15, r15
je 0x140006785
mov eax, 0x40
mov ecx, 0x40
test r13, r13
je 0x14000650e
bsr rcx, r13
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x140152dc0]
mov cl, byte [rax + rcx]
mov rdx, r13
shr rdx, cl
and edx, 7
lea rcx, [0x140152e10]
mov rcx, qword [rcx + rax*8]
and rcx, r13
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401525a8]
movzx r14d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r15 + 2], 0
je 0x140006811
mov edi, dword [0x1401797f8]
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 0x14000676b
cmp rdi, 1
jbe 0x1400068fa
inc qword [rdi + 0x298]
cmp r14w, 0x29
jae 0x140006978
mov rbx, r14
shl rbx, 4
mov rsi, rdi
add rsi, rbx
cmp qword [rdi + rbx], 0
je 0x140006a9a
inc qword [rdi + 0x2a0]
mov r12, qword [rsi]
mov rax, qword [r12]
test rax, rax
je 0x140006715
mov rcx, rax
not rcx
cmp qword [r12 + 8], rcx
je 0x140006717
jmp 0x140006710
mov r14, qword [0x140175ff8]
test r14, r14
je 0x140006866
lea rbp, [rdi - 1]
test rdi, rbp
sete al
test rdi, rdi
setne cl
test cl, al
je 0x140006c4f
cmp r13, rdi
jb 0x14000662e
mov rax, r13
dec rax
je 0x14000661f
bsr rcx, rax
xor rcx, 0x3f
jmp 0x140006624
mov ecx, 0x40
neg cl
mov edi, 1
shl rdi, cl
cmp rdi, r13
jb 0x1400068f2
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x140152dc0]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x140152e10]
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, [0x1401525a8]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x140006921
mov esi, dword [0x1401797f8]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test ebx, ebx
jne 0x140006778
cmp rsi, 1
jbe 0x140006a24
inc qword [rsi + 0x298]
mov r13, rbp
cmp r15w, 0x29
jae 0x140006ace
mov rbx, r15
shl rbx, 4
mov rbp, rsi
add rbp, rbx
cmp qword [rsi + rbx], 0
je 0x140006b79
inc qword [rsi + 0x2a0]
mov r12, qword [rbp]
mov rax, qword [r12]
test rax, rax
je 0x14000672b
mov rcx, rax
not rcx
cmp qword [r12 + 8], rcx
je 0x14000672d
call fcn.1400a8470
xor eax, eax
bswap rax
dec byte [rdi + rbx + 8]
mov qword [rsi], rax
test r12, r12
jne 0x14000674a
jmp 0x140006986
xor eax, eax
bswap rax
dec byte [rsi + rbx + 8]
mov qword [rbp], rax
test r12, r12
je 0x140006adc
test r13, r12
jne 0x140006c52
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14007d5a0
mov rax, r12
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000657f
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400066b8
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x140176000], cl
jne 0x140006787
mov r15, qword [0x140175ff8]
test r15, r15
jne 0x140006805
mov dword [0x140176008], 0x1000000
lea r15, [0x140176008]
mov byte [0x14017600e], 1
mov byte [0x140177440], 0
mov qword [0x140177518], 0
lea rcx, [0x140176010]
mov r8d, 0x1408
xor edx, edx
call fcn.14007f940
lea rcx, [0x140177448]
mov r8d, 0xca
xor edx, edx
call fcn.14007f940
mov rcx, r15
mov edx, 0x1010100
call fcn.14000aa70
mov qword [0x140175ff8], r15
mov byte [0x140176000], 0
jmp 0x1400064f7
lea rax, [r14 + r14*4]
lea rdi, [r15 + rax*8]
add rdi, 0x10
lea r14, [r15 + 8]
mov esi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12d, 0x40
mov rcx, r14
call rbp
test al, al
jne 0x1400069db
mov eax, esi
test esi, esi
jle 0x140006850
pause
dec eax
jne 0x140006848
add ebx, esi
add esi, esi
cmp esi, 0x40
cmovge esi, r12d
cmp ebx, 0x3e8
jl 0x140006835
jmp 0x1400069d2
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x140176000], cl
jne 0x140006868
mov r14, qword [0x140175ff8]
test r14, r14
jne 0x1400068e6
mov dword [0x140176008], 0x1000000
lea r14, [0x140176008]
mov byte [0x14017600e], 1
mov byte [0x140177440], 0
mov qword [0x140177518], 0
lea rcx, [0x140176010]
mov r8d, 0x1408
xor edx, edx
call fcn.14007f940
lea rcx, [0x140177448]
mov r8d, 0xca
xor edx, edx
call fcn.14007f940
mov rcx, r14
mov edx, 0x1010100
call fcn.14000aa70
mov qword [0x140175ff8], r14
mov byte [0x140176000], 0
jmp 0x1400065f0
mov rcx, r13
call fcn.1401083c0
je 0x140006986
mov byte [r15 + 2], 0
mov rcx, r15
call fcn.140008e70
mov rdi, rax
mov byte [r15 + 2], 1
inc qword [rax + 0x298]
jmp 0x140006590
mov r13, rbp
lea rax, [r15 + r15*4]
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r15, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r12
test al, al
jne 0x140006b30
mov eax, ebx
test ebx, ebx
jle 0x14000695e
pause
dec eax
jne 0x140006956
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x140006942
jmp 0x140006b27
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
lea rax, [r14 + r14*4]
lea rdi, [r15 + rax*8]
add rdi, 0x10
lea r14, [r15 + 8]
mov esi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12d, 0x40
mov rcx, r14
call rbp
test al, al
jne 0x1400069db
mov eax, esi
test esi, esi
jle 0x1400069c1
pause
dec eax
jne 0x1400069b9
add ebx, esi
add esi, esi
cmp esi, 0x40
cmovge esi, r12d
cmp ebx, 0x3e8
jl 0x1400069aa
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [rdi]
mov r12, qword [rax]
test r12, r12
je 0x140006bbf
mov byte [rsp + 0x2f], 0
mov rcx, qword [r12]
test rcx, rcx
je 0x140006a0a
mov rdx, rcx
not rdx
cmp qword [r12 + 8], rdx
je 0x140006a0c
jmp 0x140006710
xor ecx, ecx
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14000674a
mov r13, rbp
je 0x140006adc
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.140008e70
mov rbp, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
cmp r15w, 0x29
jae 0x140006c05
mov rsi, r15
shl rsi, 4
mov rbx, rbp
add rbx, rsi
cmp qword [rbp + rsi], 0
je 0x140006c18
inc qword [rbp + 0x2a0]
mov r12, qword [rbx]
mov rax, qword [r12]
test rax, rax
je 0x140006bae
mov rcx, rax
not rcx
cmp qword [r12 + 8], rcx
je 0x140006bb0
jmp 0x140006710
movdqu xmm0, xmmword [rdi + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [rdi + 0x2a8], xmm0
mov rcx, rdi
mov rdx, r14
call fcn.14003aca0
mov r12, qword [rsi]
test r12, r12
jne 0x1400065bd
jmp 0x140006986
inc qword [rsi + 0x2b8]
inc qword [rsi + 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 r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r12
test al, al
jne 0x140006b30
mov eax, ebx
test ebx, ebx
jle 0x140006b12
pause
dec eax
jne 0x140006b0a
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x140006afa
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [rsi]
mov r12, qword [rax]
test r12, r12
je 0x140006be2
mov byte [rsp + 0x2e], 0
mov rcx, qword [r12]
test rcx, rcx
je 0x140006b5f
mov rdx, rcx
not rdx
cmp qword [r12 + 8], rdx
je 0x140006b61
jmp 0x140006710
xor ecx, ecx
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140006741
movdqu xmm0, xmmword [rsi + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [rsi + 0x2a8], xmm0
mov rcx, rsi
mov rdx, r15
call fcn.14003aca0
mov r12, qword [rbp]
test r12, r12
jne 0x1400066fa
jmp 0x140006adc
xor eax, eax
bswap rax
dec byte [rbp + rsi + 8]
mov qword [rbx], rax
jmp 0x140006738
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r15
xor r8d, r8d
mov r9, r13
call fcn.140002610
mov r12, rax
jmp 0x140006a16
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140002610
mov r12, rax
jmp 0x140006b6b
inc qword [rbp + 0x2b8]
inc qword [rbp + 0x2a8]
jmp 0x140006adc
movdqu xmm0, xmmword [rbp + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [rbp + 0x2a8], xmm0
mov rcx, rbp
mov rdx, r15
call fcn.14003aca0
mov r12, qword [rbx]
test r12, r12
jne 0x140006a77
jmp 0x140006adc
int3
int3
int3