rule win_parallax_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.parallax."
        info = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator v0.6.0"
        signator_config = "callsandjumps;datarefs;binvalue"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.parallax"
        malpedia_rule_date = "20260916"
        malpedia_hash = "53a643781c18e08f4a50949af60172d837a0b6f6"
        malpedia_version = "20260917"
        malpedia_license = "CC BY-SA 4.0"
        malpedia_sharing = "TLP:WHITE"

    /* DISCLAIMER
     * The strings used in this rule have been automatically selected from the
     * disassembly of memory dumps and unpacked files, using YARA-Signator.
     * The code and documentation is published here:
     * https://github.com/fxb-cocacoding/yara-signator
     * As Malpedia is used as data source, please note that for a given
     * number of families, only single samples are documented.
     * This likely impacts the degree of generalization these rules will offer.
     * Take the described generation method also into consideration when you
     * apply the rules in your use cases and assign them confidence levels.
     */


    strings:
        $sequence_0 = { e8???????? 68???????? ff75f0 ff750c e8???????? 8b35???????? }
            // n = 6, score = 200
            //   e8????????           |                     
            //   68????????           |                     
            //   ff75f0               | push                dword ptr [ebp - 0x10]
            //   ff750c               | push                dword ptr [ebp + 0xc]
            //   e8????????           |                     
            //   8b35????????         |                     

        $sequence_1 = { 6a20 ff35???????? e8???????? 8b1d???????? 331d???????? 85db 7506 }
            // n = 7, score = 200
            //   6a20                 | push                0x20
            //   ff35????????         |                     
            //   e8????????           |                     
            //   8b1d????????         |                     
            //   331d????????         |                     
            //   85db                 | test                ebx, ebx
            //   7506                 | jne                 8

        $sequence_2 = { 8d35f4ec4000 8d3d04f14000 b908020000 f3a4 }
            // n = 4, score = 200
            //   8d35f4ec4000         | lea                 esi, [0x40ecf4]
            //   8d3d04f14000         | lea                 edi, [0x40f104]
            //   b908020000           | mov                 ecx, 0x208
            //   f3a4                 | rep movsb           byte ptr es:[edi], byte ptr [esi]

        $sequence_3 = { 837f04ff 740f 8b35???????? ff7704 ff9688010000 8d87ac000000 50 }
            // n = 7, score = 200
            //   837f04ff             | cmp                 dword ptr [edi + 4], -1
            //   740f                 | je                  0x11
            //   8b35????????         |                     
            //   ff7704               | push                dword ptr [edi + 4]
            //   ff9688010000         | call                dword ptr [esi + 0x188]
            //   8d87ac000000         | lea                 eax, [edi + 0xac]
            //   50                   | push                eax

        $sequence_4 = { 8b15???????? ff9284000000 3de5030000 7413 ff7508 }
            // n = 5, score = 200
            //   8b15????????         |                     
            //   ff9284000000         | call                dword ptr [edx + 0x84]
            //   3de5030000           | cmp                 eax, 0x3e5
            //   7413                 | je                  0x15
            //   ff7508               | push                dword ptr [ebp + 8]

        $sequence_5 = { 7534 682c010000 ff7508 ff96dc010000 6a00 ff35???????? ff9630010000 }
            // n = 7, score = 200
            //   7534                 | jne                 0x36
            //   682c010000           | push                0x12c
            //   ff7508               | push                dword ptr [ebp + 8]
            //   ff96dc010000         | call                dword ptr [esi + 0x1dc]
            //   6a00                 | push                0
            //   ff35????????         |                     
            //   ff9630010000         | call                dword ptr [esi + 0x130]

        $sequence_6 = { 6a00 ff9628010000 6a04 68???????? }
            // n = 4, score = 200
            //   6a00                 | push                0
            //   ff9628010000         | call                dword ptr [esi + 0x128]
            //   6a04                 | push                4
            //   68????????           |                     

        $sequence_7 = { e8???????? 8be5 5d c20400 8b35???????? 6a00 }
            // n = 6, score = 200
            //   e8????????           |                     
            //   8be5                 | mov                 esp, ebp
            //   5d                   | pop                 ebp
            //   c20400               | ret                 4
            //   8b35????????         |                     
            //   6a00                 | push                0

        $sequence_8 = { 8bec 83c4fc c745fc00000000 eb29 8b4dfc 51 e8???????? }
            // n = 7, score = 200
            //   8bec                 | mov                 ebp, esp
            //   83c4fc               | add                 esp, -4
            //   c745fc00000000       | mov                 dword ptr [ebp - 4], 0
            //   eb29                 | jmp                 0x2b
            //   8b4dfc               | mov                 ecx, dword ptr [ebp - 4]
            //   51                   | push                ecx
            //   e8????????           |                     

        $sequence_9 = { 8bec 83c4fc 8b35???????? c745fc01000000 c705????????0c000000 c705????????00000000 c705????????01000000 }
            // n = 7, score = 200
            //   8bec                 | mov                 ebp, esp
            //   83c4fc               | add                 esp, -4
            //   8b35????????         |                     
            //   c745fc01000000       | mov                 dword ptr [ebp - 4], 1
            //   c705????????0c000000     |     
            //   c705????????00000000     |     
            //   c705????????01000000     |     

    condition:
        7 of them and filesize < 352256
}