Function at 0x140136240
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, 0x48
mov r12, r8
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x14016e028]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], r9
test rdx, rdx
jne 0x1401362b9
xor ebx, ebx
mov qword [rsi], rbx
shl r12, 4
add r12, rbx
mov qword [rsi + 0x10], r12
mov qword [rsi + 8], r12
shl rdi, 4
add rdi, rbx
mov qword [rsi + 0x18], rdi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14007d5a0
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.140133a80
mov r14, rdi
shl r14, 4
mov eax, 0x40
mov ecx, 0x40
je 0x1401362d9
bsr rcx, r14
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x140149270]
mov cl, byte [rax + rcx]
mov rdx, r14
shr rdx, cl
and edx, 7
lea rcx, [0x1401492c0]
mov rcx, qword [rcx + rax*8]
and rcx, r14
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401494c8]
movzx ebx, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x3f], 0
cmp byte [0x140172d92], 0
je 0x1401363cf
mov ebp, dword [0x1401797f8]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r13, rax
test r15d, r15d
jne 0x1401363c1
cmp r13, 1
mov qword [rsp + 0x30], rbx
jbe 0x140136437
inc qword [r13 + 0x298]
cmp bx, 0x29
jae 0x14013646f
mov rbp, rbx
shl rbp, 4
mov r15, r13
add r15, rbp
cmp qword [r13 + rbp], 0
je 0x140136502
inc qword [r13 + 0x2a0]
mov rbx, qword [r15]
mov rax, qword [rbx]
test rax, rax
je 0x1401363bd
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x14013653e
bswap rax
dec byte [r13 + rbp + 8]
mov qword [r15], rax
test rbx, rbx
jne 0x14013627b
jmp 0x14013647d
xor eax, eax
jmp 0x1401363a4
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140136349
lea rax, [rbx + rbx*4]
lea rcx, [0x140172d90]
lea r15, [rcx + rax*8]
add r15, 0x10
mov ebp, 1
mov dword [rsp + 0x30], 0
lea rbx, [0x140172d98]
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rbx
call r13
test al, al
jne 0x1401364be
mov eax, ebp
test ebp, ebp
jle 0x14013641b
pause
dec eax
jne 0x140136411
add dword [rsp + 0x30], ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp dword [rsp + 0x30], 0x3e8
jl 0x1401363fd
jmp 0x14013656e
je 0x14013647d
mov byte [0x140172d92], 0
lea rcx, [0x140172d90]
call fcn.140008e70
mov r13, rax
mov byte [0x140172d92], 1
inc qword [rax + 0x298]
cmp word [rsp + 0x30], 0x29
jae 0x14013646f
mov rbp, qword [rsp + 0x30]
jmp 0x14013636c
inc qword [r13 + 0x2b8]
inc qword [r13 + 0x2a8]
mov rax, qword [rsp + 0x30]
lea rax, [rax + rax*4]
lea rcx, [0x140172d90]
lea r15, [rcx + rax*8]
add r15, 0x10
mov ebp, 1
mov dword [rsp + 0x30], 0
lea rbx, [0x140172d98]
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rbx
call r13
test al, al
je 0x140136543
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x14013657f
mov byte [rsp + 0x3f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14013653a
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x14013653e
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
lea rcx, [0x140172d98]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14013627b
movdqu xmm0, xmmword [r13 + 0x2a8]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [r13 + 0x2a8], xmm0
mov rcx, r13
mov rdx, qword [rsp + 0x30]
call fcn.14003aca0
mov rbx, qword [r15]
test rbx, rbx
jne 0x14013638c
jmp 0x14013647d
xor ecx, ecx
jmp 0x1401364e6
call fcn.1400a8470
mov eax, ebp
test ebp, ebp
jle 0x140136553
pause
dec eax
jne 0x140136549
add dword [rsp + 0x30], ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp dword [rsp + 0x30], 0x3e8
jl 0x1401364b0
lea rcx, [0x140172d98]
call sub.KERNEL32.dll_AcquireSRWLockExclusive
jmp 0x1401364be
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x20], rax
lea rdx, [0x140172d90]
mov rcx, r15
xor r8d, r8d
mov r9, r14
call fcn.140002610
mov rbx, rax
jmp 0x1401364f0