Function at 0x1000211f
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 0x100023f9
mov ebp, eax
lea edi, [esp + 0x24]
mov dword [edi], 0x1c
push edi
push eax
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x100023c8
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x24], 0x10
jb 0x1000220d
mov ebx, dword [esp + 0x30]
call esi
cmp ebx, eax
jne 0x1000220d
mov ebx, dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebx, eax
je 0x1000220d
mov edi, dword [esp]
mov eax, dword [edi]
test eax, eax
je 0x100021d2
mov ecx, dword [edi + 4]
cmp dword [edi + 8], ecx
jb 0x100021f9
mov ebx, edi
lea edx, [ecx + ecx]
mov dword [edi + 4], edx
shl ecx, 3
push ecx
push eax
push 0
push dword [0x10005320]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x100023d1
mov dword [ebx], eax
mov edi, ebx
jmp 0x100021f9
mov dword [edi + 4], 0x80
push 0x200
push 0
push dword [0x10005320]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, dword [esp]
mov dword [edi], eax
test eax, eax
je 0x100023e9
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 0x10002171
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov ebx, dword [esp]
jne 0x100023d1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx]
xor esi, esi
test eax, eax
je 0x100023f9
cmp dword [ebx + 8], 0
je 0x100023f9
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 0x100023b8
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 0x100023a6
mov eax, dword [esp + 0x14]
cmp dword [esp + 0xc], 0xffffffff
jne 0x100022b5
mov eax, dword [0x10005330]
cmp dword [esp + 8], eax
jae 0x100023a6
mov esi, dword [esp + 8]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x304], 1
sete al
mov ecx, dword [0x10005328]
imul ebx, esi, 0x2c
mov dword [esp + 4], ecx
mov cl, byte [ecx + ebx + 0x14]
test cl, 2
sete ah
xor ah, al
jne 0x10002399
mov ebp, dword [esp + 4]
lea edx, [ebx + ebp]
mov eax, dword [esp + 0xdc]
cmp dword [esp + 0x304], 1
jne 0x10002332
mov edi, dword [ebp + ebx + 0x18]
and edi, 0xf
je 0x10002399
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 0x1000236a
inc ebp
dec edi
jne 0x10002322
jmp 0x10002399
test cl, 1
je 0x10002340
mov edi, dword [edx]
lea ecx, [edi - 5]
cmp ecx, eax
je 0x1000237f
mov dword [esp + 0x1c], edx
mov edi, dword [ebp + ebx + 0x18]
and edi, 0xf
je 0x10002399
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 0x10002375
inc ebp
dec edi
jne 0x1000235a
jmp 0x10002399
mov eax, dword [esp + 4]
add eax, ebx
add eax, 8
jmp 0x10002379
mov eax, dword [esp + 0x1c]
movzx edi, byte [ebp]
add edi, dword [eax]
test edi, edi
je 0x10002399
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 0x100022c7
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 0x100023f7
mov eax, dword [eax]
jmp 0x10002267
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100023f9
mov eax, dword [ebx]
test eax, eax
je 0x100023e9
xor esi, esi
push eax
push esi
push dword [0x10005320]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebx], esi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 8
jmp 0x100023f9
xor esi, esi
mov eax, esi
add esp, 0x2f0
pop esi
pop edi
pop ebx
pop ebp
ret