Показать сообщение отдельно
Старый 30.01.2011, 22:09   #11
Местный
 
Аватар для supernewbie
 
Регистрация: 23.09.2009
Сообщений: 1,232
Сказал Спасибо: 119
Имеет 172 спасибок в 134 сообщенях
supernewbie пока неопределено
По умолчанию

ммм, сделал вот так пока что...

delphi Код:
procedure SendPacketHook(np:TSendPacket); stdcall; var   p:pointer;   data:array of pointer;   i,j:integer;   s:string; begin try SetLength(data,length(np.size)); s:=''; for i:=0 to length(np.size)-1 do begin asm pop eax mov p, eax end; data[(length(np.size)-1)-i]:=p; j:=-1; if np.size[(length(np.size)-1)-i]='c' then j:=0; if np.size[(length(np.size)-1)-i]='h' then j:=1; if np.size[(length(np.size)-1)-i]='d' then j:=2; if np.size[(length(np.size)-1)-i]='f' then j:=3; if np.size[(length(np.size)-1)-i]='s' then j:=4; if np.size[(length(np.size)-1)-i]='b' then j:=5; if np.size[(length(np.size)-1)-i]='q' then j:=6; case j of 0: s:=inttostr(byte(p^))+'; '+s; 1: s:=inttostr(word(p^))+'; '+s; 2: s:=inttostr(dword(p^))+'; '+s; 3: s:=floattostr(double(p^))+'; '+s; 4: s:=pchar(p)+'; '+s; 5: s:=inttostr(int64(p^))+'; '+s; 6: s:=inttostr(Int64(p^))+'; '+s;    end;

надо разобратся что такое b

блин не, эт не работает... нука попробую через дестроевский способ..

Добавлено через 20 минут
о, а дестроевский робит)

Добавлено через 8 минут
delphi Код:
procedure SendPacketHook(np:TSendPacket); stdcall; var   p:pointer;   data:array of pointer;   i:integer; begin try SetLength(data,length(np.size)); p:=@np; p:=Pointer(Cardinal(p)+$0C); data[0]:=@np.id; for i:=1 to length(np.size) do begin data[i]:=p; p:=pointer(Cardinal(p)+4); end; messagebox(0,PChar(inttohex(np.id,2)+'; '+np.size),'FromClient',0); except messagebox(0,PChar('error'),'FromClient',0); end; end;

вот короче как-то так

Добавлено через 26 минут
delphi Код:
if length(data)>1 then for i:=length(data)-1 downto 1 do asm push data[i] end; asm push data[0] push np.size push np.unknown jmp SendPacketOrig end;

блин, опять херня какая-то(
__________________
Начало.

Последний раз редактировалось supernewbie, 30.01.2011 в 22:09. Причина: Добавлено сообщение
supernewbie вне форума   Ответить с цитированием