Function at 0x404c57
Capabilities:
Enumerate processes
Get graphical window text

Disassembly:
push 0x874
mov eax, 0x50cb14
call fcn.004f41e2
mov eax, dword [ebp + 0x10]
mov ecx, dword [0x5b2acc]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x880], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x584e24]
cmp eax, dword [ecx + 4]
jg 0x405038
push 0xea0
push 0
push ebx
call fcn.004f5a90
mov esi, dword [sym.imp.USER32.dll_GetWindowLongW]
add esp, 0xc
push 0xfffffffffffffff0
push edi
call esi
push 0xffffffffffffffec
push edi
mov dword [ebp - 0x874], eax
call esi
push ebx
push edi
mov dword [ebp - 0x878], eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
jne 0x404cd7
and dword [ebx], eax
xor al, al
call fcn.004f418c
ret
cmp dword [ebx], 0
je 0x404ccf
mov esi, dword [ebp - 0x874]
mov eax, esi
shr eax, 0x1c
and al, 1
mov dword [ebp - 0x874], eax
je 0x404d76
test esi, 0x50000
je 0x404d42
mov eax, dword [ebx]
mov byte [ebp - 0x874], 1
mov dword [ebp - 0x87c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp - 0x87c]
cmp ecx, eax
je 0x404d42
cmp ecx, dword [ebp + 0xc]
je 0x404d42
test esi, 0x40000000
jne 0x404d42
test byte [ebp - 0x878], 0x80
jne 0x404d42
mov ecx, dword [0x5a22a0]
push edi
call fcn.0041f0c9
test al, al
je 0x404d4b
mov byte [ebp - 0x874], 0
jmp 0x404d76
mov eax, dword [0x5a22a0]
mov ecx, dword [eax + 0x3e68]
test ecx, ecx
je 0x404d76
push edi
call fcn.0044fccb
mov edx, dword [ebp - 0x874]
movzx ecx, dl
xor edx, edx
test al, al
cmovne ecx, edx
mov byte [ebp - 0x874], cl
push 0x104
lea eax, [ebx + 0x68]
push eax
push edi
call dword [sym.imp.USER32.dll_GetClassNameW]
push 0x104
lea eax, [ebx + 0x270]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [0x5a23ec]
push 1
call fcn.004673c5
test eax, eax
je 0x404de4
lea eax, [ebx + 0x270]
push eax
lea eax, [ebx + 0x68]
push eax
push dword [ebp - 0x878]
lea eax, [ebx + 0x478]
push esi
push edi
push eax
lea eax, [ebp - 0x640]
push str.Attach:_s_x_08X_x_08X_x_08X__s___s_
push eax
call fcn.00403bfd
lea eax, [ebp - 0x640]
push eax
call fcn.004d4bbc
add esp, 0x24
cmp byte [ebp - 0x874], 0
je 0x404ccf
push dword [ebx]
lea eax, [ebx + 8]
push 0x521bcc
push eax
call fcn.00401104
mov esi, str.__32_
mov ecx, dword [ebp - 0x880]
lea edi, [ebp - 0x28]
mov byte [ebp - 0x86d], 0
add esp, 0xc
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x1c]
mov esi, str.__64_
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x478]
test ecx, ecx
je 0x404e8b
lea esi, [ebx + 4]
push esi
push 0x410
lea eax, [ebx + 0x680]
push eax
push 0x104
push edi
push dword [ebx]
call fcn.00405498
mov byte [ebp - 0x86d], al
test al, al
je 0x404e8b
cmp byte [0x584e20], 0
je 0x40500c
cmp dword [esi], 0
je 0x40500c
cmp dword [esi], 0x40
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x1c]
cmovne eax, ecx
push eax
push 0x20
lea eax, [ebx + 8]
push eax
call fcn.004019cd
jmp 0x40500c
push 0
push dword [ebx]
call fcn.004e64d5
cmp byte [0x584e20], 0
pop ecx
pop ecx
mov dword [ebx + 4], eax
je 0x404ebe
test eax, eax
je 0x404ebe
cmp eax, 0x40
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x1c]
cmovne ecx, edx
lea eax, [ebx + 8]
push ecx
push 0x20
push eax
call fcn.004019cd
push dword [ebx]
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
test esi, esi
je 0x404f7a
cmp esi, 0xffffffff
je 0x404f7a
push 0x424
lea eax, [ebp - 0x44c]
mov dword [ebp - 0x450], 0x428
push 0
push eax
call fcn.004f5a90
add esp, 0xc
lea eax, [ebp - 0x450]
push eax
push esi
call sub.KERNEL32.dll_Module32FirstW
test eax, eax
je 0x404f59
cmp word [ebp - 0x430], 0
je 0x404f1d
lea eax, [ebp - 0x430]
jmp 0x404f2a
lea eax, [ebp - 0x230]
push eax
call fcn.004e5a5b
pop ecx
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x410
lea eax, [ebp - 0x230]
push eax
lea eax, [ebx + 0x680]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov byte [ebp - 0x86d], 1
jmp 0x404f71
cmp byte [0x584e20], 0
je 0x404f71
lea eax, [ebp - 0x1c]
push eax
push 0x20
lea eax, [ebx + 8]
push eax
call fcn.004019cd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404f8a
push 0x522a38
push 0x104
push edi
call fcn.00401a0b
cmp byte [ebp - 0x86d], 0
jne 0x40500c
push 0x228
lea eax, [ebp - 0x868]
mov dword [ebp - 0x86c], 0x22c
push 0
push eax
call fcn.004f5a90
add esp, 0xc
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
test esi, esi
je 0x40500c
cmp esi, 0xffffffff
je 0x40500c
lea eax, [ebp - 0x86c]
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
jmp 0x404fed
mov eax, dword [ebp - 0x864]
cmp eax, dword [ebx]
je 0x404ff3
lea eax, [ebp - 0x86c]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x404fd6
jmp 0x40500c
push 0x104
lea eax, [ebp - 0x848]
push eax
lea eax, [ebx + 0x478]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebx + 0x68]
push eax
call fcn.004e6362
pop ecx
test al, al
mov edx, 0x522d9c
mov ecx, 0x522d94
cmove ecx, edx
push ecx
push 0x10
lea ecx, [ebx + 0x48]
push ecx
call fcn.00401a0b
mov al, 1
jmp 0x404cd1
mov esi, 0x584e24
push esi
call fcn.004f44b1
cmp dword [0x584e24], 0xffffffff
pop ecx
jne 0x404c95
and dword [ebp - 4], 0
call fcn.004e3cd3
or dword [ebp - 4], 0xffffffff
push esi
mov byte [0x584e20], al
call fcn.004f4467
pop ecx
jmp 0x404c95