Onaylı Üye
C++:
#include <Windows.h>
#include <iostream>
#include <string>
using namespace std;
HANDLE hProc = NULL;
#define KO_PTR_CHR 0x00E61920
#define KO_PTR_DLG 0x00E47878
#define KO_FLDB KO_PTR_CHR - 0x4
#define KO_OFF_MOB 0x644
#define KO_OFF_ID 0x680
#define KO_OFF_NATION 0x6A8
#define KO_OFF_NAME_LEN 0x698
#define KO_OFF_NAME 0x688
DWORD KO_ADR_CHR = 0x0;
DWORD KO_ADR_DLG = 0x0;
DWORD Read4Bytes(DWORD paddy) {
int ret;
ReadProcessMemory(hProc, (LPVOID)paddy, &ret, 4, 0);
return (DWORD)ret;
}
void GetEntitiyList() {
while (hProc == NULL) hProc = GetCurrentProcess();
while (true) {
if (KO_ADR_CHR == 0x0 || KO_ADR_DLG == 0x0) {
KO_ADR_CHR = Read4Bytes(KO_PTR_CHR);
KO_ADR_DLG = Read4Bytes(KO_PTR_DLG);
}
DWORD EBP, ESI, EAX, FEnd, Tick, base_addr, namelen, mobid;
string name;
EBP = Read4Bytes(Read4Bytes(KO_FLDB) + 0x34);
FEnd = Read4Bytes(Read4Bytes(EBP + 4) + 4);
ESI = Read4Bytes(EBP);
Tick = GetTickCount();
do {
base_addr = Read4Bytes(ESI + 0x10);
if (base_addr == 0) continue;
mobid = Read4Bytes(base_addr + KO_OFF_ID);
namelen = Read4Bytes(base_addr + KO_OFF_NAME_LEN);
EAX = Read4Bytes(ESI + 8);
if (Read4Bytes(ESI + 8) != FEnd) {
do {
EAX = Read4Bytes(EAX);
} while (Read4Bytes(EAX) != FEnd && GetTickCount() - Tick < 150);
ESI = EAX;
}
else {
EAX = Read4Bytes(ESI + 4);
do {
ESI = EAX;
EAX = Read4Bytes(EAX + 4);
} while (ESI = Read4Bytes(EAX + 8) && GetTickCount() - Tick < 150);
if (Read4Bytes(ESI + 8) != EAX) ESI = EAX;
}
} while (ESI != EBP && GetTickCount() - Tick < 150);
WriteProcessMemory(hProc, (LPVOID)(KO_ADR_CHR + KO_OFF_MOB), &mobid, 4, 0);
}
}