Function at 0x1003c630
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2ec
mov eax, dword [0x1015f1d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x2d4], esi
xor edi, edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [ebp - 0x2ec], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, dword [esi + 4]
mov ebx, eax
mov edx, esi
mov dword [ebp - 0x2d8], ebx
neg edx
lea eax, [esi - 1]
sbb edx, edx
and edx, eax
je 0x1003c87e
xor ecx, ecx
mov eax, edx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100e13ce
mov ecx, eax
add esp, 4
mov dword [0x1016476c], ecx
test ecx, ecx
je 0x1003c879
lea eax, [esi*4 - 4]
neg esi
sbb esi, esi
and esi, eax
push esi
push edi
push ecx
call fcn.100cede0
mov eax, dword [ebp - 0x2d4]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x2dc], ecx
mov dword [ebp - 0x2e8], ecx
cmp dword [eax + 4], ecx
jbe 0x1003c86c
mov esi, dword [sym.imp.KERNEL32.dll_SuspendThread]
add eax, 0xdc
mov edi, dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov edx, dword [ebp - 0x2d4]
mov dword [ebp - 0x2e0], eax
mov eax, dword [ebp - 0x2e0]
mov eax, dword [eax]
cmp eax, ebx
je 0x1003c84f
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1003c7a4
test ebx, ebx
je 0x1003c7a4
push ebx
call esi
cmp eax, 0xffffffff
je 0x1003c82a
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push ebx
mov dword [ebp - 0x2e4], 0
call edi
test eax, eax
je 0x1003c7a4
nop dword [eax]
xor esi, esi
cmp dword [ebp + 0xc], esi
jle 0x1003c79e
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x218]
mov edx, dword [eax]
cmp edi, edx
jb 0x1003c78f
mov ecx, dword [eax + 8]
add ecx, edx
cmp edi, ecx
jb 0x1003c7d8
inc esi
add eax, 0x70
cmp esi, dword [ebp + 0xc]
jl 0x1003c780
mov edi, dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov esi, dword [sym.imp.KERNEL32.dll_SuspendThread]
mov eax, dword [0x1016476c]
mov ecx, dword [ebp - 0x2dc]
mov dword [eax + ecx*4], ebx
cmp ebx, 0xffffffff
je 0x1003c843
mov edx, dword [ebp - 0x2d4]
test ebx, ebx
mov ebx, dword [ebp - 0x2d8]
je 0x1003c84f
inc ecx
mov dword [ebp - 0x2dc], ecx
jmp 0x1003c84f
mov edi, dword [ebp - 0x2e4]
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x1003c81c
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.KERNEL32.dll_SuspendThread]
push ebx
call esi
lea eax, [ebp - 0x2d0]
inc edi
push eax
mov dword [ebp - 0x2e4], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetThreadContext]
push ebx
call edi
test eax, eax
jne 0x1003c770
jmp 0x1003c7a4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
jmp 0x1003c798
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1016476c]
mov ecx, dword [ebp - 0x2dc]
mov dword [eax + ecx*4], 0
mov ebx, dword [ebp - 0x2d8]
mov edx, dword [ebp - 0x2d4]
mov eax, dword [ebp - 0x2e8]
add dword [ebp - 0x2e0], 0x40
inc eax
mov dword [ebp - 0x2e8], eax
cmp eax, dword [edx + 4]
jb 0x1003c716
mov dword [0x10164770], ecx
mov edi, 1
jmp 0x1003c87e
call fcn.1003c530
push dword [ebp - 0x2ec]
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100476aa
mov esp, ebp
pop ebp
ret