Skip to content

Commit

Permalink
Update wiz_packet.h
Browse files Browse the repository at this point in the history
  • Loading branch information
xGladius committed Nov 21, 2020
1 parent 8891990 commit 222c735
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions wiz_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,6 @@ inline uintptr_t rebase(const uintptr_t adr)
return reinterpret_cast<uintptr_t>(GetModuleHandleA(nullptr)) + adr - 0x400000;
}

typedef void(__fastcall* o_setkey)(uintptr_t _this, int extra, byte* key, unsigned int length, uintptr_t params);
o_setkey orig_setkey;

void __fastcall setkey_hook(uintptr_t _this, int extra, byte* key, unsigned int length, uintptr_t params)
{
printf("key:\n");
for (auto i = 0; i < length; i++)
printf("%02x ", key[i]);
printf("\n");
system("pause");
return orig_setkey(_this, extra, key, length, params);
}

typedef void(__fastcall* o_setiv)(uintptr_t _this, int extra, byte* iv, unsigned int length);
o_setiv orig_setiv;

void __fastcall setiv_hook(uintptr_t _this, int extra, byte* iv, unsigned int length)
{
printf("iv:\n");
for (auto i = 0; i < length; i++)
printf("%02x ", iv[i]);
printf("\n");
system("pause");
return orig_setiv(_this, extra, iv, length);
}

enum class packet_mode
{
none,
Expand Down Expand Up @@ -267,4 +241,4 @@ void __fastcall ProcessData_hook(uintptr_t _this, int extra, byte* outString, by
handle_packet(set_iv.first, set_iv.second);
set_iv.first.clear();
set_iv.second = packet_mode::none;
}
}

0 comments on commit 222c735

Please sign in to comment.