Function at 0x180005820
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov r13, r8
mov rsi, rdx
mov r12, rcx
xor edi, edi
test rcx, rcx
je 0x180005b1f
test r8, r8
je 0x180005b1f
mov qword [r8], rdi
mov rax, qword [rcx]
movabs r10, 0xdee01e7974d59970
lea rdx, [0x180130f20]
mov rax, qword [rax]
call qword [case.0x180004bac.0]
test eax, eax
js 0x18000587f
xor eax, eax
jmp 0x180005b24
mov qword [rbp - 0x28], rdi
mov dword [rbp + 0x40], edi
mov dword [rbp + 0x58], edi
mov rax, qword [r12]
movabs r10, 0xdee01e7974d59970
lea r8, [rbp - 0x28]
lea rdx, [0x180130ef8]
mov rcx, r12
mov rax, qword [rax]
call qword [case.0x180004bac.0]
test eax, eax
js 0x1800058df
mov rcx, qword [rbp - 0x28]
mov rax, qword [rcx]
movabs r10, 0x93ed37fb1a51fb70
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x58]
mov rax, qword [rax + 0x28]
call qword [case.0x180004bac.0]
mov ebx, eax
test eax, eax
js 0x180005afb
mov rax, qword [r12]
movabs r10, 0xdbad1ea7345b3870
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [case.0x180004bac.0]
mov rbx, rax
mov qword [rbp - 0x20], rax
mov rcx, qword [r12]
mov rax, qword [rcx + 0x20]
movabs r10, 0x8634164e745d9870
mov rcx, r12
call qword [case.0x180004bac.0]
mov r15, rax
mov dword [rbp - 0x30], edi
cmp dword [rbp + 0x58], edi
je 0x180005930
mov r10d, dword [rbp + 0x40]
test r10d, r10d
jne 0x180005957
mov rdx, r15
mov rcx, rbx
call fcn.180004a34
mov r10d, eax
mov dword [rbp + 0x40], eax
mov ecx, eax
call fcn.180004ad4
mov dword [rbp - 0x30], eax
mov ecx, eax
add rbx, rcx
mov qword [rbp - 0x20], rbx
sub r15, rcx
test rsi, rsi
jne 0x180005981
mov rcx, qword [0x1801659a0]
test rcx, rcx
jne 0x180005971
mov rsi, qword [0x1801659a8]
jmp 0x180005981
mov ecx, dword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
mov r10d, dword [rbp + 0x40]
mov r14, rsi
mov qword [rbp - 0x18], rsi
test rsi, rsi
je 0x1800059ab
mov rax, qword [rsi]
movabs r10, 0xfd41b67356dad870
mov rcx, rsi
mov rax, qword [rax + 8]
call qword [case.0x180004bac.0]
mov r10d, dword [rbp + 0x40]
mov qword [rbp - 0x10], rdi
and dword [rbp - 0x2c], edi
mov ecx, 0xfde9
cmp r10d, ecx
jne 0x180005a55
cmp r15, 1
jb 0x180005a0d
cmp byte [r15 + rbx - 1], dil
jne 0x180005a0d
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, ecx
mov rdx, rsi
mov rcx, r12
call fcn.180006820
mov ebx, eax
test eax, eax
js 0x180005ab9
mov rcx, qword [rbp - 0x20]
mov eax, dword [rbp - 0x30]
test eax, eax
je 0x180005a04
add qword [rcx + 0x18], rax
mov eax, r15d
mov qword [rcx + 0x28], rax
mov qword [r13], rcx
jmp 0x180005ab9
lea r12d, [r15 + 1]
mov edx, r12d
mov rax, qword [rsi]
movabs r10, 0x8811273e76d7e870
mov rcx, rsi
mov rax, qword [rax + 0x18]
call qword [case.0x180004bac.0]
mov rdi, rax
test rax, rax
jne 0x180005a3d
mov ebx, 0x8007000e
jmp 0x180005ab9
mov ebx, r15d
mov r8d, r15d
mov rdx, qword [rbp - 0x20]
mov rcx, rdi
call fcn.18010eac0
mov byte [rbx + rdi], 0
jmp 0x180005a8a
lea rax, [rbp - 0x2c]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x20], rax
mov r9, rsi
mov r8, r15
mov rdx, rbx
mov ecx, r10d
call fcn.180004e90
mov ebx, eax
mov rdi, qword [rbp - 0x10]
mov r14, qword [rbp - 0x18]
test eax, eax
js 0x180005ab9
mov r12d, dword [rbp - 0x2c]
mov r8d, r12d
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xfde9
mov rdx, rsi
mov rcx, rdi
call fcn.180006768
mov ebx, eax
test eax, eax
js 0x180005ab9
mov rax, qword [rbp - 0x20]
mov qword [r13], rax
xor edi, edi
test rdi, rdi
je 0x180005adb
mov rax, qword [r14]
movabs r10, 0xcb3d1ea576d29870
mov rdx, rdi
mov rcx, r14
mov rax, qword [rax + 0x28]
call qword [case.0x180004bac.0]
test r14, r14
je 0x180005afb
mov rax, qword [r14]
movabs r10, 0xbaac1f10365eb170
mov rcx, r14
mov rax, qword [rax + 0x10]
call qword [case.0x180004bac.0]
nop
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180005b1b
mov rdx, qword [rcx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rdx + 0x10]
call qword [case.0x180004bac.0]
mov eax, ebx
jmp 0x180005b24
mov eax, 0x80004003
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret