Function at 0x406eec
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb94
push ebx
push esi
push edi
push 0xfa0
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], eax
push ebx
call sub.KERNEL32.dll_lstrlenW
mov edi, eax
cmp edi, 1
jl 0x40722e
cmp edi, 0x104
jg 0x40722e
xor esi, esi
test edi, edi
jle 0x406f55
lea eax, [ebp - 0x338]
sub ebx, eax
lea eax, [ebx + esi*2]
mov ax, word [ebp + eax - 0x338]
push eax
call fcn.00406ada
mov word [ebp + esi*2 - 0x338], ax
inc esi
cmp esi, edi
pop ecx
jl 0x406f36
and word [ebp + edi*2 - 0x338], 0
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 0x130], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x406f83
mov eax, 0x25e
jmp 0x407233
cmp dword [ebp - 0x120], 2
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x406faf
cmp dword [ebp - 0x120], 1
je 0x4070b5
mov eax, 0x25f
jmp 0x407233
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp + 8], eax
je 0x4070df
push str.EnumProcesses
push eax
call esi
push str.EnumProcessModules
mov edi, eax
push dword [ebp + 8]
call esi
push str.GetModuleBaseNameW
mov dword [ebp - 0xc], eax
push dword [ebp + 8]
call esi
test edi, edi
mov dword [ebp - 0x10], eax
je 0x40721c
cmp dword [ebp - 0xc], 0
je 0x40721c
test eax, eax
je 0x40721c
lea eax, [ebp - 0x18]
push eax
push 0x3e8
push dword [ebp - 4]
call edi
test eax, eax
jne 0x40701f
mov esi, 0x25d
jmp 0x4070ec
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], 0
shr eax, 2
mov dword [ebp - 0x14], eax
je 0x4070b5
lea eax, [ebp - 0x76c]
push str.Unknown
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
push dword [eax + ecx*4]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x407088
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push 4
push eax
push edi
call dword [ebp - 0xc]
test eax, eax
je 0x407088
lea eax, [ebp - 0x76c]
push 0x104
push eax
push dword [ebp - 0x1c]
push edi
call dword [ebp - 0x10]
push edi
call ebx
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x76c]
push eax
call fcn.00406acf
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4070e9
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jb 0x407035
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x120], 1
jne 0x40720a
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
jne 0x407103
mov eax, 0x25d
jmp 0x407233
xor esi, esi
inc esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x407215
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32FirstW
push edi
mov dword [ebp - 4], eax
call esi
push str.Process32NextW
push edi
mov dword [ebp - 0xc], eax
call esi
push str.Module32FirstW
push edi
mov dword [ebp - 0x10], eax
call esi
push str.Module32NextW
push edi
mov dword [ebp - 8], eax
call esi
mov dword [ebp - 0x14], eax
xor eax, eax
cmp dword [ebp - 0x10], eax
je 0x40721c
cmp dword [ebp - 0xc], eax
je 0x40721c
cmp dword [ebp - 0x14], eax
je 0x40721c
cmp dword [ebp - 8], eax
je 0x40721c
cmp dword [ebp - 4], eax
je 0x40721c
push eax
push 2
call dword [ebp - 4]
mov edi, eax
cmp edi, 0xffffffff
je 0x40721c
lea eax, [ebp - 0x564]
mov dword [ebp - 0x564], 0x22c
push eax
push edi
call dword [ebp - 0xc]
jmp 0x407203
push dword [ebp - 0x55c]
push 8
call dword [ebp - 4]
mov esi, eax
cmp esi, 0xffffffff
je 0x407219
lea eax, [ebp - 0xb94]
mov dword [ebp - 0xb94], 0x428
push eax
push esi
call dword [ebp - 8]
jmp 0x4071e7
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0xb74]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x407223
lea eax, [ebp - 0xb94]
mov dword [ebp - 0xb94], 0x428
push eax
push esi
call dword [ebp - 0x14]
test eax, eax
jne 0x4071ba
push esi
call ebx
lea eax, [ebp - 0x564]
mov dword [ebp - 0x564], 0x22c
push eax
push edi
call dword [ebp - 0x10]
test eax, eax
jne 0x407191
push edi
call ebx
xor esi, esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x407233
push edi
call ebx
mov esi, 0x25d
jmp 0x40720c
push esi
call ebx
push edi
call ebx
xor esi, esi
inc esi
jmp 0x40720c
mov eax, 0x278
pop edi
pop esi
pop ebx
leave
ret 4