Function at 0x14005a980
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 [0x1403ef4e0]
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ab80
mov eax, dword [rbx + 4]
test eax, 0x400000
je 0x14005aac8
test eax, eax
js 0x14005ac50
cmp qword [rbx + 8], 0
je 0x14005ab27
mov eax, dword [rbx + 0x94]
cmp dword [rbx + 0xd4], eax
jne 0x14005ab48
xor edi, edi
mov r9, qword [rbx + 0x70]
mov r8d, dword [r9 + 0xc0]
test r8d, r8d
je 0x14005acb0
mov edx, 0x110
xor eax, eax
jmp 0x14005aa1c
add eax, 1
add rdx, 0x20
cmp eax, r8d
je 0x14005aa24
mov ecx, dword [r9 + rdx]
test ecx, ecx
jne 0x14005aa10
cmp dword [rbx + 0x8c], eax
jbe 0x140226c80
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 0x14005abe8
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 0x14005aa84
test byte [rbx + 6], 0x40
je 0x14005aba0
mov rcx, r13
call qword [0x1403ef4d8]
test byte [rbx + 7], 0x10
je 0x14005aaaa
mov ecx, dword [rbx + 0x98]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140226cb7
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 [0x1402ba4c8]
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 0x14005ab58
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005abfc
cmp qword [rbx + 8], 0
jne 0x14005a9dd
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ab32
test eax, 0x400000
je 0x14005ac66
mov rcx, r13
mov edi, 1
call qword [0x1403ef4d8]
jmp 0x14005ab71
mov dword [rbx + 0xd4], eax
jmp 0x14005a9ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edi, eax
call qword [0x1403ef4d8]
lea eax, [rdi + 1]
cmp eax, 1
jbe 0x14005ab07
xor r14d, r14d
jmp 0x14005aaaa
mov eax, dword [rbx + 4]
test eax, eax
js 0x14005ac50
cmp qword [rbx + 8], 0
jne 0x14005a9dd
jmp 0x14005ab32
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 0x14005aa84
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.140225e50
jmp 0x14005aa84
mov rax, qword [rbx + 0x70]
add r8d, 1
mov dword [rax + 0xc0], r8d
jmp 0x14005aa5a
mov rcx, qword [rbx + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14005ac50
test eax, 0x400000
jne 0x14005ac50
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 0x14005ac50
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.140225e50
nop dword [rax]
mov rcx, r13
mov edi, 0xffff87b5
xor r14d, r14d
call qword [0x1403ef4d8]
jmp 0x14005aaaa
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 0x14005ab32
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.140225e50
jmp 0x14005ab32
xor eax, eax
jmp 0x14005aa24
xor r8d, r8d
mov edx, 1
mov rcx, rbx
call fcn.140225f50
mov edi, eax
cmp eax, 0xffffffff
je 0x14005a9f1
mov rcx, rbx
call fcn.140225ee0
cmp edi, 0xffff87ba
je 0x140226cc1
test edi, edi
je 0x140226cc1
xor r14d, r14d
jmp 0x14005aaaa
call fcn.140222970
jmp 0x14005aaaa
cmp byte [0x1403eea28], 0
je 0x140226cf9
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.1402216a0
jmp 0x140226caf
mov edi, 0xffff87ba
jmp 0x140226caf