rule win_unidentified_091_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.unidentified_091."
        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.unidentified_091"
        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 = { 488d4101 480f43c1 498b4e28 4803f8 448bc9 483bf8 490f43db }
            // n = 7, score = 100
            //   488d4101             | mov                 dword ptr [ebx + 0x7f8], eax
            //   480f43c1             | dec                 esp
            //   498b4e28             | mov                 eax, dword ptr [esp + 0x90]
            //   4803f8               | dec                 eax
            //   448bc9               | mov                 dword ptr [esp + 0x48], eax
            //   483bf8               | dec                 ebp
            //   490f43db             | test                eax, eax

        $sequence_1 = { c3 41b89d000000 488d1598910c00 488bcf e8???????? 488b7c2440 b801000000 }
            // n = 7, score = 100
            //   c3                   | lea                 ecx, [0xa6121]
            //   41b89d000000         | dec                 eax
            //   488d1598910c00       | cmp                 ecx, eax
            //   488bcf               | ja                  0x1f6a
            //   e8????????           |                     
            //   488b7c2440           | dec                 eax
            //   b801000000           | cmp                 edi, ecx

        $sequence_2 = { 4c8bc6 e8???????? 41bcc0000000 0f1f00 4c8b842488000000 488d5310 488bcb }
            // n = 7, score = 100
            //   4c8bc6               | mov                 al, 1
            //   e8????????           |                     
            //   41bcc0000000         | mov                 byte ptr [edi + 8], al
            //   0f1f00               | xor                 al, al
            //   4c8b842488000000     | inc                 ebp
            //   488d5310             | xor                 esp, esp
            //   488bcb               | jmp                 0xf3

        $sequence_3 = { e8???????? 488b4b18 e8???????? 488b4b30 488d15788f1100 41b86b000000 e8???????? }
            // n = 7, score = 100
            //   e8????????           |                     
            //   488b4b18             | inc                 esp
            //   e8????????           |                     
            //   488b4b30             | lea                 eax, [edx - 0x37]
            //   488d15788f1100       | dec                 eax
            //   41b86b000000         | test                eax, eax
            //   e8????????           |                     

        $sequence_4 = { d3e8 49895708 41894718 0fb60a 83e10f 4a0fbe840108841d00 428a8c0118841d00 }
            // n = 7, score = 100
            //   d3e8                 | lea                 ecx, [0xa3cb3]
            //   49895708             | dec                 ebp
            //   41894718             | mov                 ecx, eax
            //   0fb60a               | dec                 esp
            //   83e10f               | sub                 ecx, ecx
            //   4a0fbe840108841d00     | mov    edx, 4
            //   428a8c0118841d00     | dec                 eax

        $sequence_5 = { 7433 498b54cd18 4d8bc6 488b4d18 e8???????? 4c8d05ab311200 85c0 }
            // n = 7, score = 100
            //   7433                 | mov                 eax, 0xffffffff
            //   498b54cd18           | inc                 ecx
            //   4d8bc6               | mov                 eax, 9
            //   488b4d18             | test                eax, eax
            //   e8????????           |                     
            //   4c8d05ab311200       | jne                 0x1a0b
            //   85c0                 | dec                 eax

        $sequence_6 = { c1e017 0bc1 89442404 8bca c1e916 8bc2 83e11f }
            // n = 7, score = 100
            //   c1e017               | add                 edx, eax
            //   0bc1                 | dec                 eax
            //   89442404             | xor                 ebx, edi
            //   8bca                 | dec                 eax
            //   c1e916               | mov                 dword ptr [esp + 0x30], edi
            //   8bc2                 | dec                 eax
            //   83e11f               | mov                 edi, dword ptr [esp + 0x40]

        $sequence_7 = { 85c0 0f845f010000 4533c0 488d542440 488bce e8???????? 85c0 }
            // n = 7, score = 100
            //   85c0                 | inc                 esp
            //   0f845f010000         | mov                 ebx, esi
            //   4533c0               | xor                 edx, eax
            //   488d542440           | inc                 ebp
            //   488bce               | xor                 ebx, edx
            //   e8????????           |                     
            //   85c0                 | inc                 ebp

        $sequence_8 = { 8d0c03 488b442448 803c0100 0f854b020000 c6040101 8b0c8f 3bce }
            // n = 7, score = 100
            //   8d0c03               | mov                 eax, edx
            //   488b442448           | inc                 ebp
            //   803c0100             | mov                 eax, edx
            //   0f854b020000         | dec                 ecx
            //   c6040101             | mov                 ecx, dword ptr [esi + 0x38]
            //   8b0c8f               | dec                 eax
            //   3bce                 | add                 ebx, eax

        $sequence_9 = { 8b94b3b07b2500 448b848bb0772500 428b8c93b07f2500 42338c8bb0832500 4133c8 33ca 334c2420 }
            // n = 7, score = 100
            //   8b94b3b07b2500       | mov                 dword ptr [esp + 0x20], edi
            //   448b848bb0772500     | dec                 ecx
            //   428b8c93b07f2500     | mov                 ecx, esp
            //   42338c8bb0832500     | cmp                 eax, -1
            //   4133c8               | je                  0xfbb
            //   33ca                 | inc                 ebp
            //   334c2420             | xor                 ecx, ecx

    condition:
        7 of them and filesize < 5777408
}