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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, qword [rcx + 0x20]
mov r13d, dword [rcx + 0x7c]
mov rbp, qword [rbx + 0x48]
mov r12, rcx
and r13d, 0x20000
je 0x4a5fa0
mov eax, dword [rbx + 0x18]
test rbp, rbp
je 0x4a60a0
test eax, 0x200000
je 0x4a6118
mov rdi, qword [rcx + 0x48]
mov esi, dword [rbx + 0x34]
test rdi, rdi
je 0x4a612c
mov eax, dword [rdi + 8]
cmp eax, esi
jne 0x4a62b4
mov rax, qword [rdi]
cmp rax, 0xffffffffffffffff
jne 0x4a62b4
xor esi, esi
nop dword [rax]
mov rax, qword [rbp + 8]
mov qword [rdi], rax
mov rdx, qword [rdi]
mov rax, qword [rbp + 8]
cmp rdx, rax
jne 0x4a5e70
mov rax, qword [rdi]
mov qword [r12 + 0x48], rdi
mov qword [r12 + 0x18], rax
and eax, 1
add rax, 0xa
mov rdi, qword [rbx + rax*8]
movdqu xmm0, xmmword [rdi + 0x18]
mov rax, qword [r12 + 0x58]
mov r8d, 2
movups xmmword [rax], xmm0
movdqu xmm1, xmmword [rdi + 0x28]
movups xmmword [rax + 0x10], xmm1
movdqu xmm2, xmmword [rdi + 0x38]
movups xmmword [rax + 0x20], xmm2
movdqu xmm3, xmmword [rdi + 0x48]
movups xmmword [rax + 0x30], xmm3
movdqu xmm4, xmmword [rdi + 0x58]
movups xmmword [rax + 0x40], xmm4
movdqu xmm5, xmmword [rdi + 0x68]
movups xmmword [rax + 0x50], xmm5
mov rax, qword [rdi + 0x78]
mov dword [r12 + 0x7c], r13d
add rax, 1
mov qword [r12 + 0x10], rax
mov eax, dword [rbx + 0x2c]
mov dword [r12 + 0x78], eax
cmp eax, 2
jbe 0x4a5f43
nop word [rax + rax]
mov rax, qword [rbx + 0x98]
mov ecx, r8d
add r8d, 1
lea rdx, [rcx + rcx*2]
movzx eax, word [rax + rcx*2]
shl rdx, 4
add rdx, qword [r12 + 0x58]
mov r9d, eax
sar ax, 0xf
and r9w, 0x7fff
and eax, 0x1a
mov word [rdx + 4], r9w
mov rdx, qword [r12 + 0x70]
mov byte [rdx + rcx], al
cmp dword [r12 + 0x78], r8d
ja 0x4a5f00
mov rax, qword [r12 + 0x70]
mov byte [rax + 1], 0x18
mov rax, qword [r12 + 0x70]
mov byte [rax], 8
mov eax, dword [rbx + 0x18]
test eax, eax
js 0x4a6090
mov rax, qword [r12 + 0x10]
xor r14d, r14d
cmp qword [rbx + 0x88], rax
jae 0x4a5f83
mov r14d, 0xffff87bf
or esi, 5
mov rcx, r12
mov edx, esi
call sym.mdb_txn_end
mov eax, r14d
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rbp, rbp
je 0x4a5fd8
mov rcx, qword [rbx + 0xf8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4a60f0
mov rax, qword [rbp + 8]
mov rdx, rax
and edx, 1
add rdx, 0xa
mov rdi, qword [rbx + rdx*8]
jmp 0x4a600c
mov rax, qword [rbx + 0x50]
mov rcx, qword [rax + 0x80]
mov rax, qword [rbx + 0x58]
mov rdx, qword [rax + 0x80]
mov eax, dword [rbx + 0x18]
shr eax, 0x19
cmp rcx, rdx
setb dl
xor rax, rdx
and eax, 1
mov rdi, qword [rbx + rax*8 + 0x50]
mov rax, qword [rdi + 0x80]
add rax, 1
mov r8d, dword [rbx + 0x30]
mov rcx, qword [r12 + 0x60]
xor esi, esi
mov qword [r12 + 0x18], rax
mov rax, qword [rbx + 0xd8]
mov qword [r12 + 8], 0
shl r8, 2
mov rdx, qword [rbx + 0xa0]
mov qword [r12 + 0x48], rax
mov qword [r12 + 0x30], 0
mov dword [r12 + 0x38], 0
mov dword [r12 + 0x80], 0x1ffff
mov qword [rax], 0
mov rax, qword [rbx + 0xd0]
mov qword [r12 + 0x28], rax
mov qword [rax], 0
mov qword [r12 + 0x40], 0
mov qword [rbx + 0x68], r12
call sym.memcpy
jmp 0x4a5e9b
mov r14d, 0xffff87b5
jmp 0x4a5f76
mov rdx, qword [rbx + 0x50]
shr eax, 0x19
mov rcx, qword [rdx + 0x80]
mov rdx, qword [rbx + 0x58]
mov rdx, qword [rdx + 0x80]
cmp rcx, rdx
setb dl
xor esi, esi
xor rax, rdx
and eax, 1
mov rdi, qword [rbx + rax*8 + 0x50]
mov rax, qword [rdi + 0x80]
mov qword [r12 + 0x48], 0
mov qword [r12 + 0x18], rax
jmp 0x4a5e9b
mov rdx, qword [rbx + 0xf8]
mov r8d, eax
mov rcx, rbx
call fcn.00862500
mov r14d, eax
test eax, eax
je 0x4a5fbf
jmp 0x4a5f83
mov ecx, dword [rbx + 0xa8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
jmp 0x4a5e47
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [rbx + 0xe8]
mov r10, qword [rbx + 0xf0]
mov dword [rsp + 0x2c], eax
test edx, edx
jne 0x4a6151
mov dword [rbx + 0xe8], 1
mov qword [rsp + 0x20], r10
mov rcx, r10
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r10, qword [rsp + 0x20]
test eax, eax
jne 0x4a6240
mov ecx, dword [rbp + 0x10]
mov r8d, dword [rbx + 0x24]
xor eax, eax
test ecx, ecx
jne 0x4a6193
jmp 0x4a62bf
add eax, 1
cmp ecx, eax
je 0x4a6268
mov r15d, eax
lea rdi, [r15 + 2]
shl rdi, 6
add rdi, rbp
mov edx, dword [rdi + 8]
test edx, edx
jne 0x4a6188
cmp r8d, eax
je 0x4a62f6
mov rax, r15
mov edx, dword [rsp + 0x2c]
shl rax, 6
add rax, rbp
mov dword [rax + 0x88], 0
mov qword [rax + 0x80], 0xffffffffffffffff
mov dword [rax + 0x8c], edx
mov eax, ecx
shl r15, 6
mov dword [rbx + 0x28], eax
mov rcx, r10
add r15, rbp
mov dword [r15 + 0x88], esi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [rbx + 0x18]
and esi, 0x200000
jne 0x4a5e70
mov ecx, dword [rbx + 0xa8]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4a5e70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov esi, eax
test eax, eax
je 0x4a5e70
mov dword [r15 + 0x88], 0
jmp 0x4a5f83
mov rdx, r10
mov r8d, eax
mov rcx, rbx
mov qword [rsp + 0x20], r10
call fcn.00862500
mov r10, qword [rsp + 0x20]
test eax, eax
mov r14d, eax
je 0x4a6171
jmp 0x4a5f83
cmp ecx, r8d
je 0x4a62f6
mov eax, ecx
mov edx, dword [rsp + 0x2c]
lea rdi, [rax + 2]
shl rax, 6
add rax, rbp
shl rdi, 6
mov dword [rax + 0x88], 0
add rdi, rbp
mov qword [rax + 0x80], 0xffffffffffffffff
mov dword [rax + 0x8c], edx
lea edx, [rcx + 1]
mov eax, edx
mov dword [rbp + 0x10], edx
mov r15d, ecx
jmp 0x4a61dc
mov r14d, 0xffff87c1
jmp 0x4a5f83
test r8d, r8d
je 0x4a62f6
mov eax, dword [rsp + 0x2c]
lea rdi, [rbp + 0x80]
mov edx, 1
mov dword [rbp + 0x88], 0
mov qword [rbp + 0x80], 0xffffffffffffffff
mov dword [rbp + 0x8c], eax
mov eax, 1
jmp 0x4a62a9
mov rcx, r10
mov r14d, 0xffff87ba
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x4a5f83