rule win_rumish_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.rumish."
        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.rumish"
        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 = { 7414 eb22 68???????? 8d8d54ffffff e8???????? eb10 68???????? }
            // n = 7, score = 100
            //   7414                 | je                  0x16
            //   eb22                 | jmp                 0x24
            //   68????????           |                     
            //   8d8d54ffffff         | lea                 ecx, [ebp - 0xac]
            //   e8????????           |                     
            //   eb10                 | jmp                 0x12
            //   68????????           |                     

        $sequence_1 = { 8bec 51 894dfc 8b4dfc e8???????? 8b4dfc 894118 }
            // n = 7, score = 100
            //   8bec                 | mov                 ebp, esp
            //   51                   | push                ecx
            //   894dfc               | mov                 dword ptr [ebp - 4], ecx
            //   8b4dfc               | mov                 ecx, dword ptr [ebp - 4]
            //   e8????????           |                     
            //   8b4dfc               | mov                 ecx, dword ptr [ebp - 4]
            //   894118               | mov                 dword ptr [ecx + 0x18], eax

        $sequence_2 = { e8???????? 898518feffff 83bd18feffff00 7411 8b9518feffff 8b420c 8b08 }
            // n = 7, score = 100
            //   e8????????           |                     
            //   898518feffff         | mov                 dword ptr [ebp - 0x1e8], eax
            //   83bd18feffff00       | cmp                 dword ptr [ebp - 0x1e8], 0
            //   7411                 | je                  0x13
            //   8b9518feffff         | mov                 edx, dword ptr [ebp - 0x1e8]
            //   8b420c               | mov                 eax, dword ptr [edx + 0xc]
            //   8b08                 | mov                 ecx, dword ptr [eax]

        $sequence_3 = { 52 8d4d9c e8???????? 8b0e 2b08 898d34feffff c78538feffff00000000 }
            // n = 7, score = 100
            //   52                   | push                edx
            //   8d4d9c               | lea                 ecx, [ebp - 0x64]
            //   e8????????           |                     
            //   8b0e                 | mov                 ecx, dword ptr [esi]
            //   2b08                 | sub                 ecx, dword ptr [eax]
            //   898d34feffff         | mov                 dword ptr [ebp - 0x1cc], ecx
            //   c78538feffff00000000     | mov    dword ptr [ebp - 0x1c8], 0

        $sequence_4 = { 17 c24300 29c2 43 }
            // n = 4, score = 100
            //   17                   | pop                 ss
            //   c24300               | ret                 0x43
            //   29c2                 | sub                 edx, eax
            //   43                   | inc                 ebx

        $sequence_5 = { 50 8b4dbc e8???????? 8bc8 e8???????? 8b08 8b5004 }
            // n = 7, score = 100
            //   50                   | push                eax
            //   8b4dbc               | mov                 ecx, dword ptr [ebp - 0x44]
            //   e8????????           |                     
            //   8bc8                 | mov                 ecx, eax
            //   e8????????           |                     
            //   8b08                 | mov                 ecx, dword ptr [eax]
            //   8b5004               | mov                 edx, dword ptr [eax + 4]

        $sequence_6 = { 8b5110 8b4510 8d0c42 8b55d4 894a10 8d45e0 50 }
            // n = 7, score = 100
            //   8b5110               | mov                 edx, dword ptr [ecx + 0x10]
            //   8b4510               | mov                 eax, dword ptr [ebp + 0x10]
            //   8d0c42               | lea                 ecx, [edx + eax*2]
            //   8b55d4               | mov                 edx, dword ptr [ebp - 0x2c]
            //   894a10               | mov                 dword ptr [edx + 0x10], ecx
            //   8d45e0               | lea                 eax, [ebp - 0x20]
            //   50                   | push                eax

        $sequence_7 = { e8???????? 8b8db4fdffff 8908 8b9574fdffff 3b95f8fdffff 7d33 8d8574fdffff }
            // n = 7, score = 100
            //   e8????????           |                     
            //   8b8db4fdffff         | mov                 ecx, dword ptr [ebp - 0x24c]
            //   8908                 | mov                 dword ptr [eax], ecx
            //   8b9574fdffff         | mov                 edx, dword ptr [ebp - 0x28c]
            //   3b95f8fdffff         | cmp                 edx, dword ptr [ebp - 0x208]
            //   7d33                 | jge                 0x35
            //   8d8574fdffff         | lea                 eax, [ebp - 0x28c]

        $sequence_8 = { 8bec 83ec08 894df8 51 8bcc 8965fc 8d450c }
            // n = 7, score = 100
            //   8bec                 | mov                 ebp, esp
            //   83ec08               | sub                 esp, 8
            //   894df8               | mov                 dword ptr [ebp - 8], ecx
            //   51                   | push                ecx
            //   8bcc                 | mov                 ecx, esp
            //   8965fc               | mov                 dword ptr [ebp - 4], esp
            //   8d450c               | lea                 eax, [ebp + 0xc]

        $sequence_9 = { 53 2bd8 3bd9 7503 58 ffe0 8b4508 }
            // n = 7, score = 100
            //   53                   | push                ebx
            //   2bd8                 | sub                 ebx, eax
            //   3bd9                 | cmp                 ebx, ecx
            //   7503                 | jne                 5
            //   58                   | pop                 eax
            //   ffe0                 | jmp                 eax
            //   8b4508               | mov                 eax, dword ptr [ebp + 8]

    condition:
        7 of them and filesize < 770048
}