From 83a282551dbd9664ccc677559d615e6b6300a906 Mon Sep 17 00:00:00 2001 From: Bigjango13 Date: Tue, 23 Jan 2024 20:35:57 -0500 Subject: [PATCH] Add packet related symbols --- mods/src/misc/misc.c | 2 +- symbols/CMakeLists.txt | 1 + symbols/src/network/packet/Packet.def | 8 +++++++- symbols/src/network/raknet/RakNet_BitStream.def | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 symbols/src/network/raknet/RakNet_BitStream.def diff --git a/mods/src/misc/misc.c b/mods/src/misc/misc.c index 9fc1eba83d..0063997ef2 100644 --- a/mods/src/misc/misc.c +++ b/mods/src/misc/misc.c @@ -161,7 +161,7 @@ static void Screen_render_injection(Screen *screen, int32_t param_1, int32_t par // Sanitize Username #define MAX_USERNAME_LENGTH 16 -static void LoginPacket_read_injection(LoginPacket *packet, unsigned char *bit_stream) { +static void LoginPacket_read_injection(LoginPacket *packet, RakNet_BitStream *bit_stream) { // Call Original Method LoginPacket_read_non_virtual(packet, bit_stream); diff --git a/symbols/CMakeLists.txt b/symbols/CMakeLists.txt index 3ddaf4ff12..75341d0118 100644 --- a/symbols/CMakeLists.txt +++ b/symbols/CMakeLists.txt @@ -20,6 +20,7 @@ set(SRC src/network/raknet/RakNet_StartupResult.h src/network/raknet/RakNet_RakNetGUID.def src/network/raknet/RakNet_RakPeer.def + src/network/raknet/RakNet_BitStream.def src/network/ServerSideNetworkHandler.def src/network/packet/LoginPacket.def src/network/packet/PlayerEquipmentPacket.def diff --git a/symbols/src/network/packet/Packet.def b/symbols/src/network/packet/Packet.def index abfa163c8f..bcc587cde9 100644 --- a/symbols/src/network/packet/Packet.def +++ b/symbols/src/network/packet/Packet.def @@ -1,2 +1,8 @@ constructor () = 0x6fc18; -virtual-method void read(uchar *bit_stream) = 0xc; +size 0x10; +vtable 0x1024d8; +vtable-size 0x14; + +virtual-method void write(RakNet_BitStream *bit_stream) = 0x8; +virtual-method void read(RakNet_BitStream *bit_stream) = 0xc; +virtual-method void handle(RakNet_RakNetGUID *guid, NetEventCallback *callback) = 0x10; diff --git a/symbols/src/network/raknet/RakNet_BitStream.def b/symbols/src/network/raknet/RakNet_BitStream.def new file mode 100644 index 0000000000..570c3be2d7 --- /dev/null +++ b/symbols/src/network/raknet/RakNet_BitStream.def @@ -0,0 +1,4 @@ +method void Write_uchar(uchar *i) = 0x18448; +method void Write_int(int *i) = 0x18454; + +method void Read_int(int *i) = 0x184ec;