Function at 0x140022f30
Capabilities:
Allocate thread local storage

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
movaps xmmword [rsp + 0x80], xmm6
mov rbx, rdx
mov rdi, rcx
mov rax, qword [0x140145040]
xor rax, rsp
mov qword [rsp + 0x78], rax
lea rsi, [rcx + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140022f79
mov rcx, rsi
call fcn.140096890
cmp byte [rdi + 0x1470], 0
je 0x140022fb4
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400b7310
mov rcx, rsi
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
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.140064810
cmp byte [rbx + 2], 1
sete byte [rdi + 4]
sete al
cmp byte [rbx + 3], 1
sete dl
cmp qword [0x140147c10], 0xffffffffffffffff
setne cl
and cl, dl
mov byte [rdi + 0x10], cl
cmp byte [rbx + 0x18], 1
sete byte [rdi + 0x11]
cmp byte [rbx + 4], 1
sete byte [rdi + 0x12]
je 0x140022fff
cmp byte [rdi + 0x19c0], 0
je 0x140023154
jmp 0x1400232ee
movabs r12, 0xaaaaaaaaaaaaaaaa
mov rax, qword [rbx + 0x10]
mov qword [rdi + 0x1938], rax
mov rax, qword [rbx + 8]
mov qword [rdi + 0x1930], rax
lea r15, [rdi + 0x1940]
mov rax, qword [rbx + 0x10]
mov qword [rdi + 0x1948], rax
mov r13, qword [rbx + 8]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x30], r13
mov byte [rsp + 0x38], 1
mov qword [rsp + 0x40], 0
lea r14, [rsp + 0x70]
mov qword [r14], r12
mov edx, 8
mov rcx, r14
call fcn.14000fbc0
mov rax, qword [r14]
mov qword [rsp + 0x48], rax
mov qword [r14], r12
lea r14, [rsp + 0x70]
mov edx, 8
mov rcx, r14
call fcn.14000fbc0
mov rax, qword [r14]
mov qword [rsp + 0x50], rax
call fcn.1400a46e0
mov rdx, r13
shl rdx, 4
mov rcx, rax
xor r8d, r8d
call fcn.140014af0
test r13, r13
je 0x1400232eb
mov r14, rax
cmp byte [rdi + 0x19c0], 0
je 0x1400230ba
mov byte [rdi + 0x19c0], 0
mov qword [rdi + 0x1978], r15
mov qword [rdi + 0x1980], r13
mov r13b, 1
mov byte [rdi + 0x1988], r13b
xorps xmm6, xmm6
movaps xmmword [rdi + 0x1990], xmm6
xor ebp, ebp
mov qword [rdi + 0x19a0], rbp
lea r15, [rsp + 0x70]
mov qword [r15], r12
mov edx, 8
mov rcx, r15
call fcn.14000fbc0
mov rax, qword [r15]
mov qword [rdi + 0x1998], rax
mov qword [r15], r12
lea r15, [rsp + 0x70]
mov edx, 8
mov rcx, r15
call fcn.14000fbc0
mov rax, qword [r15]
mov qword [rdi + 0x19a0], rax
mov qword [rdi + 0x19a8], r14
movaps xmmword [rdi + 0x19b0], xmm6
lea rax, [rsp + 0x58]
mov qword [rax + 0x10], rbp
movups xmmword [rax], xmm6
mov byte [rdi + 0x19c0], r13b
lea rcx, [rsp + 0x28]
call fcn.1400192f0
mov al, byte [rdi + 4]
mov cl, byte [rdi + 0x10]
test cl, cl
je 0x140023279
test al, al
jne 0x1400232e8
mov dword [rdi + 0x14], 0
cmp byte [rbx + 1], 0
setne byte [rdi]
xorps xmm0, xmm0
movaps xmmword [rdi + 0x1450], xmm0
movaps xmmword [rdi + 0x1460], xmm0
lea rax, [0x14012a484]
mov qword [rdi + 0x1448], rax
mov rax, rdi
not rax
mov qword [rdi + 0x1920], rax
lea r14, [rdi + 0x48]
mov edx, 0x10
xor r15d, r15d
lea r12, [0x140129890]
mov rcx, r14
call fcn.1400b48b0
mov rdx, qword [r12 + r15*8 + 8]
inc r15
add r14, 0x28
cmp rdx, 1
jne 0x1400231b1
cmp r15, 0x7f
ja 0x1400231f5
dec r15
mov rcx, r14
mov edx, 1
call fcn.1400b48b0
mov qword [r14], 0
inc r15
add r14, 0x28
cmp r15, 0x7f
jb 0x1400231d4
lea rcx, [0x140147c78]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400232d7
cmp byte [0x140159c68], 0
je 0x14002329c
lea rcx, [0x140147c78]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp byte [rbx], 1
sete byte [rdi + 3]
jne 0x140023235
mov rcx, rdi
call fcn.14006b310
mov bl, 1
mov byte [rdi + 0x1470], bl
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor eax, eax
lock cmpxchg byte [0x140159c18], bl
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400b7310
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rdi + 0x14], 0
test al, al
je 0x14002316b
mov qword [rdi + 8], 4
mov dword [rdi + 0x14], 4
jmp 0x14002316b
cmp qword [0x14015aab8], 0
jne 0x1400232f1
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1400232f4
mov dword [0x140159c1c], eax
mov dword [0x14015aac0], eax
lea rax, [0x1400191f0]
mov qword [0x14015aab8], rax
mov byte [0x140159c68], 1
jmp 0x140023217
lea rcx, [0x140147c78]
call fcn.140096890
jmp 0x14002320a
int3
int3
int3
int3
int3