rule win_thunderx_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.thunderx."
        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.thunderx"
        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 = { 0f84ba000000 68???????? 8d4da8 e8???????? 6a0b 58 c645fc01 }
            // n = 7, score = 200
            //   0f84ba000000         | je                  0xc0
            //   68????????           |                     
            //   8d4da8               | lea                 ecx, [ebp - 0x58]
            //   e8????????           |                     
            //   6a0b                 | push                0xb
            //   58                   | pop                 eax
            //   c645fc01             | mov                 byte ptr [ebp - 4], 1

        $sequence_1 = { 8945fc e8???????? 8bf0 8d4e01 51 e8???????? 897314 }
            // n = 7, score = 200
            //   8945fc               | mov                 dword ptr [ebp - 4], eax
            //   e8????????           |                     
            //   8bf0                 | mov                 esi, eax
            //   8d4e01               | lea                 ecx, [esi + 1]
            //   51                   | push                ecx
            //   e8????????           |                     
            //   897314               | mov                 dword ptr [ebx + 0x14], esi

        $sequence_2 = { c7459c02000000 eb15 51 56 8bcf e8???????? }
            // n = 6, score = 200
            //   c7459c02000000       | mov                 dword ptr [ebp - 0x64], 2
            //   eb15                 | jmp                 0x17
            //   51                   | push                ecx
            //   56                   | push                esi
            //   8bcf                 | mov                 ecx, edi
            //   e8????????           |                     

        $sequence_3 = { 50 8d45e4 50 ff15???????? 8d4dcc e8???????? 8d45cc }
            // n = 7, score = 200
            //   50                   | push                eax
            //   8d45e4               | lea                 eax, [ebp - 0x1c]
            //   50                   | push                eax
            //   ff15????????         |                     
            //   8d4dcc               | lea                 ecx, [ebp - 0x34]
            //   e8????????           |                     
            //   8d45cc               | lea                 eax, [ebp - 0x34]

        $sequence_4 = { 51 51 ff7610 50 6a08 51 }
            // n = 6, score = 200
            //   51                   | push                ecx
            //   51                   | push                ecx
            //   ff7610               | push                dword ptr [esi + 0x10]
            //   50                   | push                eax
            //   6a08                 | push                8
            //   51                   | push                ecx

        $sequence_5 = { e8???????? ba???????? 8d8d58feffff e8???????? 8d8d30ffffff c645fc0c 51 }
            // n = 7, score = 200
            //   e8????????           |                     
            //   ba????????           |                     
            //   8d8d58feffff         | lea                 ecx, [ebp - 0x1a8]
            //   e8????????           |                     
            //   8d8d30ffffff         | lea                 ecx, [ebp - 0xd0]
            //   c645fc0c             | mov                 byte ptr [ebp - 4], 0xc
            //   51                   | push                ecx

        $sequence_6 = { 50 e8???????? 834dfcff 8d4dd4 e8???????? a1???????? 8d48e4 }
            // n = 7, score = 200
            //   50                   | push                eax
            //   e8????????           |                     
            //   834dfcff             | or                  dword ptr [ebp - 4], 0xffffffff
            //   8d4dd4               | lea                 ecx, [ebp - 0x2c]
            //   e8????????           |                     
            //   a1????????           |                     
            //   8d48e4               | lea                 ecx, [eax - 0x1c]

        $sequence_7 = { ba???????? e8???????? 8bf0 33db 395e10 7434 }
            // n = 6, score = 200
            //   ba????????           |                     
            //   e8????????           |                     
            //   8bf0                 | mov                 esi, eax
            //   33db                 | xor                 ebx, ebx
            //   395e10               | cmp                 dword ptr [esi + 0x10], ebx
            //   7434                 | je                  0x36

        $sequence_8 = { 8a040e 8801 3bfa 72f1 8b4584 8bbd78ffffff 8d75bc }
            // n = 7, score = 200
            //   8a040e               | mov                 al, byte ptr [esi + ecx]
            //   8801                 | mov                 byte ptr [ecx], al
            //   3bfa                 | cmp                 edi, edx
            //   72f1                 | jb                  0xfffffff3
            //   8b4584               | mov                 eax, dword ptr [ebp - 0x7c]
            //   8bbd78ffffff         | mov                 edi, dword ptr [ebp - 0x88]
            //   8d75bc               | lea                 esi, [ebp - 0x44]

        $sequence_9 = { 895dc8 8975bc 8975c0 8975c4 8975fc 8d45d4 52 }
            // n = 7, score = 200
            //   895dc8               | mov                 dword ptr [ebp - 0x38], ebx
            //   8975bc               | mov                 dword ptr [ebp - 0x44], esi
            //   8975c0               | mov                 dword ptr [ebp - 0x40], esi
            //   8975c4               | mov                 dword ptr [ebp - 0x3c], esi
            //   8975fc               | mov                 dword ptr [ebp - 4], esi
            //   8d45d4               | lea                 eax, [ebp - 0x2c]
            //   52                   | push                edx

    condition:
        7 of them and filesize < 319488
}