Function at 0x10013a80
Capabilities:
Resume thread
Suspend thread

Disassembly:
sub esp, 0x2f4
mov eax, dword [0x1008179c]
xor eax, esp
mov dword [esp + 0x2f0], eax
push ebx
push ebp
push edi
xor edi, edi
call fcn.100113d0
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [esp + 0x14], eax
call fcn.100113d0
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call ebp
push eax
push 4
call dword [0x10082624]
mov ebx, eax
mov dword [esp + 0xc], ebx
cmp ebx, 0xffffffff
je 0x10013c8f
test ebx, ebx
je 0x10013c8f
push esi
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
push ebx
xor esi, esi
call dword [0x10082620]
test eax, eax
je 0x10013c87
nop
call ebp
cmp dword [esp + 0x24], eax
jne 0x10013b15
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esp + 0x20], eax
je 0x10013b15
inc esi
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
push ebx
call dword [0x10082628]
test eax, eax
jne 0x10013b00
test esi, esi
je 0x10013c87
shl esi, 2
push esi
call fcn.1002aaba
add esp, 4
mov dword [0x1008274c], eax
test eax, eax
je 0x10013c87
push esi
push 0
push eax
call fcn.10015bf0
add esp, 0xc
mov dword [esp + 0x18], 0x1c
lea eax, [esp + 0x18]
xor ebp, ebp
push eax
push ebx
call dword [0x10082620]
test eax, eax
je 0x10013c7c
mov ebx, dword [esp + 0x308]
nop
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x24], eax
jne 0x10013c59
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x20]
cmp ecx, eax
je 0x10013c59
push ecx
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
cmp esi, 0xffffffff
je 0x10013c47
test esi, esi
je 0x10013c47
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x10013cc2
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0x10001
push eax
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10013c47
nop dword [eax]
mov ecx, dword [esp + 0xec]
cmp ecx, ebx
jb 0x10013c47
mov eax, dword [esp + 0x30c]
add eax, ebx
cmp ecx, eax
jae 0x10013c47
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x10013c3e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
lea eax, [esp + 0x34]
inc edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x10013bf0
mov eax, dword [0x1008274c]
mov dword [eax + ebp*4], esi
jmp 0x10013c58
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov eax, dword [0x1008274c]
mov dword [eax + ebp*4], esi
cmp esi, 0xffffffff
je 0x10013c59
test esi, esi
je 0x10013c59
inc ebp
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
push dword [esp + 0x14]
call dword [0x10082628]
test eax, eax
jne 0x10013b80
mov ebx, dword [esp + 0x10]
mov dword [0x10082750], ebp
mov edi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
push dword [esp + 0x10]
call fcn.100113d0
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test edi, edi
jne 0x10013ca8
call fcn.100139a0
mov ecx, dword [esp + 0x2fc]
mov eax, edi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.1001435b
add esp, 0x2f4
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1008274c]
mov dword [eax + ebp*4], 0
jmp 0x10013c59