Function at 0x1000b045
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x300
mov dword [esp + 0x18], edx
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [esp + 8], ecx
mov dword [ecx + 8], eax
push eax
push 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebp, eax
mov eax, 9
cmp ebp, 0xffffffff
je 0x1000b372
lea eax, [esp + 0x34]
mov dword [eax], 0x1c
push eax
push ebp
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x1000b366
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0xc], ebp
cmp dword [esp + 0x34], 0x10
jb 0x1000b142
mov ebx, dword [esp + 0x40]
call esi
cmp ebx, eax
jne 0x1000b142
mov ebx, dword [esp + 0x3c]
call edi
cmp ebx, eax
je 0x1000b142
mov ebx, dword [esp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x1000b0fc
mov ecx, dword [ebx + 4]
cmp dword [ebx + 8], ecx
jb 0x1000b124
lea edx, [ecx + ecx]
mov dword [ebx + 4], edx
shl ecx, 3
push ecx
push eax
push 0
push dword [0x10018b38]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x1000b34e
mov dword [ebx], eax
jmp 0x1000b124
mov dword [ebx + 4], 0x80
push 0x200
push 0
push dword [0x10018b38]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [esp + 8]
mov dword [ebx], eax
test eax, eax
je 0x1000b366
mov ecx, dword [esp + 0x3c]
mov ebp, esi
mov esi, edi
mov edi, ebx
mov edx, dword [ebx + 8]
lea ebx, [edx + 1]
mov dword [edi + 8], ebx
mov edi, esi
mov esi, ebp
mov ebp, dword [esp + 0xc]
mov dword [eax + edx*4], ecx
mov dword [esp + 0x34], 0x1c
lea eax, [esp + 0x34]
push eax
push ebp
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x1000b0a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov ebx, dword [esp + 8]
jne 0x1000b34e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebx], 0
je 0x1000b372
cmp dword [ebx + 8], 0
je 0x1000b372
xor edi, edi
mov eax, dword [esp + 0x18]
mov ecx, eax
inc ecx
mov dword [esp + 0x2c], ecx
cmove eax, edi
mov dword [esp + 0x14], eax
imul eax, eax, 0x2c
lea ecx, [eax + 0x24]
mov dword [esp + 0x24], ecx
add eax, 0x1c
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x314]
mov eax, dword [ebx]
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
test eax, eax
je 0x1000b33c
mov ebx, eax
mov dword [esp + 0x30], edi
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 0x1000b32e
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x18], 0xffffffff
jne 0x1000b20d
mov edx, dword [0x10018b44]
cmp dword [esp + 0x14], edx
jae 0x1000b32e
mov ebx, dword [0x10018b3c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov ebp, dword [esp + 0x14]
mov dword [esp + 4], edx
imul edi, ebp, 0x2c
mov eax, dword [ebx + edi + 0x14]
mov ecx, eax
shr ecx, 1
and ecx, 1
cmp ecx, esi
je 0x1000b31b
lea ecx, [ebx + edi]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0xec]
test esi, esi
je 0x1000b289
mov eax, dword [ebx + edi + 0x18]
and eax, 0xf
je 0x1000b31b
mov edx, dword [esp + 0x10]
mov esi, dword [edx]
mov edx, dword [esp + 0xc]
mov dword [esp], ebx
add edx, ebx
movzx ebx, byte [edx - 8]
add ebx, esi
cmp ebx, ecx
je 0x1000b2d5
inc edx
dec eax
jne 0x1000b279
jmp 0x1000b2c5
mov dword [esp], ebx
test al, 1
je 0x1000b2a1
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
lea edx, [eax - 5]
cmp edx, ecx
mov edx, dword [esp + 4]
je 0x1000b2f4
mov ebx, dword [esp]
mov eax, dword [ebx + edi + 0x18]
and eax, 0xf
je 0x1000b31b
mov esi, dword [ebx + edi + 8]
mov edx, dword [esp + 0x20]
add edx, ebx
movzx edi, byte [edx + 8]
add edi, esi
cmp edi, ecx
je 0x1000b2e0
inc edx
dec eax
jne 0x1000b2b7
mov esi, dword [esp + 0x314]
mov edx, dword [esp + 4]
mov ebx, dword [esp]
jmp 0x1000b31b
mov eax, dword [esp]
lea ecx, [eax + edi]
add ecx, 8
jmp 0x1000b2e4
mov ecx, dword [esp + 0x10]
movzx eax, byte [edx]
add eax, dword [ecx]
mov esi, dword [esp + 0x314]
mov edx, dword [esp + 4]
test eax, eax
mov ebx, dword [esp]
je 0x1000b31b
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 [esp + 4]
mov ebx, dword [0x10018b3c]
inc ebp
add dword [esp + 0xc], 0x2c
add dword [esp + 0x20], 0x2c
cmp ebp, edx
jne 0x1000b235
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x30]
inc edi
mov ebx, dword [esp + 8]
cmp edi, dword [ebx + 8]
jb 0x1000b1b8
xor eax, eax
jmp 0x1000b372
mov eax, dword [ebx]
test eax, eax
je 0x1000b366
xor esi, esi
push eax
push esi
push dword [0x10018b38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebx], esi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 9
add esp, 0x300
pop esi
pop edi
pop ebx
pop ebp
ret