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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x300
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x358], rbx
mov rax, qword [0x1403ad830]
xor rax, rsp
mov qword [rsp + 0x2f0], rax
mov qword [rsp + 0x40], r8
mov rdi, rdx
mov qword [rsp + 0x38], rdx
mov r12, rcx
xor edx, edx
mov r8d, 0x148
lea rcx, [rsp + 0x50]
call fcn.140285450
xor edx, edx
mov r8d, 0x148
lea rcx, [rsp + 0x1a0]
call fcn.140285450
mov ecx, dword [r12 + 0x38]
cmp ecx, 0xffffffff
je 0x14023f442
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x14023f45a
mov dl, 1
mov rcx, r12
call fcn.14023edb0
test eax, eax
jne 0x14023f45a
mov eax, 0xffffffff
jmp 0x14023f6f0
xor ebx, ebx
mov ebp, ebx
mov ecx, dword [r12 + 0x38]
cmp ecx, 0xffffffff
je 0x14023f471
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
mov eax, ebx
mov qword [rsp + 0x28], rax
mov ecx, dword [r12 + 0x3c]
cmp ecx, 0xffffffff
je 0x14023f48d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
mov ecx, dword [r12 + 0x40]
mov esi, ebx
cmp ecx, 0xffffffff
je 0x14023f4ab
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
mov qword [rsp + 0x20], rax
mov r15d, 1
lock xadd dword [0x1404526c4], r15d
inc r15d
mov rdx, qword [rdi]
mov rcx, rdi
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
mov r14, rax
mov rdx, qword [rdi]
mov rcx, rdi
call qword [rdx + 0x20]
mov edi, eax
test eax, eax
je 0x14023f6d0
mov eax, esi
mov qword [rsp + 0x30], rax
lea r13, [rsp + 0x50]
add r13, rax
nop dword [rax + rax]
mov r8, rax
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.140285450
mov rax, qword [rsp + 0x28]
mov ecx, eax
cmp edi, eax
cmovbe ecx, edi
mov esi, ecx
mov word [rsp + 0x50], si
movzx eax, cx
add ax, word [rsp + 0x20]
mov word [rsp + 0x52], ax
mov r8d, ecx
mov rdx, r14
mov rcx, r13
call fcn.140284ff0
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r14, rax
jne 0x14023f541
mov byte [r13 + 3], r15b
add r14, rsi
sub edi, esi
lea r8, [rsp + 0x1a0]
lea rdx, [rsp + 0x50]
mov rcx, rbp
call qword [0x140452450]
test eax, eax
js 0x14023f6d0
test edi, edi
je 0x14023f585
cmp word [rsp + 0x1a0], bx
mov rax, qword [rsp + 0x30]
je 0x14023f4f0
mov eax, 0xfffffffe
jmp 0x14023f6f0
mov r13, qword [rsp + 0x30]
lea r14, [rsp + 0x1a0]
add r14, r13
cmp word [rsp + 0x1a0], 8
jb 0x14023f6c9
cmp byte [r14 + 3], r15b
je 0x14023f5b4
mov eax, 0xfffffffc
jmp 0x14023f6f0
mov byte [r14 + 3], bl
mov esi, dword [r14]
test esi, esi
je 0x14023f6c9
mov ecx, 0x20
call fcn.14028314c
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14023f5e5
lea edx, [rsi + 8]
mov rcx, rax
call fcn.14025ce40
mov rbx, rax
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdi, rax
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
movsx edx, word [rsp + 0x1a0]
lea ecx, [rdi + rdx]
sub ecx, eax
cmp ecx, esi
ja 0x14023f66d
movsx r8, dx
mov rdx, r14
mov rcx, rdi
call fcn.140284ff0
movsx rax, word [rsp + 0x1a0]
add rdi, rax
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, rdi
sub rcx, rax
cmp rcx, rsi
jae 0x14023f697
mov r8, r13
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.140285450
mov rax, qword [rsp + 0x20]
mov word [rsp + 0x52], ax
lea r8, [rsp + 0x1a0]
lea rdx, [rsp + 0x50]
mov rcx, rbp
call qword [0x140452450]
test eax, eax
jns 0x14023f5f1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov rcx, rbp
call qword [0x140452438]
mov ecx, dword [r12 + 0x38]
cmp ecx, 0xffffffff
je 0x14023f690
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, 0xfffffffa
jmp 0x14023f6f0
xor eax, eax
mov qword [rdi], rax
mov rdi, qword [rsp + 0x40]
mov rax, qword [rbx]
mov rcx, rbx
test rdi, rdi
je 0x14023f6c3
mov edx, 0xffffffff
call qword [rax + reloc.ODBC32.dll_SQLAllocHandle]
mov rcx, rbx
call fcn.14025cf20
mov qword [rdi], rbx
xor eax, eax
jmp 0x14023f6f0
call qword [rax]
xor eax, eax
jmp 0x14023f6f0
mov eax, 0xfffffffb
jmp 0x14023f6f0
mov rcx, rbp
call qword [0x140452438]
mov ecx, dword [r12 + 0x38]
cmp ecx, 0xffffffff
je 0x14023f6eb
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, 0xfffffffd
mov rcx, qword [rsp + 0x2f0]
xor rcx, rsp
call fcn.140283120
mov rbx, qword [rsp + 0x358]
add rsp, 0x300
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret