Function at 0x14005b6e0
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 [0x1403e94c0]
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005b8e0
mov eax, dword [rbx + 4]
test eax, 0x400000
je 0x14005b828
test eax, eax
js 0x14005b9b0
cmp qword [rbx + 8], 0
je 0x14005b887
mov eax, dword [rbx + 0x94]
cmp dword [rbx + 0xd4], eax
jne 0x14005b8a8
xor edi, edi
mov r9, qword [rbx + 0x70]
mov r8d, dword [r9 + 0xc0]
test r8d, r8d
je 0x14005ba10
mov edx, 0x110
xor eax, eax
jmp 0x14005b77c
add eax, 1
add rdx, 0x20
cmp eax, r8d
je 0x14005b784
mov ecx, dword [r9 + rdx]
test ecx, ecx
jne 0x14005b770
cmp dword [rbx + 0x8c], eax
jbe 0x140221a30
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 0x14005b948
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 0x14005b7e4
test byte [rbx + 6], 0x40
je 0x14005b900
mov rcx, r13
call qword [0x1403e94b8]
test byte [rbx + 7], 0x10
je 0x14005b80a
mov ecx, dword [rbx + 0x98]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140221a67
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 [0x1402b54e8]
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 0x14005b8b8
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005b95c
cmp qword [rbx + 8], 0
jne 0x14005b73d
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005b892
test eax, 0x400000
je 0x14005b9c6
mov rcx, r13
mov edi, 1
call qword [0x1403e94b8]
jmp 0x14005b8d1
mov dword [rbx + 0xd4], eax
jmp 0x14005b74f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edi, eax
call qword [0x1403e94b8]
lea eax, [rdi + 1]
cmp eax, 1
jbe 0x14005b867
xor r14d, r14d
jmp 0x14005b80a
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005b9b0
cmp qword [rbx + 8], 0
jne 0x14005b73d
jmp 0x14005b892
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 0x14005b7e4
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.140220c00
jmp 0x14005b7e4
mov rax, qword [rbx + 0x70]
add r8d, 1
mov dword [rax + 0xc0], r8d
jmp 0x14005b7ba
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005b9b0
test eax, 0x400000
jne 0x14005b9b0
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 0x14005b9b0
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.140220c00
nop dword [rax]
mov rcx, r13
mov edi, 0xffff87b5
xor r14d, r14d
call qword [0x1403e94b8]
jmp 0x14005b80a
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 0x14005b892
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.140220c00
jmp 0x14005b892
xor eax, eax
jmp 0x14005b784
xor r8d, r8d
mov edx, 1
mov rcx, rbx
call fcn.140220d00
mov edi, eax
cmp eax, 0xffffffff
je 0x14005b751
mov rcx, rbx
call fcn.140220c90
cmp edi, 0xffff87ba
je 0x140221a71
test edi, edi
je 0x140221a71
xor r14d, r14d
jmp 0x14005b80a
call fcn.14021d720
jmp 0x14005b80a
cmp byte [0x1403e8a08], 0
je 0x140221aa9
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.14021c450
jmp 0x140221a5f
mov edi, 0xffff87ba
jmp 0x140221a5f