There Are many possible means to change Window caption
easiest of them being using a spy app like winspy and use the inbuilt functionality to change
take a look at this answer i wrote a few days back which shows how a title is change
change window title
or if you prefer you can code a simple FindWindow() , SetWindowText() that can do the job
you can also break on wnd proc in ollydbg / x32dbg and code a detour to
use SetWindowText()
using ollydbg v2 (32 bit win 7 )
open calc.exe and hit f9 to run and f12 to break
hit alt+w to open List Of Windows
and locate the Window Handle of CalcFrame As below
List of windows, item 3
Handle = 000206C0 <<<<<<<<<<<<<<<<<<
Text = Calculator <<<<<<<<<<<<<<<
Parent = Topmost
WinProc =
ID/menu = 0136046D (menu)
Type = UNICODE
Style = 14CA0000 WS_OVERLAPPED|WS_MINIMIZEBOX|WS_CAPTION|WS_SYSMENU|WS_VISIBLE|WS_CLIPSIBLINGS
ExtStyle = 00000100 WS_EX_WINDOWEDGE
Thread = Main
ClsProc = 00361EDE WndProc
ClsName = CalcFrame
now go to some blank space
type in a new title and note the address where you typed the title
code in blank space
push offset the address you noted
push window handle as found above {this is variable use what you find not what i type in demo}
call SetWindowTextA
make a note of existing eip
change the eip to the newly patched in code
step three times
and change back to the noted eip