Function at 0x4198c0
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2ec
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.___pth_gpointer_locked
test eax, eax
mov ebx, eax
je 0x4198e8
mov eax, dword [eax + 0x14]
lea ecx, [eax - 1]
cmp ecx, 0xfffffffd
jbe 0x4198f5
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esi, [ebp - 0x2e4]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x4198e8
lea edi, [ebx + 0x1c]
mov dword [esp], edi
call sym._pthread_mutex_lock
call sym.___pthread_self_lite
test eax, eax
je 0x419ae0
mov eax, dword [eax + 0xbc]
cmp dword [ebp + 8], eax
je 0x4199a6
mov eax, dword [ebx + 0x24]
and eax, 3
cmp eax, 3
movzx eax, byte [ebx + 0x20]
je 0x419a10
test al, 3
jne 0x41998d
and eax, 0xfffffffc
or eax, 1
mov byte [ebx + 0x20], al
mov eax, dword [0x488e0c]
test eax, eax
je 0x419ae7
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x41997e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov dword [esp], edi
call sym._pthread_mutex_unlock
xor eax, eax
jmp 0x4198ed
mov dword [esp], edi
call sym._pthread_mutex_unlock
test byte [ebx + 0x20], 0xc
jne 0x4198e8
xor eax, eax
jmp 0x4198ed
movzx eax, byte [ebx + 0x20]
test al, 3
jne 0x41998d
and eax, 0xfffffffc
or eax, 1
mov byte [ebx + 0x20], al
mov eax, dword [0x488e0c]
test eax, eax
je 0x419b0d
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x4199e3
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov eax, dword [ebx + 0x24]
and eax, 3
cmp eax, 3
jne 0x41997e
movzx eax, byte [ebx + 0x20]
and dword [ebx + 0x24], 0xfffffffe
and eax, 0xfffffff3
or eax, 4
mov byte [ebx + 0x20], al
mov dword [esp], edi
call sym._pthread_mutex_unlock
call sym.__pthread_invoke_cancel
lea esi, [esi]
test al, 0xc
jne 0x41998d
test al, 0xf
jne 0x4198e8
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x2e4], 0x10001
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
push edx
push edx
jne 0x41997e
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov dword [ebp - 0x22c], sym.__pthread_invoke_cancel
push eax
push eax
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push eax
push eax
movzx eax, byte [ebx + 0x20]
and dword [ebx + 0x24], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [ebx + 0x20], al
mov eax, dword [0x488e0c]
test eax, eax
je 0x419b33
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x419abf
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push eax
mov dword [esp], edi
call sym._pthread_mutex_unlock
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push eax
jmp 0x41997e
xor eax, eax
jmp 0x41992d
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], str._pthread_cancelling_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e0c], eax
jmp 0x41995f
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], str._pthread_cancelling_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e0c], eax
jmp 0x4199c4
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], str._pthread_cancelling_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x488e0c], eax
jmp 0x419aa4