Function at 0x402060
Capabilities:
Enumerate process modules

Disassembly:
mov eax, 0x1330
call fcn.00403a30
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x18]
push 0x104
push eax
push 0x4060f4
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov ebp, dword [sym.imp.user32.dll_SendMessageA]
push 0
mov edi, dword [esp + 0x1348]
push 0
push 0x18b
mov ecx, dword [edi + 0x33c]
push ecx
call ebp
mov esi, eax
dec esi
js 0x4020c2
mov edx, dword [edi + 0x33c]
push 0
push esi
push 0x182
push edx
call ebp
dec esi
jns 0x4020ae
mov eax, dword [edi + 0x3fc]
push 0
push 0
push 0x18b
push eax
call ebp
mov esi, eax
dec esi
js 0x4020ed
mov ecx, dword [edi + 0x3fc]
push 0
push esi
push 0x182
push ecx
call ebp
dec esi
jns 0x4020d9
mov edx, dword [edi + 0x20]
push 0
push edx
call dword [sym.imp.user32.dll_GetWindow]
push eax
call sub.mfc42.dll_CWnd::FromHandle
mov ebx, eax
test ebx, ebx
je 0x40225b
mov eax, dword [ebx + 0x20]
push eax
call dword [sym.imp.user32.dll_IsWindowVisible]
test eax, eax
je 0x40223f
lea ecx, [esp + 0xb40]
push 0x800
push ecx
mov ecx, ebx
call sub.mfc42.dll_CWnd::GetWindowTextA
test eax, eax
je 0x40223f
mov eax, dword [ebx + 0x24]
test eax, eax
jne 0x402148
mov edx, dword [ebx + 0x20]
push edx
call dword [sym.imp.user32.dll_GetParent]
push eax
call sub.mfc42.dll_CWnd::FromHandle
test eax, eax
jne 0x40223f
mov ecx, dword [ebx + 0x20]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.user32.dll_GetWindowThreadProcessId]
call dword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
je 0x40223f
push ecx
push 8
call sub.kernel32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea edx, [esp + 0xb40]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x348]
push 0x406104
push ecx
mov dword [esp + 0x24], esi
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
lea edx, [esp + 0x11c]
push edx
push esi
call sub.kernel32.dll_Module32First
test eax, eax
je 0x402208
lea esi, [esp + 0x18]
lea eax, [esp + 0x23c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4021e9
test cl, cl
je 0x4021e5
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4021e9
add eax, 2
add esi, 2
test cl, cl
jne 0x4021c5
xor eax, eax
jmp 0x4021ee
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40226a
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x11c]
push eax
push ecx
call sub.kernel32.dll_Module32Next
test eax, eax
jne 0x4021ba
mov ecx, dword [edi + 0x3fc]
lea eax, [esp + 0x340]
push eax
push 0
push 0x180
push ecx
call ebp
mov edx, dword [esp + 0x10]
push edx
push eax
mov eax, dword [edi + 0x3fc]
push 0x19a
push eax
call ebp
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edx, dword [ebx + 0x20]
push 2
push edx
call dword [sym.imp.user32.dll_GetWindow]
push eax
call sub.mfc42.dll_CWnd::FromHandle
mov ebx, eax
test ebx, ebx
jne 0x402109
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1330
ret 4
mov eax, dword [edi + 0x33c]
lea edx, [esp + 0x340]
push edx
push 0
push 0x180
push eax
call ebp
mov edx, dword [edi + 0x33c]
mov ecx, dword [esp + 0x10]
push ecx
push eax
push 0x19a
push edx
jmp 0x402232