rule win_helauto_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.helauto."
        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.helauto"
        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 = { 83c418 8d85f4feffff 68???????? 50 ff15???????? }
            // n = 5, score = 100
            //   83c418               | add                 esp, 0x18
            //   8d85f4feffff         | lea                 eax, [ebp - 0x10c]
            //   68????????           |                     
            //   50                   | push                eax
            //   ff15????????         |                     

        $sequence_1 = { 83c40c 85c0 0f85ce000000 6a3f 8dbda9f7ffff }
            // n = 5, score = 100
            //   83c40c               | add                 esp, 0xc
            //   85c0                 | test                eax, eax
            //   0f85ce000000         | jne                 0xd4
            //   6a3f                 | push                0x3f
            //   8dbda9f7ffff         | lea                 edi, [ebp - 0x857]

        $sequence_2 = { 895df4 f3ab 66ab aa 8b3d???????? 6a01 ffd7 }
            // n = 7, score = 100
            //   895df4               | mov                 dword ptr [ebp - 0xc], ebx
            //   f3ab                 | rep stosd           dword ptr es:[edi], eax
            //   66ab                 | stosw               word ptr es:[edi], ax
            //   aa                   | stosb               byte ptr es:[edi], al
            //   8b3d????????         |                     
            //   6a01                 | push                1
            //   ffd7                 | call                edi

        $sequence_3 = { 6a44 8d8530ffffff 53 50 e8???????? 8b45d4 83c40c }
            // n = 7, score = 100
            //   6a44                 | push                0x44
            //   8d8530ffffff         | lea                 eax, [ebp - 0xd0]
            //   53                   | push                ebx
            //   50                   | push                eax
            //   e8????????           |                     
            //   8b45d4               | mov                 eax, dword ptr [ebp - 0x2c]
            //   83c40c               | add                 esp, 0xc

        $sequence_4 = { 80243700 ff15???????? 8bd8 59 }
            // n = 4, score = 100
            //   80243700             | and                 byte ptr [edi + esi], 0
            //   ff15????????         |                     
            //   8bd8                 | mov                 ebx, eax
            //   59                   | pop                 ecx

        $sequence_5 = { 017d10 8b45f4 3b4510 75ad 395dfc }
            // n = 5, score = 100
            //   017d10               | add                 dword ptr [ebp + 0x10], edi
            //   8b45f4               | mov                 eax, dword ptr [ebp - 0xc]
            //   3b4510               | cmp                 eax, dword ptr [ebp + 0x10]
            //   75ad                 | jne                 0xffffffaf
            //   395dfc               | cmp                 dword ptr [ebp - 4], ebx

        $sequence_6 = { 889da8fdffff 6a1f 59 f3ab }
            // n = 4, score = 100
            //   889da8fdffff         | mov                 byte ptr [ebp - 0x258], bl
            //   6a1f                 | push                0x1f
            //   59                   | pop                 ecx
            //   f3ab                 | rep stosd           dword ptr es:[edi], eax

        $sequence_7 = { 50 ffd7 83c40c 85c0 7435 6a05 }
            // n = 6, score = 100
            //   50                   | push                eax
            //   ffd7                 | call                edi
            //   83c40c               | add                 esp, 0xc
            //   85c0                 | test                eax, eax
            //   7435                 | je                  0x37
            //   6a05                 | push                5

        $sequence_8 = { ff75e4 ffd6 ff75ac ffd6 ff75a8 ffd6 }
            // n = 6, score = 100
            //   ff75e4               | push                dword ptr [ebp - 0x1c]
            //   ffd6                 | call                esi
            //   ff75ac               | push                dword ptr [ebp - 0x54]
            //   ffd6                 | call                esi
            //   ff75a8               | push                dword ptr [ebp - 0x58]
            //   ffd6                 | call                esi

        $sequence_9 = { 56 68???????? 50 8945d8 ff15???????? 6a04 8945fc }
            // n = 7, score = 100
            //   56                   | push                esi
            //   68????????           |                     
            //   50                   | push                eax
            //   8945d8               | mov                 dword ptr [ebp - 0x28], eax
            //   ff15????????         |                     
            //   6a04                 | push                4
            //   8945fc               | mov                 dword ptr [ebp - 4], eax

    condition:
        7 of them and filesize < 57344
}