Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getContaingerName(contID : integer) : string; // purse iD = 16087
- var
- ptr, next , cid, container, offsetName: integer;
- found , lastNode : boolean;
- name : string;
- begin
- ptr := func.MemReadInteger($9EA13C);
- ptr := func.MemReadInteger(ptr + $08);
- next := func.MemReadInteger(ptr + $04);
- found := false;
- lastNode := false;
- while (not lastNode and not found) do
- begin
- cid := func.MemReadInteger(next + $0C);
- if (contID < cid) then
- next := func.MemReadInteger(next + $00)
- else if (contID > cid) then
- next := func.MemReadInteger(next + $08)
- else
- found := true;
- if (next = ptr) then
- lastNode := true;
- end;
- if (found) then
- begin
- container := func.MemReadInteger(next + $10);
- offsetName := $20;
- name := func.MemReadString(container + offsetName);
- result := name;
- end
- else
- result := 'Closed';
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement