Function at 0x14007a090
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 [0x14015e028]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x14007a2ca
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x14007a56c
mov r14, qword [0x140165ce0]
test r14, r14
je 0x14007a56f
mov eax, 0x40
mov ecx, 0x40
test r15, r15
je 0x14007a0fe
bsr rcx, r15
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x140144f60]
mov cl, byte [rax + rcx]
mov rdx, r15
shr rdx, cl
and edx, 7
lea rcx, [0x140144fb0]
mov rcx, qword [rcx + rax*8]
and rcx, r15
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x140144748]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r14 + 2], 0
je 0x14007a5fb
mov edi, dword [0x140169500]
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 0x14007a4f8
cmp rdi, 1
jbe 0x14007a657
add qword [rdi + 0x298], 1
cmp r13w, 0x29
jb 0x14007a257
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 0x14007a1f7
jmp 0x14007a449
pause
dec eax
jne 0x14007a1d6
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x14007a1c7
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
je 0x14007a2a7
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14007a223
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14007a7f2
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.14009d180
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 0x14007a41e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x14007a292
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14007a7f2
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
jne 0x14007a236
jmp 0x14007a19c
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.140061300
mov rbx, rax
jmp 0x14007a22d
mov r14, qword [0x140165ce0]
test r14, r14
je 0x14007a6cf
lea r12, [rdi - 1]
test rdi, r12
sete al
test rdi, rdi
setne cl
test cl, al
je 0x14007a75b
cmp r15, rdi
jae 0x14007a3f8
cmp rdi, r15
jb 0x14007a75e
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x140144f60]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x140144fb0]
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, [0x140144748]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x14007a766
mov esi, dword [0x140169500]
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 0x14007a525
cmp rsi, 1
jbe 0x14007a7f7
inc qword [rsi + 0x298]
cmp r15w, 0x29
jae 0x14007a458
mov rbp, r15
shl rbp, 4
mov r13, rsi
add r13, rbp
cmp qword [rsi + rbp], 0
je 0x14007a532
inc qword [rsi + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x14007a3dc
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14007a7f2
bswap rax
dec byte [rsi + rbp + 8]
mov qword [r13], rax
test rbx, rbx
je 0x14007a466
test r12, rbx
je 0x14007a236
int3
mov rax, r15
dec rax
je 0x14007a417
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov edi, 1
shl rdi, cl
jmp 0x14007a2fb
mov ecx, 0x40
jmp 0x14007a408
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14007f370
mov rbx, qword [rbp]
test rbx, rbx
jne 0x14007a27a
jmp 0x14007a19c
mov eax, ebx
test ebx, ebx
jg 0x14007a1d6
jmp 0x14007a1de
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 0x14007a4b8
jmp 0x14007a55d
pause
dec eax
jne 0x14007a493
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14007a484
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x14007a505
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14007a4e0
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14007a7f2
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14007a3ec
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14007a16f
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140061300
mov rbx, rax
jmp 0x14007a4ea
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14007a385
inc qword [rsi + 0x2b0]
inc qword [rsi + 0x2a8]
mov rcx, rsi
mov rdx, r15
call fcn.14007f370
mov rbx, qword [r13]
test rbx, rbx
jne 0x14007a3c4
jmp 0x14007a466
mov eax, ebx
test ebx, ebx
jg 0x14007a493
jmp 0x14007a49b
int3
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x140165ce8], cl
jne 0x14007a571
mov r14, qword [0x140165ce0]
test r14, r14
jne 0x14007a5ef
mov dword [0x140165cf0], 0x1000000
lea r14, [0x140165cf0]
mov byte [0x140165cf6], 1
mov byte [0x140167128], 0
mov qword [0x140167200], 0
lea rcx, [0x140165cf8]
mov r8d, 0x1408
xor edx, edx
call fcn.14009fa40
lea rcx, [0x140167130]
mov r8d, 0xca
xor edx, edx
call fcn.14009fa40
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x140165ce0], r14
mov byte [0x140165ce8], 0
jmp 0x14007a0e7
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 0x14007a1f7
jmp 0x14007a81e
pause
dec eax
jne 0x14007a639
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x14007a626
jmp 0x14007a1ef
je 0x14007a19c
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14007f0f0
mov rdi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
cmp r13w, 0x29
jae 0x14007a83c
mov rsi, r13
shl rsi, 4
mov r12, rdi
add r12, rsi
cmp qword [rdi + rsi], 0
je 0x14007a84f
inc qword [rdi + 0x2a0]
mov rbx, qword [r12]
mov rax, qword [rbx]
test rax, rax
je 0x14007a6bf
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14007a7f2
bswap rax
dec byte [rdi + rsi + 8]
mov qword [r12], rax
jmp 0x14007a29d
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x140165ce8], cl
jne 0x14007a6d1
mov r14, qword [0x140165ce0]
test r14, r14
jne 0x14007a74f
mov dword [0x140165cf0], 0x1000000
lea r14, [0x140165cf0]
mov byte [0x140165cf6], 1
mov byte [0x140167128], 0
mov qword [0x140167200], 0
lea rcx, [0x140165cf8]
mov r8d, 0x1408
xor edx, edx
call fcn.14009fa40
lea rcx, [0x140167130]
mov r8d, 0xca
xor edx, edx
call fcn.14009fa40
mov rcx, r14
mov edx, 0x1010100
call fcn.14001abf0
mov qword [0x140165ce0], r14
mov byte [0x140165ce8], 0
jmp 0x14007a2da
int3
mov rcx, r15
call fcn.1400fc770
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 0x14007a7b8
jmp 0x14007a82d
pause
dec eax
jne 0x14007a793
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14007a784
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x14007a87a
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14007a7e0
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14007a7f2
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
jmp 0x14007a4ed
call 0x1400c8770
je 0x14007a466
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.14007f0f0
mov rsi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
jmp 0x14007a396
mov eax, ebx
test ebx, ebx
jg 0x14007a639
jmp 0x14007a641
mov eax, ebx
test ebx, ebx
jg 0x14007a793
jmp 0x14007a79b
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
jmp 0x14007a19c
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14007f370
mov rbx, qword [r12]
test rbx, rbx
jne 0x14007a6a7
jmp 0x14007a19c
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.140061300
mov rbx, rax
jmp 0x14007a7ea