Multilanguage Support CabalMain v263

Socius Decennalis
Decennium
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)
}
 
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)
}
thanks!
 
After implementing the provided code into the Cabal Realm source, the client executable fails to launch, exhibiting no discernible activity upon execution. Further investigation is required to determine the root cause of this issue.

adding additional class
1751064116563 - Multilanguage Support CabalMain v263 - RaGEZONE Forums



I modify your code to make it compatible to cabal realm source

LanguangePatch.cpp
C++:
#include "LanguagePatch.h"
#include <Memory/Memory.h>

namespace LanguagePatch { // Add the same namespace
    extern "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
            Memory::WriteValue<DWORD>(0x00BBAF68, 2);
        }

        void SetHooks()
        {
            LanguagePatch();
            // set language index lock to B change to opt.dat value
            Memory::HookFunc<Memory::HookType::JMP>(MultiLanguagePatch, 0x006033BB);
            Memory::HookFunc<Memory::HookType::JMP>(MultiLanguagePatch, 0x00605446 + 1);
        }
    }
}


LanguagePatch.h
C++:
#pragma once

#include "Base.h" 


namespace LanguagePatch { // Add a namespace
    extern "C" {
        void MultiLanguagePatch();
        void LanguagePatch();
        void SetHooks();
    }
}

Include on Main.cpp

C++:
#include "Language/LanguagePatch.h"

void InitAll()
{

    
    //Additional
    LanguagePatch::SetHooks();

    VM_END;
}


Still got no chance to fully run the client, what did i do wrong???:unsure::unsure:
 
After implementing the provided code into the Cabal Realm source, the client executable fails to launch, exhibiting no discernible activity upon execution. Further investigation is required to determine the root cause of this issue.

check the hooked address after your dll is loaded.

it should look like this
006033BB call <your MultiLanguagePatch address>
00605446 jnz <your MultiLanguagePatch address>
 
check the hooked address after your dll is loaded.

it should look like this
006033BB call <your MultiLanguagePatch address>
00605446 jnz <your MultiLanguagePatch address>
Thank you for answering my issues on the code

correct me if i'm wrong since i already declare in cpp

C++:
        void LanguagePatch()
        {
            // Hardcoded language index B -> 2
            Memory::WriteValue<DWORD>(0x00BBAF68, 2);
        }

        void SetHooks()
        {
            LanguagePatch();
            // set language index lock to B change to opt.dat value
            Memory::HookFunc<Memory::HookType::JMP>(MultiLanguagePatch, 0x006033BB);
            Memory::HookFunc<Memory::HookType::JMP>(MultiLanguagePatch, 0x00605446 + 1);
        }

is this correct?
 
is this correct?
I think not, because 006033BB is call not jmp and 00605446 also not jmp while in your code I see Memory::HookFunc<Memory::HookType::JMP>.
try to look on that Memory::HookFunc<T> maybe it has types for call and jnz. I don't know how your Memory::HookFunc works.
 
I think not, because 006033BB is call not jmp and 00605446 also not jmp while in your code I see Memory::HookFunc<Memory::HookType::JMP>.
try to look on that Memory::HookFunc<T> maybe it has types for call and jnz. I don't know how your Memory::HookFunc works.
thank you my friend. I already fix my code thanks alot.

completely integrated on cabal realm source code. i also did try to trace one by one those expression you provide on source and i ended up completely understand the functions on it.
 
Back