Function at 0x140009640
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov eax, 7
mov r13d, dword [0x1400707a8]
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rcx, rax
cmovge rax, rcx
mov rdi, rax
call rbp
mov ecx, r13d
mov r13, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12d, eax
call r13
mov ecx, r12d
mov r12, qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, rax
call r12
mov rax, qword [rbx + 0x50]
cmp qword [rbx + 0x48], rax
jle 0x140009728
mov rax, qword [rbx + 0x40]
cmp qword [rbx + 0x2138], rax
jge 0x140009728
lea rdx, [rdi + 0x21]
lea rcx, [rbx + 0xa0]
call sym.rawAlloc__system_5138
mov rsi, rax
lea rax, [0x14004c020]
mov qword [rsi + 8], rax
mov qword [rsi], 4
mov rax, qword [rbx + 0x50]
mov rdx, qword [rbx + 0x60]
cmp rax, 8
jle 0x140009800
lea r8, [rax*8]
lea r9, [rdx + r8 - 8]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
jbe 0x140009760
and rcx, 0xfffffffffffffffb
mov qword [r10], rcx
mov qword [r9], rsi
lea rax, [rsi + 0x10]
mov qword [rax + 8], rdi
mov qword [rsi + 0x10], 0
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [rbx + 0x98], 0
jne 0x1400096aa
lea rcx, [rbx + 0x38]
call sym.collectCTBody__system_6506
mov rax, qword [rbx + 0x50]
mov edx, 0x1f4
add rax, rax
cmp rax, rdx
cmovl rax, rdx
mov qword [rbx + 0x48], rax
jmp 0x1400096aa
lea r9, [rdx + r8 - 0x10]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea r9, [rdx + r8 - 0x18]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea r9, [rdx + r8 - 0x20]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea r9, [rdx + r8 - 0x28]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea r9, [rdx + r8 - 0x30]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea r9, [rdx + r8 - 0x38]
mov r10, qword [r9]
mov rcx, qword [r10]
cmp rcx, 7
ja 0x1400096fa
lea rcx, [rdx + r8 - 0x40]
mov r8, qword [rcx]
mov rdx, qword [r8]
cmp rdx, 7
jbe 0x14000980e
and rdx, 0xfffffffffffffffb
mov qword [r8], rdx
mov qword [rcx], rsi
jmp 0x140009704
mov qword [rdx + rax*8], rsi
add qword [rbx + 0x50], 1
jmp 0x140009704
mov r14, qword [rbx + 0x58]
cmp rax, r14
jl 0x1400098c8
lea r14, [r14 + r14*2]
mov ecx, 2
mov r15d, dword [0x1400707a8]
mov rax, r14
cqo
idiv rcx
mov r14, rax
mov qword [rbx + 0x58], rax
call rbp
mov ecx, r15d
mov dword [rsp + 0x20], eax
call r13
mov ecx, dword [rsp + 0x20]
mov r15, rax
call r12
lea rdx, [r14*8 + 0x10]
lea rcx, [r15 + 0xa0]
call sym.rawAlloc__system_5138
mov qword [rax + 8], 1
mov r14, rax
mov r8, qword [rbx + 0x50]
mov rdx, qword [rbx + 0x60]
add r14, 0x10
shl r8, 3
mov rcx, r14
call sym.memcpy
mov ecx, dword [0x1400707a8]
mov rax, qword [rbx + 0x60]
mov dword [rsp + 0x2c], ecx
mov qword [rsp + 0x20], rax
call rbp
mov ecx, dword [rsp + 0x2c]
mov r15d, eax
call r13
mov ecx, r15d
mov rbp, rax
call r12
mov rax, qword [rsp + 0x20]
lea rcx, [rbp + 0xa0]
lea rdx, [rax - 0x10]
call sym.rawDealloc__system_5267
mov qword [rbx + 0x60], r14
mov rdx, qword [rbx + 0x50]
mov rax, qword [rbx + 0x60]
mov qword [rax + rdx*8], rsi
add qword [rbx + 0x50], 1
jmp 0x140009704