Function at 0x1401584d0
Capabilities:
Allocate thread local storage

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
movaps xmmword [rsp + 0x50], xmm9
movaps xmmword [rsp + 0x40], xmm8
movaps xmmword [rsp + 0x30], xmm7
movaps xmmword [rsp + 0x20], xmm6
mov rbx, rdx
mov rdi, rcx
lea rsi, [rcx + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140158908
cmp byte [rdi + 0x1470], 0
jne 0x140158915
call fcn.1400414d0
cmp byte [rbx], 1
sete byte [rdi + 4]
cmp byte [rbx + 3], 1
sete byte [rdi + 5]
mov al, byte [rbx + 4]
cmp al, 1
sete byte [rdi + 6]
cmp byte [rbx + 5], 1
sete byte [rdi + 7]
jne 0x14015854d
cmp al, 1
jne 0x140158963
cmp byte [rbx + 6], 1
je 0x1401588d9
mov byte [rdi + 8], 0
mov qword [rdi + 0xc], 0
cmp al, 1
je 0x1401588cd
cmp byte [rbx + 2], 0
setne byte [rdi]
xorps xmm8, xmm8
movups xmmword [rdi + 0x1448], xmm8
movups xmmword [rdi + 0x1458], xmm8
mov qword [rdi + 0x1468], 0
call fcn.140100250
mov qword [rdi + 0x1448], rax
mov rax, rdi
not rax
mov qword [rdi + 0x1920], rax
mov eax, 0x10
xor r15d, r15d
movabs r14, 0x3ffffffffff
lea r12, [0x140265120]
movsd xmm9, qword [0x14024e598]
movdqa xmm6, xmmword [0x140265bc0]
movapd xmm7, xmmword [0x140265bd0]
lea r13, [r15 + r15*4]
mov dword [rdi + r13*8 + 0x60], eax
mov ecx, eax
mov rax, r14
xor edx, edx
div rcx
inc rax
mov qword [rdi + r13*8 + 0x68], rax
call fcn.140100250
mov qword [rdi + r13*8 + 0x48], rax
movups xmmword [rdi + r13*8 + 0x50], xmm8
movzx eax, byte [rdi + r13*8 + 0x64]
mov dword [rdi + r13*8 + 0x64], eax
mov r8d, dword [rdi + r13*8 + 0x60]
cmp r8, 0x10000
ja 0x1401586d8
mov ecx, 0x3000
mov r10w, 3
xor r9d, r9d
movapd xmm0, xmm9
nop word cs:[rax + rax]
mov rax, rcx
xor edx, edx
div r8
mov eax, r10d
and eax, 3
lea r11d, [rax*8]
mov ebp, 0x20
sub ebp, r11d
test eax, eax
cmove ebp, eax
add rbp, rdx
xorps xmm1, xmm1
cvtsi2sd xmm1, rbp
movq xmm2, rcx
punpckldq xmm2, xmm6
subpd xmm2, xmm7
movapd xmm3, xmm2
unpckhpd xmm3, xmm2
addsd xmm3, xmm2
divsd xmm1, xmm3
ucomisd xmm0, xmm1
minsd xmm1, xmm0
cmova r9d, r10d
add rcx, 0x1000
inc r10d
movapd xmm0, xmm1
cmp rcx, 0x11000
jne 0x140158640
cmp r9w, 0x10
ja 0x1401588fc
lea rax, [rdi + r13*8]
movzx ecx, r9b
mov dword [rax + 0x64], ecx
mov rax, qword [r12 + r15*8 + 8]
inc r15
cmp rax, 1
jne 0x1401585dc
jmp 0x1401586ee
test r8d, 0xff00000
jne 0x1401588ff
shr r8d, 0xc
mov r9d, r8d
jmp 0x1401586b9
cmp r15, 0x7f
ja 0x14015880f
movabs r14, 0x40000000000
xorps xmm8, xmm8
movsd xmm9, qword [0x14024e598]
lea r12, [r15 + r15*4]
mov dword [rdi + r12*8 + 0x60], 1
mov qword [rdi + r12*8 + 0x68], r14
call fcn.140100250
mov qword [rdi + r12*8 + 0x48], rax
movups xmmword [rdi + r12*8 + 0x50], xmm8
movzx eax, byte [rdi + r12*8 + 0x64]
mov dword [rdi + r12*8 + 0x64], eax
mov r8d, dword [rdi + r12*8 + 0x60]
cmp r8, 0x10000
ja 0x1401587f9
mov ecx, 0x3000
mov r10w, 3
xor r9d, r9d
movapd xmm0, xmm9
mov rax, rcx
xor edx, edx
div r8
mov eax, r10d
and eax, 3
lea r11d, [rax*8]
mov r13d, 0x20
sub r13d, r11d
test eax, eax
cmove r13d, eax
add r13, rdx
xorps xmm1, xmm1
cvtsi2sd xmm1, r13
movq xmm2, rcx
punpckldq xmm2, xmm6
subpd xmm2, xmm7
haddpd xmm2, xmm2
divsd xmm1, xmm2
ucomisd xmm0, xmm1
minsd xmm1, xmm0
cmova r9d, r10d
add rcx, 0x1000
inc r10d
movapd xmm0, xmm1
cmp rcx, 0x11000
jne 0x140158760
cmp r9w, 0x10
ja 0x140158902
lea rax, [rdi + r12*8]
movzx ecx, r9b
mov dword [rax + 0x64], ecx
mov qword [rax + 0x48], 0
lea rax, [r15 + 1]
cmp r15, 0x7f
mov r15, rax
jb 0x14015870f
jmp 0x14015880f
test r8d, 0xff00000
jne 0x140158905
shr r8d, 0xc
mov r9d, r8d
jmp 0x1401587d3
lea rcx, [0x14028a680]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140158945
cmp byte [0x14029ff68], 0
je 0x14015888a
lea rcx, [0x14028a680]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp byte [rbx + 1], 1
sete byte [rdi + 3]
je 0x140158956
mov bl, 1
mov byte [rdi + 0x1470], bl
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor eax, eax
lock cmpxchg byte [0x14029ff14], bl
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm8, xmmword [rsp + 0x40]
movaps xmm9, xmmword [rsp + 0x50]
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [0x1402a2930], 0
jne 0x140158966
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140158969
mov dword [0x14029ff18], eax
mov dword [0x1402a2938], eax
lea rax, [0x140163a20]
mov qword [0x1402a2930], rax
mov byte [0x14029ff68], 1
jmp 0x14015882d
mov dword [rdi + 0xc], 4
jmp 0x14015856b
cmp qword [0x14028a590], 0xffffffffffffffff
setne byte [rdi + 8]
je 0x14015855b
cmp al, 1
je 0x14015896c
mov qword [rdi + 0xc], 0
jmp 0x14015856b
int3
int3
int3
int3
mov rcx, rsi
call fcn.1400ff150
jmp 0x140158511
mov rcx, rsi
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm8, xmmword [rsp + 0x40]
movaps xmm9, xmmword [rsp + 0x50]
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
lea rcx, [0x14028a680]
call fcn.1400ff150
jmp 0x140158824
mov rcx, rdi
call fcn.1400bc120
jmp 0x140158848
int3
int3
int3
int3