rule win_slothfulmedia_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.slothfulmedia."
        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.slothfulmedia"
        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???????? e9???????? 5f 8d4638 5e 5b }
            // n = 6, score = 200
            //   e8????????           |                     
            //   e9????????           |                     
            //   5f                   | pop                 edi
            //   8d4638               | lea                 eax, [esi + 0x38]
            //   5e                   | pop                 esi
            //   5b                   | pop                 ebx

        $sequence_1 = { 83f805 761f 6a08 59 }
            // n = 4, score = 200
            //   83f805               | cmp                 eax, 5
            //   761f                 | jbe                 0x21
            //   6a08                 | push                8
            //   59                   | pop                 ecx

        $sequence_2 = { 0f84a1000000 3bc7 0f8499000000 57 6a05 6a02 53 }
            // n = 7, score = 200
            //   0f84a1000000         | je                  0xa7
            //   3bc7                 | cmp                 eax, edi
            //   0f8499000000         | je                  0x9f
            //   57                   | push                edi
            //   6a05                 | push                5
            //   6a02                 | push                2
            //   53                   | push                ebx

        $sequence_3 = { 8d8ddcfdffff 51 b9fccb0000 2bce }
            // n = 4, score = 200
            //   8d8ddcfdffff         | lea                 ecx, [ebp - 0x224]
            //   51                   | push                ecx
            //   b9fccb0000           | mov                 ecx, 0xcbfc
            //   2bce                 | sub                 ecx, esi

        $sequence_4 = { 8d4dfc 51 2bc7 50 8b4508 56 }
            // n = 6, score = 200
            //   8d4dfc               | lea                 ecx, [ebp - 4]
            //   51                   | push                ecx
            //   2bc7                 | sub                 eax, edi
            //   50                   | push                eax
            //   8b4508               | mov                 eax, dword ptr [ebp + 8]
            //   56                   | push                esi

        $sequence_5 = { 8b4508 8b00 53 8d1c48 8b48f4 8d0448 }
            // n = 6, score = 200
            //   8b4508               | mov                 eax, dword ptr [ebp + 8]
            //   8b00                 | mov                 eax, dword ptr [eax]
            //   53                   | push                ebx
            //   8d1c48               | lea                 ebx, [eax + ecx*2]
            //   8b48f4               | mov                 ecx, dword ptr [eax - 0xc]
            //   8d0448               | lea                 eax, [eax + ecx*2]

        $sequence_6 = { 53 56 8bf0 8d45f4 50 8d45fc 33db }
            // n = 7, score = 200
            //   53                   | push                ebx
            //   56                   | push                esi
            //   8bf0                 | mov                 esi, eax
            //   8d45f4               | lea                 eax, [ebp - 0xc]
            //   50                   | push                eax
            //   8d45fc               | lea                 eax, [ebp - 4]
            //   33db                 | xor                 ebx, ebx

        $sequence_7 = { 57 ff15???????? 59 894610 85c0 7505 }
            // n = 6, score = 200
            //   57                   | push                edi
            //   ff15????????         |                     
            //   59                   | pop                 ecx
            //   894610               | mov                 dword ptr [esi + 0x10], eax
            //   85c0                 | test                eax, eax
            //   7505                 | jne                 7

        $sequence_8 = { 51 ff15???????? 8b8c2410020000 5f 5e }
            // n = 5, score = 100
            //   51                   | push                ecx
            //   ff15????????         |                     
            //   8b8c2410020000       | mov                 ecx, dword ptr [esp + 0x210]
            //   5f                   | pop                 edi
            //   5e                   | pop                 esi

        $sequence_9 = { 6804010000 8d54240c 6a00 52 e8???????? }
            // n = 5, score = 100
            //   6804010000           | push                0x104
            //   8d54240c             | lea                 edx, [esp + 0xc]
            //   6a00                 | push                0
            //   52                   | push                edx
            //   e8????????           |                     

        $sequence_10 = { 56 57 68d0070000 ff15???????? 33c0 6806020000 }
            // n = 6, score = 100
            //   56                   | push                esi
            //   57                   | push                edi
            //   68d0070000           | push                0x7d0
            //   ff15????????         |                     
            //   33c0                 | xor                 eax, eax
            //   6806020000           | push                0x206

        $sequence_11 = { 5e 33cc 33c0 e8???????? 81c40c020000 c21000 3b0d???????? }
            // n = 7, score = 100
            //   5e                   | pop                 esi
            //   33cc                 | xor                 ecx, esp
            //   33c0                 | xor                 eax, eax
            //   e8????????           |                     
            //   81c40c020000         | add                 esp, 0x20c
            //   c21000               | ret                 0x10
            //   3b0d????????         |                     

        $sequence_12 = { 8d44240c 50 6a00 ff15???????? 6a04 6a00 8d4c2410 }
            // n = 7, score = 100
            //   8d44240c             | lea                 eax, [esp + 0xc]
            //   50                   | push                eax
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   6a04                 | push                4
            //   6a00                 | push                0
            //   8d4c2410             | lea                 ecx, [esp + 0x10]

        $sequence_13 = { 81c40c020000 c21000 3b0d???????? 7502 f3c3 e9???????? }
            // n = 6, score = 100
            //   81c40c020000         | add                 esp, 0x20c
            //   c21000               | ret                 0x10
            //   3b0d????????         |                     
            //   7502                 | jne                 4
            //   f3c3                 | ret                 
            //   e9????????           |                     

        $sequence_14 = { 8b35???????? 8b3d???????? 90 68???????? ffd6 85c0 }
            // n = 6, score = 100
            //   8b35????????         |                     
            //   8b3d????????         |                     
            //   90                   | nop                 
            //   68????????           |                     
            //   ffd6                 | call                esi
            //   85c0                 | test                eax, eax

        $sequence_15 = { 6689442414 e8???????? 83c40c 6a00 ff15???????? 8b35???????? 8b3d???????? }
            // n = 7, score = 100
            //   6689442414           | mov                 word ptr [esp + 0x14], ax
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   8b35????????         |                     
            //   8b3d????????         |                     

    condition:
        7 of them and filesize < 122880
}