Function at 0x100022d7
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2f0
mov dword [esp + 0xc], edx
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [esp], ecx
mov dword [ecx + 8], eax
push eax
push 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, 8
cmp eax, 0xffffffff
je 0x100025b1
mov ebp, eax
lea edi, [esp + 0x24]
mov dword [edi], 0x1c
push edi
push eax
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x10002580
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x24], 0x10
jb 0x100023c5
mov ebx, dword [esp + 0x30]
call esi
cmp ebx, eax
jne 0x100023c5
mov ebx, dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebx, eax
je 0x100023c5
mov edi, dword [esp]
mov eax, dword [edi]
test eax, eax
je 0x1000238a
mov ecx, dword [edi + 4]
cmp dword [edi + 8], ecx
jb 0x100023b1
mov ebx, edi
lea edx, [ecx + ecx]
mov dword [edi + 4], edx
shl ecx, 3
push ecx
push eax
push 0
push dword [0x10005308]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x10002589
mov dword [ebx], eax
mov edi, ebx
jmp 0x100023b1
mov dword [edi + 4], 0x80
push 0x200
push 0
push dword [0x10005308]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, dword [esp]
mov dword [edi], eax
test eax, eax
je 0x100025a1
mov ecx, dword [esp + 0x2c]
mov edx, dword [edi + 8]
lea ebx, [edx + 1]
mov dword [edi + 8], ebx
lea edi, [esp + 0x24]
mov dword [eax + edx*4], ecx
mov dword [esp + 0x24], 0x1c
push edi
push ebp
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x10002329
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov ebx, dword [esp]
jne 0x10002589
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx]
xor esi, esi
test eax, eax
je 0x100025b1
cmp dword [ebx + 8], 0
je 0x100025b1
xor esi, esi
mov ecx, dword [esp + 0xc]
mov edx, ecx
inc edx
mov dword [esp + 0x14], edx
cmove ecx, esi
mov dword [esp + 8], ecx
push dword [eax + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
test eax, eax
je 0x10002570
mov ebx, eax
mov dword [esp + 0x18], esi
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov dword [esp + 0x24], 0x10001
push edi
mov dword [esp + 0x14], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1000255e
mov eax, dword [esp + 0x14]
cmp dword [esp + 0xc], 0xffffffff
jne 0x1000246d
mov eax, dword [0x10005318]
cmp dword [esp + 8], eax
jae 0x1000255e
mov esi, dword [esp + 8]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x304], 1
sete al
mov ecx, dword [0x10005310]
imul ebx, esi, 0x2c
mov dword [esp + 4], ecx
mov cl, byte [ecx + ebx + 0x14]
test cl, 2
sete ah
xor ah, al
jne 0x10002551
mov ebp, dword [esp + 4]
lea edx, [ebx + ebp]
mov eax, dword [esp + 0xdc]
cmp dword [esp + 0x304], 1
jne 0x100024ea
mov edi, dword [ebp + ebx + 0x18]
and edi, 0xf
je 0x10002551
mov ecx, dword [edx]
mov edx, dword [esp + 4]
lea ebp, [edx + ebx]
add ebp, 0x24
movzx edx, byte [ebp - 8]
add edx, ecx
cmp edx, eax
je 0x10002522
inc ebp
dec edi
jne 0x100024da
jmp 0x10002551
test cl, 1
je 0x100024f8
mov edi, dword [edx]
lea ecx, [edi - 5]
cmp ecx, eax
je 0x10002537
mov dword [esp + 0x1c], edx
mov edi, dword [ebp + ebx + 0x18]
and edi, 0xf
je 0x10002551
mov ecx, dword [esp + 4]
lea ebp, [ecx + ebx]
add ebp, 0x1c
mov edx, dword [ebp - 0x14]
movzx ecx, byte [ebp + 8]
add ecx, edx
cmp ecx, eax
je 0x1000252d
inc ebp
dec edi
jne 0x10002512
jmp 0x10002551
mov eax, dword [esp + 4]
add eax, ebx
add eax, 8
jmp 0x10002531
mov eax, dword [esp + 0x1c]
movzx edi, byte [ebp]
add edi, dword [eax]
test edi, edi
je 0x10002551
mov dword [esp + 0xdc], edi
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
inc esi
mov eax, dword [esp + 0x20]
cmp esi, eax
jne 0x1000247f
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x24]
mov esi, dword [esp + 0x18]
inc esi
mov eax, dword [esp]
cmp esi, dword [eax + 8]
jae 0x100025af
mov eax, dword [eax]
jmp 0x1000241f
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100025b1
mov eax, dword [ebx]
test eax, eax
je 0x100025a1
xor esi, esi
push eax
push esi
push dword [0x10005308]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebx], esi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 8
jmp 0x100025b1
xor esi, esi
mov eax, esi
add esp, 0x2f0
pop esi
pop edi
pop ebx
pop ebp
ret