Function at 0x140043ad0
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x30
mov r15, rcx
mov rax, qword [0x1401ff028]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rax, [0x1401d4af0]
mov qword [rcx], rax
lea rax, [0x1401d75f0]
mov qword [rcx + 8], rax
mov eax, dword [0x14020a490]
mov ecx, dword [0x1402029e4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140043e55
lea rdi, [r15 + 8]
mov ecx, dword [0x140200ec8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140043e98
movsxd rcx, dword [0x14020a488]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14020a48c]
jne 0x140043e98
mov rcx, qword [rax + rcx]
mov rdx, r15
call fcn.1400206e0
call fcn.14001e380
mov rcx, rax
mov rdx, rdi
xor r8d, r8d
call fcn.140028020
mov r14, qword [r15 + 0x10]
add r14, 8
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140043e9f
mov rax, qword [r15 + 0x18]
test rax, rax
jne 0x140043eac
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9, qword [r15 + 0x10]
mov r10, qword [r9 + 0x310]
test r10, r10
je 0x140043ceb
mov r8d, eax
movsxd r13, eax
mov rax, r10
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, r10
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rsi, 0x101010101010101
imul rsi, rax
shr rsi, 0x38
cmp rsi, 1
ja 0x140043da7
lea rcx, [r10 - 1]
and rcx, r13
mov r12, qword [r9 + 0x308]
mov rax, qword [r12 + rcx*8]
test rax, rax
je 0x140043ceb
mov rbx, qword [rax]
test rbx, rbx
je 0x140043ceb
lea r11, [r10 - 1]
mov rax, qword [rbx + 8]
cmp rax, r13
jne 0x140043e25
cmp dword [rbx + 0x10], r8d
jne 0x140043e44
cmp esi, 1
ja 0x140043dc3
and r13, r11
mov rax, qword [r12 + r13*8]
mov rcx, rax
mov rax, qword [rax]
cmp rax, rbx
jne 0x140043c7d
lea rax, [r9 + 0x318]
cmp rcx, rax
jne 0x140043deb
mov rax, qword [rbx]
test rax, rax
jne 0x140043d8d
mov qword [r12 + r13*8], 0
mov rdi, qword [rbx]
test rdi, rdi
jne 0x140043d65
xor edi, edi
mov qword [rcx], rdi
mov qword [rbx], 0
dec qword [r9 + 0x320]
test rbx, rbx
je 0x140043ceb
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140043ce3
lock dec dword [rcx + 8]
je 0x140043ee4
mov rcx, rbx
call fcn.1401039b0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rsi, qword [r15 + 0x10]
mov ecx, dword [0x140200ec8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140043d32
movsxd rcx, dword [rsi + 0x2f0]
shl rcx, 4
mov qword [rax + rcx], 0
mov ecx, dword [rsi + 0x2f4]
movsxd rdx, dword [rsi + 0x2f0]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rdi, qword [r15 + 0x18]
mov qword [r15 + 0x18], 0
test rdi, rdi
jne 0x140043ef6
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140106510
nop
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rdi + 8]
cmp esi, 1
ja 0x140043ddc
and rax, r11
cmp rax, r13
je 0x140043cba
mov rdx, qword [r9 + 0x308]
mov qword [rdx + rax*8], rcx
mov rdi, qword [rbx]
jmp 0x140043cba
mov rax, qword [rax + 8]
cmp esi, 1
ja 0x140043e13
and rax, r11
cmp rax, r13
je 0x140043cac
jmp 0x140043ca4
mov rcx, r13
cmp r10, r13
ja 0x140043c32
mov rax, r13
xor edx, edx
div r10
mov rcx, rdx
jmp 0x140043c32
cmp r10, r13
ja 0x140043c79
mov rax, r13
xor edx, edx
div r10
mov r13, rdx
jmp 0x140043c79
cmp rax, r10
jb 0x140043d71
xor edx, edx
div r10
mov rax, rdx
jmp 0x140043d71
mov rax, qword [rcx + 8]
cmp esi, 1
jbe 0x140043f0b
cmp rax, r10
jb 0x140043e05
xor edx, edx
div r10
mov rax, rdx
cmp rax, r13
je 0x140043cac
jmp 0x140043c98
cmp rax, r10
jb 0x140043d99
xor edx, edx
div r10
mov rax, rdx
jmp 0x140043d99
cmp esi, 1
jbe 0x140043f13
cmp rax, r10
jb 0x140043e3b
xor edx, edx
div r10
mov rax, rdx
cmp rax, rcx
jne 0x140043ceb
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140043c56
jmp 0x140043ceb
lea rcx, [0x14020a490]
int3
xor ecx, ecx
jmp 0x140043b64
mov rcx, r14
int3
mov rcx, qword [r15 + 0x10]
mov rdx, qword [rcx + 0x360]
cmp dword [r15 + 0x28], edx
jne 0x140043ba5
mov rcx, qword [rcx + 0x20]
mov qword [r15 + 0x18], 0
lea r8, [rsp + 0x20]
mov qword [r8], rax
mov rdx, qword [r15 + 0x20]
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x140043ba5
add rcx, 8
add rcx, 0xfffffffffffffff8
int3
mov rcx, rdi
int3
and rax, r11
jmp 0x140043e05
and rax, r11
jmp 0x140043e3b