Function at 0x1003a370
Capabilities:
Enumerate threads
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x1004c040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
je 0x1003a52d
push ebx
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_Thread32First]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1003a527
mov edi, 1
mov dword [ebp - 0x24], edi
cmp dword [ebp - 0x20], 0x10
jb 0x1003a48f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x1003a48f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 0x18]
cmp ecx, eax
je 0x1003a48f
push ecx
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x1003a48f
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x1003a41a
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
jmp 0x1003a495
mov ecx, dword [esi]
test ecx, ecx
jne 0x1003a44c
push 0x200
push ecx
push dword [0x1004c6a0]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
xor eax, eax
test ecx, ecx
mov dword [esi], ecx
cmovne eax, edi
lea edi, [esi + 8]
mov dword [ebp - 0x24], eax
jmp 0x1003a47d
mov eax, dword [esi + 4]
lea edi, [esi + 8]
cmp dword [edi], eax
jb 0x1003a47a
add eax, eax
mov dword [esi + 4], eax
shl eax, 2
push eax
push ecx
push 0
push dword [0x1004c6a0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
test ecx, ecx
je 0x1003a53f
mov dword [esi], ecx
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1003a546
mov eax, dword [edi]
mov dword [ecx + eax*4], ebx
inc dword [edi]
mov edi, dword [ebp - 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x1003a3c4
test edi, edi
je 0x1003a4c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x1003a527
xor edi, edi
mov dword [ebp - 0x24], edi
cmp dword [esi], 0
je 0x1003a527
cmp dword [esi + 8], 0
mov dword [ebp - 0x28], 0
jbe 0x1003a50e
xor edi, edi
xor ebx, ebx
nop dword [eax + eax]
mov eax, dword [esi]
push dword [eax + edi]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [esi]
push dword [eax + ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x28]
lea edi, [edi + 4]
inc eax
lea ebx, [ebx + 4]
mov dword [ebp - 0x28], eax
cmp eax, dword [esi + 8]
jb 0x1003a4e0
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
push 0
push dword [0x1004c6a0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0x24]
mov dword [esi], 0
push dword [ebp - 0x2c]
call ebx
pop ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.1003b9a6
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [ebp - 0x24], edi
jmp 0x1003a549
mov edi, dword [ebp - 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
jmp 0x1003a4c5