Function at 0x10087de0
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x304
mov dword [esp + 0x14], edx
mov eax, dword [0x10258d1c]
xor eax, esp
mov dword [esp + 0x300], eax
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [esp + 8], ecx
mov dword [ecx + 8], 0
push 0
push 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
cmp eax, 0xffffffff
je 0x10087f16
mov ebx, eax
mov dword [esp + 0x34], 0x1c
lea esi, [esp + 0x34]
push esi
push eax
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x10087f0f
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
jmp 0x10087eb3
mov dword [ecx + 4], 0x80
push 0x200
push 0
push dword [0x1025e584]
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp], eax
test eax, eax
je 0x10087f0f
mov ecx, dword [esp + 0x3c]
mov dword [esp], ecx
mov ecx, esi
mov esi, edi
mov edi, dword [esp + 8]
mov edx, dword [edi + 8]
lea ebp, [edx + 1]
mov dword [edi + 8], ebp
mov edi, esi
mov esi, ecx
mov ecx, dword [esp]
mov dword [eax + edx*4], ecx
nop word cs:[eax + eax]
mov dword [esp + 0x34], 0x1c
push esi
push ebx
call sub.KERNEL32.dll_Thread32Next
test eax, eax
je 0x10087f0f
cmp dword [esp + 0x34], 0x10
jb 0x10087ea0
mov ebp, dword [esp + 0x40]
call edi
cmp ebp, eax
jne 0x10087ea0
mov ebp, dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebp, eax
je 0x10087ea0
mov ecx, dword [esp + 8]
mov eax, dword [ecx]
test eax, eax
je 0x10087e4b
mov edx, ecx
mov ecx, dword [ecx + 4]
cmp dword [edx + 8], ecx
jb 0x10087e72
shl ecx, 3
push ecx
push eax
push 0
push dword [0x1025e584]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x10087f0f
mov ecx, dword [esp + 8]
shl dword [ecx + 4], 1
mov dword [ecx], eax
jmp 0x10087e72
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 8]
cmp dword [ecx], 0
je 0x10088137
cmp dword [ecx + 8], 0
je 0x10088137
xor esi, esi
mov eax, dword [esp + 0x14]
mov edx, eax
inc edx
mov dword [esp + 0x2c], edx
cmove eax, esi
mov dword [esp + 0x18], eax
imul eax, eax, 0x2c
lea edx, [eax + 0x24]
mov dword [esp + 0x24], edx
add eax, 0x1c
mov dword [esp + 0x28], eax
jmp 0x10087f7c
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x30]
inc esi
mov ecx, dword [esp + 8]
cmp esi, dword [ecx + 8]
jae 0x10088137
mov eax, dword [ecx]
push dword [eax + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
test eax, eax
je 0x10087f6e
mov ebx, eax
mov dword [esp + 0x30], esi
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov dword [esp + 0x34], 0x10001
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x20], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10087f60
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x14], 0xffffffff
jne 0x10087fc9
mov esi, dword [0x1025e590]
cmp dword [esp + 0x18], esi
jae 0x10087f60
mov edx, dword [0x1025e588]
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov ebp, dword [esp + 0x18]
mov dword [esp + 0xc], esi
jmp 0x10088006
mov ebx, dword [esp]
mov edx, edi
inc ebp
add dword [esp + 0x20], 0x2c
add ebx, 0x2c
cmp ebp, esi
je 0x10087f60
imul ecx, ebp, 0x2c
mov edi, dword [esp + 0x318]
mov eax, edi
test edi, edi
je 0x1008803a
cmp dword [esp + 0x318], 1
jne 0x10088030
mov eax, 1
jmp 0x1008803a
mov eax, dword [edx + ecx + 0x14]
shr eax, 2
and eax, 1
mov dword [esp], ebx
mov ebx, dword [edx + ecx + 0x14]
bt ebx, 1
mov edi, edx
mov edx, eax
sbb edx, 0
je 0x10087ff0
lea edx, [edi + ecx]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xec]
test eax, eax
je 0x10088097
mov eax, dword [edi + ecx + 0x18]
and eax, 0xf
je 0x10087ff0
mov esi, dword [esp + 0x10]
mov ebx, dword [esi]
mov esi, dword [esp + 0x20]
mov dword [esp + 4], edi
add edi, esi
nop dword [eax]
movzx esi, byte [edi - 8]
add esi, ebx
cmp esi, edx
je 0x100880eb
inc edi
dec eax
jne 0x10088080
mov esi, dword [esp + 0xc]
mov ebx, dword [esp]
jmp 0x100880e2
mov dword [esp + 4], edi
test bl, 1
mov ebx, dword [esp]
je 0x100880b4
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
lea esi, [eax - 5]
cmp esi, edx
mov esi, dword [esp + 0xc]
je 0x1008810a
mov edi, dword [esp + 4]
mov eax, dword [edi + ecx + 0x18]
and eax, 0xf
je 0x10087ff3
mov ecx, dword [edi + ecx + 8]
add edi, ebx
nop dword [eax + eax]
movzx esi, byte [edi + 8]
add esi, ecx
cmp esi, edx
je 0x100880fd
inc edi
dec eax
jne 0x100880d0
mov esi, dword [esp + 0xc]
mov edx, dword [esp + 4]
jmp 0x10087ff5
mov eax, dword [esp + 4]
add ecx, eax
add ecx, 8
mov esi, dword [esp + 0xc]
mov ebx, dword [esp]
jmp 0x10088105
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
movzx eax, byte [edi]
add eax, dword [ecx]
test eax, eax
mov edx, dword [esp + 4]
je 0x10087ff5
mov dword [esp + 0xec], eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov edx, dword [0x1025e588]
jmp 0x10087ff5
mov ecx, dword [esp + 0x300]
xor ecx, esp
call fcn.10155ad1
add esp, 0x304
pop esi
pop edi
pop ebx
pop ebp
ret