Function at 0x14005a970
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 [0x1403ec4e0]
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ab70
mov eax, dword [rbx + 4]
test eax, 0x400000
je 0x14005aab8
test eax, eax
js 0x14005ac40
cmp qword [rbx + 8], 0
je 0x14005ab17
mov eax, dword [rbx + 0x94]
cmp dword [rbx + 0xd4], eax
jne 0x14005ab38
xor edi, edi
mov r9, qword [rbx + 0x70]
mov r8d, dword [r9 + 0xc0]
test r8d, r8d
je 0x14005aca0
mov edx, 0x110
xor eax, eax
jmp 0x14005aa0c
add eax, 1
add rdx, 0x20
cmp eax, r8d
je 0x14005aa14
mov ecx, dword [r9 + rdx]
test ecx, ecx
jne 0x14005aa00
cmp dword [rbx + 0x8c], eax
jbe 0x140223d10
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 0x14005abd8
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 0x14005aa74
test byte [rbx + 6], 0x40
je 0x14005ab90
mov rcx, r13
call qword [0x1403ec4d8]
test byte [rbx + 7], 0x10
je 0x14005aa9a
mov ecx, dword [rbx + 0x98]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140223d47
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 [0x1402b6e88]
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 0x14005ab48
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005abec
cmp qword [rbx + 8], 0
jne 0x14005a9cd
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ab22
test eax, 0x400000
je 0x14005ac56
mov rcx, r13
mov edi, 1
call qword [0x1403ec4d8]
jmp 0x14005ab61
mov dword [rbx + 0xd4], eax
jmp 0x14005a9df
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edi, eax
call qword [0x1403ec4d8]
lea eax, [rdi + 1]
cmp eax, 1
jbe 0x14005aaf7
xor r14d, r14d
jmp 0x14005aa9a
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005ac40
cmp qword [rbx + 8], 0
jne 0x14005a9cd
jmp 0x14005ab22
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 0x14005aa74
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.140222ee0
jmp 0x14005aa74
mov rax, qword [rbx + 0x70]
add r8d, 1
mov dword [rax + 0xc0], r8d
jmp 0x14005aa4a
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ac40
test eax, 0x400000
jne 0x14005ac40
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 0x14005ac40
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.140222ee0
nop dword [rax]
mov rcx, r13
mov edi, 0xffff87b5
xor r14d, r14d
call qword [0x1403ec4d8]
jmp 0x14005aa9a
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 0x14005ab22
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.140222ee0
jmp 0x14005ab22
xor eax, eax
jmp 0x14005aa14
xor r8d, r8d
mov edx, 1
mov rcx, rbx
call fcn.140222fe0
mov edi, eax
cmp eax, 0xffffffff
je 0x14005a9e1
mov rcx, rbx
call fcn.140222f70
cmp edi, 0xffff87ba
je 0x140223d51
test edi, edi
je 0x140223d51
xor r14d, r14d
jmp 0x14005aa9a
call fcn.14021fa00
jmp 0x14005aa9a
cmp byte [0x1403eba28], 0
je 0x140223d89
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.14021e730
jmp 0x140223d3f
mov edi, 0xffff87ba
jmp 0x140223d3f