Function at 0x411e80
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push r14
push r13
push r12
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x28
mov qword [rbp + 0x38], rcx
lea rcx, [0x00501158]
call sym.unk_4158
mov rax, qword [rbp + 0x38]
lea r12, [rax + 0x38]
mov rcx, r12
call sym.unk_4158
cmp dword [0x00536410], 1
je 0x411f87
lea rcx, [0x00501150]
lea rsi, [0x00536410]
call sym.unk_4176
mov rbx, qword [0x005363c0]
test rbx, rbx
jne 0x411f28
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov r13, rax
lea rax, [0x00536410]
mov qword [r13], rax
mov dword [r13 + 0x10], 1
mov qword [0x005363c0], r13
lea rcx, [r13 + 8]
xor edx, edx
call sym.unk_4162
jmp 0x411f33
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x4120dc
mov rbx, rax
cmp qword [rbx], rsi
jne 0x411f18
inc dword [rbx + 0x10]
mov r13, rbx
lea rcx, [0x00501150]
lea r14, [r13 + 8]
call sym.unk_4178
mov rcx, r14
call sym.unk_4158
mov ebx, dword [0x00536410]
test ebx, ebx
jne 0x4120a0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x00501168], eax
inc eax
je sym.unk_4190
mov dword [0x00536410], 1
mov rcx, r14
call sym.unk_4160
mov rcx, r13
call sym.unk_4182
mov rdx, qword [rbp + 0x38]
mov ecx, dword [0x00501168]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rdx, qword [rbp + 0x38]
mov rcx, r12
mov dword [rdx + 0x70], eax
call sym.unk_4160
mov rax, qword [rbp + 0x38]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
jne 0x412101
lea rcx, [0x00501158]
call sym.unk_4160
mov rax, qword [rbp + 0x38]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x4120d2
mov rdx, qword [rbp + 0x38]
mov rcx, qword [rdx + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x00501158]
call sym.unk_4158
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x412018
call sym.unk_4188
mov rax, qword [rbp + 0x38]
lea r12, [rax + 0x38]
mov rcx, r12
call sym.unk_4158
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x30]
mov rbx, qword [rax + 8]
test rcx, rcx
je 0x41203f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x38]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x412112
mov rcx, r12
call sym.unk_4160
mov rcx, r12
call sym.unk_4163
mov rax, qword [rbp + 0x38]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea r12, [0x00501158]
mov rcx, r12
call sym.unk_4160
test eax, eax
jne 0x412148
xor ecx, ecx
call rsi
jmp 0x41208a
cmp ebx, 1
je 0x411f77
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r9d, ebx
lea r8, [0x00536410]
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf
jmp 0x411f77
mov ebx, pe_nt_image_headers64
jmp 0x411ff1
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov qword [rax], rsi
mov r13, rax
mov dword [rax + 0x10], 1
mov qword [rbx + 0x18], rax
jmp 0x411f08
lea rcx, [0x00501158]
call sym.unk_4158
jmp 0x412018
mov rax, qword [rbp + 0x38]
mov rcx, r12
mov dword [rax], 0xdeadbeef
call sym.unk_4160
mov rcx, r12
call sym.unk_4163
mov rcx, qword [rbp + 0x38]
call sym.unk_4180
mov ecx, dword [0x00501168]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41207c
mov ecx, ebx
call qword [sym.imp.msvcrt.dll__endthreadex]