Not at all:
Delphi-Quellcode:
function StrSearch(mem: pbyte;text: pchar; size: DWORD):Boolean;
var
pchL: pbyte;
offset: DWORD;
length: DWORD;
iMax: integer;
begin
pchL := mem;
offset := DWORD(pchL);
length := offset + size;
iMax := lstrlen(text);
while offset < length do
begin
if StrLIComp(PChar(pchL),PChar(text),iMax)=0 then
begin
result:= true; // Here you set Result := True
Break; // .. and then jump out of the loop ...
end;
inc(offset);
inc(pchL);
end;
// ... to here!
result:= false; // and set Result := False
end;
So your function will always return false.
Replace "break" by "exit" and it should work.