Function at 0x5c4b60
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
test rcx, rcx
je 0x5c4b96
mov rsi, qword [rcx]
test rsi, rsi
je 0x5c4b96
cmp rsi, 0xffffffffffffffff
mov rbx, rcx
je 0x5c4d40
cmp dword [rsi + 0x24], 0xfacade2
je 0x5c4bb1
mov edi, 0x16
mov eax, edi
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call fcn.005babc0
test eax, eax
mov edi, eax
jne 0x5c4b9b
lea rbp, [rsi + 8]
mov rcx, rbp
call fcn.005babc0
test eax, eax
mov edi, eax
jne 0x5c4eb6
mov eax, dword [rsi + 0x1c]
test eax, eax
jne 0x5c4e60
mov edx, dword [rsi + 0x20]
test edx, edx
jle 0x5c4ed9
mov ebx, dword [rsi + 0x18]
mov dword [rsi + 0x20], 0
sub ebx, edx
mov edx, ebx
mov dword [rsi + 0x18], ebx
test edx, edx
jle 0x5c4e60
lea rcx, [rsp + 0x40]
neg edx
mov r8, rsi
mov dword [rsi + 0x20], edx
lea r12, [rsp + 0x80]
lea rdx, [0x005bf5e0]
call fcn.005ba820
lea r14, [rsi + 0x10]
lea r13, [r12 + 0x10]
jmp 0x5c4d13
cmp rbx, 0xffffffffffffffff
je 0x5c4ee8
lea rdi, [rbx + 0x18]
mov rcx, rdi
call fcn.005c2dc0
test eax, eax
jne 0x5c4e99
add dword [rbx], 1
mov rcx, rdi
call fcn.005bfc40
test eax, eax
jne 0x5c4e99
mov rdi, qword [0x0065df88]
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x70], rax
lea rax, [0x005bfe00]
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x68], rbx
test rdi, rdi
mov qword [rsp + 0x88], rax
je 0x5c4fde
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rdi]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r15d
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, qword [0x0065df88]
mov rax, qword [rsp + 0x28]
mov rdx, r12
mov rcx, rdi
mov qword [rsp + 0x90], rax
call fcn.005ba2f0
mov rcx, rbp
call fcn.005bbaf0
test eax, eax
mov dword [rsp + 0x3c], eax
je 0x5c4f7c
mov ecx, 1
call fcn.005ba7b0
mov edi, dword [rsp + 0x3c]
test edi, edi
jne 0x5c4d2d
mov eax, dword [rsi + 0x20]
test eax, eax
jns 0x5c4e4f
mov rbx, qword [rsi + 0x10]
mov dword [rsp + 0x3c], 0
test rbx, rbx
jne 0x5c4c33
mov edi, 0x16
mov ecx, 1
call fcn.005ba7b0
jmp 0x5c4b9b
lea rax, [0x0065df40]
mov qword [rsp + 0x98], 0
lea rbp, [rsp + 0x80]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], 0
mov rdx, rbp
mov qword [rsp + 0x88], 0
xchg qword [rax], rdx
test rdx, rdx
je 0x5c4db3
mov qword [rdx + 8], rbp
xor eax, eax
add rdx, 0x18
lock cmpxchg qword [rdx], rsi
test rax, rax
mov rcx, rax
je 0x5c4da3
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rdi, [rbp + 0x10]
xor esi, esi
lock xadd qword [rdi], rsi
test rsi, rsi
je 0x5c4e21
mov rax, qword [rbx]
cmp rax, 0xffffffffffffffff
je 0x5c4ec3
cmp rax, 1
sbb esi, esi
and esi, 6
cmp rax, 1
sbb edi, edi
and edi, 0x16
mov r8, qword [rsp + 0x80]
lea rax, [rbp + 8]
xor edx, edx
lock xadd qword [rax], rdx
test rdx, rdx
mov rcx, rdx
je 0x5c4e6d
lea rdx, [rcx + 0x10]
xor eax, eax
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x5c4e11
call qword [sym.imp.KERNEL32.dll_SetEvent]
test esi, esi
jne 0x5c4b9b
mov rsi, qword [rbx]
jmp 0x5c4b8d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r12, rax
mov rax, rsi
lock cmpxchg qword [rdi], r12
test rax, rax
je 0x5c4ea6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x5c4db3
xor ecx, ecx
call fcn.005ba7b0
mov eax, dword [rsi + 0x1c]
mov dword [rsi + 0x18], 0
add eax, 1
xor edi, edi
mov dword [rsi + 0x1c], eax
jmp 0x5c4b9b
mov rax, rbp
lock cmpxchg qword [r8], rdx
cmp rbp, rax
je 0x5c4e11
lea rcx, [rbp + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x5c4ee1
add rbp, 8
xor ecx, ecx
lock xadd qword [rbp], rcx
jmp 0x5c4df1
call qword [sym.imp.msvcrt.dll__errno]
mov edi, dword [rax]
jmp 0x5c4d04
mov edx, 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x5c4e41
mov rcx, rsi
call fcn.005bbaf0
jmp 0x5c4b9b
xor edx, edx
mov rcx, rbx
call fcn.005bea50
mov esi, eax
mov edi, eax
and esi, 0xffffffef
jmp 0x5c4dd2
mov edx, dword [rsi + 0x18]
jmp 0x5c4bfc
call fcn.005b6360
jmp 0x5c4e88
lea rdx, [0x0065df48]
mov rax, r12
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x88], 0
xchg qword [rdx], rax
test rax, rax
je 0x5c4f50
mov qword [rax + 8], r12
lea rdx, [rax + 0x18]
xor eax, eax
lock cmpxchg qword [rdx], rbx
test rax, rax
mov rcx, rax
je 0x5c4f43
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ebx, ebx
lock xadd qword [r13], rbx
test rbx, rbx
je 0x5c4fa0
mov rax, qword [rsi + 0x10]
cmp rax, 0xffffffffffffffff
je 0x5c4fe5
test rax, rax
je 0x5c4fcc
mov rcx, r12
call fcn.005b63b0
mov dword [rsp + 0x3c], 0
mov rbx, qword [rsi + 0x10]
jmp 0x5c4c3d
lea rcx, [rbx + 0x10]
xor edx, edx
call fcn.005c3910
test eax, eax
je 0x5c4cf6
call qword [sym.imp.msvcrt.dll__errno]
mov eax, dword [rax]
mov dword [rsp + 0x3c], eax
jmp 0x5c4cf6
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rdi, rax
mov rax, rbx
lock cmpxchg qword [r13], rdi
test rax, rax
je 0x5c500e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x5c4f50
mov rcx, r12
mov edi, 0x16
call fcn.005b63b0
jmp 0x5c4d2d
xor eax, eax
jmp 0x5c4ccf
xor edx, edx
mov rcx, r14
call fcn.005be470
mov rcx, r12
mov edi, eax
call fcn.005b63b0
test edi, 0xffffffef
mov dword [rsp + 0x3c], edi
jne 0x5c4d2d
jmp 0x5c4f73
or edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x5c4fc1