Function at 0x2cd7e2cf0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x2cd7f7b80], 1
je 0x2cd7e2d08
call fcn.2cd7e2950
mov ecx, dword [0x2cd7eec28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x2cd7e2d30
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
call fcn.2cd7e2620
mov r12, rax
test rax, rax
je 0x2cd7e2d1c
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [r12 + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [r12 + 0x68]
mov qword [r12 + 0x38], 0xffffffffffffffff
mov qword [r12 + 0x30], rax
call fcn.2cd7e5d00
cmp eax, 1
je 0x2cd7e2e41
mov qword [r12 + 0x68], 0xffffffffffffffff
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [r12 + 0xb8], 0
mov qword [r12 + 0x28], 0
call rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r13, rax
call rsi
mov dword [rsp + 0x30], 2
mov r8, rbx
mov rdx, r13
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [r12 + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x2cd7e989c
mov rcx, qword [r12 + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x2cd7eec28]
mov rdx, r12
mov dword [r12 + 0xbc], 0
mov dword [r12 + 0xc0], eax
movzx eax, byte [r12 + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [r12 + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x2cd7e989c
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
call fcn.2cd7e2720
nop
nop word [rax + rax]
push r14
push r13
push r12
sub rsp, 0x20
test edx, edx
jne 0x2cd7e2e78
test r8, r8
je 0x2cd7e2f70
add rsp, 0x20
pop r12
pop r13
pop r14
ret
cmp edx, 1
je 0x2cd7e2f40
cmp edx, 3
jne 0x2cd7e2e67
mov ecx, dword [0x2cd7eec28]
cmp ecx, 0xffffffff
je 0x2cd7e2e67
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x2cd7e2e67
test byte [rax + 0x40], 0x30
je 0x2cd7e2fa8
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x2cd7e2eba
call fcn.2cd7e2a00
mov rcx, qword [r12 + 0x28]
test rcx, rcx
je 0x2cd7e2eed
mov r13, qword [sym.imp.KERNEL32.dll_CloseHandle]
call r13
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x2cd7e2edb
call r13
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
lea rcx, [r12 + 0x38]
call fcn.2cd7e2080
lea rcx, [r12 + 0x68]
call fcn.2cd7e5d00
cmp eax, 1
je 0x2cd7e303c
cmp qword [r12 + 0x1d0], 0
mov qword [r12 + 0x68], 0xffffffffffffffff
je 0x2cd7e30a0
mov ecx, dword [0x2cd7eec28]
xor edx, edx
add rsp, 0x20
pop r12
pop r13
pop r14
jmp qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword [0x2cd7f7b38]
test rax, rax
je 0x2cd7e2f8e
lea rdx, [0x2cd7e21f0]
mov ecx, 1
call rax
mov qword [0x2cd7f7b40], rax
add rsp, 0x20
pop r12
pop r13
pop r14
ret
mov rcx, qword [0x2cd7f7b40]
test rcx, rcx
je 0x2cd7e2e67
mov rax, qword [0x2cd7f7b30]
test rax, rax
je 0x2cd7e2f8e
call rax
mov qword [0x2cd7f7b40], 0
add rsp, 0x20
pop r12
pop r13
pop r14
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x2cd7e3048
test rcx, rcx
je 0x2cd7e2fc5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r12 + 0x1d8]
mov qword [r12 + 0x30], 0
mov dword [r12 + 0xbc], 1
test rcx, rcx
je 0x2cd7e2fec
call fcn.2cd7e2a00
lea r14, [r12 + 0x38]
lea r13, [r12 + 0x68]
test byte [r12 + 0x44], 4
je 0x2cd7e3088
mov rcx, qword [r12 + 0x28]
mov dword [r12], 0xdeadbeef
test rcx, rcx
je 0x2cd7e301a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x28], 0
mov rcx, r14
call fcn.2cd7e2080
mov rcx, r13
call fcn.2cd7e5d00
cmp eax, 1
jne 0x2cd7e2f0a
call fcn.2cd7e2720
nop dword [rax]
test rcx, rcx
je 0x2cd7e3053
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x30], 0
lea rcx, [r12 + 0x38]
call fcn.2cd7e2080
lea rcx, [r12 + 0x68]
call fcn.2cd7e5d00
cmp eax, 1
je 0x2cd7e303c
mov qword [r12 + 0x68], 0xffffffffffffffff
jmp 0x2cd7e2e67
mov rcx, r14
call fcn.2cd7e2080
mov rcx, r13
call fcn.2cd7e5d00
cmp eax, 1
jne 0x2cd7e3075
jmp 0x2cd7e303c
mov rcx, r12
call fcn.2cd7e27a0
jmp 0x2cd7e2f22
call sub.msvcrt.dll_abort
nop
mov rax, qword [0x28]
ud2