- Статус
- Оффлайн
- Регистрация
- 13 Май 2017
- Сообщения
- 121
- Реакции
- 25
trying to write x64 injector for x32 game
all struct contains 32 postfix
loader code part:
this shit crashes game
maybe this is due to the different sizes of the pointer?
all struct contains 32 postfix
loader code part:
C++:
while (pIBR->VirtualAddress)
{
if (pIBR->SizeOfBlock >= sizeof(IMAGE_BASE_RELOCATION))
{
int count = (pIBR->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(WORD);
PWORD list = (PWORD)(pIBR + 1);
for (int i = 0; i < count; i++)
{
if (list[i])
{
PDWORD ptr = (PDWORD)((LPBYTE)LoaderParams->ImageBase + (pIBR->VirtualAddress + (list[i] & 0xFFF)));
*ptr += delta;
}
}
}
pIBR = (PIMAGE_BASE_RELOCATION)((LPBYTE)pIBR + pIBR->SizeOfBlock);
}
maybe this is due to the different sizes of the pointer?