Function at 0x1018c760
Capabilities:
Resume thread
Suspend thread

Disassembly:
sub esp, 0x2f8
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov ebx, ecx
push esi
push edi
mov dword [esp + 0x18], edx
xor edi, edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [esp + 0x20], eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov esi, dword [0x103209ec]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 4
call esi
mov ebp, eax
mov dword [esp + 0x14], ebp
cmp ebp, 0xffffffff
je 0x1018c95c
test ebp, ebp
je 0x1018c95c
mov eax, dword [0x103209e8]
lea ecx, [esp + 0x20]
push ecx
push ebp
mov dword [esp + 0x28], 0x1c
xor esi, esi
call eax
test eax, eax
je 0x1018c955
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x2c], eax
jne 0x1018c7f0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esp + 0x28], eax
je 0x1018c7f0
inc esi
mov eax, dword [0x103209f0]
lea ecx, [esp + 0x20]
push ecx
push ebp
mov dword [esp + 0x28], 0x1c
call eax
test eax, eax
jne 0x1018c7d7
test esi, esi
je 0x1018c955
shl esi, 2
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [0x10320fd8], eax
test eax, eax
je 0x1018c955
push esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x103209e8]
lea ecx, [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x20], 0x1c
xor esi, esi
mov dword [esp + 0x10], esi
push ecx
push ebp
call eax
test eax, eax
je 0x1018c94a
mov ebp, dword [sym.imp.KERNEL32.dll_SuspendThread]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x2c], eax
jne 0x1018c922
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
je 0x1018c922
push ecx
push 0
push 0x1f03ff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
cmp esi, 0xffffffff
je 0x1018c908
test esi, esi
je 0x1018c908
push esi
call ebp
cmp eax, 0xffffffff
je 0x1018c8ff
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0x10001
push eax
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1018c908
nop dword [eax]
mov ecx, dword [esp + 0xf4]
cmp ecx, ebx
jb 0x1018c908
mov eax, dword [esp + 0x18]
add eax, ebx
cmp ecx, eax
jae 0x1018c908
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x1018c8ff
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebp
lea eax, [esp + 0x3c]
inc edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x1018c8c0
jmp 0x1018c908
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov eax, dword [0x10320fd8]
mov ecx, dword [esp + 0x10]
mov dword [eax + ecx*4], esi
cmp esi, 0xffffffff
je 0x1018c922
test esi, esi
je 0x1018c922
inc ecx
mov dword [esp + 0x10], ecx
mov eax, dword [0x103209f0]
lea ecx, [esp + 0x20]
push ecx
push dword [esp + 0x18]
mov dword [esp + 0x28], 0x1c
call eax
test eax, eax
jne 0x1018c860
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov dword [0x10320ebc], esi
mov edi, 1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test edi, edi
jne 0x1018c976
call fcn.1018c990
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2f8
ret