Skip to content

Instantly share code, notes, and snippets.

@up-n-atom
Last active February 9, 2023 06:21
Show Gist options
  • Select an option

  • Save up-n-atom/76059b436ebdcf7ec2a9cc61b3c4b64f to your computer and use it in GitHub Desktop.

Select an option

Save up-n-atom/76059b436ebdcf7ec2a9cc61b3c4b64f to your computer and use it in GitHub Desktop.
Yara Rules for WonderSwan LSI-C toolchain
rule font_load
{
strings:
$STR = { 51 52 56 57 1e 8e c2 8b d9 26 8b 77 ?? 03 f1 d1 e0 8b f8 8b bd ?? ?? 26 8b 4f ?? c1 e1 03 8e 06 ?? ?? 8e da (f3 a5 | a5 e2 fd ) 1f 5f 5e 5a 59 cb }
condition:
$STR
}
rule put_sprite
{
strings:
$STR = { 55 8b ec 56 c1 e0 02 03 06 ?? ?? 8b f0 8e 06 ?? ?? 26 88 4c 02 26 88 5c 03 81 e2 ff f1 8b 46 ?? 25 07 00 c1 e0 09 0b c2 26 88 04 26 88 64 01 5e 5d cb }
condition:
$STR
}
rule atexit
{
strings:
$STR = { 55 8b ec 83 ec 04 56 57 89 46 fc 89 5e fe 33 f6 eb 2f 8b fe d1 e7 d1 e7 8b 9d ?? ?? 8b 85 ?? ?? }
condition:
$STR
}
rule far_memset
{
strings:
$STR = { 51 57 50 8e c3 8b f8 8a c1 8b ca fc f3 aa 58 5f 59 (c3 | cb) }
condition:
$STR
}
rule memset
{
strings:
$STR = { 51 57 50 1e 07 8b f8 8a c3 fc f3 aa 58 5f 59 (c3 | cb) }
condition:
$STR
}
rule LMUL
{
strings:
$STR = { 52 50 f7 e2 93 f7 e1 03 d8 58 f7 e1 03 da 5a (c3 | cb) }
condition:
$STR
}
rule LDIVI
{
strings:
$STR = { 56 8b f2 33 f3 9c 85 db 9c 79 07 f7 d8 83 d3 00 f7 db 85 d2 79 07 f7 d9 83 d2 00 f7 da [3-5] 9d 79 07 f7 d9 83 d2 00 f7 da 9d 79 07 f7 d8 83 d3 00 f7 db 5e (c3 | cb) }
condition:
$STR
}
rule LDIVU
{
strings:
$STR = { 85 d2 75 0d 33 d2 93 f7 f1 93 f7 f1 8b ca 33 d2 (c3 | cb) }
condition:
$STR
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment