|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |

12-20-2008, 10:20 PM
|
Discordant
|
|
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
|
|
Trevius is our hero.
|
 |
|
 |

12-21-2008, 05:31 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
While it is good to know some people are following this post, I think it would be best to keep the clutter down if possible. I am hoping that I can get it working enough that others might be able to start assisting me at some point and it is easier to read if there is less clutter. I do appreciate the cheering on (it is alot of work so far), but this thread isn't really the place for it. Besides, until it is at least somewhat usable, there isn't much to cheer about. There is a good chance that we may never have enough info to get SoF fully functional. I am trying to stay positive about it though lol.
I have already learned a ton over the past couple of weeks just playing with the different sources I have available to me to get them all frankenstiened into something that will at least let us log all of the way in. If I could read the assembly code better, it may eventually be possible to pull everything we need straight from there, but I am still a good ways from being able to understand it enough to do that.
Currently, I am trying to understand the item serialization code. I have the full itemlist for SoF, and I think it should be very close to accurate. But, until I know how to set the serialization up so that it works with my new list, I can't load items. Other than that, I already have a large amount of the bare minimum opcodes needed to log in. There are only a few more I need to have a complete list. Here is what I have so far:
Code:
Opcode Name=Titanium Op - SoF Op
OP_SendLoginInfo=0x4dd0 - 0x6c3c V
OP_GuildsList=0x6957 - 0x04FB V
OP_LogServer=0x0fa6 - 0x129A V
OP_ApproveWorld=0x3c25 - 0x7FC0 V
OP_EnterWorld=0x7cba - 0x1340 V
OP_PostEnterWorld=0x52A4 - 0x1AEE V
OP_ExpansionInfo=0x04ec - 0x0A1B V
OP_SendCharInfo=0x4513 - 0x6040 V
OP_World_Client_CRC1=0x5072 - 0x7a9e V
OP_World_Client_CRC2=0x5b18 - 0x3795 V
- 0x22cf - size 2056 - Some new CRC from SoF. This shouldn't be required to use at all.
- 0x43ba - size 2056 - Some new CRC from SoF. This shouldn't be required to use at all.
OP_AckPacket=0x7752 - 0x4D38 V
OP_WorldClientReady=0x5e99 - 2EBD V
0x58FB - size 8 - the Auto-AFK opcode - This isn't in Titanium opcodes, but does exist. Not required though.
Log into a zone:
OP_EnterWorld=0x7cba - 0x1340 V
OP_MOTD=0x024d - 0x5711 V?
OP_SetChatServer=0x00d7 - 0x71B8 V
OP_SetChatServer2=0x6536 - 0x32CC V
OP_ZoneServerInfo=0x61b6 - 0x18B1 V
OP_WorldComplete=0x509d - 0x2486 V
OP_PlayerProfile=0x75DF - 0x0FEB V
OP_ZoneEntry=0x7213 - 0x737E V
OP_TimeOfDay=0x1580 - 0x7274 V
OP_TributeUpdate=0x5639 - 0x71Fb ???
OP_TributeTimer=0x4665 - 0x4775 ???
OP_CharInventory=0x5394 - 0x08A3 V
OP_TaskDescription=0x5ef7 - 0x0Af9 ???
OP_TaskActivity=0x682d - 0x2E60 ???
OP_CompletedTasks=0x76a2 - 0x5855
OP_Weather=0x254d - 0x70A5 V
OP_ReqNewZone=0x7ac5 - 0x3CDC NEW from IDA 0x5417 V
OP_NewZone=0x0920 - 0x5D22 V
OP_CustomTitles=0x2a28 - ???
OP_SendAATable=0x367d - 0x6F05 V
OP_UpdateAA=0x5966 - 0x45D2 V
OP_RespondAA=0x3af4 -
OP_SendTributes=0x067a - 0x28C1??? From Tail 0x6764
OP_TributeInfo=0x152d - 0x4775 From Tail 0x3F33
OP_SendGuildTributes=0x5e3a - 0x6774
OP_SpawnAppearance=0x7c32 - 0x10B7 NEW from IDA 0x50EC V? 0x0000?
OP_ReqClientSpawn=0x0322 - 0x45D2 NEW from IDA 0x014C V
OP_SpawnDoor=0x4c24 - 0x68C8 NEW from IDA 0x3547 V???
OP_GroundSpawn=0x0f47 - 0x33E5 ???
OP_SendZonepoints=0x3eba - 0x2992 ???
OP_PetitionCheckout=0x0000 - Shouldn't be required as we don't have it in Titanium either.
OP_SendAAStats=0x5996 - 0x3518 ??? - I don't know if this is used in Titanium
OP_SendExpZonein=0x0587 - 0x3703 V?
OP_AAExpUpdate=0x5f58 - 0x3518 ???
OP_ExpUpdate=0x5ecd - 0x581A ???
OP_RaidUpdate=0x1f21 - 0x00AF ???
OP_GuildMemberList=0x147d - 0x317C ???
OP_GuildMOTD=0x475a - 0xD677 ???
OP_SetServerFilter=0x6563 - I don't think this is required.
OP_ClientReady=0x5e20 - NEW 0x2854 V
OP_PetitionUpdate=0x0000 - Shouldn't be required as we don't have it in Titanium either.
OP_WearChange=0x7441 - 0x25F0 V?
OP_HPUpdate=0x3bcf - 0x62F6 ???
OP_WeaponEquip2=0x63da - skip this as it is unhandled in Titanium and comes from the client each time you zone
OP_WeaponEquip1=0x6c5e - skip this as it is unhandled in Titanium and comes from the client each time you zone
OP_ManaChange=0x4839 - 0x0659 V?
OP_SpecialMesg=0x2372 - 0x1126 V?
OP_TGB=0x0c11 - 0x0137 V?
OP_ClientUpdate=0x14cb - 0x5Cf3 V?
OP_FloatListThing=0x6a1b - I don't have this yet, but it comes from the client and should be able to get it from the tail once I can get in game with SoF
The V means it has been verified either from the client, or from IDA or both. This is about 95% sure to be accurate. The V? means I verified it from IDA, but the code isn't an exact match, so I am only 50-75% sure it is accurate. The ??? means I was either unable to find it at all in IDA, or that I found it and it doesn't look like a match to me, they are likely to be wrong.
I think if we can get all of those, I may have enough opcodes correct that we can at least log in a naked character all of the way. Once the item serialization is done for SoF, we should be able to login geared characters as well. I think the main opcode I need to be accurate now is the doorspawn opcode. I think that also sends objects in the zone and seems to be where the naked test character is getting hung up at.
Like I said, as soon as I can get any character logged in all of the way, I will submit my changes to the SVN so others can assist with it if they want. What I will probably do is set it so that the Anniversary files (that I am using for getting SoF to work currently), will not be used by default on new builds. It would be disabled by a simple define and could be easily enabled by anyone who wanted to mess with it. I will post how to enable it if I can get to that point. It will just mean a simple 1 line code change to enable it (uncommenting a #define). The reason to leave it disabled is so you don't have players trying to use SoF and crashing zones if there are issues with it that cause crashes.
Last edited by trevius; 12-24-2008 at 06:21 PM..
|
 |
|
 |
 |
|
 |

12-21-2008, 05:36 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Here is my new updated itemlist incase anyone knows how to write the item serialization code to use it properly:
Code:
/* 000 */ //I(ItemClass) // Leave this one off on purpose
/* 001 */ S(Name)
/* 002 */ S(Lore)
/* 003 */ C("")//lorefile - Newly Added - Field is Null
/* 004 */ S(IDFile)
/* 005 */ I(ID)
/* 006 */ I(Weight)
/* 007 */ I(NoRent)
/* 008 */ I(NoDrop)
/* 009 */ I(Size)
/* 010 */ I(Slots)
/* 011 */ I(Price)
/* 012 */ I(Icon)
/* 013 */ C("0")//UNK013
/* 014 */ C("0")//UNK014
/* 015 */ I(BenefitFlag)
/* 016 */ I(Tradeskills)
/* 017 */ I(CR)
/* 018 */ I(DR)
/* 019 */ I(PR)
/* 020 */ I(MR)
/* 021 */ I(FR)
/* 022 */ C("0")//svcorruption - Newly Added
/* 023 */ I(AStr)
/* 024 */ I(ASta)
/* 025 */ I(AAgi)
/* 026 */ I(ADex)
/* 027 */ I(ACha)
/* 028 */ I(AInt)
/* 029 */ I(AWis)
/* 030 */ I(HP)
/* 031 */ I(Mana)
/* 032 */ I(Endur) //endur - Relocated
/* 033 */ I(AC)
/* 034 */ I(Classes)//classes - Relocated
/* 035 */ I(Races)//races - Relocated
/* 036 */ I(Deity)
/* 037 */ I(SkillModValue)
/* 038 */ C("0")//UNK038 - Default is 0
/* 039 */ I(SkillModType)
/* 040 */ I(BaneDmgRace)
/* 041 */ I(BaneDmgBody)//banedmgbody - Relocated
/* 042 */ I(BaneDmgRaceAmt)//banedmgraceamt - Relocated
/* 043 */ I(BaneDmgAmt)//banedmgamt - Relocated
/* 044 */ I(Magic)
/* 045 */ I(CastTime_)
/* 046 */ I(ReqLevel)
/* 047 */ I(RecLevel)//reclevel - Relocated
/* 048 */ I(RecSkill)//recskill - Relocated
/* 049 */ I(BardType)
/* 050 */ I(BardValue)
/* 051 */ I(Light)
/* 052 */ I(Delay)
/* 053 */ I(ElemDmgType)
/* 054 */ I(ElemDmgAmt)
/* 055 */ I(Range)
/* 056 */ I(Damage)
/* 057 */ I(Color)
/* 058 */ I(ItemType)
/* 059 */ I(Material)
/* 060 */ C("0")//UNK060 - Default is 0
/* 061 */ C("0")//UNK061 - Default is 0
/* 062 */ F(SellRate)
/* 063 */ I(CombatEffects)
/* 064 */ I(Shielding)
/* 065 */ I(StunResist)
/* 066 */ I(StrikeThrough)
/* 067 */ I(ExtraDmgSkill)
/* 068 */ I(ExtraDmgAmt)
/* 069 */ I(SpellShield)
/* 070 */ I(Avoidance)
/* 071 */ I(Accuracy)
/* 072 */ I(CharmFileID)
/* 073 */ I(FactionMod1)//Swapped these so Faction Amt comes after each Faction Mod
/* 074 */ I(FactionAmt1)//Swapped these so Faction Amt comes after each Faction Mod
/* 075 */ I(FactionMod2)//Swapped these so Faction Amt comes after each Faction Mod
/* 076 */ I(FactionAmt2)//Swapped these so Faction Amt comes after each Faction Mod
/* 077 */ I(FactionMod3)//Swapped these so Faction Amt comes after each Faction Mod
/* 078 */ I(FactionAmt3)//Swapped these so Faction Amt comes after each Faction Mod
/* 079 */ I(FactionMod4)//Swapped these so Faction Amt comes after each Faction Mod
/* 080 */ I(FactionAmt4)//Swapped these so Faction Amt comes after each Faction Mod
/* 081 */ S(CharmFile)
/* 082 */ I(AugType)
/* 083 */ I(AugRestrict)//augrestrict - Relocated
/* 084 */ I(AugDistiller)//augdistiller - Relocated
/* 085 */ I(AugSlotType[0])
/* 086 */ I(AugSlotUnk[0])//augslot1visible - Default 1
/* 087 */ C("0")//augslot1unk2 - Newly Added - Default 0
/* 088 */ I(AugSlotType[1])
/* 089 */ I(AugSlotUnk[1])
/* 090 */ C("0")//augslot2unk2 - Newly Added
/* 091 */ I(AugSlotType[2])
/* 092 */ I(AugSlotUnk[2])
/* 093 */ C("0")//augslot3unk2 - Newly Added
/* 094 */ I(AugSlotType[3])
/* 095 */ I(AugSlotUnk[3])
/* 096 */ C("0")//augslot4unk2 - Newly Added
/* 097 */ I(AugSlotType[4])
/* 098 */ I(AugSlotUnk[4])
/* 099 */ C("0")//augslot5unk2 - Newly Added
/* 100 */ I(PointType)//pointtype - Relocated
/* 101 */ I(LDoNTheme)
/* 102 */ I(LDoNPrice)
/* 103 */ C("70")//UNK098 - Newly Added - Default 70, but some are set to 0
/* 104 */ I(LDoNSold)
/* 105 */ I(BagType)
/* 106 */ I(BagSlots)
/* 107 */ I(BagSize)
/* 108 */ I(BagWR)
/* 109 */ I(Book)
/* 110 */ I(BookType)
/* 111 */ S(Filename)
/* 112 */ I(LoreGroup)
/* 113 */ I(ArtifactFlag)
/* 114 */ C("0")//I(PendingLoreFlag)?//UNK109 - Default 0, but a few are 1
/* 115 */ I(Favor)
/* 116 */ I(GuildFavor)//guildfavor - Relocated
/* 117 */ I(FVNoDrop)
/* 118 */ I(DotShielding)
/* 119 */ I(Attack)
/* 120 */ I(Regen)
/* 121 */ I(ManaRegen)
/* 122 */ I(EnduranceRegen)
/* 123 */ I(Haste)
/* 124 */ I(DamageShield)
/* 125 */ C("-1") //UNK120 - Default is -1
/* 126 */ C("0") //UNK121 - Default is 0
/* 127 */ I(Attuneable)
/* 128 */ I(NoPet)
/* 129 */ C("0") //UNK124 - Default 0, but a few are 1
/* 130 */ I(PotionBelt)
/* 131 */ C("0") //potionbeltslots - Default 0, but a few are 1
/* 132 */ I(StackSize)
/* 133 */ I(NoTransfer)
/* 134 */ I(Stackable)//UNK129 - Default is 0, but some are much higher
/* 135 */ I(QuestItemFlag)//questitemflag - Default is 0 (off), flag on = 1
/* 136 */ C("0")//UNK131 - Default is 0, but there is an item set to 1
/* 137 */ C("0")//UNK132 - Default is 0? 0000000000000000000?
/* 138 */ I(Click.Effect)
/* 139 */ I(Click.Type)
/* 140 */ I(Click.Level2)
/* 141 */ I(Click.Level)
/* 142 */ I(MaxCharges)//maxcharges - Relocated
/* 143 */ I(CastTime_)//casttime - Relocated - Note Duplicate Entries for CastTime_ and none for CastTime
/* 144 */ I(RecastDelay)//recastdelay - Relocated
/* 145 */ I(RecastType)//recasttype - Relocated
/* 146 */ C("0")//clickunk5 - Newly Added - Default is 0
/* 147 */ C("")//clickname - Newly Added - Default is Null
/* 148 */ C("-1")//clickunk7 - Newly Added - Default is -1, but some set to 0 and some much higher
/* 149 */ I(Proc.Effect)
/* 150 */ I(Proc.Type)
/* 151 */ I(Proc.Level2)
/* 152 */ I(Proc.Level)
/* 153 */ C("0")//procunk1 - Newly Added - Default is 0, but some set to -1 and 1
/* 154 */ C("0")//procunk2 - Newly Added - Default is 0
/* 155 */ C("0")//procunk3 - Newly Added - Default is 0
/* 156 */ C("0")//procunk4 - Newly Added - Default is 0
/* 157 */ I(ProcRate)//procrate - Relocated
/* 158 */ C("")//procname - Newly Added - Default is Null
/* 159 */ C("-1")//procunk7 - Newly Added - Default is -1, but some set to 0
/* 160 */ I(Worn.Effect)
/* 161 */ I(Worn.Type)
/* 162 */ I(Worn.Level2)
/* 163 */ I(Worn.Level)
/* 164 */ C("0")//wornunk1 - Newly Added - Default is 0
/* 165 */ C("0")//wornunk2 - Newly Added - Default is 0
/* 166 */ C("0")//wornunk3 - Newly Added - Default is 0
/* 167 */ C("0")//wornunk4 - Newly Added - Default is 0
/* 168 */ C("0")//wornunk5 - Newly Added - Default is 0
/* 169 */ C("")//wornname - Newly Added - Default is Null
/* 170 */ C("-1")//wornunk7 - Newly Added - Default is -1, but some set to 0
/* 171 */ I(Focus.Effect)
/* 172 */ I(Focus.Type)
/* 173 */ I(Focus.Level2)
/* 174 */ I(Focus.Level)
/* 175 */ C("0")//focusunk1 - Newly Added - Default is 0
/* 176 */ C("0")//focusunk2 - Newly Added - Default is 0
/* 177 */ C("0")//focusunk3 - Newly Added - Default is 0
/* 178 */ C("0")//focusunk4 - Newly Added - Default is 0
/* 179 */ C("0")//focusunk5 - Newly Added - Default is 0
/* 180 */ C("")//focusname - Newly Added - Default is Null
/* 181 */ C("-1")//focusunk7 - Newly Added - Default is -1, but some set to 0
/* 182 */ I(Scroll.Effect)
/* 183 */ I(Scroll.Type)
/* 184 */ I(Scroll.Level2)
/* 185 */ I(Scroll.Level)
/* 186 */ C("0")//scrollunk1 - Renumber this***
/* 187 */ C("0")//scrollunk2 - Newly Added - Default is 0
/* 188 */ C("0")//scrollunk3 - Newly Added - Default is 0
/* 189 */ C("0")//scrollunk4 - Newly Added - Default is 0
/* 190 */ C("0")//scrollunk5 - Newly Added - Default is 0
/* 191 */ C("")//scrollname - Newly Added - Default is Null
/* 192 */ C("-1")//scrollunk7 - Newly Added - Default is -1, but some set to 0
/* 193 */ C("0")//UNK193 - Default is 0
/* 194 */ C("0")//purity - Newly Added - Default is 0, but some go up to 75
/* 195 */ C("0")//dsmitigation - Newly Added - Default is 0, but some are up to 2
/* 196 */ C("0")//heroic_str - Newly Added - Default is 0
/* 197 */ C("0")//heroic_int - Newly Added - Default is 0
/* 198 */ C("0")//heroic_wis - Newly Added - Default is 0
/* 199 */ C("0")//heroic_agi - Newly Added - Default is 0
/* 200 */ C("0")//heroic_dex - Newly Added - Default is 0
/* 201 */ C("0")//heroic_sta - Newly Added - Default is 0
/* 202 */ C("0")//heroic_cha - Newly Added - Default is 0
/* 203 */ C("0")//healamt - Newly Added - Default is 0, but some are up to 9
/* 204 */ C("0")//spelldmg - Newly Added - Default is 0, but some are up to 9
/* 205 */ C("0")//clairvoyance - Newly Added - Default is 0, but some are up to 10
/* 206 */ C("0")//backstabdmg - Newly Added - Default is 0, but some are up to 65
//* 207 */ C("0")//evolvinglevel - Newly Added - Default is 0, but some are up to 7
//This doesn't appear to be used /* 102 */ S(verified)//verified
//This doesn't appear to be used /* 102 */ S(serialized)//created
//Unsure where this goes right now (or if it is even used) /* 108 */ I(SummonedFlag)
Here is a piece of the log from the EQ Debug showing where it is currently failing:
Code:
[Sun Dec 21 07:09:29 2008]00201:Entering main loop.
[Sun Dec 21 07:09:30 2008]00202:DoMainLoop - Just after packet processing()
[Sun Dec 21 07:09:30 2008]00203:DoMainLoop - Just after actor creation()
[Sun Dec 21 07:09:30 2008]00204:Loading game sounds.
[Sun Dec 21 07:09:30 2008]00205:Requesting initialization data.
[Sun Dec 21 07:09:30 2008]00206:DoMainLoop: just before first while(!EverQuest.ReceievedWorldObjects).
[Sun Dec 21 07:11:14 2008]00132:THE SERVER IS NOT RESPONDING.
[Sun Dec 21 07:11:38 2008]00133:
end of DisplayScreen
[Sun Dec 21 07:11:40 2008]00134:TIMED OUT WAITING FOR ZONE ADDR
[Sun Dec 21 07:11:41 2008]00135:Networking: Connection Closed [0] with 0 pending bytes.
Last edited by trevius; 12-21-2008 at 05:19 PM..
|
 |
|
 |

12-21-2008, 05:08 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by AndMetal
Quote:
Originally Posted by AndMetal
Looking at the source (different files of course) from the same time, we should be able to find out at least some of the structures, if we don't know them already. However, taking a quick peek myself, I wasn't able to find any clear cut "structures" file, so it's probably all spread out through the source.
|
Found them: showeq/src/everquest.h. Maybe some of the later changes to the structs might provide some insight on what the unknown values may be...
|
If we're still looking for newer structs (after 2006), we can peek into the SEQ SVN. Specifically, SoF structs should be in Rev 686 (11/5/2007), Rev 688 (11/21/2007), or Rev 690 (11/27/2007). Since, according to Wikipedia, it was released on 11/13/2007, we'll probably want to look at Rev 688.
|
 |
|
 |
 |
|
 |

12-21-2008, 06:33 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Ya, I have been using all of those to get as far as I have :P They have been very useful.
Even though SoF was released on 11/13/07, it was actually built on 9/7/07 (according to the EQ Debug Logs). So, anything from 9/7/07 to around the beginning of 2008 is probably useful. They may have patched in some of the SoF stuff to live before it actually came out, so the structures and stuff may have already been there for the most part. The main thing that would have changed alot are the opcodes. Unfortunately, most of the opcodes in SEQ weren't updated until after December, so many of them aren't correct.
I am thinking about trying a current version of SEQ and running a trial live account just to see if I can find 100% accurate structures that can be used to help getting SoF to work. I am betting that the current live structs are probably closer to SoF than the Titanium ones are.
If anyone has packet collects from right around the time that SoF was released (preferrably from SEQ if possible), I would love to get a copy of them. I think that would help alot once I knew what I was looking at. But, I am not holding my breath to get them, because I doubt anyone has still them.
I am not really sure what it is for, but a code obfuscater was added to SEQ around the time that SoF came out. From looking at the comments around the code for it, it appears to be used for pulling opcodes directly from the assembly code of the eqgame.exe. I have no idea how it is actually used though, or if I am just misunderstanding what it does. I have seen comments about it on the SEQ forums that seem to say something about opcodes changing from time to time when you zone or log on other characters/servers. I guess it is some kind of simple encryption or something. But, it seems that the new obfuscate can pull an opcode table from the exe file. If that is true, maybe we can use it on Titanium, and then on SoF and compare the 2 tables and compare the conf files for known opcodes and match them up. Here is a link to the obfuscate getting added to SEQ SVN:
http://seq.svn.sourceforge.net/viewv...85&pathrev=686
Last edited by trevius; 12-22-2008 at 03:16 AM..
|
 |
|
 |

12-23-2008, 04:57 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I moved this to the development section, because it seems more appropriate.
|
 |
|
 |

12-24-2008, 10:03 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I figured out where it is currently breaking when it is trying to log in. It seems that the opcode OP_SendExpZonein=0x3703 is where the problem is. This is the last opcode that the client receives before it stops responding. I also verified that by removing this opcode from Titanium it will fail at the exact same point according to the EQ Debug Logs.
Code:
DoMainLoop: just before first while(!EverQuest.ReceievedWorldObjects).
Actually, in Titanium, the log entry is slightly different, but it is the same thing just renamed:
Code:
DoMainLoop: just before first while(!ReadyEnterWorld).
My guess is that this opcode now needs to be encoded like many of the other important ones. And since it isn't being encoded, it isn't recognizing it, so it is failing. I am 99% sure that I have the correct opcode set for it.
Looking at the place where it is failing, here is the Assembly code for it:
Code:
.text:004DCC8F push offset aDomainloopJu_1 ; "DoMainLoop: just before first while(!Ev"...
.text:004DCC94 mov dword_907F60, esi
.text:004DCC9A call sub_645680 ; Call Procedure
.text:004DCC9F mov al, byte_9262EC
.text:004DCCA4 add esp, 18h ; Add
.text:004DCCA7 cmp al, bl ; Compare Two Operands
.text:004DCCA9 jnz short loc_4DCCF8 ; Jump if Not Zero (ZF=0)
.text:004DCCAB jmp short loc_4DCCB0 ; Jump
.text:004DCCAB ; ---------------------------------------------------------------------------
.text:004DCCAD align 10h
.text:004DCCB0
.text:004DCCB0 loc_4DCCB0: ; CODE XREF: sub_4DC610+69Bj
.text:004DCCB0 ; sub_4DC610+6E6j
.text:004DCCB0 mov eax, dword_761C6C
.text:004DCCB5 cmp eax, ebx ; Compare Two Operands
.text:004DCCB7 jz short loc_4DCCCA ; Jump if Zero (ZF=1)
.text:004DCCB9 mov ecx, [eax+4Ch]
.text:004DCCBC cmp ecx, ebx ; Compare Two Operands
.text:004DCCBE jz short loc_4DCCCA ; Jump if Zero (ZF=1)
.text:004DCCC0 push 1F4h
.text:004DCCC5 call sub_60DAD0 ; Call Procedure
.text:004DCCCA
.text:004DCCCA loc_4DCCCA: ; CODE XREF: sub_4DC610+6A7j
.text:004DCCCA ; sub_4DC610+6AEj
.text:004DCCCA mov ecx, edi
.text:004DCCCC call sub_4D9FF0 ; Call Procedure
.text:004DCCD1 push 1
.text:004DCCD3 push 4841h
.text:004DCCD8 push offset aCP4Everquest_0 ; "C:\\p4\\EverQuest\\live\\EverQuest\\EverQues"...
.text:004DCCDD mov ecx, edi
.text:004DCCDF call sub_4C1EA0 ; Call Procedure
.text:004DCCE4 test al, al ; Logical Compare
.text:004DCCE6 jnz loc_4DE160 ; Jump if Not Zero (ZF=0)
.text:004DCCEC push 1
.text:004DCCEE call ebp ; Indirect Call Near Procedure
.text:004DCCF0 cmp byte_9262EC, bl ; Compare Two Operands
.text:004DCCF6 jz short loc_4DCCB0 ; Jump if Zero (ZF=1)
.text:004DCCF8
.text:004DCCF8 loc_4DCCF8: ; CODE XREF: sub_4DC610+699j
.text:004DCCF8 push offset aDomainloopComp ; "DoMainLoop: complete after first while("...
.text:004DCCFD call sub_645680 ; Call Procedure
.text:004DCD02 add esp, 4 ; Add
.text:004DCD05 mov ecx, edi
.text:004DCD07 call sub_4E3B70 ; Call Procedure
.text:004DCD0C push 1
.text:004DCD0E mov ecx, edi
.text:004DCD10 mov dword_926EAC, ebx
.text:004DCD16 mov dword_926EA8, ebx
.text:004DCD1C call sub_4C2850 ; Call Procedure
.text:004DCD21 mov dword ptr [edi+38E94h], 1
.text:004DCD2B cmp byte_98452C, bl ; Compare Two Operands
.text:004DCD31 jz loc_4DCDE6 ; Jump if Zero (ZF=1)
.text:004DCD37 mov ecx, dword_907F0C
.text:004DCD3D push ebx
.text:004DCD3E push 3043h
.text:004DCD43 mov byte_98452C, bl
.text:004DCD49 call sub_6138B0 ; Call Procedure
.text:004DCD4E push 1 ; char
.text:004DCD50 push 111h ; int
.text:004DCD55 push eax ; char *
.text:004DCD56 mov ecx, edi
.text:004DCD58 call sub_4C5160 ; Call Procedure
.text:004DCD5D mov eax, dword_907F54
.text:004DCD62 mov edx, [eax+8]
.text:004DCD65 mov ecx, [edx+4]
.text:004DCD68 lea eax, [ecx+eax+8] ; Load Effective Address
.text:004DCD6C lea ecx, [eax+4] ; Load Effective Address
.text:004DCD6F call sub_61DF20 ; Call Procedure
.text:004DCD74 cmp dword ptr [eax+1304h], 0Ah ; Compare Two Operands
.text:004DCD7B jg short loc_4DCD96 ; Jump if Greater (ZF=0 & SF=OF)
.text:004DCD7D mov ecx, dword_907F0C
.text:004DCD83 push ebx
.text:004DCD84 push 213Ah
.text:004DCD89 call sub_6138B0 ; Call Procedure
.text:004DCD8E push eax ; char *
.text:004DCD8F mov ecx, edi
.text:004DCD91 call sub_4C5310 ; Call Procedure
.text:004DCD96
.text:004DCD96 loc_4DCD96: ; CODE XREF: sub_4DC610+76Bj
.text:004DCD96 mov ecx, dword_907F54
.text:004DCD9C add ecx, 0EEF8h ; Add
.text:004DCDA2 xor esi, esi ; Logical Exclusive OR
.text:004DCDA4 call sub_41C4D0 ; Call Procedure
.text:004DCDA9 test al, al ; Logical Compare
.text:004DCDAB jbe short loc_4DCDE6 ; Jump if Below or Equal (CF=1 | ZF=1)
.text:004DCDAD db 8Dh,49h,0 ; <BAD>lea ecx, [ecx+0] ; Load Effective Address
.text:004DCDB0
.text:004DCDB0 loc_4DCDB0: ; CODE XREF: sub_4DC610+7D4j
.text:004DCDB0 mov ecx, dword_907F54
.text:004DCDB6 push esi
.text:004DCDB7 add ecx, 0EEF8h ; Add
.text:004DCDBD call sub_41DA40 ; Call Procedure
.text:004DCDC2 cmp [eax], bl ; Compare Two Operands
.text:004DCDC4 jz short loc_4DCDCD ; Jump if Zero (ZF=1)
.text:004DCDC6 mov byte_925E8C, 1
.text:004DCDCD
.text:004DCDCD loc_4DCDCD: ; CODE XREF: sub_4DC610+7B4j
.text:004DCDCD mov ecx, dword_907F54
.text:004DCDD3 add ecx, 0EEF8h ; Add
.text:004DCDD9 inc esi ; Increment by 1
.text:004DCDDA call sub_41C4D0 ; Call Procedure
.text:004DCDDF movzx edx, al ; Move with Zero-Extend
.text:004DCDE2 cmp esi, edx ; Compare Two Operands
.text:004DCDE4 jl short loc_4DCDB0 ; Jump if Less (SF!=OF)
.text:004DCDE6
.text:004DCDE6 loc_4DCDE6: ; CODE XREF: sub_4DC610+721j
.text:004DCDE6 ; sub_4DC610+79Bj
.text:004DCDE6 push ebx ; int
.text:004DCDE7 push ebx ; int
.text:004DCDE8 push ebx ; int
.text:004DCDE9 push ebx ; int
.text:004DCDEA push ebx ; int
.text:004DCDEB push ebx ; int
.text:004DCDEC push ebx ; int
.text:004DCDED push ebx ; int
.text:004DCDEE push offset byte_925F9C ; int
.text:004DCDF3 lea eax, [esp+104h] ; Load Effective Address
.text:004DCDFA push 3045h ; int
.text:004DCDFF push eax ; char *
.text:004DCE00 call sub_4A3080 ; Call Procedure
.text:004DCE05 add esp, 2Ch ; Add
.text:004DCE08 push 1 ; char
.text:004DCE0A push 111h ; int
.text:004DCE0F lea ecx, [esp+0E8h] ; Load Effective Address
.text:004DCE16 push ecx ; char *
.text:004DCE17 mov ecx, edi
.text:004DCE19 call sub_4C5160 ; Call Procedure
.text:004DCE1E call sub_4EA590 ; Call Procedure
.text:004DCE23 mov ecx, eax
.text:004DCE25 call sub_4EA5C0 ; Call Procedure
.text:004DCE2A cmp dword_926328, 4 ; Compare Two Operands
.text:004DCE31 jnz short loc_4DCE92 ; Jump if Not Zero (ZF=0)
.text:004DCE33 mov eax, dword_907F54
.text:004DCE38 mov edx, [eax+8]
.text:004DCE3B mov ecx, [edx+4]
.text:004DCE3E lea eax, [ecx+eax+8] ; Load Effective Address
.text:004DCE42 lea ecx, [eax+4] ; Load Effective Address
.text:004DCE45 call sub_61DF20 ; Call Procedure
.text:004DCE4A cmp dword ptr [eax+1304h], 6 ; Compare Two Operands
.text:004DCE51 jge short loc_4DCE92 ; Jump if Greater or Equal (SF=OF)
.text:004DCE53 mov eax, dword_907F54
.text:004DCE58 mov edx, [eax+8]
.text:004DCE5B mov ecx, [edx+4]
.text:004DCE5E mov eax, [ecx+eax+108h]
.text:004DCE65 mov ecx, dword_907F34
.text:004DCE6B push eax
.text:004DCE6C call sub_62A060 ; Call Procedure
.text:004DCE71 test al, al ; Logical Compare
.text:004DCE73 jnz short loc_4DCE92 ; Jump if Not Zero (ZF=0)
.text:004DCE75 mov ecx, dword_907F0C
.text:004DCE7B push 1 ; char
.text:004DCE7D push 0Dh ; int
.text:004DCE7F push ebx
.text:004DCE80 push 3046h
.text:004DCE85 call sub_6138B0 ; Call Procedure
.text:004DCE8A push eax ; char *
.text:004DCE8B mov ecx, edi
.text:004DCE8D call sub_4C5160 ; Call Procedure
.text:004DCE92
.text:004DCE92 loc_4DCE92: ; CODE XREF: sub_4DC610+821j
.text:004DCE92 ; sub_4DC610+841j ...
.text:004DCE92 mov al, byte ptr word_92636C
.text:004DCE97 cmp al, 7Eh ; Compare Two Operands
.text:004DCE99 jz short loc_4DCED4 ; Jump if Zero (ZF=1)
.text:004DCE9B cmp al, bl ; Compare Two Operands
.text:004DCE9D jz short loc_4DCED4 ; Jump if Zero (ZF=1)
.text:004DCE9F push ebx ; int
.text:004DCEA0 push ebx ; int
.text:004DCEA1 push ebx ; int
.text:004DCEA2 push ebx ; int
.text:004DCEA3 push ebx ; int
.text:004DCEA4 push ebx ; int
.text:004DCEA5 push ebx ; int
.text:004DCEA6 push ebx ; int
.text:004DCEA7 push offset word_92636C ; int
.text:004DCEAC lea edx, [esp+104h] ; Load Effective Address
.text:004DCEB3 push 3047h ; int
.text:004DCEB8 push edx ; char *
.text:004DCEB9 call sub_4A3080 ; Call Procedure
.text:004DCEBE add esp, 2Ch ; Add
.text:004DCEC1 push 1 ; char
.text:004DCEC3 push 0Fh ; int
.text:004DCEC5 lea eax, [esp+0E8h] ; Load Effective Address
.text:004DCECC push eax ; char *
.text:004DCECD mov ecx, edi
.text:004DCECF call sub_4C5160 ; Call Procedure
.text:004DCED4
.text:004DCED4 loc_4DCED4: ; CODE XREF: sub_4DC610+889j
.text:004DCED4 ; sub_4DC610+88Dj
.text:004DCED4 mov ecx, offset unk_761D50
.text:004DCED9 mov byte ptr word_92636C, 7Eh
.text:004DCEE0 call sub_453C10 ; Call Procedure
.text:004DCEE5 mov ecx, dword_996AB4
.text:004DCEEB cmp ecx, ebx ; Compare Two Operands
.text:004DCEED jz short loc_4DCEF4 ; Jump if Zero (ZF=1)
.text:004DCEEF call sub_5E8870 ; Call Procedure
.text:004DCEF4
.text:004DCEF4 loc_4DCEF4: ; CODE XREF: sub_4DC610+8DDj
.text:004DCEF4 push offset aDomainloopJu_2 ; "DoMainLoop: just before second while(!R"...
.text:004DCEF9 call sub_645680 ; Call Procedure
.text:004DCEFE add esp, 4 ; Add
.text:004DCF01 call sub_4EC1F0 ; Call Procedure
.text:004DCF06 mov esi, eax
.text:004DCF08 cmp [esi+20h], bl ; Compare Two Operands
.text:004DCF0B jnz short loc_4DCF14 ; Jump if Not Zero (ZF=0)
.text:004DCF0D mov ecx, esi
.text:004DCF0F call sub_4EBE60 ; Call Procedure
.text:004DCF14
.text:004DCF14 loc_4DCF14: ; CODE XREF: sub_4DC610+8FBj
.text:004DCF14 mov byte ptr [esi+20h], 1
.text:004DCF18 mov ecx, dword_9A1CB4
.text:004DCF1E push 1
.text:004DCF20 dec ecx ; Decrement by 1
.text:004DCF21 push ebx
.text:004DCF22 mov dword_9A1CB4, ecx
.text:004DCF28 mov ecx, dword_761C68
.text:004DCF2E push 3703h
.text:004DCF33 call sub_637360 ; Call Procedure
.text:004DCF38 push eax
.text:004DCF39 push offset dword_907EF0
.text:004DCF3E push ebx
.text:004DCF3F push ebx ; char
.text:004DCF40 call sub_4BB750 ; Call Procedure
.text:004DCF45 dec dword_907F60 ; Decrement by 1
.text:004DCF4B call sub_4A2CF0 ; Call Procedure
.text:004DCF50 push offset aZoneConnectSen ; "Zone Connect -- Sending out a MSG_READY"...
.text:004DCF55 call sub_645680 ; Call Procedure
.text:004DCF5A mov eax, dword_925C80
.text:004DCF5F add esp, 18h ; Add
.text:004DCF62 cmp eax, ebx ; Compare Two Operands
.text:004DCF64 jnz short loc_4DCFAA ; Jump if Not Zero (ZF=0)
And, from client_packet.cpp, here is the code that handles that opcode:
Code:
void Client::Handle_Connect_OP_SendExpZonein(const EQApplicationPacket *app)
{
//////////////////////////////////////////////////////
// Spawn Appearance Packet
EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
SpawnAppearance_Struct* sa = (SpawnAppearance_Struct*)outapp->pBuffer;
sa->type = AT_SpawnID; // Is 0x10 used to set the player id?
sa->parameter = GetID(); // Four bytes for this parameter...
outapp->priority = 6;
QueuePacket(outapp);
safe_delete(outapp);
// Inform the world about the client
outapp = new EQApplicationPacket();
CreateSpawnPacket(outapp);
outapp->priority = 6;
if (!GetHideMe()) entity_list.QueueClients(this, outapp, true);
safe_delete(outapp);
if(GetPVP()) //force a PVP update until we fix the spawn struct
SendAppearancePacket(AT_PVP, GetPVP(), true, false);
//Send AA Exp packet:
if(GetLevel() >= 51)
SendAAStats();
// Send exp packets
outapp = new EQApplicationPacket(OP_ExpUpdate, sizeof(ExpUpdate_Struct));
ExpUpdate_Struct* eu = (ExpUpdate_Struct*)outapp->pBuffer;
int32 tmpxp1 = GetEXPForLevel(GetLevel()+1);
int32 tmpxp2 = GetEXPForLevel(GetLevel());
// Quag: crash bug fix... Divide by zero when tmpxp1 and 2 equalled each other, most likely the error case from GetEXPForLevel() (invalid class, etc)
if (tmpxp1 != tmpxp2 && tmpxp1 != 0xFFFFFFFF && tmpxp2 != 0xFFFFFFFF) {
float tmpxp = (float) ( (float) m_pp.exp-tmpxp2 ) / ( (float) tmpxp1-tmpxp2 );
eu->exp = (uint32)(330.0f * tmpxp);
outapp->priority = 6;
QueuePacket(outapp);
}
safe_delete(outapp);
if(GetLevel() >= 51)
SendAATimers();
outapp = new EQApplicationPacket(OP_SendExpZonein, 0);
QueuePacket(outapp);
safe_delete(outapp);
outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(ZoneInSendName_Struct));
ZoneInSendName_Struct* zonesendname=(ZoneInSendName_Struct*)outapp->pBuffer;
strcpy(zonesendname->name,m_pp.name);
strcpy(zonesendname->name2,m_pp.name);
zonesendname->unknown0=0x0A;
QueuePacket(outapp);
safe_delete(outapp);
/* this is actually the guild MOTD
outapp = new EQApplicationPacket(OP_ZoneInSendName2, sizeof(ZoneInSendName_Struct2));
ZoneInSendName_Struct2* zonesendname2=(ZoneInSendName_Struct2*)outapp->pBuffer;
strcpy(zonesendname2->name,m_pp.name);
QueuePacket(outapp);
safe_delete(outapp);*/
if(IsInAGuild()) {
SendGuildMembers();
}
//No idea why live sends this if even were not in a guild
SendGuildMOTD();
return;
}
So, either the opcode needs to be encoded, or this handling code needs to be changed. I am guessing the opcode needs to be encoded, because the jump is looking for anything that isn't 0, so I would think that it is just making sure it got something for it. And, if it isn't encoded and is supposed to be, maybe it shows up as 0. But, if it doesn't need to be encoded, I don't know why it would be 0.
I will mess with it and see if I can figure out how to get that opcode encoded, but I don't really know how that will work, since the only opcodes I see currently getting encoded already have structures tied to them, but I don't see one for SendExpZonein. Unless maybe it is named differently.
At least I know where it is failing now, so I should be able to come up with something to move it to the next step. It should be getting pretty close now. I was able to find and verify more of the required opcodes for logging in over the past couple of days as well. Making some progress at least 
|
 |
|
 |
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:54 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |