Function at 0x14010d060
Capabilities:
Set 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 rax, qword [0x140219028]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x14010d6ca
mov rsi, rcx
mov eax, dword [rcx + 8]
lea r15, [rax + 0x2f8]
mov byte [rsp + 0x3f], 0xaa
cmp byte [rcx + 3], 0
je 0x14010d6cd
bsr rcx, r15
xor rcx, 0x3f
mov rbp, r15
mov edx, 0x40
sub rdx, rcx
lea rcx, [0x1401fc620]
mov cl, byte [rdx + rcx]
mov rax, rbp
shr rax, cl
and eax, 3
lea rcx, [0x1401fc670]
and rbp, qword [rcx + rdx*8]
lea rax, [rax + rdx*4]
cmp rbp, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401fc208]
movzx eax, word [rcx + rax*2 + 0x200]
lea rbx, [rax + rax*4]
lea r13, [rsi + rbx*8]
add r13, 0x48
lea r14, [rsi + 0x40]
mov edi, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call r12
test al, al
je 0x14010d654
mov rax, qword [r13]
mov rdi, qword [rax]
test rdi, rdi
je 0x14010d5e9
mov byte [rsp + 0x3f], 0
mov rbp, qword [rdi]
test rbp, rbp
je 0x14010d5e2
mov ecx, dword [rsi + rbx*8 + 0x60]
bswap rbp
mov rdx, rbp
xor rdx, rdi
cmp rdx, 0x1fffff
ja 0x14010d6c5
mov edx, ebp
and edx, 0x1fc000
test rdx, rdx
je 0x14010d6c5
prefetcht0 byte [rbp]
mov qword [rax], rbp
mov ecx, dword [rax + 0x18]
lea edx, [rcx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [rax + 0x18], ecx
mov rax, qword [rax + 0x10]
mov eax, dword [rax + 0x18]
add rax, qword [rsi + 0xa98]
mov qword [rsi + 0xa98], rax
mov rcx, qword [rsi + 0xaa0]
cmp rcx, rax
cmovae rax, rcx
mov qword [rsi + 0xaa0], rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor ebx, ebx
mov dword [rdi], ebx
mov byte [rdi + 4], 0
mov qword [rdi + 0x58], rbx
mov dword [rdi + 0x60], ebx
mov byte [rdi + 0x61], 0
mov dword [rdi + 0x70], ebx
mov qword [rdi + 0x68], rbx
mov byte [rdi + 0x71], 0
mov dword [rdi + 0x80], ebx
mov qword [rdi + 0x78], rbx
mov byte [rdi + 0x81], 0
mov dword [rdi + 0x90], ebx
mov qword [rdi + 0x88], rbx
mov byte [rdi + 0x91], 0
mov dword [rdi + 0xa0], ebx
mov qword [rdi + 0x98], rbx
mov byte [rdi + 0xa1], 0
mov dword [rdi + 0xb0], ebx
mov qword [rdi + 0xa8], rbx
mov byte [rdi + 0xb1], 0
mov dword [rdi + 0xc0], ebx
mov qword [rdi + 0xb8], rbx
mov byte [rdi + 0xc1], 0
mov dword [rdi + 0xd0], ebx
mov qword [rdi + 0xc8], rbx
mov byte [rdi + 0xd1], 0
mov dword [rdi + 0xe0], ebx
mov qword [rdi + 0xd8], rbx
mov byte [rdi + 0xe1], 0
mov dword [rdi + 0xf0], ebx
mov qword [rdi + 0xe8], rbx
mov byte [rdi + 0xf1], 0
mov dword [rdi + 0x100], ebx
mov qword [rdi + 0xf8], rbx
mov byte [rdi + 0x101], 0
mov dword [rdi + 0x110], ebx
mov qword [rdi + 0x108], rbx
mov byte [rdi + 0x111], 0
mov dword [rdi + 0x120], ebx
mov qword [rdi + 0x118], rbx
mov byte [rdi + 0x121], 0
mov dword [rdi + 0x130], ebx
mov qword [rdi + 0x128], rbx
mov byte [rdi + 0x131], 0
mov dword [rdi + 0x140], ebx
mov qword [rdi + 0x138], rbx
mov byte [rdi + 0x141], 0
mov dword [rdi + 0x150], ebx
mov qword [rdi + 0x148], rbx
mov byte [rdi + 0x151], 0
mov dword [rdi + 0x160], ebx
mov qword [rdi + 0x158], rbx
mov byte [rdi + 0x161], 0
mov dword [rdi + 0x170], ebx
mov qword [rdi + 0x168], rbx
mov byte [rdi + 0x171], 0
mov dword [rdi + 0x180], ebx
mov qword [rdi + 0x178], rbx
mov byte [rdi + 0x181], 0
mov dword [rdi + 0x190], ebx
mov qword [rdi + 0x188], rbx
mov byte [rdi + 0x191], 0
mov dword [rdi + 0x1a0], ebx
mov qword [rdi + 0x198], rbx
mov byte [rdi + 0x1a1], 0
mov dword [rdi + 0x1b0], ebx
mov qword [rdi + 0x1a8], rbx
mov byte [rdi + 0x1b1], 0
mov dword [rdi + 0x1c0], ebx
mov qword [rdi + 0x1b8], rbx
mov byte [rdi + 0x1c1], 0
mov dword [rdi + 0x1d0], ebx
mov qword [rdi + 0x1c8], rbx
mov byte [rdi + 0x1d1], 0
mov dword [rdi + 0x1e0], ebx
mov qword [rdi + 0x1d8], rbx
mov byte [rdi + 0x1e1], 0
mov dword [rdi + 0x1f0], ebx
mov qword [rdi + 0x1e8], rbx
mov byte [rdi + 0x1f1], 0
mov dword [rdi + 0x200], ebx
mov qword [rdi + 0x1f8], rbx
mov byte [rdi + 0x201], 0
mov dword [rdi + 0x210], ebx
mov qword [rdi + 0x208], rbx
mov byte [rdi + 0x211], 0
mov dword [rdi + 0x220], ebx
mov qword [rdi + 0x218], rbx
mov byte [rdi + 0x221], 0
mov dword [rdi + 0x230], ebx
mov qword [rdi + 0x228], rbx
mov byte [rdi + 0x231], 0
mov dword [rdi + 0x240], ebx
mov qword [rdi + 0x238], rbx
mov byte [rdi + 0x241], 0
mov dword [rdi + 0x250], ebx
mov qword [rdi + 0x248], rbx
mov byte [rdi + 0x251], 0
mov dword [rdi + 0x260], ebx
mov qword [rdi + 0x258], rbx
mov byte [rdi + 0x261], 0
mov dword [rdi + 0x270], ebx
mov qword [rdi + 0x268], rbx
mov byte [rdi + 0x271], 0
mov dword [rdi + 0x280], ebx
mov qword [rdi + 0x278], rbx
mov byte [rdi + 0x281], 0
mov dword [rdi + 0x290], ebx
mov qword [rdi + 0x288], rbx
mov byte [rdi + 0x291], 0
mov dword [rdi + 0x2a0], ebx
mov qword [rdi + 0x298], rbx
mov byte [rdi + 0x2a1], 0
mov dword [rdi + 0x2b0], ebx
mov qword [rdi + 0x2a8], rbx
mov byte [rdi + 0x2b1], 0
mov dword [rdi + 0x2c0], ebx
mov qword [rdi + 0x2b8], rbx
mov byte [rdi + 0x2c1], 0
mov dword [rdi + 0x2d0], ebx
mov qword [rdi + 0x2c8], rbx
mov byte [rdi + 0x2d1], 0
mov qword [rdi + 0x2d8], rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rdi + 0x2e0], eax
xorps xmm0, xmm0
movups xmmword [rdi + 0x2e8], xmm0
mov ebp, 1
lea r14, [0x14021c218]
mov rcx, r14
call r12
test al, al
je 0x14010d686
mov qword [rdi + 0x2f0], 0
mov rax, qword [0x14021c220]
mov qword [0x14021c220], rdi
mov qword [rdi + 0x2e8], rax
test rax, rax
je 0x14010d52f
mov qword [rax + 0x2f0], rdi
lea rcx, [0x14021c218]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xorps xmm0, xmm0
movups xmmword [rdi + 0x48], xmm0
movups xmmword [rdi + 0x38], xmm0
movups xmmword [rdi + 0x28], xmm0
movups xmmword [rdi + 0x18], xmm0
movups xmmword [rdi + 8], xmm0
add rsi, 0x48
lea rax, [rdi + 0x62]
xor ecx, ecx
lea rdx, [0x140227630]
mov qword [rax - 0xa], 0
mov byte [rax - 2], 0
mov bl, byte [rcx + rdx]
mov byte [rax - 1], bl
movzx ebp, word [rsi + 0x18]
mov word [rax], bp
cmp qword [rsi], 0
je 0x14010d6bc
inc rcx
add rsi, 0x28
add rax, 0x10
cmp rcx, 0x28
jne 0x14010d564
mov ecx, dword [0x140227624]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x140222a94]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x130], rdi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14011fe20
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ebp, ebp
jmp 0x14010d16c
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, r13
mov rdx, rsi
mov r8d, 2
mov r9, r15
call fcn.1400e4f30
test rax, rax
je 0x14010d730
mov rdi, rax
mov rcx, rax
and rcx, 0xffffffffffe00000
mov rdx, rax
shr rdx, 9
and edx, 0xfe0
lea rax, [rdx + rcx]
movzx ecx, byte [rdx + rcx + 0x101e]
and ecx, 0x3f
shl rcx, 5
sub rax, rcx
add rax, 0x1000
jmp 0x14010d186
mov eax, edi
test edi, edi
jle 0x14010d662
pause
dec eax
jne 0x14010d65a
add ebp, edi
add edi, edi
cmp edi, 0x10
mov eax, 0x10
cmovge edi, eax
cmp ebp, 0x40
jl 0x14010d10e
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x14010d11c
mov eax, ebp
test ebp, ebp
jle 0x14010d694
pause
dec eax
jne 0x14010d68c
add ebx, ebp
add ebp, ebp
cmp ebp, 0x10
mov eax, 0x10
cmovge ebp, eax
cmp ebx, 0x40
jl 0x14010d4f5
lea rcx, [0x14021c218]
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x14010d503
mov byte [rax - 1], 0
jmp 0x14010d587
call fcn.140154cc0
int3
cmp eax, 0x7fd07
ja 0x14010d0a4
mov edx, r15d
mov ecx, 0xffffffff
mov eax, 0x20
sub edx, 1
cmovae ecx, eax
je 0x14010d6f3
bsr eax, edx
xor eax, 0x1f
sub ecx, eax
mov eax, 1
shl eax, cl
movsxd rcx, eax
mov rax, rcx
shr rax, 1
lea rbp, [rax + rax*4]
shr rbp, 2
cmp rbp, r15
cmovb rbp, rcx
test rbp, rbp
je 0x14010d726
bsr rcx, rbp
xor rcx, 0x3f
jmp 0x14010d0af
mov ecx, 0x40
jmp 0x14010d0af
xor edi, edi
jmp 0x14010d1b0