Function at 0x3001e4c0
Capabilities:
Allocate thread local storage
Check os version
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x71c
mov eax, dword [0x3021ae88]
xor eax, esp
mov dword [esp + 0x718], eax
mov edx, dword [0x3027143c]
mov ecx, edx
push ebx
push esi
push edi
mov dword [esp + 0xc], 0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x3001e4f0
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
lea eax, [esp + 0x518]
push eax
call fcn.3016a610
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
add esp, 0xc
cmp dword [0x3026f250], 0
jne 0x3001e527
lea eax, [esp + 0x510]
push eax
call esi
lea eax, [esp + 0x510]
push eax
call esi
lea eax, [esp + 0x510]
push eax
lea eax, [esp + 0x40c]
push str._sdatayara
push eax
call fcn.3001dcb0
add esp, 0xc
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x1fc]
push str._scapemon.yac
push eax
call fcn.3001dcb0
mov eax, dword [0x3026c054]
add esp, 0xc
inc eax
mov dword [0x3026c054], eax
cmp eax, 1
jg 0x3001e65e
push 0
call fcn.30168973
add esp, 4
push eax
call fcn.3016836d
add esp, 4
mov esi, 0xffffffbf
lea eax, [esi - 0x20]
lea ecx, [esi + 0x41]
cmp eax, 0x19
ja 0x3001e5a7
lea eax, [ecx - 0x20]
jmp 0x3001e5b0
mov al, cl
cmp esi, 0x19
ja 0x3001e5b0
add al, 0x20
push ecx
mov byte [esi + 0x3026c241], al
call fcn.30169bae
mov byte [esi + 0x3026c141], al
add esp, 4
inc esi
lea eax, [esi + 0x41]
cmp eax, 0x100
jl 0x3001e597
push 0
push 0x8000
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x3026c078], eax
test eax, eax
je 0x3001e65e
mov esi, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call esi
mov dword [0x3026c0f0], eax
cmp eax, 0xffffffff
je 0x3001e65e
call esi
mov dword [0x3026c0f4], eax
cmp eax, 0xffffffff
je 0x3001e65e
mov ecx, dword [fcn.30057d40]
test ecx, ecx
je 0x3001e62c
mov esi, 0x302335f0
lea eax, [esi - 0x10]
push eax
call ecx
add esp, 4
test eax, eax
jne 0x3001e65e
mov ecx, dword [esi + 0x18]
add esi, 0x18
test ecx, ecx
jne 0x3001e615
mov dword [0x3026c058], 0x4000
mov dword [0x3026c060], 0x2710
mov dword [0x3026c070], 0x40000000
mov dword [0x3026c074], 0
mov dword [0x3026c068], 0x200
lea eax, [esp + 0x1f8]
push 0x301fb338
push eax
call fcn.3016a4a2
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001e739
lea eax, [esp + 0x1f8]
push 0x3020781c
push eax
call fcn.3016a4a2
mov edi, eax
add esp, 8
test edi, edi
jne 0x3001e69d
lea esi, [eax + 3]
jmp 0x3001e6e2
lea edx, [esp + 0xc]
mov dword [esp + 0x14], edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], fcn.3016d828
call fcn.30050420
mov esi, eax
test esi, esi
jne 0x3001e6d9
mov ecx, dword [esp + 0xc]
mov edx, 0x30244530
call fcn.3004fe20
mov esi, eax
test esi, esi
jne 0x3001e6d9
mov ecx, dword [esp + 0xc]
call fcn.30050180
push edi
call fcn.3016a5de
add esp, 4
push ebx
call fcn.3016a5de
add esp, 4
lea eax, [esp + 0x1f8]
push eax
test esi, esi
jne 0x3001e709
push str.YaraInit:_Compiled_rules_loaded_from_existing_file__s_n
call fcn.30009b00
add esp, 8
jmp 0x3001eabb
cmp esi, 3
jne 0x3001e720
push str.YaraInit:_Unable_to_load_existing_compiled_rules_file__s_n
call fcn.30009b00
add esp, 8
jmp 0x3001eabb
push str.YaraInit:_Error_loading_existing_compiled_rules_file__s_n
call fcn.30009b00
add esp, 8
mov ecx, esi
call fcn.3001e190
jmp 0x3001eabb
lea ecx, [esp + 0xc]
call fcn.3004efb0
mov esi, dword [esp + 0xc]
test eax, eax
je 0x3001e75c
push str.YaraInit:_yr_compiler_create_failure_n
call fcn.30009b00
add esp, 4
jmp 0x3001ea00
cmp dword [0x3026f27c], 0
je 0x3001e94b
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x61c]
push str._s.yar
push eax
call fcn.3001dcb0
add esp, 0xc
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x3001e936
xor edi, edi
mov ebx, eax
mov dword [esp + 0x10], edi
lea eax, [esp + 0xe4]
push eax
lea eax, [esp + 0x40c]
push eax
push str._s_s
lea eax, [esp + 0x30c]
push 0x104
push eax
call fcn.3001dcd0
add esp, 0x14
test byte [esp + 0xb8], 0x10
jne 0x3001e910
lea eax, [esp + 0x300]
push 0x301fb338
push eax
call fcn.3016a4a2
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001e90c
cmp dword [esi + 0x18], 0
je 0x3001e825
push 0x23b
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__rules__NULL
call fcn.3016b269
add esp, 0xc
cmp dword [esi + 0x1c], 0
je 0x3001e842
push 0x240
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016b269
add esp, 0xc
mov edx, str.default
mov ecx, esi
call fcn.3004f5a0
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001e8ae
lea edx, [esp + 0x300]
mov ecx, esi
call fcn.3004f3f0
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001e8ae
mov edx, esi
mov ecx, ebx
call fcn.30057080
mov edi, eax
mov eax, dword [esi + 0x238]
test eax, eax
jle 0x3001e8b4
dec eax
mov dword [esi + 0x238], eax
push dword [esi + eax*4 + 0x1f8]
push 0
push dword [0x3026c078]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esi + 0x238]
mov dword [esi + eax*4 + 0x1f8], 0
jmp 0x3001e8b4
inc dword [esi + 0x1c]
mov edi, dword [esi + 0x1c]
cmp edi, 3
jne 0x3001e8d4
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_open_file__s_n
call fcn.30009b00
mov edi, dword [esp + 0x18]
add esp, 8
jmp 0x3001e903
test edi, edi
je 0x3001e8fa
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_compile_rule_file__s_n
call fcn.30009b00
add esp, 8
mov ecx, edi
call fcn.3001e190
mov edi, dword [esp + 0x10]
jmp 0x3001e903
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x10], edi
push ebx
call fcn.3016a5de
add esp, 4
mov ebx, dword [esp + 0xc]
lea eax, [esp + 0xb8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x3001e7b1
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
push str.YaraInit:_Compiled__d_rule_files_n
jmp 0x3001e943
lea eax, [esp + 0x408]
push eax
push str.YaraInit:_Found_no_Yara_rules_in__s_n
call fcn.30009b00
add esp, 8
cmp dword [esi + 0x18], 0
je 0x3001e968
push 0x27f
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__rules__NULL
call fcn.3016b269
add esp, 0xc
cmp dword [esi + 0x1c], 0
je 0x3001e985
push 0x283
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016b269
add esp, 0xc
mov edx, str.default
mov ecx, esi
call fcn.3004f5a0
mov dword [esi + 0x24], eax
test eax, eax
je 0x3001e9a1
mov eax, dword [esi + 0x1c]
inc eax
mov dword [esi + 0x1c], eax
jmp 0x3001e9a8
mov edx, esi
call fcn.30056f80
test eax, eax
je 0x3001e9c1
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Failed_to_add_internal_yara_rules._n
call fcn.30009b00
add esp, 8
cmp dword [esi + 0x1c], 0
je 0x3001e9de
push 0x2c3
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016b269
add esp, 0xc
mov dword [0x30244530], 0
cmp dword [esi + 0x18], 0
jne 0x3001ea35
mov ecx, esi
call fcn.3004f700
test eax, eax
je 0x3001ea35
mov ecx, eax
call fcn.3001e190
test esi, esi
je 0x3001ea0b
mov ecx, esi
call fcn.3004f270
cmp dword [0x30244530], 0
je 0x3001ea19
call fcn.3004ff20
call fcn.3004fd20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x718]
xor ecx, esp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret
cmp dword [0x3026f27c], 0
mov edi, dword [esi + 0x18]
mov dword [0x30244530], edi
je 0x3001eab4
lea eax, [esp + 0x1f8]
push 0x30207cf0
push eax
call fcn.3016a4a2
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x3001ea70
mov edi, 3
mov ecx, edi
call fcn.3001e190
jmp 0x3001eab4
mov ecx, dword [edi]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], fcn.3016bd6d
call fcn.300506d0
push ebx
mov edi, eax
call fcn.3016a5de
add esp, 4
test edi, edi
je 0x3001ea9f
mov ecx, edi
call fcn.3001e190
jmp 0x3001eab4
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Compiled_rules_saved_to_file__s_n
call fcn.30009b00
add esp, 8
mov ecx, esi
call fcn.3004f270
lea eax, [esp + 0x20]
mov dword [0x30271454], 1
push eax
mov dword [0x30271458], 1
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x3001eaf5
push str.YaraInit:_Failed_to_get_OS_version
call fcn.30009b20
add esp, 4
jmp 0x3001eb24
cmp dword [esp + 0x24], 6
jne 0x3001eb05
cmp dword [esp + 0x28], 1
ja 0x3001eb07
jmp 0x3001eb24
jbe 0x3001eb24
push 0x301e6ac8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
mov ecx, esi
call fcn.30002410
mov edx, eax
mov ecx, esi
call fcn.3001e380
mov ecx, dword [esp + 0x724]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret