Function at 0x40d400
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5417fe
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x594ca8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push 2
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
lea eax, [ebp - 0x23c]
push eax
push edi
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x23c], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x40d685
mov edx, dword [ebp + 8]
mov esi, dword [edx - 0xc]
cmp esi, ebx
jge 0x40d478
push 0x80070057
call fcn.00404860
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x40d495
push esi
lea ecx, [ebp + 8]
call fcn.00404610
mov edx, dword [ebp + 8]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.00517512
mov eax, dword [ebp + 8]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x40d46e
lea ecx, [ebp - 0x23c]
mov dword [eax - 0xc], esi
mov eax, dword [ebp + 8]
push ecx
xor edx, edx
push edi
mov word [eax + esi*2], dx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
je 0x40d655
call fcn.00417515
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x40d6c9
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x240], esi
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 1
test ecx, 0xffff0000
jne 0x40d522
mov edx, ecx
movzx edi, dx
push edi
call fcn.004181ba
cmp eax, ebx
je 0x40d558
push edi
push eax
lea ecx, [ebp - 0x240]
call fcn.00403eb0
jmp 0x40d552
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
jmp 0x40d530
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d530
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x240]
call fcn.004046e0
mov esi, dword [ebp - 0x240]
mov byte [ebp - 4], 2
mov edi, dword [esi - 0xc]
cmp edi, ebx
jl 0x40d46e
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x40d58a
push edi
lea ecx, [ebp - 0x240]
call fcn.00404610
mov esi, dword [ebp - 0x240]
lea ecx, [edi + 1]
push ecx
push esi
call fcn.00517512
add esp, 8
cmp edi, dword [esi - 8]
jg 0x40d46e
xor edx, edx
mov dword [esi - 0xc], edi
mov word [esi + edi*2], dx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, ebx
setne al
cmp eax, ebx
je 0x40d6c9
mov eax, esi
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d5e6
cmp dx, bx
je 0x40d5e2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d5e6
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40d5c0
xor eax, eax
jmp 0x40d5eb
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40d6d3
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00516787
add esp, 8
cmp eax, ebx
jl 0x40d46e
cmp eax, dword [esi - 8]
jg 0x40d46e
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d639
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x244]
lea ecx, [ebp - 0x23c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40d4cc
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00516787
add esp, 8
cmp eax, ebx
jl 0x40d46e
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx - 8]
jg 0x40d46e
mov dword [ecx - 0xc], eax
mov edx, dword [ebp + 8]
xor ecx, ecx
mov word [edx + eax*2], cx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d6ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051553d
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404860
mov eax, dword [ebp - 0x234]
push eax
push ebx
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d713
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d739
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40d6ad