rule win_client_maximus_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.client_maximus."
        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.client_maximus"
        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 = { 890424 8954240c ff5320 ff15???????? 895c2408 }
            // n = 5, score = 300
            //   890424               | mov                 dword ptr [esp], eax
            //   8954240c             | mov                 dword ptr [esp + 0xc], edx
            //   ff5320               | call                dword ptr [ebx + 0x20]
            //   ff15????????         |                     
            //   895c2408             | mov                 dword ptr [esp + 8], ebx

        $sequence_1 = { 83c601 39730c 7fe1 891424 e8???????? }
            // n = 5, score = 300
            //   83c601               | add                 esi, 1
            //   39730c               | cmp                 dword ptr [ebx + 0xc], esi
            //   7fe1                 | jg                  0xffffffe3
            //   891424               | mov                 dword ptr [esp], edx
            //   e8????????           |                     

        $sequence_2 = { 8954240c ff5320 ff15???????? 895c2408 c744240400000000 890424 }
            // n = 6, score = 300
            //   8954240c             | mov                 dword ptr [esp + 0xc], edx
            //   ff5320               | call                dword ptr [ebx + 0x20]
            //   ff15????????         |                     
            //   895c2408             | mov                 dword ptr [esp + 8], ebx
            //   c744240400000000     | mov                 dword ptr [esp + 4], 0
            //   890424               | mov                 dword ptr [esp], eax

        $sequence_3 = { 55 89e5 56 53 83ec10 8b1d???????? c70424???????? }
            // n = 7, score = 300
            //   55                   | push                ebp
            //   89e5                 | mov                 ebp, esp
            //   56                   | push                esi
            //   53                   | push                ebx
            //   83ec10               | sub                 esp, 0x10
            //   8b1d????????         |                     
            //   c70424????????       |                     

        $sequence_4 = { 7fe1 891424 e8???????? 8b4304 85c0 741d 8b5330 }
            // n = 7, score = 300
            //   7fe1                 | jg                  0xffffffe3
            //   891424               | mov                 dword ptr [esp], edx
            //   e8????????           |                     
            //   8b4304               | mov                 eax, dword ptr [ebx + 4]
            //   85c0                 | test                eax, eax
            //   741d                 | je                  0x1f
            //   8b5330               | mov                 edx, dword ptr [ebx + 0x30]

        $sequence_5 = { 8b5330 c744240800800000 c744240400000000 890424 8954240c ff5320 ff15???????? }
            // n = 7, score = 300
            //   8b5330               | mov                 edx, dword ptr [ebx + 0x30]
            //   c744240800800000     | mov                 dword ptr [esp + 8], 0x8000
            //   c744240400000000     | mov                 dword ptr [esp + 4], 0
            //   890424               | mov                 dword ptr [esp], eax
            //   8954240c             | mov                 dword ptr [esp + 0xc], edx
            //   ff5320               | call                dword ptr [ebx + 0x20]
            //   ff15????????         |                     

        $sequence_6 = { 7418 8b5014 85d2 7511 8b5034 }
            // n = 5, score = 300
            //   7418                 | je                  0x1a
            //   8b5014               | mov                 edx, dword ptr [eax + 0x14]
            //   85d2                 | test                edx, edx
            //   7511                 | jne                 0x13
            //   8b5034               | mov                 edx, dword ptr [eax + 0x34]

        $sequence_7 = { 85c0 7438 c70424???????? ffd3 }
            // n = 4, score = 300
            //   85c0                 | test                eax, eax
            //   7438                 | je                  0x3a
            //   c70424????????       |                     
            //   ffd3                 | call                ebx

        $sequence_8 = { 8b5330 890424 89542404 ff532c }
            // n = 4, score = 300
            //   8b5330               | mov                 edx, dword ptr [ebx + 0x30]
            //   890424               | mov                 dword ptr [esp], eax
            //   89542404             | mov                 dword ptr [esp + 4], edx
            //   ff532c               | call                dword ptr [ebx + 0x2c]

        $sequence_9 = { 89c8 0fb63c0b 99 f77c241c 89f8 }
            // n = 5, score = 300
            //   89c8                 | mov                 eax, ecx
            //   0fb63c0b             | movzx               edi, byte ptr [ebx + ecx]
            //   99                   | cdq                 
            //   f77c241c             | idiv                dword ptr [esp + 0x1c]
            //   89f8                 | mov                 eax, edi

    condition:
        7 of them and filesize < 106496
}