Function at 0x140161170
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 0x14016165e
cmp byte [rdi + 0x1470], 0
jne 0x14016166b
call fcn.1400318f0
cmp bl, 1
sete byte [rdi + 4]
mov eax, ebx
and eax, 0xff000000
cmp eax, 0x1000000
sete byte [rdi + 5]
movabs rax, 0xff00000000
and rax, rbx
movabs rcx, 0x100000000
cmp rax, rcx
sete byte [rdi + 6]
movabs rdx, 0xff0000000000
and rdx, rbx
movabs r8, 0x10000000000
cmp rdx, r8
sete byte [rdi + 7]
jne 0x140161221
cmp rax, rcx
jne 0x1401616b9
movabs rdx, 0xff000000000000
and rdx, rbx
movabs r8, 0x1000000000000
cmp rdx, r8
je 0x140161610
mov byte [rdi + 8], 0
lea rdx, [rdi + 0xc]
mov qword [rdi + 0xc], 0
cmp rax, rcx
je 0x1401615f7
mov rax, rbx
shr rax, 0x38
cmp eax, 1
je 0x140161647
test ebx, 0xff0000
setne byte [rdi]
xorps xmm8, xmm8
movups xmmword [rdi + 0x1448], xmm8
movups xmmword [rdi + 0x1458], xmm8
mov qword [rdi + 0x1468], 0
call fcn.1400f08c0
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, [0x14027a910]
movsd xmm9, qword [0x14025fa78]
movdqa xmm6, xmmword [0x140278800]
movapd xmm7, xmmword [0x140278810]
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.1400f08c0
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 0x1401613db
mov ecx, 0x3000
mov r10w, 3
xor r9d, r9d
movapd xmm0, xmm9
nop word [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 0x140161340
cmp r9w, 0x10
ja 0x140161652
lea rax, [rdi + r13*8]
add rax, 0x64
movzx ecx, r9b
mov dword [rax], ecx
mov rax, qword [r12 + r15*8 + 8]
inc r15
cmp rax, 1
jne 0x1401612dd
jmp 0x1401613f1
test r8d, 0xff00000
jne 0x140161655
shr r8d, 0xc
mov r9d, r8d
jmp 0x1401613b9
cmp r15, 0x7f
ja 0x14016152a
movabs r14, 0x40000000000
xorps xmm8, xmm8
movsd xmm9, qword [0x14025fa78]
lea r12, [r15 + r15*4]
mov dword [rdi + r12*8 + 0x60], 1
mov qword [rdi + r12*8 + 0x68], r14
call fcn.1400f08c0
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 0x140161514
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 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
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 0x140161470
cmp r9w, 0x10
ja 0x140161658
lea rax, [rdi + r12*8]
add rax, 0x48
movzx ecx, r9b
mov dword [rax + 0x1c], ecx
mov qword [rax], 0
lea rax, [r15 + 1]
cmp r15, 0x7f
mov r15, rax
jb 0x140161412
jmp 0x14016152a
test r8d, 0xff00000
jne 0x14016165b
shr r8d, 0xc
mov r9d, r8d
jmp 0x1401614eb
lea rcx, [0x14029ee68]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14016169b
cmp byte [0x1402b0da8], 0
je 0x1401615b4
lea rcx, [0x14029ee68]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
and ebx, 0xff00
cmp rbx, 0x100
sete byte [rdi + 3]
cmp ebx, 0x100
je 0x1401616ac
mov bl, 1
mov byte [rdi + 0x1470], bl
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor eax, eax
lock cmpxchg byte [0x1402b0db8], 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 [0x1402b5de8], 0
jne 0x1401616bc
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1401616bf
mov dword [0x1402b0d50], eax
mov dword [0x1402b5df0], eax
lea rax, [0x140178930]
mov qword [0x1402b5de8], rax
mov byte [0x1402b0da8], 1
jmp 0x140161548
mov dword [rdx], 4
mov rax, rbx
shr rax, 0x38
cmp eax, 1
jne 0x14016126a
int3
cmp qword [0x1402aaed0], 0xffffffffffffffff
setne byte [rdi + 8]
je 0x140161245
cmp rax, rcx
je 0x1401616c2
mov qword [rdi + 0xc], 0
mov rax, rbx
shr rax, 0x38
cmp eax, 1
jne 0x14016126a
lea rdx, [rdi + 0xc]
mov dword [rdx], 4
jmp 0x14016126a
int3
int3
int3
int3
mov rcx, rsi
call fcn.1400ef7c0
jmp 0x1401611b1
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, [0x14029ee68]
call fcn.1400ef7c0
jmp 0x14016153f
mov rcx, rdi
call fcn.1400b9f40
jmp 0x140161572
int3
int3
int3
int3