Function at 0x405940
Capabilities:
Enumerate process modules
Enumerate processes
Get common file path
Terminate process
Terminate process by name

Disassembly:
sub esp, 0x4f4
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov ecx, 0x49
xor eax, eax
lea edi, [esp + 0x24]
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], ebx
rep stosd dword es:[edi], eax
mov ecx, ebx
call fcn.004058c0
test eax, eax
je 0x405977
mov ecx, ebx
call fcn.00405920
lea eax, [esp + 0x148]
mov dword [esp + 0x148], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x158]
mov ecx, ebx
cmp eax, 1
jne 0x4059b4
call fcn.00405780
test eax, eax
jne 0x4059c8
mov ecx, ebx
call fcn.004057c0
test eax, eax
je 0x4059cf
jmp 0x4059c8
call fcn.004058f0
test eax, eax
jne 0x4059c8
mov ecx, ebx
call fcn.00405890
test eax, eax
je 0x4059cf
mov ecx, ebx
call fcn.00405920
mov dword [esp + 0x20], 0x128
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0
push 2
mov dword [esp + 0x24], eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea ecx, [esp + 0x20]
mov ebp, eax
push ecx
push ebp
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x405a97
lea edx, [esp + 0x20]
push edx
push ebp
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x405a97
lea eax, [esp + 0x44]
mov ecx, ebx
push eax
call fcn.004056d0
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.USER32.dll_CharUpperBuffA]
mov esi, 0x4012a8
lea eax, [esp + 0x44]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405a65
test cl, cl
je 0x405a61
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405a65
add eax, 2
add esi, 2
test cl, cl
jne 0x405a41
xor eax, eax
jmp 0x405a6a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x28]
jne 0x405a76
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x1c]
jne 0x405a84
mov eax, dword [esp + 0x38]
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
push ebp
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x405a12
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x405ac5
push eax
push 1
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f4
ret
mov ecx, 0x88
xor eax, eax
lea edi, [esp + 0x2e4]
push esi
rep stosd dword es:[edi], eax
push 8
mov dword [esp + 0x2e8], 0x224
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea edx, [esp + 0x2e0]
mov dword [esp + 0x14], eax
push edx
push eax
call sub.KERNEL32.dll_Module32First
test eax, eax
je 0x405c57
mov ebp, dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x405b14
mov esi, dword [esp + 0x10]
cmp esi, dword [esp + 0x2e8]
jne 0x405c3d
lea eax, [esp + 0x1dc]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x4012a4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1dc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x1dc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4012a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x400]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x400]
push ecx
push eax
call dword [sym.imp.USER32.dll_CharUpperBuffA]
lea edi, [esp + 0x1dc]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x400]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x1e0]
push ecx
push edx
call fcn.00409960
add esp, 0xc
test eax, eax
je 0x405c3d
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x400]
push eax
call fcn.004056d0
mov esi, 0x4012a8
lea eax, [esp + 0x400]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405c21
test cl, cl
je 0x405c1d
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405c21
add eax, 2
add esi, 2
test cl, cl
jne 0x405bfd
xor eax, eax
jmp 0x405c26
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405c3d
mov eax, dword [esp + 0x10]
push eax
push 1
push 0x1f0fff
call ebp
push 0
push eax
call ebx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x2e0]
push ecx
push edx
call sub.KERNEL32.dll_Module32Next
test eax, eax
jne 0x405b10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f4
ret