rule win_shurl0ckr_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2020-10-14"
        version = "1"
        description = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator v0.5.0"
        signator_config = "callsandjumps;datarefs;binvalue"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.shurl0ckr"
        malpedia_rule_date = "20201014"
        malpedia_hash = "a7e3bd57eaf12bf3ea29a863c041091ba3af9ac9"
        malpedia_version = "20201014"
        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 = { 896c243c 8b5c2420 895c2440 80f800 }
            // n = 4, score = 200
            //   896c243c             | mov                 dword ptr [esp + 0x3c], ebp
            //   8b5c2420             | mov                 ebx, dword ptr [esp + 0x20]
            //   895c2440             | mov                 dword ptr [esp + 0x40], ebx
            //   80f800               | cmp                 al, 0

        $sequence_1 = { c7042400000000 8954245c 89542404 896c2460 896c2408 bb???????? 895c240c }
            // n = 7, score = 200
            //   c7042400000000       | mov                 dword ptr [esp], 0
            //   8954245c             | mov                 dword ptr [esp + 0x5c], edx
            //   89542404             | mov                 dword ptr [esp + 4], edx
            //   896c2460             | mov                 dword ptr [esp + 0x60], ebp
            //   896c2408             | mov                 dword ptr [esp + 8], ebp
            //   bb????????           |                     
            //   895c240c             | mov                 dword ptr [esp + 0xc], ebx

        $sequence_2 = { 891c24 8944240c 89442404 e8???????? 8b44240c 8b680c 896c2424 }
            // n = 7, score = 200
            //   891c24               | mov                 dword ptr [esp], ebx
            //   8944240c             | mov                 dword ptr [esp + 0xc], eax
            //   89442404             | mov                 dword ptr [esp + 4], eax
            //   e8????????           |                     
            //   8b44240c             | mov                 eax, dword ptr [esp + 0xc]
            //   8b680c               | mov                 ebp, dword ptr [eax + 0xc]
            //   896c2424             | mov                 dword ptr [esp + 0x24], ebp

        $sequence_3 = { 8b8900000000 3b6108 0f86f3000000 83ec10 0fb61d???????? 80fb00 }
            // n = 6, score = 200
            //   8b8900000000         | mov                 ecx, dword ptr [ecx]
            //   3b6108               | cmp                 esp, dword ptr [ecx + 8]
            //   0f86f3000000         | jbe                 0xf9
            //   83ec10               | sub                 esp, 0x10
            //   0fb61d????????       |                     
            //   80fb00               | cmp                 bl, 0

        $sequence_4 = { 8b4b04 894c2404 e8???????? 8b44240c 8b5c2410 895c2434 }
            // n = 6, score = 200
            //   8b4b04               | mov                 ecx, dword ptr [ebx + 4]
            //   894c2404             | mov                 dword ptr [esp + 4], ecx
            //   e8????????           |                     
            //   8b44240c             | mov                 eax, dword ptr [esp + 0xc]
            //   8b5c2410             | mov                 ebx, dword ptr [esp + 0x10]
            //   895c2434             | mov                 dword ptr [esp + 0x34], ebx

        $sequence_5 = { 0f855a0b0000 896804 8b9c2480000000 83fb00 0f84400b0000 803d????????00 0f851f0b0000 }
            // n = 7, score = 200
            //   0f855a0b0000         | jne                 0xb60
            //   896804               | mov                 dword ptr [eax + 4], ebp
            //   8b9c2480000000       | mov                 ebx, dword ptr [esp + 0x80]
            //   83fb00               | cmp                 ebx, 0
            //   0f84400b0000         | je                  0xb46
            //   803d????????00       |                     
            //   0f851f0b0000         | jne                 0xb25

        $sequence_6 = { 80fb00 0f858afeffff 8944245c 83f804 0f8593fdffff 890c24 }
            // n = 6, score = 200
            //   80fb00               | cmp                 bl, 0
            //   0f858afeffff         | jne                 0xfffffe90
            //   8944245c             | mov                 dword ptr [esp + 0x5c], eax
            //   83f804               | cmp                 eax, 4
            //   0f8593fdffff         | jne                 0xfffffd99
            //   890c24               | mov                 dword ptr [esp], ecx

        $sequence_7 = { bb???????? 895c2404 c744240810000000 e8???????? 8b5c240c 899c24ec000000 8b5c2410 }
            // n = 7, score = 200
            //   bb????????           |                     
            //   895c2404             | mov                 dword ptr [esp + 4], ebx
            //   c744240810000000     | mov                 dword ptr [esp + 8], 0x10
            //   e8????????           |                     
            //   8b5c240c             | mov                 ebx, dword ptr [esp + 0xc]
            //   899c24ec000000       | mov                 dword ptr [esp + 0xec], ebx
            //   8b5c2410             | mov                 ebx, dword ptr [esp + 0x10]

        $sequence_8 = { 8b29 89ac2498000000 8b6904 89ac249c000000 80fb00 7554 8b05???????? }
            // n = 7, score = 200
            //   8b29                 | mov                 ebp, dword ptr [ecx]
            //   89ac2498000000       | mov                 dword ptr [esp + 0x98], ebp
            //   8b6904               | mov                 ebp, dword ptr [ecx + 4]
            //   89ac249c000000       | mov                 dword ptr [esp + 0x9c], ebp
            //   80fb00               | cmp                 bl, 0
            //   7554                 | jne                 0x56
            //   8b05????????         |                     

        $sequence_9 = { 6bed18 01eb 8dac248c000000 895c2404 896c2408 bd???????? 892c24 }
            // n = 7, score = 200
            //   6bed18               | imul                ebp, ebp, 0x18
            //   01eb                 | add                 ebx, ebp
            //   8dac248c000000       | lea                 ebp, [esp + 0x8c]
            //   895c2404             | mov                 dword ptr [esp + 4], ebx
            //   896c2408             | mov                 dword ptr [esp + 8], ebp
            //   bd????????           |                     
            //   892c24               | mov                 dword ptr [esp], ebp

    condition:
        7 of them and filesize < 12689408
}