Function at 0x140011470
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 r13, rdx
mov r12, rcx
mov rax, qword [0x14016c028]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea rax, [0x140147c10]
mov qword [rcx], rax
lea rax, [0x140148ed0]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], rdx
xorps xmm0, xmm0
movups xmmword [rcx + 0x18], xmm0
mov rax, qword [rdx + 0x368]
mov dword [rcx + 0x28], eax
mov eax, dword [0x140179158]
mov ecx, dword [0x14016f824]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14001186f
mov ecx, dword [0x14016f428]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140011868
movsxd rcx, dword [0x140179150]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x140179154]
jne 0x140011868
mov rax, qword [rax + rcx]
lea rsi, [r12 + 8]
lea rcx, [rsp + 0x38]
mov qword [rcx], rax
mov rdx, r12
call fcn.1400118d0
call fcn.140011da0
mov rdi, rax
call fcn.14000ab30
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14001154c
lock inc dword [rax + 8]
lea r8, str.ThreadLocalEventBuffer
lea r9, [rsp + 0x30]
mov rcx, rdi
mov rdx, rsi
call fcn.140011a40
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
lea rsi, [r13 + 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400117b6
mov qword [rsp + 0x28], rsi
call fcn.14000ab30
mov r14, qword [rax]
test r14, r14
je 0x140011597
lock inc dword [r14 + 8]
lea r9, [r13 + 0x310]
movsxd rsi, ebp
mov r15, qword [r13 + 0x318]
test r15, r15
je 0x140011747
mov rax, r15
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, r15
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rcx, 0x101010101010101
imul rcx, rax
shr rcx, 0x38
cmp rcx, 1
ja 0x14001179a
lea rdi, [r15 - 1]
and rdi, rsi
mov rax, qword [r9]
mov rbx, qword [rax + rdi*8]
test rbx, rbx
je 0x140011665
lea r8, [r15 - 1]
mov rbx, qword [rbx]
test rbx, rbx
je 0x140011665
mov rax, qword [rbx + 8]
cmp rax, rsi
je 0x14001164c
cmp ecx, 1
ja 0x140011656
and rax, r8
cmp rax, rdi
jne 0x140011665
cmp dword [rbx + 0x10], ebp
jne 0x14001162e
jmp 0x14001170a
cmp rax, r15
jb 0x140011647
xor edx, edx
div r15
mov rax, rdx
jmp 0x140011647
mov rbp, r9
mov ecx, 0x20
call fcn.14010b888
mov rbx, rax
mov dword [rax + 0x10], esi
xor eax, eax
mov qword [rbx + 0x18], rax
mov qword [rbx + 8], rsi
mov qword [rbx], rax
mov rax, qword [r13 + 0x328]
inc rax
js 0x140011698
cvtsi2ss xmm0, rax
jmp 0x1400116ad
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
mov rcx, r15
shr rcx, 1
mov eax, r15d
and eax, 1
or rax, rcx
test r15, r15
js 0x1400116c8
cvtsi2ss xmm1, r15
jmp 0x1400116d1
cvtsi2ss xmm1, rax
addss xmm1, xmm1
movss xmm2, dword [r13 + 0x330]
je 0x1400117d2
mulss xmm1, xmm2
ucomiss xmm0, xmm1
ja 0x1400117d2
mov rcx, qword [rbp]
mov rax, qword [rcx + rdi*8]
test rax, rax
je 0x140011759
mov rcx, qword [rax]
mov qword [rbx], rcx
mov qword [rax], rbx
inc qword [r13 + 0x328]
mov rcx, qword [rbx + 0x18]
mov qword [rbx + 0x18], r14
test rcx, rcx
jne 0x1400118b3
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14010e4a0
mov rax, r12
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rbp, r9
movabs rdi, 0xaaaaaaaaaaaaaaaa
jmp 0x140011668
lea rax, [r13 + 0x320]
mov rdx, qword [r13 + 0x320]
mov qword [rbx], rdx
mov qword [r13 + 0x320], rbx
mov qword [rcx + rdi*8], rax
mov rax, qword [rbx]
test rax, rax
je 0x140011703
mov rax, qword [rax + 8]
lea rcx, [r15 - 1]
test r15, rcx
jne 0x1400117c3
and rax, rcx
shl rax, 3
add rax, qword [rbp]
jmp 0x140011700
mov rdi, rsi
cmp r15, rsi
ja 0x14001161e
mov rax, rsi
xor edx, edx
div r15
mov rdi, rdx
jmp 0x14001161e
mov rcx, rsi
call fcn.1400067c0
jmp 0x140011580
cmp rax, r15
jb 0x14001178d
xor edx, edx
div r15
mov rax, rdx
jmp 0x14001178d
mov qword [rsp + 0x20], rbp
divss xmm0, xmm2
call fcn.140137320
cvttss2si rcx, xmm0
movss xmm1, dword [0x140149f98]
movaps xmm2, xmm0
subss xmm2, xmm1
cvttss2si rax, xmm2
btc rax, 0x3f
ucomiss xmm0, xmm1
cmovb rax, rcx
lea rcx, [r15 + r15]
mov edx, 1
cmp r15, 3
jb 0x140011820
lea rbp, [r15 - 1]
xor edx, edx
test r15, rbp
setne dl
or rdx, rcx
cmp rdx, rax
cmovb rdx, rax
mov rcx, qword [rsp + 0x20]
call fcn.1400132a0
mov r15, qword [r13 + 0x318]
lea rdi, [r15 - 1]
test r15, rdi
jne 0x140011851
and rdi, rsi
mov rbp, qword [rsp + 0x20]
jmp 0x1400116ed
cmp r15, rsi
jbe 0x14001185b
mov rdi, rsi
jmp 0x140011847
mov rax, rsi
xor edx, edx
div r15
mov rdi, rdx
jmp 0x140011847
xor eax, eax
jmp 0x140011519
lea rcx, [0x140179158]
call fcn.14010bdd8
cmp dword [0x140179158], 0xffffffff
jne 0x1400114e4
mov eax, 0xffffffff
mov qword [0x140179150], rax
lea rcx, [0x140179150]
xor edx, edx
call fcn.14001c0c0
lea rcx, [0x140179158]
call fcn.14010ba50
jmp 0x1400114e4
lock dec dword [rcx + 8]
jne 0x14001171b
add rcx, 8
add rcx, 0xfffffffffffffff8
call fcn.140029220
jmp 0x14001171b