Function at 0x10001012
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
and byte [ebp - 1], 0
push ebx
push esi
lea eax, [ebp - 0xbc]
push edi
push eax
mov dword [ebp - 0xbc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x100012c6
push dword [ebp + 8]
call fcn.10001387
cmp dword [ebp - 0xac], 2
pop ecx
jne 0x100011f3
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x18], edi
je 0x100012c6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push edi
call esi
push str.EnumProcessModules
push edi
mov ebx, eax
call esi
push str.GetModuleFileNameExA
push edi
mov dword [ebp - 0x10], eax
call esi
test ebx, ebx
mov dword [ebp - 0x20], eax
je 0x100011ed
cmp dword [ebp - 0x10], 0
je 0x100011ed
test eax, eax
je 0x100011ed
and dword [ebp - 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0xc], 0x400
cmp dword [ebp - 8], 0
je 0x100010de
push dword [ebp - 8]
push 0
call esi
push eax
call edi
mov eax, dword [ebp - 0xc]
add eax, eax
mov dword [ebp - 0xc], eax
push dword [ebp - 0xc]
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 8], eax
je 0x10001115
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0xc]
push eax
call ebx
test eax, eax
je 0x1000110b
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jne 0x1000111d
jmp 0x100010c6
push dword [ebp - 8]
push 0
call esi
push eax
call edi
push dword [ebp - 0x18]
jmp 0x100012c0
shr dword [ebp - 0x14], 2
mov dword [ebp - 0x1c], 0
je 0x100011d1
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
and byte [ebp - 0x2e8], 0
push dword [eax]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x100011be
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x28]
push 4
push eax
push ebx
call dword [ebp - 0x10]
test eax, eax
je 0x100011b7
lea eax, [ebp - 0x2e8]
push 0x104
push eax
push dword [ebp - 0x28]
push ebx
call dword [ebp - 0x20]
test eax, eax
jne 0x10001182
and byte [ebp - 0x2e8], al
lea eax, [ebp - 0x2e8]
push eax
call fcn.10001387
lea eax, [ebp - 0x2e8]
push 0x5c
push eax
call fcn.10001360
add esp, 0xc
test eax, eax
je 0x100011a4
inc eax
push dword [ebp + 8]
push eax
call fcn.100012d0
pop ecx
test eax, eax
pop ecx
jne 0x100011b7
mov byte [ebp - 1], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x1c]
add dword [ebp - 0x24], 4
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x14]
jb 0x10001134
push dword [ebp - 8]
push 0
call esi
push eax
call edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, byte [ebp - 1]
jmp 0x100012c8
push edi
jmp 0x100012c0
cmp dword [ebp - 0xac], 1
jne 0x100012c6
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x18], ebx
je 0x100012c6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push ebx
call esi
push str.Process32First
push ebx
mov edi, eax
call esi
push str.Process32Next
push ebx
mov dword [ebp - 0x10], eax
call esi
test eax, eax
mov dword [ebp - 0x20], eax
je 0x100012bf
cmp dword [ebp - 0x10], 0
je 0x100012bf
test edi, edi
je 0x100012bf
push 0
push 2
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x100012bf
lea eax, [ebp - 0x1e4]
mov esi, 0x128
push eax
push edi
mov dword [ebp - 0x1e4], esi
call dword [ebp - 0x10]
test eax, eax
je 0x100011db
lea eax, [ebp - 0x1c0]
push eax
call fcn.10001387
lea eax, [ebp - 0x1c0]
push 0x5c
push eax
call fcn.10001360
add esp, 0xc
test eax, eax
je 0x10001299
inc eax
push dword [ebp + 8]
push eax
call fcn.100012d0
pop ecx
test eax, eax
pop ecx
jne 0x100012ac
mov byte [ebp - 1], 1
lea eax, [ebp - 0x1e4]
mov dword [ebp - 0x1e4], esi
push eax
push edi
call dword [ebp - 0x20]
jmp 0x1000126f
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4