rule win_animate_clipper_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.animate_clipper."
        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.animate_clipper"
        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 = { 33c9 e8???????? eb9e 488bc6 4c8bfe 49c1ff06 488d0ded970100 }
            // n = 7, score = 100
            //   33c9                 | dec                 ecx
            //   e8????????           |                     
            //   eb9e                 | arpl                word ptr [edi + eax*4], ax
            //   488bc6               | dec                 esp
            //   4c8bfe               | add                 eax, edi
            //   49c1ff06             | jmp                 eax
            //   488d0ded970100       | lea                 edx, [ecx + 0x3e]

        $sequence_1 = { 48ffc0 48894748 c6475c11 0fb6475c 83e03f 49630487 }
            // n = 6, score = 100
            //   48ffc0               | mov                 ecx, dword ptr [ebp + 0x220]
            //   48894748             | dec                 eax
            //   c6475c11             | mov                 dword ptr [eax - 0x20], ecx
            //   0fb6475c             | dec                 eax
            //   83e03f               | mov                 eax, dword ptr [ebp + 0x220]
            //   49630487             | mov                 ebx, dword ptr [eax]

        $sequence_2 = { 448a4c1f1a 488d4d70 488d15cc290200 6a3a 4158 e8???????? 48ffc3 }
            // n = 7, score = 100
            //   448a4c1f1a           | mov                 eax, ebp
            //   488d4d70             | dec                 eax
            //   488d15cc290200       | add                 esp, 0x108
            //   6a3a                 | pop                 ebx
            //   4158                 | pop                 edi
            //   e8????????           |                     
            //   48ffc3               | pop                 esi

        $sequence_3 = { 66c746082100 e9???????? 55 4889e5 31c0 5d c3 }
            // n = 7, score = 100
            //   66c746082100         | mov                 ecx, eax
            //   e9????????           |                     
            //   55                   | dec                 ebp
            //   4889e5               | mov                 ecx, dword ptr [eax + 0x38]
            //   31c0                 | dec                 ebp
            //   5d                   | add                 ecx, edx
            //   c3                   | dec                 esp

        $sequence_4 = { 80e1f0 80f9e0 7509 488d0d7dbc0100 eb18 80e2f8 80faf0 }
            // n = 7, score = 100
            //   80e1f0               | and                 dl, 7
            //   80f9e0               | mov                 byte ptr [ebp + 6], dl
            //   7509                 | psrld               xmm2, 0x10
            //   488d0d7dbc0100       | pand                xmm2, xmm0
            //   eb18                 | pminsw              xmm2, xmm1
            //   80e2f8               | movd                ecx, xmm2
            //   80faf0               | mov                 edx, ecx

        $sequence_5 = { 72e9 488b5c2430 4883c420 5f c3 488d050d7c0100 c3 }
            // n = 7, score = 100
            //   72e9                 | mov                 eax, 0x2578
            //   488b5c2430           | dec                 eax
            //   4883c420             | sub                 esp, eax
            //   5f                   | dec                 eax
            //   c3                   | lea                 ebp, [esp + 0x80]
            //   488d050d7c0100       | movaps              xmmword ptr [ebp + 0x24e0], xmm6
            //   c3                   | dec                 esp

        $sequence_6 = { ebd7 0f57c0 0f1106 eb39 4584f6 7409 49f7df }
            // n = 7, score = 100
            //   ebd7                 | shr                 eax, 0x2c
            //   0f57c0               | dec                 esp
            //   0f1106               | lea                 ecx, [0x124b6]
            //   eb39                 | vsubsd              xmm1, xmm1, xmm2
            //   4584f6               | vfmsub213sd         xmm5, xmm6, xmm1
            //   7409                 | inc                 ecx
            //   49f7df               | movups              xmm0, xmmword ptr [ecx + eax*8]

        $sequence_7 = { 751f 488b85a0010000 488b8888000000 488d0561fe0100 483bc8 7405 e8???????? }
            // n = 7, score = 100
            //   751f                 | je                  0xcbe
            //   488b85a0010000       | mov                 al, byte ptr [edi + 0x2a]
            //   488b8888000000       | pop                 edx
            //   488d0561fe0100       | test                al, 1
            //   483bc8               | je                  0xce3
            //   7405                 | dec                 eax
            //   e8????????           |                     

        $sequence_8 = { 7329 4c89c3 89d1 48d3eb 4883fa40 }
            // n = 5, score = 100
            //   7329                 | xor                 esi, esi
            //   4c89c3               | xor                 eax, eax
            //   89d1                 | dec                 esp
            //   48d3eb               | mov                 esp, dword ptr [ebp + 0x688]
            //   4883fa40             | dec                 eax

        $sequence_9 = { 4d89d9 4d29d1 4c895a30 807a5e01 751f 41f6c001 7432 }
            // n = 7, score = 100
            //   4d89d9               | dec                 esp
            //   4d29d1               | mov                 eax, eax
            //   4c895a30             | dec                 eax
            //   807a5e01             | sub                 eax, ebx
            //   751f                 | jae                 0x136d
            //   41f6c001             | dec                 eax
            //   7432                 | mov                 ecx, dword ptr [edi + 8]

    condition:
        7 of them and filesize < 513024
}