- Joined
- Feb 22, 2008
- Messages
- 2,404
- Reaction score
- 724
The way to use it is the same as this thread:
http://forum.ragezone.com/f399/extract-strings-aid-translation-728191/
The only difference is that this one has a GUI and for those that doesnt like too much of freeBasic (like me ) you can see how its done.
How the txt should look like: (strings.txt)
PS: As you can see, there are some 0x02 that I dont know what happened
Just the form1.cs:
(It should be ExtractStrings not ExtractStringas but you know... crap keyboard and was too lazy to change tt1: )
Full project:
How to use:
In Nome da seção: (Section name) you put the name of the .rdata section or whatever section you wanna to extract strings of, just look bob's previous thread.
In Offset Inicial:(Initial Offset) you just get the Virtual Offset in CFF Explorer, exactly bob did.
ALL THANKS TO BOBSOBOL FOR HIS SOURCE!
http://forum.ragezone.com/f399/extract-strings-aid-translation-728191/
The only difference is that this one has a GUI and for those that doesnt like too much of freeBasic (like me ) you can see how its done.
How the txt should look like: (strings.txt)
Code:
Sheen Strings Finder v1.0
----START
(useless pointers...)
0x10FAFB = "F_change01.bmp"
0x10FB0B = "BL_loding_04.bmp"
0x10FB1F = "BL_loding_03.bmp"
0x10FB33 = "BL_loding_02.bmp"
0x10FB47 = "BL_loding_01.bmp"
0x10FB5B = "BL_loding_00.bmp"
0x10FB6F = "BL_loding.bmp"
0x113D1F = "ruin-4"
0x113D27 = "ricarten\v-ani14.ASE"
0x113D3F = "ricarten\v-ani13.ASE"
0x113D57 = "ricarten\v-ani12.ASE"
0x113D6F = "ricarten\v-ani11.ASE"
0x113D87 = "ricarten\v-ani10.ASE"
0x113D9F = "ricarten\v-ani09.ASE"
0x113DB7 = "ricarten\v-ani08.ASE"
0x113DCF = "ricarten\v-ani07.ASE"
0x113DE7 = "ricarten\v-ani06.ASE"
0x113DFF = "ricarten\v-ani05.ASE"
0x113E17 = "ricarten\v-ani04.ASE"
0x113E2F = "ricarten\v-ani03.ASE"
0x113E47 = "ricarten\v-ani02.ASE"
0x113E5F = "ricarten\v-ani01.ASE"
0x113E77 = "ricarten\village-2.ase"
0x1236F3 = "%d-%d%s"
0x1236FB = "%d(+%d)-%d(+%d)\r"
0x12370F = "%d-%d+(LV/2)\r"
0x12371F = "%d-%d+(LV/3)\r"
0x12372F = "%d+(LV/9)\r"
0x12373B = "%d-%d(+LV/5)\r"
Just the form1.cs:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Threading;
namespace ExtractStringas
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static void Analyse(byte letter,BinaryWriter stream)
{
switch (letter)
{
case 27:
break;
case 7:
stream.Write("\\a");
break;
case 8:
stream.Write("\\b");
break;
case 12:
break;
case 10:
stream.Write("\\n");
break;
case 13:
stream.Write("\\r");
break;
case 9:
stream.Write("\\t");
break;
case 11:
stream.Write("\\b");
break;
default:
stream.Write((char)letter);
break;
}
}
void Find()
{
if (textBox2.Text.Length < 3 || textBox1.Text.Length < 3)
{
MessageBox.Show("Error!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
var address = int.Parse(textBox2.Text) - 1;
var section = textBox1.Text;
var read = new BinaryReader(new FileStream(section, FileMode.Open, FileAccess.Read));
var write = new BinaryWriter(new FileStream("strings.txt", FileMode.Create, FileAccess.Write));
var text = Encoding.ASCII.GetBytes("Sheen Strings Finder v1.0\r\n----START\r\n\r\n");
write.Write(text);
var letra = (byte)0;
while (read.BaseStream.Position < read.BaseStream.Length)
{
text = Encoding.ASCII.GetBytes("0x" + address.ToString("X2") + " = " + (char)0x22);
write.Write(text);
do
{
if (letra != 0)
{
Analyse(letra, write);
}
letra = read.ReadByte();
address++;
}
while (letra != 0 && (read.BaseStream.Position < read.BaseStream.Length));
write.Write((char)0x22);
text = Encoding.ASCII.GetBytes(Environment.NewLine);
write.Write(text);
do
{
letra = read.ReadByte();
address++;
}
while (letra == 0 && (read.BaseStream.Position < read.BaseStream.Length));
}
text = Encoding.ASCII.GetBytes("----END");
write.Write(text);
write.Close();
read.Close();
MessageBox.Show("Done!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void button1_Click(object sender, EventArgs e)
{
var t = new Thread(new ThreadStart(Find));
t.Start();
}
}
}
(It should be ExtractStrings not ExtractStringas but you know... crap keyboard and was too lazy to change tt1: )
Full project:
You must be registered to see links
How to use:
In Nome da seção: (Section name) you put the name of the .rdata section or whatever section you wanna to extract strings of, just look bob's previous thread.
In Offset Inicial:(Initial Offset) you just get the Virtual Offset in CFF Explorer, exactly bob did.
ALL THANKS TO BOBSOBOL FOR HIS SOURCE!