Function at 0x610038a0
Capabilities:
Terminate thread

Disassembly:
push edi
push ebx
sub esp, 0x54
mov ebx, dword [esp + 0x60]
test byte [0x6110c854], 1
mov byte [esp + 0x2f], 1
jne 0x610039a6
mov eax, dword [ebx]
test eax, eax
je 0x61003a10
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x610039f0
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_TerminateThread
sub esp, 8
mov eax, 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [ebx + 8]
sub esp, 8
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebx]
sub esp, 4
test eax, eax
je 0x61003a10
cmp byte [0x61106ee0], 0
jne 0x61003a10
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x61003a20
cld
xor eax, eax
lea edi, [esp + 0x30]
mov ecx, 7
rep stosd dword es:[edi], eax
mov eax, 0x1c
mov dword [esp + 8], eax
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x61003a69
mov eax, dword [ebx + 0x14]
mov edi, str.bool_cygthread::terminate_thread__
mov ecx, 0x8000
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp + 0x10], eax
mov eax, str.m.RegionSize_0___stack_ptr__p
mov dword [esp + 0xc], eax
mov dword [esp], 0x6110c854
call method.strace.prntf_unsigned_int__char_const__char_const__..._
cmp byte [ebx + 0x28], 0
je 0x61003a56
mov dword [esp], ebx
call sym._free_1
jmp 0x61003a15
mov eax, dword [ebx + 0x14]
mov edi, str.bool_cygthread::terminate_thread__
mov ecx, 0x40
mov dword [esp + 0x1c], eax
mov eax, dword [ebx]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp + 0x10], eax
mov eax, str.thread__s__id__p__inuse__d__stack_ptr__p
mov dword [esp + 0xc], eax
mov dword [esp], 0x6110c854
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x610039f7
xor eax, eax
call sym._low_priority_sleep
mov eax, dword [ebx]
test eax, eax
je 0x61003a10
mov edx, dword [ebx + 0x14]
test edx, edx
je 0x610039f0
test eax, eax
jne 0x610038d0
lea esi, [esi]
mov byte [esp + 0x2f], 0
movzx eax, byte [esp + 0x2f]
add esp, 0x54
pop ebx
pop edi
ret
mov dword [esp], eax
xor edx, edx
mov dword [esp + 4], edx
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
test eax, eax
setne byte [esp + 0x2f]
cmp byte [esp + 0x2f], 0
jne 0x6100392b
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sub.KERNEL32.dll_ResetEvent
sub esp, 4
jmp 0x6100392b
mov dword [esp], ebx
mov eax, 1
mov dword [esp + 4], eax
call method.cygthread.release_bool_
jmp 0x61003a15
mov eax, dword [esp + 0x34]
xor ecx, ecx
mov edi, 0x8000
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualFree
sub esp, 0xc
test eax, eax
jne 0x61003992
test byte [0x6110c854], 1
je 0x61003992
mov eax, dword [esp + 0x34]
mov edx, str.VirtualFree_of_allocation_base__p__p__failed___E
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 0xc], edx
mov dword [esp], 0x6110c854
mov dword [esp + 0x10], eax
mov eax, str.bool_cygthread::terminate_thread__
mov dword [esp + 8], eax
mov eax, 0x40
mov dword [esp + 4], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x61003992