Function at 0x140069a20
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 [0x14010c038]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x140069c5a
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x140069efc
mov r14, qword [0x140114798]
test r14, r14
je 0x140069eff
mov eax, 0x40
mov ecx, 0x40
test r15, r15
je 0x140069a8e
bsr rcx, r15
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400f5dc0]
mov cl, byte [rax + rcx]
mov rdx, r15
shr rdx, cl
and edx, 7
lea rcx, [0x1400f5e10]
mov rcx, qword [rcx + rax*8]
and rcx, r15
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400f55a0]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r14 + 2], 0
je 0x140069f8b
mov edi, dword [0x140117fa0]
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 0x140069e88
cmp rdi, 1
jbe 0x140069fe7
add qword [rdi + 0x298], 1
cmp r13w, 0x29
jb 0x140069be7
add qword [rdi + 0x2b8], 1
add qword [rdi + 0x2a8], 1
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x140069b87
jmp 0x140069dd9
pause
dec eax
jne 0x140069b66
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x140069b57
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
je 0x140069c37
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140069bb3
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14006a182
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400797f0
mov rax, rbx
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 rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x140069dae
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x140069c22
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14006a182
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
jne 0x140069bc6
jmp 0x140069b2c
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.140050620
mov rbx, rax
jmp 0x140069bbd
mov r14, qword [0x140114798]
test r14, r14
je 0x14006a05f
lea r12, [rdi - 1]
test rdi, r12
sete al
test rdi, rdi
setne cl
test cl, al
je 0x14006a0eb
cmp r15, rdi
jae 0x140069d88
cmp rdi, r15
jb 0x14006a0ee
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x1400f5dc0]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x1400f5e10]
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, [0x1400f55a0]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x14006a0f6
mov esi, dword [0x140117fa0]
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 0x140069eb5
cmp rsi, 1
jbe 0x14006a187
inc qword [rsi + 0x298]
cmp r15w, 0x29
jae 0x140069de8
mov rbp, r15
shl rbp, 4
mov r13, rsi
add r13, rbp
cmp qword [rsi + rbp], 0
je 0x140069ec2
inc qword [rsi + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x140069d6c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14006a182
bswap rax
dec byte [rsi + rbp + 8]
mov qword [r13], rax
test rbx, rbx
je 0x140069df6
test r12, rbx
je 0x140069bc6
int3
mov rax, r15
dec rax
je 0x140069da7
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov edi, 1
shl rdi, cl
jmp 0x140069c8b
mov ecx, 0x40
jmp 0x140069d98
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14006e800
mov rbx, qword [rbp]
test rbx, rbx
jne 0x140069c0a
jmp 0x140069b2c
mov eax, ebx
test ebx, ebx
jg 0x140069b66
jmp 0x140069b6e
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 r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r13
test al, al
jne 0x140069e48
jmp 0x140069eed
pause
dec eax
jne 0x140069e23
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x140069e14
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x140069e95
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140069e70
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14006a182
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140069d7c
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140069aff
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140050620
mov rbx, rax
jmp 0x140069e7a
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140069d15
inc qword [rsi + 0x2b0]
inc qword [rsi + 0x2a8]
mov rcx, rsi
mov rdx, r15
call fcn.14006e800
mov rbx, qword [r13]
test rbx, rbx
jne 0x140069d54
jmp 0x140069df6
mov eax, ebx
test ebx, ebx
jg 0x140069e23
jmp 0x140069e2b
int3
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1401147a0], cl
jne 0x140069f01
mov r14, qword [0x140114798]
test r14, r14
jne 0x140069f7f
mov dword [0x1401147a8], 0x1000000
lea r14, [0x1401147a8]
mov byte [0x1401147ae], 1
mov byte [0x140115be0], 0
mov qword [0x140115cb8], 0
lea rcx, [0x1401147b0]
mov r8d, 0x1408
xor edx, edx
call fcn.14007c0b0
lea rcx, [0x140115be8]
mov r8d, 0xca
xor edx, edx
call fcn.14007c0b0
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x140114798], r14
mov byte [0x1401147a0], 0
jmp 0x140069a77
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x140069b87
jmp 0x14006a1ae
pause
dec eax
jne 0x140069fc9
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x140069fb6
jmp 0x140069b7f
je 0x140069b2c
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14006e580
mov rdi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
cmp r13w, 0x29
jae 0x14006a1cc
mov rsi, r13
shl rsi, 4
mov r12, rdi
add r12, rsi
cmp qword [rdi + rsi], 0
je 0x14006a1df
inc qword [rdi + 0x2a0]
mov rbx, qword [r12]
mov rax, qword [rbx]
test rax, rax
je 0x14006a04f
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14006a182
bswap rax
dec byte [rdi + rsi + 8]
mov qword [r12], rax
jmp 0x140069c2d
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x1401147a0], cl
jne 0x14006a061
mov r14, qword [0x140114798]
test r14, r14
jne 0x14006a0df
mov dword [0x1401147a8], 0x1000000
lea r14, [0x1401147a8]
mov byte [0x1401147ae], 1
mov byte [0x140115be0], 0
mov qword [0x140115cb8], 0
lea rcx, [0x1401147b0]
mov r8d, 0x1408
xor edx, edx
call fcn.14007c0b0
lea rcx, [0x140115be8]
mov r8d, 0xca
xor edx, edx
call fcn.14007c0b0
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x140114798], r14
mov byte [0x1401147a0], 0
jmp 0x140069c6a
int3
mov rcx, r15
call fcn.1400d8ac0
lea rax, [r15 + r15*4]
lea r15, [r14 + rax*8]
add r15, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rsi
call r13
test al, al
jne 0x14006a148
jmp 0x14006a1bd
pause
dec eax
jne 0x14006a123
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14006a114
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x14006a20a
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14006a170
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14006a182
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
jmp 0x140069e7d
call 0x1400a5820
je 0x140069df6
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14006e580
mov rsi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
jmp 0x140069d26
mov eax, ebx
test ebx, ebx
jg 0x140069fc9
jmp 0x140069fd1
mov eax, ebx
test ebx, ebx
jg 0x14006a123
jmp 0x14006a12b
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
jmp 0x140069b2c
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14006e800
mov rbx, qword [r12]
test rbx, rbx
jne 0x14006a037
jmp 0x140069b2c
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140050620
mov rbx, rax
jmp 0x14006a17a