~ snipped to reduce clutter ~
The account list inside of PlayOnline is hard-coded to a maximum of 20 slots. It's limited to only showing 4 of those slots currently due to a feature flag inside of polcore.dll not being set. The patch you guys are doing is not really recommended since you are allowing the client to exceed the 20 slot maximum which can lead to account file corruption. If you go beyond 20 slots you will crash PlayOnline and potentially lose your currently saved account info.
Here are two alternative methods of enabling this in a safer/more proper manner:
1. Edit Flag Value In polcore.dll Memory
This feature is controlled by a flag inside of polcore.dll, there are two functions within polcore that are exposed via its main command table that allow you to get/set this flag value. Instead of patching the check within app.dll, you can instead just set the flag to enabled within polcore's memory, leaving PlayOnline to be able to properly limit itself to 20 accounts and avoid the buffer overrun.
For the current versions of PlayOnline, the flag is at this offset:
- polcore.dll + AA83C
The value is a uint32_t (4 bytes) just set it to 1 and it will be enabled. This offset is the same for all 3 versions of POL. (NA, JP, EU)
--
2. Call Proper polcore.dll Function To Enable Feature
The more proper way to deal with this would be to actually call the function inside of 'polcore.dll' that is used to set the flag. To do this, you first need to get the main polcore command function table which is generally exposed through its COM interface. You can either do all the COM hassle to pull the interface instance and call the method to get the command function table, or you can just pull it via the following signature:
- Pattern: 8B442408C700????????33C0C20800
- Offset: +6
This will be the pointer to the command table. It is just a simple array of function pointers. The function of interest for this feature is at offsets 1074 and 1075.
- Offset: 1074 - Get Flag
- Offset: 1075 - Set Flag
The prototypes for these are just:
- get: int32_t __cdecl get_flag(void);
- set: int32_t __cdecl set_flag(int32_t val);
Cast the given pointers in the command table to the proper prototype and call as needed.
For those using Ashita v4, I've released a new polplugin named extraslots for this under our current beta branch. It'll be fully released in the near future.