samp-re/rangelist_deserialize.c

52 lines
891 B
C
Raw Normal View History

2020-04-05 16:19:05 +02:00
/* vim: set filetype=c ts=8 noexpandtab: */
#include "common.h"
#include "rangelist_deserialize.h"
#include "bitstream.h"
static
__declspec(naked)
int __stdcall RangeList__Deserialize(
struct CRangeList *this,
struct CBitStream *bitStream)
{
_asm {
pop eax
pop ecx
push eax
mov eax, 0x45E2D0
jmp eax
}
}
int __stdcall RangeList__Deserialize_hooked(struct CBitStream *bitStream)
{
struct CRangleList *this;
short result;
char confusingVar;
int value, valueshr3;
_asm mov this, ecx
thiscall0((void*) 0x45D820, this);
thiscall3((void*) 0x44DB30, bitStream, (int) &result, 0x10, 1);
if (result == 0) {
return 1;
}
confusingVar = *((char*) bitStream); // ??
if (bitStream->readOffset + 1 <= bitStream->numberOfBitsUsed) {
value = (int) bitStream->ptrData;
valueshr3 = value >> 3;
value &= 0x8000007;
if (value & 0x80000000) {
}
}
return 0;
}