CIOStream:
* Use flag based system instead (common flags are aliased; uses std::ios_base::openmode).
* 'ReadString' now writes into a string buffer (reference) that needs to be passed in by programmer (avoids copy).
* 'm_nSize' is now synced with any write operations.
CSigCache:
* Fixed bug causing crash when 'DecompressBlob' failed (results were never checked).
* Light formatting improvements.
* Added 'GetImportedFunction'.
* Remove extraneous std::string copy constructors during construction of 'm_vModuleSections'.
* Added extra constructor using base address.
Unregister gamesdk's crash handler if -noworkerdll is passed. This is required as both crashhandlers will be called during an exception, and on one, the whitelist wouldn't work.
Setting 'sv_showhitboxes' to 0 will enable it on everything deriving from CBaseAnimating, and having a valid studiohdr/hitbox. -1 means off, value > 0 will select entity by index (value of 'sv_showhitbox').
Field 'm_bInitialized' should be set prior to calling this, this field was named differently and its use case was inverted, forgot to reflect changes in assert.
This is required as otherwise the game's exception filter will be called after ours. If we didn't handle the exception, the game's implementation, or an exception handler associated to the exception raised by address will take care of it. Unlike the game's implementation, our exception handler does not handle unknown exceptions. We only do the low level stuff reliably.
* Only handle exceptions we could handle (anything that isn't in the switch case is not getting handled).
* Only show hexadecimal representation of decimal integer if could contain hexadecimal digits.
Properly format negative numbers too. The function now checks if any of the 4 values in the SSE register are above or below one million before displaying in hexadecimal. Prior to this commit, the value was unsigned leading to negative numbers bellow one million being displayed as very high in hexadecimal.
Programmer could add and remove whitelisted addresses. If an exception occurs, the system checks the callstack up to 'MAX_IMI_SEARCH' frames (defined in CCrashHandler), and returns true if found (returning early with 'EXCEPTION_CONTINUE_SEARCH' so we use whatever exception handler is set for this particular case), false otherwise.
* CCrashHandler now calls the crashmsg executable to display the error to the user.
* Logs are now placed into directories named to the current time to avoid overwriting them or having 2 instances of the game writing to the same logs.
* Only gets compiled in for release builds.
* Attaches on gamesdk init, so should catch everything on dll setup also.
* Fake PDB parsing still needs to be done.
* THIS IS NOT SUPPOSED TO BE USED WITH SHIPPING CODE!
* This is used for a quick way to call virtual functions for reverse engineering and rebuilding big functions, upon successful rebuild, implement needed VTables accordingly.
In Respawn's engine, the '-forceborder' command line parameter does the same thing as '-noborder'. '-forceborder' should remove the flags (nand) while '-noborder' should append the borderless flag. This code is an attempt to mitigate the problem. There was not enough bytes to assemble the nand operation for this code path without involving code caves or shifting.