Function at 0x406d45
Capabilities:
Link many functions at runtime
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1644
call fcn.0057c4e0
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
push esi
mov dword [esp + 0x2c], ebx
call fcn.005749e0
mov edi, eax
lea eax, [edi - 1]
pop ecx
cmp eax, 0x102
ja 0x407173
cmp edi, ebx
jle 0x406da7
mov dword [esp + 0x14], esi
lea eax, [esp + 0x160]
sub dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
lea esi, [esp + ebx + 0x160]
movsx eax, byte [eax + esi]
push eax
call fcn.0057714a
inc ebx
cmp ebx, edi
pop ecx
mov byte [esi], al
jl 0x406d8a
lea eax, [esp + 0x268]
push eax
mov byte [esp + edi + 0x164], 0
mov dword [esp + 0x26c], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x406dd6
mov eax, 0x25e
jmp 0x407178
cmp dword [esp + 0x278], 2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x406e04
cmp dword [esp + 0x278], 1
je 0x406f70
mov eax, 0x25f
jmp 0x407178
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x406e21
mov eax, 0x25d
jmp 0x407178
push str.EnumProcesses
push eax
call esi
push str.EnumProcessModules
push dword [esp + 0x18]
mov edi, eax
call esi
push str.GetModuleBaseNameA
push dword [esp + 0x18]
mov dword [esp + 0x24], eax
call esi
mov dword [esp + 0x20], eax
test edi, edi
je 0x406f8f
cmp dword [esp + 0x1c], 0
je 0x406f8f
test eax, eax
je 0x406f8f
lea eax, [esp + 0x2c]
push eax
push 0x3e8
lea eax, [esp + 0x6b8]
push eax
call edi
test eax, eax
jne 0x406e86
mov esi, 0x2bd
jmp 0x406f94
mov eax, dword [esp + 0x2c]
and dword [esp + 0x10], 0
shr eax, 2
mov dword [esp + 0x24], eax
test eax, eax
jbe 0x406f62
lea edi, [esp + 0x380]
call fcn.0041f1e0
mov edi, dword [esp + 0x10]
lea edi, [esp + edi*4 + 0x6b0]
push dword [edi]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x18], eax
test eax, eax
je 0x406efa
lea ecx, [esp + 0x2c]
push ecx
push 4
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [esp + 0x2c]
test eax, eax
je 0x406efa
push 0x104
lea eax, [esp + 0x384]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x24]
call dword [esp + 0x30]
push dword [esp + 0x18]
call ebx
lea eax, [esp + 0x160]
push eax
lea eax, [esp + 0x384]
push eax
call fcn.005773db
pop ecx
push eax
call fcn.00577180
pop ecx
pop ecx
test eax, eax
jne 0x406f50
push dword [edi]
inc eax
push 0
push eax
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x407151
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
test eax, eax
je 0x40713c
call ebx
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x24]
jb 0x406e9e
cmp dword [esp + 0x278], 1
jne 0x407117
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jne 0x406fa5
mov eax, 0x2be
jmp 0x407178
mov esi, 0x2bc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x407178
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32First
push edi
mov dword [esp + 0x24], eax
call esi
push str.Process32Next
push edi
mov dword [esp + 0x20], eax
call esi
push str.Module32First
push edi
mov dword [esp + 0x28], eax
call esi
push str.Module32Next
push edi
mov dword [esp + 0x2c], eax
call esi
xor esi, esi
mov dword [esp + 0x30], eax
cmp dword [esp + 0x20], esi
je 0x40715b
cmp dword [esp + 0x18], esi
je 0x40715b
cmp eax, esi
je 0x40715b
cmp dword [esp + 0x24], esi
je 0x40715b
cmp dword [esp + 0x1c], esi
je 0x40715b
push esi
push 2
call dword [esp + 0x24]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x40702d
mov esi, 0x2c0
jmp 0x406f94
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x14]
mov dword [esp + 0x40], 0x128
call dword [esp + 0x20]
jmp 0x407109
push dword [esp + 0x40]
push 8
call dword [esp + 0x24]
mov edi, eax
cmp edi, 0xffffffff
je 0x407128
lea eax, [esp + 0x488]
push eax
push edi
mov dword [esp + 0x490], 0x224
call dword [esp + 0x2c]
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x4070f1
lea eax, [esp + 0x160]
push eax
lea eax, [esp + 0x4ac]
push eax
call fcn.00577180
pop ecx
pop ecx
test eax, eax
jne 0x4070cf
push dword [esp + 0x40]
inc eax
push esi
push eax
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x407148
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
test eax, eax
je 0x407133
call ebx
push dword [esp + 0x10]
call ebx
push esi
call ebx
xor esi, esi
jmp 0x4070eb
lea eax, [esp + 0x488]
push eax
push edi
mov dword [esp + 0x490], 0x224
call dword [esp + 0x38]
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], esi
jne 0x40707c
push edi
call ebx
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x14]
mov dword [esp + 0x40], 0x22c
call dword [esp + 0x28]
test eax, eax
jne 0x407047
push dword [esp + 0x10]
call ebx
cmp dword [esp + 0x28], 0
jne 0x407165
mov esi, 0x25b
jmp 0x406f94
push dword [esp + 0x10]
call ebx
jmp 0x407023
call ebx
push dword [esp + 0x10]
call ebx
push esi
call ebx
mov esi, 0x25a
jmp 0x406f94
push edi
call ebx
push dword [esp + 0x10]
call ebx
mov esi, 0x25c
jmp 0x406f94
mov esi, 0x2bf
jmp 0x406f94
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x407178
mov eax, 0x278
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret