Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Update signature
Browse files Browse the repository at this point in the history
  • Loading branch information
namazso committed Aug 18, 2017
1 parent 8c6a38c commit 2e2f726
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nSkinz/src/KitParser.cpp
Expand Up @@ -156,13 +156,13 @@ void InitializeKits()

// Dump sticker kits
{
auto sticker_sig = platform::FindPattern("client.dll", "\x8D\x48\x04\xE8\x00\x00\x00\x00\x89\x45\xF8\xE8", "xxxx????xxxx");
auto sticker_sig = platform::FindPattern("client.dll", "\x53\x8D\x48\x04\xE8\x00\x00\x00\x00\x8B\x4D\x10", "xxxxx????xxx") + 4;

// Skip the instructions between, skip the opcode, read rel32 address
auto get_sticker_kit_definition_offset = *reinterpret_cast<intptr_t*>(sticker_sig + 3 + 1);
// Skip the opcode, read rel32 address
auto get_sticker_kit_definition_offset = *reinterpret_cast<intptr_t*>(sticker_sig + 1);

// Add the offset to the end of the instruction
auto get_sticker_kit_definition_fn = reinterpret_cast<CPaintKit* (__thiscall *)(CCStrike15ItemSchema*, int)>(sticker_sig + 3 + 5 + get_sticker_kit_definition_offset);
auto get_sticker_kit_definition_fn = reinterpret_cast<CPaintKit* (__thiscall *)(CCStrike15ItemSchema*, int)>(sticker_sig + 5 + get_sticker_kit_definition_offset);

// The last offset is head_element, we need that

Expand Down

0 comments on commit 2e2f726

Please sign in to comment.