Function at 0x402654
Capabilities:
Find taskbar
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x384
push esi
mov dword [ebp - 8], 0
cmp dword [0x409b7c], 0
je 0x402680
push 0
push 0
push 0x1f
mov eax, dword [0x40a210]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x409b7c], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [ebp - 0x1c], eax
push 0x4071dc
push 0x1f4
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.USER32.dll_AppendMenuA]
cmp dword [0x409740], 2
jl 0x402723
mov dword [ebp - 0x24], 0
jmp 0x4026c4
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
cmp eax, dword [0x409740]
jge 0x402723
cmp dword [ebp - 0x24], 0
jne 0x4026e8
push 0
push 0
push 0x800
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov edx, dword [ebp - 0x24]
add edx, 1
push edx
push 0x4071f4
lea eax, [ebp - 0x2b4]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x2b4]
push ecx
mov edx, dword [ebp - 0x24]
add edx, 0x258
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_AppendMenuA]
jmp 0x4026bb
push 5
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [ebp - 4], eax
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
cmp ecx, 0x3e8
jle 0x402755
jmp 0x4028a2
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x402768
jmp 0x402889
push 0xfffffffffffffff0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindowLongA]
and eax, 0xc00000
test eax, eax
jne 0x402782
jmp 0x402889
push 0xffffffffffffffec
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_GetWindowLongA]
and eax, 0x80
test eax, eax
je 0x40279c
jmp 0x402889
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x10]
je 0x4027ba
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jne 0x4027bf
jmp 0x402889
cmp dword [ebp - 8], 0
jne 0x4027d8
push 0
push 0
push 0x800
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [ebp + edx*4 - 0x1b4], eax
push 0x100
lea ecx, [ebp - 0x2b4]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + edx*4 - 0x1b4]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea ecx, [ebp - 0x2b4]
push ecx
call fcn.00403220
add esp, 4
cmp eax, 0x40
jbe 0x40283b
push 0x40
lea edx, [ebp - 0x2b4]
push edx
call fcn.0040126c
add esp, 8
push 0x407204
lea eax, [ebp - 0x2b4]
push eax
call fcn.00403310
add esp, 8
lea ecx, [ebp - 0x2b4]
push ecx
mov edx, dword [ebp - 8]
add edx, 0x2bc
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + ecx*4 - 0x1b4]
push edx
mov eax, dword [ebp - 8]
add eax, 0x2bc
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004018cd
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x14
jl 0x402889
jmp 0x4028a2
push 2
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40273c
lea ecx, [ebp - 0x2bc]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetLastActivePopup]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0
mov eax, dword [ebp + 8]
push eax
push 0
mov ecx, dword [ebp - 0x2b8]
push ecx
mov edx, dword [ebp - 0x2bc]
push edx
push 0x180
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_TrackPopupMenu]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.USER32.dll_DestroyMenu]
push 0
push str.multimonitormanagerclass
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [ebp - 0x2c0], eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x384], edx
cmp dword [ebp - 0x384], 0x1f4
je 0x40291f
jmp 0x402b8e
push 0
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x402b89
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [ebp - 0x368]
mov dword [ebp - 0x2d8], edx
mov eax, dword [ebp - 0x364]
mov dword [ebp - 0x2d4], eax
push 2
lea ecx, [ebp - 0x368]
push ecx
call fcn.00401869
mov dword [ebp - 0x2c8], eax
cmp dword [ebp - 0x2c8], 0
je 0x4029dd
mov dword [ebp - 0x24], 0
jmp 0x402991
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
cmp eax, dword [0x409740]
jge 0x4029dd
mov ecx, dword [ebp - 0x24]
imul ecx, ecx, 0x28
mov edx, dword [ecx + 0x40a080]
cmp edx, dword [ebp - 0x2c8]
jne 0x4029db
cmp dword [ebp - 0x2c0], 0
je 0x4029db
mov eax, dword [ebp - 0x24]
add eax, 1
push eax
push 0
push 0x407234
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push eax
mov ecx, dword [ebp - 0x2c0]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x402988
lea edx, [ebp - 0x368]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov byte [ebp - 0x358], 0
push 5
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [ebp - 0x2d0], eax
cmp dword [ebp - 0x2d0], 0
je 0x402a29
push 0x80
lea edx, [ebp - 0x358]
push edx
mov eax, dword [ebp - 0x2d0]
push eax
call dword [sym.imp.USER32.dll_GetClassNameA]
push str.button
lea ecx, [ebp - 0x358]
push ecx
call fcn.00405cc0
add esp, 8
test eax, eax
jne 0x402ab2
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x2d0]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [ebp - 0x18]
push ecx
call fcn.00401c66
add esp, 4
test eax, eax
je 0x402a90
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x18]
add edx, eax
mov dword [ebp - 0x2c4], edx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x2cc], ecx
jmp 0x402ab0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x2c4], ecx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2cc], edx
jmp 0x402ae2
mov dword [ebp - 0x2d0], 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [ebp - 0x18]
add edx, 0xf
mov dword [ebp - 0x2c4], edx
mov eax, dword [ebp - 0x14]
add eax, 0xa
mov dword [ebp - 0x2cc], eax
mov ecx, dword [ebp - 0x2cc]
push ecx
mov edx, dword [ebp - 0x2c4]
push edx
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [ebp - 0x2cc]
push eax
mov ecx, dword [ebp - 0x2c4]
push ecx
call fcn.00402ebb
add esp, 8
cmp dword [ebp - 0x2d0], 0
je 0x402b89
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [ebp - 0x368]
push ecx
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
jne 0x402b89
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x2d0]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x18]
add edx, eax
mov dword [ebp - 0x2c4], edx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x2cc], ecx
mov edx, dword [ebp - 0x2cc]
push edx
mov eax, dword [ebp - 0x2c4]
push eax
call dword [sym.imp.USER32.dll_SetCursorPos]
jmp 0x402eac
cmp dword [ebp - 0x20], 0x2bc
jl 0x402dc2
mov ecx, dword [ebp - 0x20]
sub ecx, 0x2bc
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 8]
jl 0x402bb4
jmp 0x402eac
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + eax*4 - 0x1b4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
push edx
push str.hwnd_x
call fcn.004011ea
add esp, 8
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x402be5
jmp 0x402eac
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x402c37
push 4
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_IsZoomed]
test eax, eax
je 0x402c23
push 3
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x402c2f
push 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x40a210]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetLastActivePopup]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_GetLastActivePopup]
cmp esi, eax
je 0x402c7d
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetLastActivePopup]
push eax
call fcn.00401bed
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push 2
lea ecx, [ebp - 0x18]
push ecx
call fcn.00401869
mov dword [ebp - 0x2c8], eax
mov dword [ebp - 0x24], 0
jmp 0x402cb8
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
cmp eax, dword [0x409740]
jge 0x402d89
mov ecx, dword [ebp - 0x24]
imul ecx, ecx, 0x28
mov edx, dword [ecx + 0x40a080]
cmp edx, dword [ebp - 0x2c8]
jne 0x402d84
push 0x20
call fcn.00401791
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax + 1]
mov dword [ebp - 0x370], edx
push 0x21
call fcn.00401791
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 1]
mov dword [ebp - 0x36c], edx
mov eax, dword [ebp - 0x36c]
push eax
mov ecx, dword [ebp - 0x370]
push ecx
mov edx, dword [ebp - 0x24]
imul edx, edx, 0x28
add edx, 0x40a084
push edx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
jne 0x402d57
cmp dword [ebp - 0x2c0], 0
je 0x402d52
push 0
push 0
push 0x407260
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push eax
mov eax, dword [ebp - 0x2c0]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x402eac
cmp dword [ebp - 0x2c0], 0
je 0x402d82
mov ecx, dword [ebp - 0x24]
add ecx, 1
push ecx
push 0
push 0x407278
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push eax
mov edx, dword [ebp - 0x2c0]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x402d89
jmp 0x402caf
push 0x21
call fcn.00401791
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 1]
push edx
push 0x20
call fcn.00401791
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax + 1]
push edx
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00402ebb
add esp, 8
jmp 0x402eac
cmp dword [ebp - 0x20], 0x258
jl 0x402eac
mov edx, dword [ebp - 0x20]
sub edx, 0x258
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
cmp eax, dword [0x409740]
jl 0x402deb
jmp 0x402eac
cmp dword [ebp - 0x2c0], 0
je 0x402e16
mov ecx, dword [ebp - 0x20]
add ecx, 1
push ecx
push 0
push str.MultiMonitorManagerMsg
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push eax
mov edx, dword [ebp - 0x2c0]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x20]
imul eax, eax, 0x28
add eax, 0x40a084
mov ecx, dword [eax]
mov dword [ebp - 0x380], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x37c], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x378], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x374], edx
mov eax, dword [ebp - 0x378]
sub eax, dword [ebp - 0x380]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x380]
add ecx, eax
mov dword [ebp - 0x2c4], ecx
mov eax, dword [ebp - 0x374]
sub eax, dword [ebp - 0x37c]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 0x37c]
add edx, eax
mov dword [ebp - 0x2cc], edx
mov eax, dword [ebp - 0x2cc]
push eax
mov ecx, dword [ebp - 0x2c4]
push ecx
call dword [sym.imp.USER32.dll_SetCursorPos]
mov edx, dword [ebp - 0x2cc]
push edx
mov eax, dword [ebp - 0x2c4]
push eax
call fcn.00402ebb
add esp, 8
mov dword [0x409b7c], 0
pop esi
mov esp, ebp
pop ebp
ret