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

Disassembly:
push rbp
mov rbp, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov r12, rdx
mov r15, rcx
call fcn.140056e9c
mov rbx, qword [r15 + 8]
mov ecx, dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140060ef2
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x14017caf8]
jne 0x140060ef2
mov rsi, qword [rbx + 0x48]
mov ecx, dword [rbx + 0x28]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140060ef2
mov rcx, rbx
call fcn.14006257c
cmp rax, rsi
je 0x140060eee
mov ecx, 0x1c1449
call fcn.14002cdf4
jmp 0x140060ef2
mov rdi, qword [rbx + 0x48]
cmp rdi, r12
je 0x140060f01
mov ecx, 0x1c139c
call fcn.14002cdf4
xor r13d, r13d
nop word [rax + rax]
mov rax, qword [r15 + 0x10]
or edx, 0xffffffff
mov ecx, eax
shr ecx, 0x13
and ecx, 0x7ff
test eax, eax
jns 0x140060f25
test ecx, ecx
je 0x140060f25
dec ecx
shr eax, 0xc
and eax, 0x7f
sub ecx, eax
sub ecx, 4
test ecx, ecx
jle 0x140061035
cmp ecx, 4
jbe 0x140061030
mov dword [rbp + 0x18], r13d
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea rdx, [rbp + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadIOPendingFlag]
test eax, eax
je 0x140060f62
cmp dword [rbp + 0x18], r13d
jne 0x140060fcd
prefetchw byte [r15 + 0x10]
mov rax, qword [r15 + 0x10]
mov qword [rsp + 0x38], rax
mov r8d, dword [rsp + 0x38]
mov r9d, r8d
shr r9d, 0x13
mov edx, r9d
and edx, 0x7ff
test r8d, r8d
jns 0x140060f90
test edx, edx
je 0x140060f90
dec edx
mov ecx, r8d
shr ecx, 0xc
and ecx, 0x7f
sub edx, ecx
sub edx, 4
test edx, edx
jle 0x140060fcd
lea ecx, [r9 - 1]
shl ecx, 0x13
xor ecx, r8d
and ecx, 0x3ff80000
xor r8d, ecx
mov dword [rsp + 0x38], r8d
mov rcx, qword [rsp + 0x38]
lock cmpxchg qword [r15 + 0x10], rcx
je 0x1400613a9
jmp 0x140060f6b
mov rbx, qword [r15 + 8]
mov ecx, dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140061021
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x14017caf8]
jne 0x140061021
mov rsi, qword [rbx + 0x48]
mov ecx, dword [rbx + 0x28]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140061021
mov rcx, rbx
call fcn.14006257c
cmp rax, rsi
je 0x14006101d
mov ecx, 0x1c1449
call fcn.14002cdf4
jmp 0x140061021
mov rdi, qword [rbx + 0x48]
cmp rdi, r12
je 0x140061030
mov ecx, 0x1c139a
call fcn.14002cdf4
mov edx, 0x1770
mov rcx, qword [r15 + 0x80]
mov dword [rsp + 0x20], edx
lea r9, [rsp + 0x30]
lea rdx, [rbp + 0x10]
lea r8, [rbp + 0x28]
mov qword [rbp + 0x28], r13
mov qword [rsp + 0x30], r13
call qword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
mov ebx, eax
test eax, eax
je 0x140061067
mov edi, r13d
jmp 0x14006106f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov r8, qword [rbp + 0x28]
mov rdx, qword [rsp + 0x30]
cmp r8, 4
setae cl
test ebx, ebx
jne 0x1400611cd
test rdx, rdx
jne 0x1400611cd
test byte [0x14017cb40], 0x20
je 0x1400610b4
mov r9d, dword [rbp + 0x10]
mov rcx, qword [0x14017cb48]
lea rdx, [0x1400fe2c8]
call fcn.140094fd0
mov r8, qword [rbp + 0x28]
test r8, r8
je 0x1400610c3
mov ecx, 0x1c13a3
call fcn.14002cdf4
cmp edi, 0x102
je 0x1400610d5
mov ecx, 0x1c13c0
call fcn.14002cdf4
mov dword [rbp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea rdx, [rbp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadIOPendingFlag]
test eax, eax
je 0x1400610f6
cmp dword [rbp + 0x20], r13d
jne 0x140061161
prefetchw byte [r15 + 0x10]
mov rax, qword [r15 + 0x10]
mov qword [rsp + 0x38], rax
mov r8d, dword [rsp + 0x38]
mov r9d, r8d
shr r9d, 0x13
mov ecx, r9d
and ecx, 0x7ff
test r8d, r8d
jns 0x140061124
test ecx, ecx
je 0x140061124
dec ecx
mov edx, r8d
shr edx, 0xc
and edx, 0x7f
sub ecx, edx
sub ecx, 4
test ecx, ecx
jle 0x140061161
lea ecx, [r9 - 1]
shl ecx, 0x13
xor ecx, r8d
and ecx, 0x3ff80000
xor r8d, ecx
mov dword [rsp + 0x38], r8d
mov rcx, qword [rsp + 0x38]
lock cmpxchg qword [r15 + 0x10], rcx
je 0x1400613a9
jmp 0x1400610ff
mov rbx, qword [r15 + 8]
mov ecx, dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x1400611b5
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x14017caf8]
jne 0x1400611b5
mov rsi, qword [rbx + 0x48]
mov ecx, dword [rbx + 0x28]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400611b5
mov rcx, rbx
call fcn.14006257c
cmp rax, rsi
je 0x1400611b1
mov ecx, 0x1c1449
call fcn.14002cdf4
jmp 0x1400611b5
mov rdi, qword [rbx + 0x48]
cmp rdi, r12
je 0x140060f09
mov ecx, 0x1c139a
call fcn.14002cdf4
jmp 0x140060f09
test cl, cl
je 0x1400612a6
test rdx, rdx
jne 0x1400611ed
mov ecx, 0x1c13c3
call fcn.14002cdf4
mov r8, qword [rbp + 0x28]
mov rdx, qword [rsp + 0x30]
test byte [0x14017cb40], 0x10
je 0x140061216
mov r9d, dword [rbp + 0x10]
mov rcx, qword [0x14017cb48]
lea rdx, [0x1400fe268]
call fcn.140094fd0
mov r8, qword [rbp + 0x28]
mov rdx, qword [rsp + 0x30]
mov r9d, dword [rbp + 0x10]
mov rcx, r15
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], edi
call fcn.1400608fc
mov rbx, qword [r15 + 8]
mov ecx, dword [rbx + 0x28]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x140061282
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x14017caf8]
jne 0x140061282
mov rdi, qword [rbx + 0x48]
mov ecx, dword [rbx + 0x28]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140061282
mov rcx, rbx
call fcn.14006257c
cmp rax, rdi
je 0x14006127e
mov ecx, 0x1c1449
call fcn.14002cdf4
jmp 0x140061282
mov rsi, qword [rbx + 0x48]
cmp rsi, r12
je 0x140061291
mov ecx, 0x1c13c7
call fcn.14002cdf4
cmp r14d, 1
je 0x140060f09
test r14d, r14d
je 0x1400613a9
jmp 0x1400612f3
test byte [0x14017cb40], 0x10
je 0x1400612cf
mov r9d, dword [rbp + 0x10]
mov rcx, qword [0x14017cb48]
lea rdx, [0x1400fe278]
call fcn.140094fd0
mov r8, qword [rbp + 0x28]
mov rdx, qword [rsp + 0x30]
mov r9, r12
mov rcx, r15
call fcn.140060b6c
mov ebx, eax
cmp eax, 1
je 0x140060f09
cmp eax, 2
jne 0x1400613ad
nop word [rax + rax]
lea rdx, [rsp + 0x40]
lea rcx, [r15 + 0x90]
mov qword [rsp + 0x40], r13
call fcn.1400646fc
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14006138d
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0xf0]
mov rbx, qword [r15 + 8]
mov ecx, dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140061373
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x14017caf8]
jne 0x140061373
mov rsi, qword [rbx + 0x48]
mov ecx, dword [rbx + 0x28]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140061373
mov rcx, rbx
call fcn.14006257c
cmp rax, rsi
je 0x14006136f
mov ecx, 0x1c1449
call fcn.14002cdf4
jmp 0x140061373
mov rdi, qword [rbx + 0x48]
cmp rdi, r12
je 0x140061382
mov ecx, 0x1c13d4
call fcn.14002cdf4
mov rcx, qword [rsp + 0x40]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rdx, r12
mov rcx, r15
call fcn.140060da4
cmp eax, 1
je 0x140060f09
test eax, eax
jne 0x1400612f3
xor eax, eax
jmp 0x1400613c2
test eax, eax
je 0x1400613c0
cmp eax, 3
je 0x1400613c0
mov ecx, 0x1c13ce
call fcn.14002cdf4
mov eax, ebx
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret