Function at 0x1400520e0
Capabilities:
Allocate thread local storage

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x148
movaps xmmword [rsp + 0x130], xmm15
movapd xmmword [rsp + 0x120], xmm14
movapd xmmword [rsp + 0x110], xmm13
movapd xmmword [rsp + 0x100], xmm12
movapd xmmword [rsp + 0xf0], xmm11
movapd xmmword [rsp + 0xe0], xmm10
movapd xmmword [rsp + 0xd0], xmm9
movapd xmmword [rsp + 0xc0], xmm8
movapd xmmword [rsp + 0xb0], xmm7
movapd xmmword [rsp + 0xa0], xmm6
mov r12, rdx
mov r13, rcx
mov rax, qword [0x14010a040]
xor rax, rsp
mov qword [rsp + 0x98], rax
lea rbx, [rcx + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140052880
cmp byte [r13 + 0x1878], 0
jne 0x1400528cd
call fcn.140006ff0
cmp byte [r12 + 2], 1
sete byte [r13 + 4]
sete al
cmp byte [r12 + 3], 1
sete dl
cmp qword [0x14010c510], 0xffffffffffffffff
setne cl
and cl, dl
mov byte [r13 + 0x10], cl
cmp byte [r12 + 0x10], 1
sete byte [r13 + 0x11]
cmp byte [r12 + 4], 1
sete byte [r13 + 0x12]
mov qword [rsp + 0x38], rbx
je 0x1400522b0
cmp byte [r13 + 0x1dc0], 1
je 0x14005287d
cmp byte [r12 + 0x1c], 1
sete byte [r13 + 0x13]
test cl, cl
jne 0x1400523a3
mov dword [r13 + 0x14], 0
test al, 1
jne 0x14005229b
cmp byte [r12 + 1], 0
setne byte [r13]
xorps xmm0, xmm0
movaps xmmword [r13 + 0x1850], xmm0
movaps xmmword [r13 + 0x1860], xmm0
mov qword [r13 + 0x1870], 0
lea r15, [0x1400f9958]
mov qword [r13 + 0x1848], r15
mov rax, r13
not rax
mov qword [r13 + 0x1d28], rax
mov qword [rsp + 0x28], r12
mov bpl, byte [r12 + 0x1d]
lea r12, [r13 + 0x48]
mov qword [rsp + 0x30], r13
lea r10, [r13 + 0x70]
mov r14d, 0x10
xor r11d, r11d
movabs rcx, 0x3ffffffffff
lea r13, [0x1400f8168]
movsd xmm15, qword [0x1400e3b00]
mov ebx, 0xf
mov edi, 0x10
jmp 0x140052429
mov qword [r13 + 8], 4
mov dword [r13 + 0x14], 4
jmp 0x14005220e
mov rsi, qword [r12 + 8]
mov qword [r13 + 0x1d38], rsi
lea r14, [r13 + 0x1d70]
lea rax, [r13 + 0x1d40]
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x48], 1
mov qword [rsp + 0x50], 0
movabs rdi, 0xaaaaaaaaaaaaaaaa
lea r15, [rsp + 0x90]
mov qword [r15], rdi
mov edx, 8
mov rcx, r15
call fcn.140003f30
mov rax, qword [r15]
mov qword [rsp + 0x58], rax
mov qword [r15], rdi
lea r15, [rsp + 0x90]
mov edx, 8
mov rcx, r15
call fcn.140003f30
mov rax, qword [r15]
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rsp + 0x88], rsi
cmp byte [r13 + 0x1dc0], 1
je 0x1400528bd
lea r15, [rsp + 0x40]
mov rcx, r14
mov rdx, r15
call fcn.140006df0
mov byte [r13 + 0x1dc0], 1
mov rcx, r15
call fcn.14000c570
mov r14, qword [r15 + 0x28]
mov rax, qword [r15 + 0x30]
cmp rax, r14
jne 0x1400528b1
mov qword [rsp + 0x70], r14
test r14, r14
jne 0x140052952
cmp byte [r12 + 0x1c], 1
mov al, byte [r13 + 4]
sete byte [r13 + 0x13]
test byte [r13 + 0x10], 1
je 0x1400521fe
test al, 1
jne 0x1400528ca
mov dword [r13 + 0x14], 0
jmp 0x14005220e
test r14d, 0xff00000
jne 0x14005286d
mov eax, r14d
shr eax, 0xc
movzx eax, al
mov dword [r10 - 0xc], eax
mov byte [r10], 0
test r14d, 0xfff
jne 0x140052870
shl eax, 0xc
imul r8, rax
movabs rax, 0x7ffffc0000000000
and r8, rax
mov sil, 1
mov r9, r10
movabs rax, 0x40000000000
cmp r8, rax
jne 0x140052873
mov byte [r9], sil
mov r14, qword [r13 + r11*8 + 8]
inc r11
add r10, 0x30
cmp r14, 1
je 0x14005270d
mov dword [r10 - 0x10], r14d
mov r8d, r14d
mov rax, rcx
xor edx, edx
div r8
mov r8, rax
inc r8
mov qword [r10 - 8], r8
mov qword [r10 - 0x28], r15
movaps xmmword [r10 - 0x20], xmm0
movzx eax, byte [r10 - 0xc]
mov dword [r10 - 0xc], eax
cmp r14d, 0x10001
jae 0x1400523b8
lea r9, [r11 + r11*2]
shl r9, 4
add r9, r12
mov eax, 0x10000
xor edx, edx
div r14d
cvtsi2sd xmm1, edx
mulsd xmm1, qword [0x1400f98e8]
mov eax, 0xf000
xor edx, edx
div r14d
add edx, 8
xorps xmm2, xmm2
cvtsi2sd xmm2, edx
divsd xmm2, qword [0x1400f98f0]
mov eax, 0xe000
xor edx, edx
div r14d
add edx, 0x10
xorps xmm3, xmm3
cvtsi2sd xmm3, edx
divsd xmm3, qword [0x1400f98f8]
mov eax, 0xd000
xor edx, edx
div r14d
add edx, 0x18
xorps xmm4, xmm4
cvtsi2sd xmm4, edx
xor esi, esi
divsd xmm4, qword [0x1400f9900]
mov eax, 0xc000
xor edx, edx
div r14d
cvtsi2sd xmm5, edx
divsd xmm5, qword [0x1400f9908]
mov eax, 0xb000
xor edx, edx
div r14d
add edx, 8
cvtsi2sd xmm6, edx
divsd xmm6, qword [0x1400f9910]
mov eax, 0xa000
xor edx, edx
div r14d
add edx, 0x10
cvtsi2sd xmm7, edx
divsd xmm7, qword [0x1400f9918]
mov eax, 0x9000
xor edx, edx
div r14d
add edx, 0x18
cvtsi2sd xmm8, edx
divsd xmm8, qword [0x1400f9920]
mov eax, 0x8000
xor edx, edx
div r14d
cvtsi2sd xmm9, edx
mulsd xmm9, qword [0x1400f9928]
mov eax, 0x7000
xor edx, edx
div r14d
add edx, 8
cvtsi2sd xmm10, edx
divsd xmm10, qword [0x1400f9930]
mov eax, 0x6000
xor edx, edx
div r14d
add edx, 0x10
cvtsi2sd xmm11, edx
divsd xmm11, qword [0x1400f9938]
mov eax, 0x5000
xor edx, edx
div r14d
add edx, 0x18
cvtsi2sd xmm12, edx
divsd xmm12, qword [0x1400f9940]
mov eax, 0x4000
xor edx, edx
div r14d
cvtsi2sd xmm13, edx
mulsd xmm13, qword [0x1400f9948]
mov eax, 0x3000
xor edx, edx
div r14d
add edx, 8
cvtsi2sd xmm14, edx
divsd xmm14, qword [0x1400f9950]
xor eax, eax
ucomisd xmm15, xmm14
seta al
minsd xmm14, xmm15
ucomisd xmm14, xmm13
lea eax, [rax + rax*2]
mov edx, 4
cmova eax, edx
minsd xmm13, xmm14
ucomisd xmm13, xmm12
mov edx, 5
cmova eax, edx
minsd xmm12, xmm13
ucomisd xmm12, xmm11
mov edx, 6
cmova eax, edx
minsd xmm11, xmm12
ucomisd xmm11, xmm10
mov edx, 7
cmova eax, edx
minsd xmm10, xmm11
ucomisd xmm10, xmm9
mov edx, 8
cmova eax, edx
minsd xmm9, xmm10
ucomisd xmm9, xmm8
mov edx, 9
cmova eax, edx
minsd xmm8, xmm9
ucomisd xmm8, xmm7
mov edx, 0xa
cmova eax, edx
minsd xmm7, xmm8
ucomisd xmm7, xmm6
mov edx, 0xb
cmova eax, edx
minsd xmm6, xmm7
ucomisd xmm6, xmm5
mov edx, 0xc
cmova eax, edx
minsd xmm5, xmm6
ucomisd xmm5, xmm4
mov edx, 0xd
cmova eax, edx
minsd xmm4, xmm5
ucomisd xmm4, xmm3
mov edx, 0xe
cmova eax, edx
minsd xmm3, xmm4
ucomisd xmm3, xmm2
cmova eax, ebx
minsd xmm2, xmm3
ucomisd xmm2, xmm1
cmova eax, edi
add r9, 0x28
mov dword [r10 - 0xc], eax
cmp bpl, 1
jne 0x140052410
cmp r14d, 0x8001
jb 0x140052410
mov edx, eax
shl edx, 0xc
imul r8, rdx
movabs rdx, 0x7ffffc0000000000
and r8, rdx
movabs rdx, 0x40000000000
cmp r8, rdx
jne 0x140052876
cmp eax, 5
setae sil
jmp 0x140052410
cmp r11, 0x7f
movabs rcx, 0x40000000000
ja 0x140052753
dec r11
movabs rax, 0x400000001
xorps xmm0, xmm0
mov qword [r10 - 0x10], rax
mov qword [r10 - 8], rcx
movaps xmmword [r10 - 0x20], xmm0
mov byte [r10], 0
mov qword [r10 - 0x28], 0
inc r11
add r10, 0x30
cmp r11, 0x7f
jb 0x14005272d
lea rcx, [0x14010c568]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x28]
je 0x14005288d
cmp byte [0x14011ba48], 0
je 0x140052832
lea rcx, [0x14010c568]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp byte [rdi], 1
sete byte [rsi + 3]
je 0x14005289e
mov bl, 1
mov byte [rsi + 0x1878], bl
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor eax, eax
lock cmpxchg byte [0x14011b9ec], bl
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.14005e230
movaps xmm6, xmmword [rsp + 0xa0]
movaps xmm7, xmmword [rsp + 0xb0]
movaps xmm8, xmmword [rsp + 0xc0]
movaps xmm9, xmmword [rsp + 0xd0]
movaps xmm10, xmmword [rsp + 0xe0]
movaps xmm11, xmmword [rsp + 0xf0]
movaps xmm12, xmmword [rsp + 0x100]
movaps xmm13, xmmword [rsp + 0x110]
movaps xmm14, xmmword [rsp + 0x120]
movaps xmm15, xmmword [rsp + 0x130]
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [0x140121dd0], 0
jne 0x1400528ab
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1400528ae
mov dword [0x14011b9f0], eax
mov dword [0x140121dd8], eax
lea rax, [0x14000fff0]
mov qword [0x140121dd0], rax
mov byte [0x14011ba48], 1
jmp 0x14005277f
int3
int3
int3
xor esi, esi
jmp 0x140052410
int3
mov rcx, rbx
call fcn.140040b50
jmp 0x140052181
lea rcx, [0x14010c568]
call fcn.140040b50
jmp 0x140052772
mov rcx, rsi
call fcn.14003db60
jmp 0x140052799
int3
int3
add rax, 0xfffffffffffffff0
jne 0x140052372
ud2
mov byte [r13 + 0x1dc0], 0
jmp 0x14005234a
int3
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.14005e230
mov rcx, rbx
movaps xmm6, xmmword [rsp + 0xa0]
movaps xmm7, xmmword [rsp + 0xb0]
movaps xmm8, xmmword [rsp + 0xc0]
movaps xmm9, xmmword [rsp + 0xd0]
movaps xmm10, xmmword [rsp + 0xe0]
movaps xmm11, xmmword [rsp + 0xf0]
movaps xmm12, xmmword [rsp + 0x100]
movaps xmm13, xmmword [rsp + 0x110]
movaps xmm14, xmmword [rsp + 0x120]
movaps xmm15, xmmword [rsp + 0x130]
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
call fcn.140009eb0
mov rcx, rax
mov rdx, r14
call fcn.140010060
jmp 0x140052389