svn -> git Migration

This commit is contained in:
KimLS
2013-02-16 16:14:39 -08:00
parent 88c9715fb0
commit da7347f76f
1174 changed files with 445622 additions and 0 deletions
@@ -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";
+14
View File
@@ -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";