- Joined
- May 15, 2009
- Messages
- 406
- Reaction score
- 465
Enabling to select language via opt.dat language index instead of locking to one only.
C++:
void MultiLanguagePatch()
{
__asm
{
//get the default language index
mov eax, dword ptr ds:[0x00BBAF68]
//compare if opt.dat language index is 0
cmp dword ptr ds:[ecx+1], 0
//jump if opt.dat language index is not zero
jnz _return
//set language index from default
mov dword ptr ds:[ecx+1], eax
}
_return:
return;
}
void LanguagePatch()
{
// Hardcoded language index B -> 2
MEMUTIL_WRITE_VALUE(DWORD, 0x00BBAF68, 2)
// set language index lock to B change to opt.dat value
MEMUTIL_REPLACE_OFFSET(0x006033BB, MultiLanguagePatch)
MEMUTIL_REPLACE_OFFSET(0x00605446 + 1, MultiLanguagePatch)
}

