Coder Social home page Coder Social logo

ffxivnetworkopcodes's Introduction

FFXIVNetworkOpcodes

ffxiv_opcode_finder.py

Python3 and IDA7 are required.

Press Alt+F7 and Select this script

then everything is ok.

No need to set anything up !

Welcom to contribute the signatures in signatures.json.

Some mapping of synonyms provided in NAME.md

Supported IpcType

  • In JmpTable Switch with certain case in path
  • In simple Switch with variable parameter call
  • Any call to send ZonePacket

Todo

  • 【WIP】Refactoring with new switch calc and new pattern matcher
  • More generators
  • Support more complex but not jmptable switch

record_opcode_finder.py

Python3 and IDA7 are required.

Run after ffxiv_opcode_finder.py

It will find all opcodes which in-game duty recorder would recorded,

which means all opcodes about content director included in.

However we still need some manual works to fixed the output opcodes_record_raw.json to opcodes_record.json, and then the replay_updater.py can use it.

scripts

replay_updater.py

Python3 is required.

usage: python replay_updater.py record.dat old_record.json new_record.json <check_name>
example: py .\replay_updater.py '.\2023.01.15 20.03.49.dat' ..\output\Global_2023.01.11\opcodes_record.json ..\output\Global_2023.01.17\opcodes_record.json

It uses opcodes_record.json to convert your record.dat recorded by in-game recorder between versions and deletes all character identities at the same time to protect your privacy.

replay_updater_online.py

Standalone version of replay_updater.py which fetch opcodes file from this repo online

Python3 and Httpx required.

Use pip install httpx to install requirement.

usage: python replay_updater.py record.dat
example: py .\replay_updater.py '.\2023.01.15 20.03.49.dat'

Related Work

karashiiro/FFXIVOpcodes

zhyupe/ffxiv-opcode-worker

NukoOoOoOoO/FFXIV-OpcoeFinder

ffxivnetworkopcodes's People

Contributors

yarukon avatar lifaze avatar niguangowo avatar starhearthunt avatar

Stargazers

 avatar  avatar NicoCHANY avatar  avatar Jason R. McNeil avatar  avatar cyf5119 avatar ms_enternalwind avatar Souma avatar 素琴百韵 avatar Roshin avatar  avatar allure_151 avatar AtmoOmen avatar

Watchers

 avatar

ffxivnetworkopcodes's Issues

添加 Event相关, WorldTravel 和 StartCountdown 的opcode

太懒了不想写python(

// void AddOpcode(string name, string sig, short offset)
AddOpcode("WorldTravel", "C7 45 ?? ?? ?? ?? ?? 48 8B C8 48 C7 45", 3);
AddOpcode("StartCountdown", "C7 44 24 ?? ?? ?? ?? ?? 45 33 C9 48 C7 44 24 ?? ?? ?? ?? ?? 45 33 C0 88 5C 24", 4);
AddOpcode("EventStart", "C7 44 24 ?? ?? ?? ?? ?? 48 C7 44 24 ?? ?? ?? ?? ?? 89 5C 24 ?? 0F 85", 4);

AddEventRelatedOpcodes(DalamudApi.SigScanner.ScanText("49 0F 45 C2 80 F9 02") + 4, "EventAction");
AddEventRelatedOpcodes(DalamudApi.SigScanner.ScanModule("E9 ?? ?? ?? ?? 80 F9 ?? 77 ?? 88 4C 24") + 5, "EventFinish");

void AddEventRelatedOpcodes(nint address, string opcodeName)
{
    if (address <= 0x1000)
    {
        PluginLog.Error($"Failed to add {opcodeName} opcodes. Invalid signature");
        return;
    }

    for (var i = 0; i < 8; i++)
    {
        if (*(byte*)address != 0x80)
        {
            break;
        }

        address += 3; // skip cmp cl, 2

        var size = *(byte*)(address - 1);

        address += 2; // skip ja loc_xxx

        var offsetToJump = *(byte*)(address - 1);
        var newAddress = address + offsetToJump;

        var offsetToSkip = size switch
                           {
                               > 2 and < 64 => 0x3,
                               64 => 0x16,
                               _ => 0xc,
                           };

        address += offsetToSkip; // skip to the start of mov     [rsp+0FA0h+opcode], opcode
        address += 4; // skip instruct mov     [rsp+0FA0h+opcode]

        var opcode = *(ushort*)(address);
        var name = $"{opcodeName}{(size / 2 == 1 ? "" : size / 2)}";
        _opcodeNames[opcode] = name;
        PluginLog.Debug($"{name} --> 0x{opcode:X}");

        address = newAddress;
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.