Function at 0x1800043f0
Capabilities:
Get thread local storage value
Resume thread
Suspend thread

Disassembly:
mov rax, rsp
sub rsp, 0x68
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov rbx, rcx
lea rcx, [rax - 0x48]
mov qword [rax + 0x20], rdi
mov qword [rax - 0x10], r13
mov rax, qword [rbx]
xor ebp, ebp
mov qword [rcx], rax
mov rax, qword [rbx + 8]
mov edi, ebp
mov qword [rcx + 8], rax
lea rcx, [0x1804d8480]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rdx, qword [rsp + 0x20]
lea r13d, [rbp + 3]
test rdx, rdx
je 0x18000444a
mov eax, dword [rdx + 0x18]
cmp dword [rsp + 0x28], eax
jne 0x18000444a
cmp qword [rdx + 8], rdi
jne 0x18000444d
mov edi, r13d
lea rcx, [0x1804d8480]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x18000467d
lea rcx, [rsp + 0x40]
call fcn.180001710
lea rcx, [rsp + 0x30]
mov r11, rax
mov rax, qword [rax]
mov qword [rcx], rax
mov rax, qword [r11 + 8]
mov qword [rcx + 8], rax
cmp qword [rsp + 0x30], rbp
jne 0x180004491
lea eax, [rdi + 0xc]
jmp 0x18000467f
mov rax, qword [r11]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x60], r12
mov qword [rcx], rax
mov rax, qword [r11 + 8]
mov qword [rcx + 8], rax
mov rax, qword [rbx]
lea rcx, [rsp + 0x30]
mov qword [rcx], rax
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x20]
cmp qword [rsp + 0x30], rax
jne 0x1800044da
mov eax, dword [rsp + 0x28]
cmp dword [rsp + 0x38], eax
jne 0x1800044da
mov r12d, 1
jmp 0x1800044dd
mov r12d, ebp
mov rbx, qword [rbx]
mov qword [rsp + 0x80], rsi
lea rcx, [rbx + 0x58]
call fcn.180001910
cmp dword [rbx + 0x64], ebp
jne 0x18000463e
cmp dword [rbx + 0x60], ebp
jne 0x18000463e
mov eax, dword [rbx + 0x28]
cmp eax, 4
jge 0x18000463e
test r12d, r12d
je 0x1800045ea
lea rcx, [rbx + 0x58]
mov dword [rbx + 0x28], 4
mov dword [rbx + 0x60], 1
call fcn.180001a80
mov rsi, qword [0x1804d0840]
test rsi, rsi
je 0x180004572
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [rsi]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call sub.WS2_32.dll_WSASetLastError
test rbp, rbp
je 0x180004572
test byte [rbp + 0x170], 1
je 0x180004581
call fcn.1800038d0
mov ecx, 0xffffffff
call fcn.180294cd8
mov rsi, qword [0x1804d0848]
test rsi, rsi
je 0x1800045db
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [rsi]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call sub.WS2_32.dll_WSASetLastError
test rsi, rsi
je 0x1800045db
mov rax, qword [rsi]
test rax, rax
je 0x1800045c9
mov rcx, qword [rsi + 8]
call rax
mov rdx, qword [rsi + 0x10]
mov rcx, qword [0x1804d0848]
call fcn.180001e80
jmp 0x180004581
lea rcx, [rbp + 0x70]
mov edx, 2
call fcn.18027c294
int3
mov rbp, qword [rbx + 8]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x180004670
lea rcx, [0x1800042b0]
xor r8d, r8d
mov rdx, rbp
mov dword [rbx + 0x28], 4
mov dword [rbx + 0x60], 1
call qword [0x1804d0870]
lea rcx, [rbx + 0x58]
call fcn.180001a80
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x180004670
mov eax, dword [rbx + 0x28]
cmp eax, r13d
jge 0x18000465d
mov rcx, qword [rbx + 0x68]
mov dword [rbx + 0x28], r13d
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x180004667
mov edi, r13d
jmp 0x180004667
mov ecx, dword [rbx + 0x28]
cmp ecx, 4
cmovge edi, r13d
lea rcx, [rbx + 0x58]
call fcn.180001a80
mov rsi, qword [rsp + 0x80]
mov r12, qword [rsp + 0x60]
mov eax, edi
mov r13, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x68
ret