Function at 0x14005a8e0
Capabilities:
Set thread local storage value

Disassembly:
push rbp
mov rbp, rsp
push r14
push r13
lea r13, [rdx + 0x188]
push r12
mov r12, rcx
mov rcx, r13
push rdi
push rsi
mov rsi, r8
push rbx
mov rbx, rdx
and rsp, 0xfffffffffffffff0
sub rsp, 0x50
call qword [0x1403f2500]
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005aae0
mov eax, dword [rbx + 4]
test eax, 0x400000
je 0x14005aa28
test eax, eax
js 0x14005abb0
cmp qword [rbx + 8], 0
je 0x14005aa87
mov eax, dword [rbx + 0x94]
cmp dword [rbx + 0xd4], eax
jne 0x14005aaa8
xor edi, edi
mov r9, qword [rbx + 0x70]
mov r8d, dword [r9 + 0xc0]
test r8d, r8d
je 0x14005ac10
mov edx, 0x110
xor eax, eax
jmp 0x14005a97c
add eax, 1
add rdx, 0x20
cmp eax, r8d
je 0x14005a984
mov ecx, dword [r9 + rdx]
test ecx, ecx
jne 0x14005a970
cmp dword [rbx + 0x8c], eax
jbe 0x1402288d0
mov edx, eax
add rdx, 8
shl rdx, 5
lea r14, [r9 + rdx]
mov dword [r14 + 0x10], 0
lea rdx, [r14 + 0x10]
mov qword [r14], 0xffffffffffffffff
cmp r8d, eax
je 0x14005ab48
xor eax, eax
test byte [rbx + 6], 0x20
cmovne rsi, rax
mov qword [r14 + 8], rsi
mov eax, dword [rbx + 0x94]
mov dword [rdx], eax
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005a9e4
test byte [rbx + 6], 0x40
je 0x14005ab00
mov rcx, r13
call qword [0x1403f24f8]
test byte [rbx + 7], 0x10
je 0x14005aa0a
mov ecx, dword [rbx + 0x98]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140228907
mov dword [r12], edi
mov rax, r12
mov qword [r12 + 8], r14
lea rsp, [rbp - 0x30]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop rbp
ret
mov rax, qword [0x1402bcb08]
xor r8d, r8d
mov qword [rsp + 0x48], 0
mov r9d, 0x40
mov dword [rsp + 0x20], 0
mov edx, 2
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
je 0x14005aab8
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005ab5c
cmp qword [rbx + 8], 0
jne 0x14005a93d
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005aa92
test eax, 0x400000
je 0x14005abc6
mov rcx, r13
mov edi, 1
call qword [0x1403f24f8]
jmp 0x14005aad1
mov dword [rbx + 0xd4], eax
jmp 0x14005a94f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edi, eax
call qword [0x1403f24f8]
lea eax, [rdi + 1]
cmp eax, 1
jbe 0x14005aa67
xor r14d, r14d
jmp 0x14005aa0a
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005abb0
cmp qword [rbx + 8], 0
jne 0x14005a93d
jmp 0x14005aa92
xor r8d, r8d
mov r9d, 0x40
mov edx, 0xc0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_UnlockFile]
test eax, eax
jne 0x14005a9e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.mdbx_rdt_unlock
lea rcx, str._s_failed:_err__u
mov r8d, eax
call fcn.140227aa0
jmp 0x14005a9e4
mov rax, qword [rbx + 0x70]
add r8d, 1
mov dword [rax + 0xc0], r8d
jmp 0x14005a9ba
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005abb0
test eax, 0x400000
jne 0x14005abb0
xor r8d, r8d
mov r9d, 0x40
mov edx, 0xc0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_UnlockFile]
test eax, eax
jne 0x14005abb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.mdbx_rdt_unlock
lea rcx, str._s_failed:_err__u
mov r8d, eax
call fcn.140227aa0
nop dword [rax]
mov rcx, r13
mov edi, 0xffff87b5
xor r14d, r14d
call qword [0x1403f24f8]
jmp 0x14005aa0a
xor r8d, r8d
mov r9d, 0x40
mov edx, 0xc0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_UnlockFile]
test eax, eax
jne 0x14005aa92
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.mdbx_rdt_unlock
lea rcx, str._s_failed:_err__u
mov r8d, eax
call fcn.140227aa0
jmp 0x14005aa92
xor eax, eax
jmp 0x14005a984
xor r8d, r8d
mov edx, 1
mov rcx, rbx
call fcn.140227ba0
mov edi, eax
cmp eax, 0xffffffff
je 0x14005a951
mov rcx, rbx
call fcn.140227b30
cmp edi, 0xffff87ba
je 0x140228911
test edi, edi
je 0x140228911
xor r14d, r14d
jmp 0x14005aa0a
call fcn.1402245c0
jmp 0x14005aa0a
cmp byte [0x1403f1a48], 0
je 0x140228949
mov eax, dword [rbx + 0x8c]
lea r9, str.READER_LIMIT_REACHED___d__n
mov r8d, 0x2a9b
lea rdx, str.bind_rslot
mov ecx, 1
mov edi, 0xffff87ba
mov dword [rsp + 0x20], eax
call fcn.1402232f0
jmp 0x1402288ff
mov edi, 0xffff87ba
jmp 0x1402288ff