Function at 0x40d470
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54184e
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 0x40d6f5
mov edx, dword [ebp + 8]
mov esi, dword [edx - 0xc]
cmp esi, ebx
jge 0x40d4e8
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 0x40d505
push esi
lea ecx, [ebp + 8]
call fcn.00404610
mov edx, dword [ebp + 8]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.00517582
mov eax, dword [ebp + 8]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x40d4de
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 0x40d6c5
call fcn.00417597
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x40d739
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 0x40d592
mov edx, ecx
movzx edi, dx
push edi
call fcn.00418209
cmp eax, ebx
je 0x40d5c8
push edi
push eax
lea ecx, [ebp - 0x240]
call fcn.00403eb0
jmp 0x40d5c2
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
jmp 0x40d5a0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d5a0
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 0x40d4de
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x40d5fa
push edi
lea ecx, [ebp - 0x240]
call fcn.00404610
mov esi, dword [ebp - 0x240]
lea ecx, [edi + 1]
push ecx
push esi
call fcn.00517582
add esp, 8
cmp edi, dword [esi - 8]
jg 0x40d4de
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 0x40d739
mov eax, esi
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d656
cmp dx, bx
je 0x40d652
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d656
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40d630
xor eax, eax
jmp 0x40d65b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40d743
mov eax, dword [esi - 8]
push eax
push esi
call fcn.005167f7
add esp, 8
cmp eax, ebx
jl 0x40d4de
cmp eax, dword [esi - 8]
jg 0x40d4de
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 0x40d6a9
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 0x40d53c
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.005167f7
add esp, 8
cmp eax, ebx
jl 0x40d4de
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx - 8]
jg 0x40d4de
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 0x40d71b
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.005155a4
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 0x40d783
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 0x40d7a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40d71d