Skip to content

Instantly share code, notes, and snippets.

@Zoxc
Last active February 28, 2019 16:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Zoxc/4388879 to your computer and use it in GitHub Desktop.
Save Zoxc/4388879 to your computer and use it in GitHub Desktop.
struct PoEEmpty
{
}
[DataTypeByteOrder = 1] UnsignedNumber PoEU16
{
Size = 2
}
[DataTypeByteOrder = 0] UnsignedNumber PoEU16LE
{
Size = 2
}
[DataTypeByteOrder = 1] UnsignedNumber PoEU32
{
Size = 4
}
[DataTypeByteOrder = 0] UnsignedNumber PoEU32LE
{
Size = 4
}
struct PoEString = String
{
[ByteOrder = 1] PoEU16 Size;
[ByteOrder = 0] UnicodeString(Size) String;
}
struct PoEPassordHash
{
UINT8 Hash[32]; // Salted SHA-256
}
struct PoEGameServerInfo = "Game Server"
{
PoEU16 GameServerPort;
IPv4Address GameServerIP;
[Global.PoEGameServers$[MakeByteArray(GameServerIP, GameServerPort)] = 1]
UINT8 Unknown2[20];
}
// Patch Server connections
[RegisterAfter(TCPPayload.Ftp, PoEPatchServer, 12995)]
[RegisterAfter(TCPPayload.Ftp, PoEPatchServer, 12994)]
[RegisterAfter(TCPPayload.Ftp, PoEPatchServer, 12993)]
[RegisterAfter(TCPPayload.Ftp, PoEPatchServer, 12992)]
[RegisterAfter(PayloadHeader.Http, PoEPatchServer, "PoEPatchServer")]
[BuildConversationWithParent]
Protocol PoEPatchServer = PoEPacketName
{
while [Offset < FrameLength]
{
UINT8 Id;
switch(Id)
{
case 1:
[PoEPacketName = this.ToString] PoERequestPatchServerInfo RequestPatchServerInfo;
case 2:
[PoEPacketName = this.ToString] PoEPatchServerInfo PatchServerInfo;
case 3:
[PoEPacketName = this.ToString] PoERequestFolderList RequestFolderList;
case 4:
[PoEPacketName = this.ToString] PoEFolderList FolderList;
case 5:
[PoEPacketName = this.ToString] PoERequestPatchNotes RequestPatchNotes;
case 6:
[PoEPacketName = this.ToString] PoEPatchNotes PatchNotes;
default:
[PoEPacketName = FormatString("Unknown 0x%X", Id)] PoEEmpty Unknown;
}
}
}
struct PoERequestPatchServerInfo = "Request Patch Server Info"
{
UINT8 ProtocolVersion;
}
struct PoEPatchServerInfo = "Patch Server Info"
{
UINT8 Unknown[32];
PoEString Server0;
PoEString Server1;
}
struct PoERequestFolderList = FormatString("Request Folder List - %s", FolderName.ToString)
{
PoEString FolderName;
}
struct PoEFolderEntry = Name.ToString
{
UINT8 Unknown0;
PoEString Name;
UINT8 Unknown1[36];
}
struct PoEFolderList = FormatString("Folder List - %s", FolderName.ToString)
{
PoEString FolderName;
PoEU16 Unknown0;
PoEU16 FileCount;
PoEFolderEntry File[FileCount];
}
struct PoERequestPatchNotes = "Request Patch Notes"
{
}
struct PoEPatchNotes = FormatString("Patch Notes - %s", PatchNotesURL.ToString)
{
PoEString PatchNotesURL;
}
// Login Server connections
[RegisterAfter(TCPPayload.Ftp, PoELoginServer, 20481)]
[BuildConversationWithParent]
Protocol PoELoginServer = PoEPacketName
{
UINT8 Id;
switch(Id)
{
case 1:
[PoEPacketName = this.ToString] PoELoginRequest LoginRequest;
case 2:
[PoEPacketName = this.ToString] PoELoginRequestResult LoginRequestResult;
case 3:
[PoEPacketName = this.ToString] PoEChangePasswordRequest ChangePasswordRequest;
case 4:
[PoEPacketName = this.ToString] PoEChangePasswordResult ChangePasswordResult;
case 5:
[PoEPacketName = this.ToString] PoEDeleteCharRequest DeleteCharRequest;
case 6:
[PoEPacketName = this.ToString] PoELeagueUpdate DeleteCharResult;
case 7:
[PoEPacketName = this.ToString] PoEPlayRequest PlayRequest;
case 9:
[PoEPacketName = this.ToString] PoECreateCharRequest CreateCharRequest;
case 0xA:
[PoEPacketName = this.ToString] PoELeagueUpdate CreateCharResult;
case 0xB:
[PoEPacketName = this.ToString] PoEGameServerData GameServerData;
case 0xE:
[PoEPacketName = this.ToString] PoERequestLeagueInfo RequestLeagueInfo;
case 0xF:
[PoEPacketName = this.ToString] PoELeagueInfo LeagueInfo;
default:
[PoEPacketName = FormatString("Unknown 0x%X", Id)] PoEEmpty Unknown;
}
}
struct PoELoginRequest = "Request Login"
{
PoEU32 Unknown0;
[Conversation.ConversationDescription = Account.ToString]
PoEString Account;
PoEPassordHash Password;
}
table PoEClasses
{
switch(value)
{
case 1: "Marauder";
case 2: "Ranger";
case 3: "Witch";
case 4: "Duelist";
case 5: "Templar";
case 6: "Shadow";
default: FormatString("Unknown 0x%X", value);
}
}
// Index into WorldAreas.dat
table PoEAreas
{
switch(value)
{
case 0x51: "Forest Encampment";
case 0x53: "Old Fields";
default: FormatString("Unknown 0x%X", value);
}
}
struct PoECharacter = FormatString("%s (Level %d %s) in %s", Name.ToString, Level, Class.ToString, League.ToString)
{
PoEString Name;
PoEString League;
UINT8 Unknown1[7];
UINT8 Level;
UINT8 Unknown2[4];
UINT8 Class = PoEClasses(Class);
}
table PoELoginServerError
{
switch(value)
{
case 0x00: "Action successful";
case 0x05: "Account doesn't exist";
case 0x06: "Wrong password";
case 0x15: "Name is already taken";
case 0x16: "Name contains invalid characters";
default: FormatString("Unknown 0x%X", value);
}
}
struct PoELoginRequestResult = FormatString("Login Request Result - %s", Status.ToString)
{
UINT8 Status = PoELoginServerError(Status);
UINT8 Unknown[36];
switch
{
case Status == 0:
_struct
{
UINT8 Unknown1;
PoEU32 CharacterCount;
PoECharacter Character[CharacterCount];
PoEU32 Unknown2;
}
}
}
struct PoEChangePasswordRequest = "Change Password Request"
{
PoEPassordHash OldPassword;
PoEPassordHash NewPassword;
}
struct PoEChangePasswordResult = FormatString("Change Password Result - %s", Status.ToString)
{
UINT8 Status = PoELoginServerError(Status);
PoEU32 Unknown;
}
struct PoEDeleteCharRequest = FormatString("Delete Char %s", Character.ToString)
{
PoEString Character;
}
struct PoELeagueUpdate = FormatString("League Update - %s", Status.ToString)
{
UINT8 Status = PoELoginServerError(Status);
PoEU32 Unknown;
switch
{
case Status == 0:
_struct
{
UINT8 CharacterCount;
PoECharacter Character[CharacterCount];
}
}
}
struct PoELeague = Name.ToString
{
PoEString Name;
PoEString Description;
UINT8 Unknown1:6;
UINT8 PasswordProtected:1;
UINT8 Hardcore:1;
UINT8 Unknown2;
UINT16 Unknown3;
}
struct PoERequestLeagueInfo = "Request League Info"
{
}
struct PoELeagueInfo = "League Info"
{
PoEU32 LeagueCount;
PoELeague League[LeagueCount];
}
struct PoEPlayRequest = FormatString("Play using %s", Character.ToString)
{
PoEString Character;
}
table PoECreateCharResultStatus
{
switch(value)
{
case 0x00: "Creation successfull";
default: FormatString("Unknown 0x%X", value);
}
}
struct PoECreateCharRequest = FormatString("Create Char Request for %s (%s) in %s", Name.ToString, Class.ToString, League.ToString)
{
PoEString Name;
PoEString League;
UINT8 Unknown1[11];
UINT8 Class = PoEClasses(Class);
UINT8 Unknown2[32];
}
struct PoEGameServerData = "Game Server Data"
{
PoEU32 ConnectionId; // Must match with the one in PoEGameEnterRequest
UINT8 Unknown1[7];
PoEGameServerInfo GameServer;
}
// Game Server connections
[RegisterAfter(TCPPayload.Rpchttp, PoEGameServer, Global.PoEGameServers$[MakeByteArray(DestinationNetworkAddress, DestinationPort)] == 1 || Global.PoEGameServers$[MakeByteArray(SourceNetworkAddress, SourcePort)] == 1)]
[BuildConversationWithParent]
Protocol PoEGameServer = PoEPacketName
{
UINT8 Id;
switch(Id)
{
case 1:
[PoEPacketName = this.ToString] PoEGameEnterRequest GameEnterRequest;
case 3:
[PoEPacketName = this.ToString] PoELinkItem LinkItem;
case 4:
[PoEPacketName = this.ToString] PoESendChat SendChat;
case 5:
[PoEPacketName = this.ToString] PoEReceiveChat ReceiveChat;
case 6:
[PoEPacketName = "Exit"] PoEEmpty Exit;
case 8:
[PoEPacketName = this.ToString] PoEPing Ping;
case 9:
[PoEPacketName = this.ToString] PoEPong Pong;
case 0xB:
[PoEPacketName = this.ToString] PoEGameEnterResult GameEnterResult;
case 0xE:
[PoEPacketName = this.ToString] PoEUseOnLocation UseOnLocation;
case 0x10:
[PoEPacketName = this.ToString] PoENewGameServer NewGameServer;
case 0x11:
[PoEPacketName = this.ToString] PoEPickItem PickItem;
case 0x13:
[PoEPacketName = this.ToString] PoEPlaceItem PlaceItem;
case 0x17:
[PoEPacketName = this.ToString] PoEPassivePoints PassivePoints;
case 0x18:
[PoEPacketName = this.ToString] PoESpendPassivePoint SpendPassivePoint;
case 0x20:
[PoEPacketName = this.ToString] PoEEquipSkill EquipSkill;
case 0x21:
[PoEPacketName = this.ToString] PoEAssignedSkils AssignedSkils;
case 0x24:
[PoEPacketName = this.ToString] PoEDrinkFlask DrinkFlask;
case 0x37:
[PoEPacketName = this.ToString] PoEJoinParty JoinParty;
case 0x38:
[PoEPacketName = this.ToString] PoELeaveParty LeaveParty;
case 0x3A:
[PoEPacketName = this.ToString] PoEUpdatePublicParty UpdatePublicParty;
case 0x3B:
[PoEPacketName = this.ToString] PoERequestPartyDetails RequestPartyDetails;
case 0x3C:
[PoEPacketName = this.ToString] PoEPlayerUpdate PlayerUpdate;
case 0x3D:
[PoEPacketName = this.ToString] PoEPlayerLeftParty PlayerLeftParty;
case 0x3E:
[PoEPacketName = this.ToString] PoEPartyDetails PartyDetails;
case 0x3F:
[PoEPacketName = this.ToString] PoELeftParty LeftParty;
case 0x41:
[PoEPacketName = "Request Party List"] PoEEmpty RequestPartyList;
case 0x42:
[PoEPacketName = this.ToString] PoEPartyList PartyList;
case 0x57:
[PoEPacketName = this.ToString] PoEFriend Friend;
case 0x5D:
[PoEPacketName = this.ToString] PoEUseWeaponSet UseWeaponSet;
case 0x5E:
[PoEPacketName = this.ToString] PoEUseWeaponSetAck UseWeaponSetAck;
case 0xF0:
[PoEPacketName = this.ToString] PoEObjectAdd ObjectAdd;
case 0xF1:
[PoEPacketName = this.ToString] PoEObjectUpdate ObjectUpdate;
case 0xF2:
[PoEPacketName = this.ToString] PoEObjectRemove ObjectRemove;
default:
[PoEPacketName = FormatString("Unknown 0x%X", Id)] PoEEmpty Unknown;
}
}
struct PoEGameEnterRequest = FormatString("Enter Game Request - %s", Character.ToString)
{
[Conversation.ConversationDescription = Character.ToString]
PoEString Character;
PoEU32 ConnectionId; // Must match with the one in PoEGameServerInfo
}
struct PoELinkItem = FormatString("Link Item %d = ItemId %d", ItemLinkId, ItemId)
{
PoEU32 ItemLinkId;
PoEU32 Unknown1;
PoEU32 ItemId;
UINT8 Unknown2;
}
struct PoESendChat = FormatString("Send Chat %s", Message.ToString)
{
PoEString Message;
UINT8 NumberOfItems;
PoEU32 ItemLinkId[NumberOfItems];
}
struct PoELinkedItem
{
PoEU32 ItemLinkId;
UINT8 Unknown;
}
struct PoEReceiveChat = FormatString("Receive Chat %s - %s", Character.ToString, Message.ToString)
{
PoEString Character;
PoEString Message;
PoEU16 NumberOfItems;
PoELinkedItem Item[NumberOfItems];
}
struct PoEPing = "Ping"
{
[PoEPing = 1]
PoEEmpty Dummy;
}
struct PoEPong = "Pong"
{
[PoEPing = 1]
PoEU32 Unknown;
}
struct PoEUseOnLocation = FormatString("Use %s On (%d, %d)", Skill.ToString, X, Y)
{
PoEU32 X;
PoEU32 Y;
PoEU16 Skill = PoESkills(Skill);
PoEU16 ActionId;
UINT8 Unknown;
}
struct PoENewGameServer = "New Game Server"
{
PoEU32 ConnectionId;
UINT8 Unknown1[11];
PoEGameServerInfo GameServer;
}
table PoEItemContainer
{
switch(value)
{
case 1: "Inventory";
case 2: "Body";
case 3: "Left Hand";
case 4: "Right Hand";
case 5: "Helm";
case 6: "Amulet";
case 7: "Left Ring";
case 8: "Right Ring";
case 9: "Gloves";
case 10: "Boots";
case 11: "Belt";
case 12: "Flasks";
default: FormatString("Stash Tab %d", value - 23);
}
}
struct PoEPickItem = FormatString("Pick Item from %s", Container.ToString)
{
PoEU32 ItemId;
PoEU32 Container = PoEItemContainer(Container);
}
struct PoEPlaceItem = FormatString("Place Item at (%d, %d) in %s", X, Y, Container.ToString)
{
PoEU32 Container = PoEItemContainer(Container);
PoEU32 X;
PoEU32 Y;
}
struct PoEPassivePoints = FormatString("Passive Points (%d used)", PassiveSkillCount)
{
PoEU16 PassiveSkillCount;
PoEU16LE PassiveSkills[PassiveSkillCount];
PoEU32 Unknown2;
PoEU16 Unknown3;
}
struct PoESpendPassivePoint = FormatString("Spend Passive Point 0x%X", PassiveSkill)
{
PoEU16 Unknown;
PoEU16 PassiveSkill;
}
table PoESkills
{
switch(value)
{
case 0x4000: "Default Attack";
case 0x2909: "Move Only";
case 0x8004: "Lightning Arrow";
default: FormatString("Skill 0x%X", value);
}
}
table PoESkillSlot
{
switch(value)
{
case 0: "Left Mouse";
case 1: "Middle Mouse";
case 2: "Right Mouse";
case 3: "Q Key";
case 4: "W Key";
case 5: "E Key";
case 6: "R Key";
default: FormatString("Unknown 0x%X", value);
}
}
struct PoESkill = Skill.ToString
{
PoEU16 Skill = PoESkills(Skill);
}
struct PoESkillLE = Skill.ToString
{
PoEU16LE Skill = PoESkills(Skill);
}
struct PoEEquipSkill = FormatString("Equip %s in %s", Skill.ToString, Slot.ToString)
{
UINT8 Slot = PoESkillSlot(Slot);
PoESkill Skill;
}
struct PoEAssignedSkils = "Assigned Skills"
{
PoESkillLE Skill[7];
}
struct PoEDrinkFlask = "Drink Flask"
{
}
struct PoEJoinParty = FormatString("Join Party 0x%X", PartyId)
{
PoEU32 PartyId;
}
struct PoELeaveParty = "Leave Party"
{
}
struct PoEUpdatePublicParty = FormatString("Update Public Party - %s", PartyName.ToString)
{
PoEString PartyName;
}
struct PoERequestPartyDetails = FormatString("Request Party Details For 0x%X", PartyId)
{
PoEU32 PartyId;
}
struct PoEGameEnterResult = FormatString("Enter Game Result - %s", League.ToString)
{
[Local.Terminator = 0]
PoEString Unknown1;
while [Local.Terminator != 0xA]
{
[Local.Terminator = this] UINT8 Unknown2;
}
PoEU32 Unknown3;
PoEString League;
PoEU32 MapSeed;
}
struct PoEPlayerUpdate = FormatString("Player Update %s (%s) - %s", Player.ToString, Online == 1 ? FormatString("Online with %s", Character.ToString) : "Offline", Message.ToString)
{
PoEString Player;
PoEString Message;
UINT8 Online;
switch
{
case Online == 1:
_struct
{
PoEString Character;
PoEU32 Level;
UINT8 Class = PoEClasses(Class);
UINT8 Unknown[3];
UINT8 Area = PoEAreas(Area);
}
}
}
struct PoEPlayerLeftParty = FormatString("%s Left Party", Character.ToString)
{
PoEString Character;
}
struct PoEPartyPlayer = Player.ToString
{
PoEString Player;
UINT8 Unknown;
}
struct PoEPartyDetails = FormatString("Details For %s", Party.ToString)
{
PoEParty Party;
UINT8 Unknown;
UINT8 PlayerCount;
PoEPartyPlayer Player[PlayerCount];
}
struct PoELeftParty = "Left Party"
{
PoEU32 PartyId;
}
struct PoEParty = FormatString("Party %s (0x%X)", Name.ToString, PartyId)
{
PoEU32 PartyId;
PoEString Name;
}
struct PoEPartyListEntry = Party.ToString
{
PoEParty Party;
UINT8 Unknown[3];
}
struct PoEPartyList = "Party List"
{
PoEU16 PartyCount;
PoEPartyListEntry Party[PartyCount];
}
struct PoEFriend = FormatString("Friend %s", Friend.ToString)
{
PoEU32 Unknown;
PoEString Friend;
}
table PoEWeaponSet
{
switch(value)
{
case 0: "Primary";
case 1: "Secondary";
default: FormatString("Unknown 0x%X", value);
}
}
struct PoEUseWeaponSet = FormatString("Use %s Weapon Set", WeaponSet.ToString)
{
UINT8 WeaponSet = PoEWeaponSet(WeaponSet);
}
struct PoEUseWeaponSetAck = FormatString("Use %s Weapon Set Ack", WeaponSet.ToString)
{
UINT8 WeaponSet = PoEWeaponSet(WeaponSet);
PoEU32 Unknown;
}
struct PoEObjectAdd = FormatString("Added Object 0x%x", ObjectId)
{
PoEU32 Unknown;
PoEU32 ObjectId;
}
struct PoEObjectUpdate = FormatString("Object 0x%x - %s", ObjectId, PoEObjectUpdateDesc)
{
PoEU32 ObjectId;
PoEU16 UpdateType;
switch(UpdateType)
{
case 0x701:
[PoEObjectUpdateDesc = this.ToString] PoEObjectUseOnLocation ObjectUseOnLocation;
default:
[PoEObjectUpdateDesc = "Unknown update"] PoEEmpty Unknown;
}
}
struct PoEObjectUseOnLocation = FormatString("Uses %s from (%d, %d) to (%d, %d)", Skill.ToString, OldX, OldY, X, Y)
{
UINT8 Unknown1[3];
PoEU32 OldX;
PoEU32 OldY;
PoEU16 Skill = PoESkills(Skill);
PoEU16 ActionId;
PoEU32 Unknown2;
PoEU32 X;
PoEU32 Y;
}
struct PoEObjectRemove = FormatString("Remove Object 0x%x", ObjectId)
{
PoEU32 ObjectId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment