|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
GH*master Expert Cheater Reputation: 8
Joined: 10 Jan 2008 Posts: 159
|
Posted: Wed Apr 11, 2012 11:42 am Post subject: Get language name then CE start |
|
|
I have some problem.
This analog code from C++
Code: |
TCHAR wlocale[255];
GetSystemDefaultLocaleName(wlocale, 255); // result wlocale = "ru-RU"
|
Debug code:
Code: | TCHAR wlocale[255];
GetSystemDefaultLocaleName(wlocale, 255);
0114322C mov esi,esp
0114322E push 0FFh
01143233 lea eax,[wlocale]
01143239 push eax
0114323A call dword ptr [__imp__GetSystemDefaultLocaleName@8 (1145048h)]
01143240 cmp esi,esp
01143242 call _RTC_CheckEsp (1143710h) |
GetSystemDefaultLocaleName is kernel32.GetSystemDefaultLocaleName
I rewrite code from CE Lua:
Code: | local aaCode = [[
alloc(bufferMem,1024)
alloc(codeMem,1024)
label(strLanguageNameOS)
registersymbol(strLanguageNameOS)
codeMem:
mov eax, [esp]
mov [lastPoint],eax
push 0FFh
lea eax,[bufferMem]
push eax
call kernel32.GetSystemDefaultLocaleName
mov eax,[lastPoint]
push eax
ret
lastPoint:
dd 0
bufferMem:
strLanguageNameOS:
dd 0
createthread(codeMem)
]]
autoAssemble(aaCode, true)
local valLang = readStringLocal("strLanguageNameOS")
print(valLang) |
But no any result that I needed (CE 6.2 Beta 5, Win7 64)
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Apr 11, 2012 12:52 pm Post subject: |
|
|
Readstringlocal might not know that strLanguageNameOS is (there are 2 symbol tables, and I guess getAddress looks it up in the target process symbollist, bug)
See if you can find another method.
00400500 tends to be free. Don't forget to add FullAccess(00400500,1) to your aa script
Also, add in a check to see if the thread is done or not
And perhaps lua also has a method of getting the language
If it's regarding translations, 6.2 has a ini file where you can specify the language to use regardless of the os language
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|