Results 1 to 2 of 2

Thread: Tutorial: Changing League Structures (with DDraw.dll)

  1. #1
    Join Date
    24-02-13
    Posts
    11
    vCash
    500

    Tutorial: Changing League Structures (with DDraw.dll)

    Tutorial how to use DDraw.dll wrapper to change (or create???) league structures in cm01/02.
    Possible this solution have more potential.

    Tools needed:
    Ida Free
    x64dbg (Newest version of Olly)
    Visual Studio Community

    Source code of DDraw.dll:
    DDrawWrapper

    Source code with added polish first and second division with some changes as example.
    Change relegation to 3 without playoff-s. Disable dividing points.

    1.Open cm01/02 in IDA
    Go to Windows->Strings window
    Find the (ctrl+F) pol_first.cpp. Double click on them.
    Select the name of address (eg. aEDevCpp....) and press X.
    Click first on the list, and go to begin of function SUB_7C8A80.
    You can rename this name to own (press N on that name).

    Find line:
    Code:
    mov     dword ptr [esi], offset off_96E360
    Select the off_96E360 and press Enter or Alt+Enter (to open in new tab).
    This is begin of pointer table of polish first division
    Pointer table is 45 addresses of function. Part of them is this same for all leagues/divisions.
    Next off_96E414 is Polish League Cup, next Polish Second Divison etc.
    For another nation template is this same.

    2. Copy function from IDA to Visual Studio.
    Check example how its this working.
    Some function must be replaces:
    In IDA:
    Code:
    mov eax, dword_9CF858
    must be changed to:
    Code:
    mov eax, 0x9cf858
    mov eax, [eax]
    More examples in source.

    Don't change anything yet.

    3. Write in DDraw.dll function to replace orginal addresses with new to your function

    4. Compile DDraw.dll
    Fix the compile errors, and function errors.
    Edit DDraw.ini file or remove from DDraw code.
    Open DDraw in IDA and compare your functions with orginal.
    Beware the stack. (push / pop)

    5. Test with x64dbg or Olly
    Copy compiled ddraw.dll to cm0102.exe main directory.
    Probably the cm0102 will crash. Go to 4.

    6. Make changes and go to 5.

    Have fun.
    Last edited by Anoxic; 14-05-19 at 03:50 PM.

  2. The Following User Says Thank You to Anoxic For This Useful Post:


  3. #2
    Join Date
    26-09-18
    Location
    Brazil
    Posts
    508
    vCash
    273
    this is amazing and has a huge potential, thanks a lot for sharing !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •