Parsi Coders
[DELPHI]Anti JoeBox, CwSandbox, Anubis - Printable Version

+- Parsi Coders (http://parsicoders.com)
+-- Forum: Cracking / Anti Crack (http://parsicoders.com/forumdisplay.php?fid=75)
+--- Forum: Anti Debug (http://parsicoders.com/forumdisplay.php?fid=76)
+---- Forum: Delphi (http://parsicoders.com/forumdisplay.php?fid=81)
+---- Thread: [DELPHI]Anti JoeBox, CwSandbox, Anubis (/showthread.php?tid=1076)



[DELPHI]Anti JoeBox, CwSandbox, Anubis - Amin_Mansouri - 10-16-2011

Code:
function IsInSandbox(Serial: string):boolean;
var
  hOpen:    HKEY;
  sBuff:    array[0..256] of char;
  BuffSize: integer;
begin
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar('Software\Microsoft\Windows\CurrentVersion'), 0, KEY_QUERY_VALUE, hOpen)) = ERROR_SUCCESS then begin
    BuffSize := SizeOf(sBuff);
    RegQueryValueEx(hOpen, PChar('ProductId'), nil, nil, @sBuff, @BuffSize);
    if sBuff = Serial then  Result := True;

    RegCloseKey(hOpen);
  end;
end;