• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Modifying MiniMap Loren Deep on 1.05.06 KOR main.exe

Joined
Oct 29, 2007
Messages
1,292
Reaction score
1,314
Good evening people... I'm tired of dealing with people who do not understand anything at all in Latino communities. I've come back my real house... RaGEZONE!

Small introduction:

These days I founded 1 new Development Team for MU. and we have developed a few things... but as RaGEZONE is a forum that has really given me a lot (in my early days). I back (to my real home) to want to contribute this little code... (nothing super important)... but perhaps some people may find it useful.

Code:

Code:
#pragma optimize("t",on)
void __declspec(naked) DrawPlayerASM()
{
    static DWORD dwReturnLoad = 0x006CAD8E;
    static DWORD dwRenderColor = 0x005DE75C;
    // ----
    _asm
    {
        CMP DWORD PTR DS:[0x8314D4],0x1E        // -> Comparing actual MapNumber with Loren Deep (0x1E) and Jump to: Normal Draw or Custom :D
        JNZ NewMiniMap
        JE NormalMiniMap
        // ----
        NewMiniMap:
        // ----
        MOV EAX,DWORD PTR SS:[EBP-0x104]    // -> Substract EBP-0x104 from EAX Register
        MOV ECX,DWORD PTR DS:[EAX+0x80]     // -> /*+128*/ GLfloat AlphaLevel;
        PUSH ECX                    // -> PUSH SEASON3B::CNewUISiegeWarBase *Class
        PUSH 0                        // -> Base 16-Hexadecimal Color Value (Blue) = 0.f
        PUSH 0x3F800000                    // -> Base 16-Hexadecimal Color Value (Green) = 1.f
        PUSH 0                        // -> Base 16-Hexadecimal Color Value (Red) = 0.f
        CALL DWORD PTR DS:[0x803390]    // -> <&OPENGL32.glColor4f> Procedure from Main
        PUSH 0x40400000                    // -> Base 16-Hexadecimal Height Value (PointY) = 3.f
        PUSH 0x40400000                    // -> Base 16-Hexadecimal Width Value (PointX) = 3.f
        MOV EDX,DWORD PTR SS:[EBP-0x104] // -> Substract EBP-0x104 from EDX Register
        FILD DWORD PTR DS:[EDX+0x68]  // -> EDX+0x68 = /*+104*/ DWORD dwCharPosY;
        PUSH ECX                    // -> PUSH ECX Register
        FSTP DWORD PTR SS:[ESP]                // -> I don't know :D
        MOV EAX,DWORD PTR SS:[EBP-0x104]// -> Substract EBP-0x104 from EAX Register 1st Parameter
        FILD DWORD PTR DS:[EAX+0x64] // -> EAX+0x64 = /*+100*/ DWORD dwCharPosX;
        PUSH ECX                    // -> PUSH ECX (for Class)
        FSTP DWORD PTR SS:[ESP]                // -> I don't know (again) :D
        CALL dwRenderColor                // -> Draw Player Point on Screen :D
        ADD ESP,0x10        // -> Adition operation for restore ESP register BYTES before of Exit
        // ----
        JMP dwReturnLoad
        // ----
        NormalMiniMap:
        // ----
        MOV EAX,DWORD PTR SS:[EBP-0x104]   // -> Substract EBP-0x104 from EAX Register
        MOV ECX,DWORD PTR DS:[EAX+0x80]   // -> /*+128*/ GLfloat AlphaLevel;
        PUSH ECX                    // -> PUSH SEASON3B::CNewUISiegeWarBase *Class
        PUSH 0                        // -> Base 16-Hexadecimal Color Value (Blue) = 0.f
        PUSH 0x3F800000                    // -> Base 16-Hexadecimal Color Value (Green) = 1.f
        PUSH 0x3F800000                    // -> Base 16-Hexadecimal Color Value (Red) = 1.f
        CALL DWORD PTR DS:[0x803390]   // -> <&OPENGL32.glColor4f> Procedure from Main
        PUSH 0x40400000                    // -> Base 16-Hexadecimal Height Value (PointY) = 3.f
        PUSH 0x40400000                    // -> Base 16-Hexadecimal Width Value (PointX) = 3.f
        MOV EDX,DWORD PTR SS:[EBP-0x104] // -> Substract EBP-0x104 from EDX Register
        FILD DWORD PTR DS:[EDX+0x68]   // -> EDX+0x68 = /*+104*/ DWORD dwCharPosY;
        PUSH ECX                    // -> PUSH ECX Register
        FSTP DWORD PTR SS:[ESP]                // -> I don't know :D
        MOV EAX,DWORD PTR SS:[EBP-0x104]// -> Substract EBP-0x104 1st Parameter
        FILD DWORD PTR DS:[EAX+0x64]   // -> EAX+0x64 = /*+100*/ DWORD dwCharPosX;
        PUSH ECX                    // -> PUSH ECX (for Class)
        FSTP DWORD PTR SS:[ESP]                // -> I don't know (again) :D
        CALL dwRenderColor                // -> Draw Player Point on Screen :D
        ADD ESP,0x10        // -> Adition operation for restore ESP register BYTES before of Exit
        // ----
        JMP dwReturnLoad
    }
}
#pragma optimize("t",off)

Hook:

Code:
gToolKit.SetRange((LPVOID)0x6CAD43,75,ASM::NOP);    
gToolKit.SetOp((LPVOID)0x6CAD43,DrawPlayerASM,ASM::JMP);

What does this code do? Well 2 pictures are worth more than 2000 words :D

In Game Tests :D

zS7aDMa - Modifying MiniMap Loren Deep on 1.05.06 KOR main.exe - RaGEZONE Forums


JBpKxcn - Modifying MiniMap Loren Deep on 1.05.06 KOR main.exe - RaGEZONE Forums


Credits:

Webzen
Nemesis
 

Attachments

You must be registered for see attachments list
Skilled Illusionist
Joined
Jun 22, 2017
Messages
363
Reaction score
561
MOV EAX,DWORD PTR SS:[EBP-0x104]// -> Substract EBP-0x104 1st Parameter
FILD DWORD PTR DS:[EAX+0x64] // -> EAX+0x64 = /*+100*/ DWORD dwCharPosX;
PUSH ECX // -> PUSH ECX (for Class)
FSTP DWORD PTR SS:[ESP] // -> I don't know (again) :D

you have a misunderstanding
PUSH ECX // -> PUSH ECX (for Class) this isn't 'this' pointer

FILD DWORD PTR DS:[EAX+0x64] will cast int32 to floating point and put onto the Floating Point Unit (FPU) register stack
and FSTP DWORD PTR SS:[ESP] will copies the value in the FPU register stack to the destination stack (ECX)

so the code will be like this:
Code:
dwRenderColor((float)(*(int*)(v104+0x64)), ...);
 
Last edited:
Joined
Oct 29, 2007
Messages
1,292
Reaction score
1,314
you have a misunderstanding

FILD DWORD PTR DS:[EAX+0x64] will cast int32 to floating point and put onto the Floating Point Unit (FPU) register stack
and FSTP DWORD PTR SS:[ESP] will copies the value in the FPU register stack to the destination stack (ECX)

so the code will be like this:
Code:
dwRenderColor((float)(*(int*)(v104+0x64)), ...);

Not in really, I know this ;) look my defined Pointer:

Code:
#define pRenderColor ((void(__cdecl*)(float PosX,float PosY,float Width,float Height))0x5DE75C)

But I'm using asm by class :D since is difficult of decompiling (fine) but anyways I try... look this:

Code:
void cInterface::DrawPlayer()
{
    CNewUISiegeWarBase * Hero = &*(CNewUISiegeWarBase*)pMiniMapClass;
    // ----
    float GetPlayerX = (float)(640.f-1+Hero->PlayerPointX/2.f);
    float GetPlayerY = (float)(65.f-1+(255.f-Hero->PlayerPointY)/2.f);
    float GetPlayerW = 3.f;
    float GetPlayerH = 3.f;
    // ----
    if(pWorld!=MAP_CASTLE_SIEGE)
    {
        if(gInterface.CheckWindow(MiniMap)) /* Window: 52 */
        {
            glColor4f(0.f,1.f,0.f,Hero->AlphaLevel);
            pRenderColor(GetPlayerX,GetPlayerY,GetPlayerW,GetPlayerH);
        }
    }
}

Here I leave a small screenshot (guide) about how to make to get MiniMap Class Offset Address of Struct (Beginning of allocate) on any main.exe version.

brx3oma - Modifying MiniMap Loren Deep on 1.05.06 KOR main.exe - RaGEZONE Forums


It's very very simply... you only must search for: All referenced text strings (in Ollydbg) -> "newui_SW_MiniMap_Bt_clearness.jpg" (without: ""). and Get ObjIndex of Texture drawing... on my case is: 0x7B70. (this texture is used by Ducking MiniMap Loren Deep) for Alpha Channel Control... :D
Then: Search for -> All Constants -> 0x7B70 and Search for (Up) 1 function above.. and Results sweet like in the Screenshot :D
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top