mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
svn -> git Migration
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#! /usr/bin/perl -W
|
||||
|
||||
#reads the output of `objdump -D eqgame.exe` from stdin
|
||||
#reads eqstr_us.txt from .
|
||||
|
||||
open(F, "<eqstr_us.txt") or die("Unable to open ./eqstr_us.txt\n");
|
||||
%strs = ();
|
||||
while(<F>) {
|
||||
s/\r?\n//g;
|
||||
next unless(/^([0-9]+)\s+(.+)$/);
|
||||
$strs{$1} = $2;
|
||||
}
|
||||
close(F);
|
||||
|
||||
while(<STDIN>) {
|
||||
if (/push\s+(.*)/) {
|
||||
push(@stack,$1);
|
||||
shift @stack if ($#stack>4);
|
||||
}
|
||||
#address of DisplayStringID
|
||||
if (/ ([0-9a-f]+):.*call 0x5DFA00/i) {
|
||||
my $loc = $1;
|
||||
if($stack[$#stack] =~ /(0x[0-9a-fA-F]+)/) {
|
||||
my $sid = hex($1);
|
||||
if(defined($strs{$sid})) {
|
||||
printf("%s Sends %s\n",$loc,$strs{$sid});
|
||||
} else {
|
||||
printf("%s Sends %s\n",$loc,"UNDEFINED STRING");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
print "#include \"idc.idc\"\n\nstatic main() {\n";
|
||||
|
||||
print "\tauto id;\n";
|
||||
print "\tDelEnum(GetEnum(\"EQOpcode\"));\n";
|
||||
print "\tid = AddEnum(GetEnumQty(), \"EQOpcode\", 0);\n";
|
||||
|
||||
while(<>) {
|
||||
next unless(/^(OP_[^= \t]+)=(0x[0-9a-fA-F]+)/);
|
||||
next if($2 eq "0x0000" || hex($2) == 0);
|
||||
printf("\tAddConstEx(id, \"$1\", $2, -1);\n");
|
||||
}
|
||||
|
||||
print "}\n\n";
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
do $ARGV[0];
|
||||
|
||||
print "#include \"idc.idc\"\n\nstatic main() {\n";
|
||||
|
||||
foreach my $sig(@signatures) {
|
||||
my $off = $sig->{offset} + 0x00400000;
|
||||
my $name = $sig->{name};
|
||||
my $op = $sig->{opcode};
|
||||
printf("MakeName(0x%x, \"${name}_0x%x\");\n", $off, $op);
|
||||
}
|
||||
|
||||
print "}\n\n";
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#reads the output of locate_stringids.pl from stdin
|
||||
#produces a .IDC file on stdout which we can feed to IDA
|
||||
|
||||
print "#include \"idc.idc\"\n\nstatic main() {\n";
|
||||
|
||||
while(<>) {
|
||||
s/\r?\n//g;
|
||||
next unless(/^([0-9a-fA-F]+) Sends (.*)/);
|
||||
next if(hex($1) == 0);
|
||||
my $off = hex($1);
|
||||
my $str = substr($2, 0, 200);
|
||||
$str =~ s/"/\\"/g;
|
||||
printf("\tMakeComm($off, \"$str\");\n");
|
||||
}
|
||||
|
||||
print "}\n\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user