for (int i=1;i<=48771;i++)
{
ReadProcessMemory(GetCurrentProcess(),(LPVOID)startaddr,&addressbyte,1,NULL);
if (addressbyte[0]==0xA9)
{
addrlist[addrcount]=startaddr;
addrcount++;
}
startaddr=startaddr+0x10;
}
int addresscount=checkarrgy(addrlist);
for (int ii=0;ii<=addresscount-1;ii++)
{
ReadProcessMemory(GetCurrentProcess(),(LPVOID)addrlist[ii],&addressbyte,4,NULL);
if (addressbyte[0]==0xA9&&addressbyte[1]==0x8B&&addressbyte[2]==0x8c&&addressbyte[3]==0x00)
{
addressline=addrlist[ii];
return addressline;
break;