Page 1 of 1

Wilcard Searching in LSS Script

PostPosted: Wed Apr 28, 2010 11:37 am
by kebinuchiousu
I was looking at the FF7 String search tutorial and wondering how it would be possible to search using a WildCard search.

I'm trying to look for a section of ASM code that changes every time the pcsx2.exe (PS2) emulator is rebooted.

Unfortunately the emulator uses dynamic recompilation in order to get an acceptable speed and the address of the ASM code changes.

The game I'm playing in the emulator .hack//Infection.

The string that I'm searching for is this..

\x0F\xBF\x01\x0F\xBF\xC0\x99\xA3????\x89\x15????\x8B\x15????\x8B\x0D????\x83\xC1\x74\x89\xC8\xC1\xE8\x0C\x8B\x04\x85????\xBB????\x01\xC1\x0F\x88????\x66\x89\x11\x8B\x0D????\x83\xC1\x26

If an example already exists, I was unable to find it.

Re: Wilcard Searching in LSS Script

PostPosted: Fri Apr 30, 2010 10:14 am
by L. Spiro
Why don’t you just search for \x0F\xBF\x01\x0F\xBF\xC0\x99\xA3????\x89\x15????\x8B\x15????\x8B\x0D????\x83\xC1\x74\x89\xC8\xC1\xE8\x0C\x8B\x04\x85????\xBB????\x01\xC1\x0F\x88????\x66\x89\x11\x8B\x0D????\x83\xC1\x26 using a Wildcard String Search?

Unless of course ???? is actually supposed to be ?.
Or maybe replacing ???? with * will get results.


L. Spiro

Re: Wilcard Searching in LSS Script

PostPosted: Fri Apr 30, 2010 11:04 am
by kebinuchiousu
L. Spiro,

Thank you for the quick reply.

The wildcard string search works, I was just wondering how I would perform such a search in your scripting language.

I can't seem to be able to find the parameters that would let me do it.

Thanks again for the help.

KebinuChiousu

Re: Wilcard Searching in LSS Script

PostPosted: Sat May 01, 2010 9:08 am
by L. Spiro
There is no way except manually.

You can find a routine that scans a wildcard string online easily.
Make a script function that does that and copy the routine.

Then use a Script Search to call your function during a scan.
You could alternatively use a Regular Expression, which can do everything a Wildcard can but you have to slightly reformat your string.
Again Regular Expression is not supported directly from RAMSearch() in the scripts, but you can set up a Script Search to use RegExMatch() so you don’t have to make the comparison routine manually.


L. Spiro

Re: Wilcard Searching in LSS Script

PostPosted: Sat May 01, 2010 9:55 am
by kebinuchiousu
L. Spiro,

Thank you, that answers my question.

KebinuChiousu