关于RADebug.dll的汉化
使用Radialix 2汉化插件菜单后始终只能显示四个汉字,如第一个切换断点,大小四个汉化,下面的菜单
部分就被切掉,取消“切换断点”的汉化,改下面,“运行”“中断”后,不管如何修改其它的项都不显示。
解决方法:
先使用PASSOLO试试,居然连非标部分都找不出来,使用Sisulizer,程序导演退出,再试试LocPlus(点睛),只能找出第一项“切换断点”,其它项(如“运行”、“停止”)无法找到,最后拿出Restorator,无法找到非标部分。
想了下,以前RADASM作者发过RADEBUG的源码,拿出来一看,发现作者是这样定义的:
MenuItems db 'Toggle &Breakpoint',VK_TAB,'Ctrl+T',0
db '&Clear Breakpoints',VK_TAB,'Ctrl+Shift+T',0
db '-',0
db '&Run',VK_TAB,'Shift+F7',0
db '&Stop',VK_TAB,'Alt+F7',0
db '-',0
db 'Step &Into',VK_TAB,'F7',0
db 'Step &Over',VK_TAB,'Ctrl+F7',0
db 'Run &To Caret',VK_TAB,'Ctrl+Shift+F7',0
db 'Do not Debug',0
db 0
再看看处理部分:
CreateDebugMenu proc uses ebx esi edi,hWin:HWND
LOCAL mii:MENUITEMINFO
.if hMnu
mov eax,[lpHandles]
invoke RemoveMenu,[eax].ADDINHANDLES.hMenu,IDAddIn,MF_BYCOMMAND
invoke DestroyMenu,hMnu
.else
mov edi,offset IDAddIn
xor ecx,ecx
.while ecx<9
push ecx
; Allocate a new menu id
invoke SendMessage,hWin,AIM_GETMENUID,0,0
pop ecx
mov [edi+ecx*4],eax
inc ecx
.endw
.endif
invoke CreatePopupMenu
mov hMnu,eax
;Make menu
mov edx,5
;Adjust topmost popup if maximized.
mov eax,[lpData]
.if [eax].ADDINDATA.fMaximized
inc edx
.endif
;Get handle of edit popup
mov eax,[lpHandles]
invoke GetSubMenu,[eax].ADDINHANDLES.hMenu,edx ;Edit menu
push eax
;Add our menuitem
invoke AppendMenu,eax,MF_POPUP or MF_STRING,hMnu,addr DebugMenu
mov edi,offset IDAddIn
mov eax,[edi]
add edi,4
mov mii.cbSize,sizeof MENUITEMINFO
mov mii.fMask,MIIM_ID
mov mii.wID,eax
pop eax
push eax
invoke GetMenuItemCount,eax
lea ecx,[eax-1]
pop edx
invoke SetMenuItemInfo,edx,ecx,TRUE,addr mii
mov esi,offset MenuItems
.while byte ptr [esi]
.if byte ptr [esi]=='-'
invoke AppendMenu,hMnu,MF_SEPARATOR,0,0
.else
;Add our menuitem
invoke AppendMenu,hMnu,MF_STRING,[edi],esi
add edi,4
.endif
invoke lstrlen,esi
lea esi,[esi+eax+1]
.endw
ret