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

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x1d3c0ddd0], 1
je 0x1d3b38d67
call fcn.1d3b389b0
mov ecx, dword [0x1d3bd7158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x1d3b38d90
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call fcn.1d3b38730
cmp qword [0x1d3c29040], 0
mov rbx, rax
je 0x1d3b38d7b
test rax, rax
je 0x1d3b38d7b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.1d3b380f0
cmp eax, 1
je 0x1d3b38e9a
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rdi
mov dword [rsp + 0x30], 2
mov r8, rsi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1d3bd67ec
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1d3bd7158]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1d3bd67ec
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call fcn.1d3b38500
nop
push r14
push r13
push r12
sub rsp, 0x20
test edx, edx
jne 0x1d3b38ed0
test r8, r8
je 0x1d3b38f90
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
cmp edx, 1
je 0x1d3b38fc0
cmp edx, 3
jne 0x1d3b38eb7
mov ecx, dword [0x1d3bd7158]
cmp ecx, 0xffffffff
je 0x1d3b38eb7
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x1d3b38eb7
test byte [rax + 0x40], 0x30
je 0x1d3b38ff0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x1d3b38f12
call fcn.1d3b38a60
mov rcx, qword [r12 + 0x28]
test rcx, rcx
je 0x1d3b38f45
mov r13, qword [sym.imp.KERNEL32.dll_CloseHandle]
call r13
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x1d3b38f33
call r13
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
lea rcx, [r12 + 0x38]
call fcn.1d3b37f70
lea rcx, [r12 + 0x68]
call fcn.1d3b380f0
cmp eax, 1
je 0x1d3b39084
cmp qword [r12 + 0x1d0], 0
mov qword [r12 + 0x68], 0xffffffffffffffff
je 0x1d3b390f0
mov ecx, dword [0x1d3bd7158]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1d3b38eb7
mov rcx, qword [0x1d3c0dd90]
test rcx, rcx
je 0x1d3b38eb7
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x1d3c0dd90], 0
jmp 0x1d3b38eb7
lea rdx, [0x1d3b38150]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x1d3c0dd90], rax
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x1d3b39090
test rcx, rcx
je 0x1d3b3900d
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 0x1d3b39034
call fcn.1d3b38a60
lea r14, [r12 + 0x38]
lea r13, [r12 + 0x68]
test byte [r12 + 0x44], 4
je 0x1d3b390d0
mov rcx, qword [r12 + 0x28]
mov dword [r12], 0xdeadbeef
test rcx, rcx
je 0x1d3b39062
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x28], 0
mov rcx, r14
call fcn.1d3b37f70
mov rcx, r13
call fcn.1d3b380f0
cmp eax, 1
jne 0x1d3b38f62
call fcn.1d3b38500
nop dword [rax]
test rcx, rcx
je 0x1d3b3909b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x30], 0
lea rcx, [r12 + 0x38]
call fcn.1d3b37f70
lea rcx, [r12 + 0x68]
call fcn.1d3b380f0
cmp eax, 1
je 0x1d3b39084
mov qword [r12 + 0x68], 0xffffffffffffffff
jmp 0x1d3b38eb7
mov rcx, r14
call fcn.1d3b37f70
mov rcx, r13
call fcn.1d3b380f0
cmp eax, 1
jne 0x1d3b390bd
jmp 0x1d3b39084
mov rcx, r12
call fcn.1d3b38800
jmp 0x1d3b38f7a
call sub.msvcrt.dll_abort
nop
mov rax, qword [0x28]
ud2