Function at 0x3001e300
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 [0x3021be88]
xor eax, esp
mov dword [esp + 0x718], eax
mov edx, dword [0x302724fc]
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 0x3001e330
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
lea eax, [esp + 0x518]
push eax
call fcn.3016bc70
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
add esp, 0xc
cmp dword [0x30270314], 0
jne 0x3001e367
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.3001daf0
add esp, 0xc
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x1fc]
push str._scapemon.yac
push eax
call fcn.3001daf0
mov eax, dword [0x3026d104]
add esp, 0xc
inc eax
mov dword [0x3026d104], eax
cmp eax, 1
jg 0x3001e49e
push 0
call fcn.30169fd3
add esp, 4
push eax
call fcn.301699cd
add esp, 4
mov esi, 0xffffffbf
lea eax, [esi - 0x20]
lea ecx, [esi + 0x41]
cmp eax, 0x19
ja 0x3001e3e7
lea eax, [ecx - 0x20]
jmp 0x3001e3f0
mov al, cl
cmp esi, 0x19
ja 0x3001e3f0
add al, 0x20
push ecx
mov byte [esi + 0x3026d301], al
call fcn.3016b20e
mov byte [esi + 0x3026d201], al
add esp, 4
inc esi
lea eax, [esi + 0x41]
cmp eax, 0x100
jl 0x3001e3d7
push 0
push 0x8000
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x3026d128], eax
test eax, eax
je 0x3001e49e
mov esi, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call esi
mov dword [0x3026d1a0], eax
cmp eax, 0xffffffff
je 0x3001e49e
call esi
mov dword [0x3026d1a4], eax
cmp eax, 0xffffffff
je 0x3001e49e
mov ecx, dword [fcn.300593f0]
test ecx, ecx
je 0x3001e46c
mov esi, 0x30234690
lea eax, [esi - 0x10]
push eax
call ecx
add esp, 4
test eax, eax
jne 0x3001e49e
mov ecx, dword [esi + 0x18]
add esi, 0x18
test ecx, ecx
jne 0x3001e455
mov dword [0x3026d108], 0x4000
mov dword [0x3026d110], 0x2710
mov dword [0x3026d120], 0x40000000
mov dword [0x3026d124], 0
mov dword [0x3026d118], 0x200
lea eax, [esp + 0x1f8]
push 0x301fc178
push eax
call fcn.3016bb02
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001e579
lea eax, [esp + 0x1f8]
push 0x302088dc
push eax
call fcn.3016bb02
mov edi, eax
add esp, 8
test edi, edi
jne 0x3001e4dd
lea esi, [eax + 3]
jmp 0x3001e522
lea edx, [esp + 0xc]
mov dword [esp + 0x14], edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], fcn.3016ef78
call fcn.30051ad0
mov esi, eax
test esi, esi
jne 0x3001e519
mov ecx, dword [esp + 0xc]
mov edx, 0x302455d0
call fcn.300514d0
mov esi, eax
test esi, esi
jne 0x3001e519
mov ecx, dword [esp + 0xc]
call fcn.30051830
push edi
call fcn.3016bc3e
add esp, 4
push ebx
call fcn.3016bc3e
add esp, 4
lea eax, [esp + 0x1f8]
push eax
test esi, esi
jne 0x3001e549
push str.YaraInit:_Compiled_rules_loaded_from_existing_file__s_n
call fcn.30009b40
add esp, 8
jmp 0x3001e8fb
cmp esi, 3
jne 0x3001e560
push str.YaraInit:_Unable_to_load_existing_compiled_rules_file__s_n
call fcn.30009b40
add esp, 8
jmp 0x3001e8fb
push str.YaraInit:_Error_loading_existing_compiled_rules_file__s_n
call fcn.30009b40
add esp, 8
mov ecx, esi
call fcn.3001dfd0
jmp 0x3001e8fb
lea ecx, [esp + 0xc]
call fcn.30050660
mov esi, dword [esp + 0xc]
test eax, eax
je 0x3001e59c
push str.YaraInit:_yr_compiler_create_failure_n
call fcn.30009b40
add esp, 4
jmp 0x3001e840
cmp dword [0x30270340], 0
je 0x3001e78b
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x61c]
push str._s.yar
push eax
call fcn.3001daf0
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 0x3001e776
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.3001db10
add esp, 0x14
test byte [esp + 0xb8], 0x10
jne 0x3001e750
lea eax, [esp + 0x300]
push 0x301fc178
push eax
call fcn.3016bb02
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001e74c
cmp dword [esi + 0x18], 0
je 0x3001e665
push 0x23b
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__rules__NULL
call fcn.3016c8c9
add esp, 0xc
cmp dword [esi + 0x1c], 0
je 0x3001e682
push 0x240
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016c8c9
add esp, 0xc
mov edx, str.default
mov ecx, esi
call fcn.30050c50
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001e6ee
lea edx, [esp + 0x300]
mov ecx, esi
call fcn.30050aa0
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001e6ee
mov edx, esi
mov ecx, ebx
call fcn.30058730
mov edi, eax
mov eax, dword [esi + 0x238]
test eax, eax
jle 0x3001e6f4
dec eax
mov dword [esi + 0x238], eax
push dword [esi + eax*4 + 0x1f8]
push 0
push dword [0x3026d128]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esi + 0x238]
mov dword [esi + eax*4 + 0x1f8], 0
jmp 0x3001e6f4
inc dword [esi + 0x1c]
mov edi, dword [esi + 0x1c]
cmp edi, 3
jne 0x3001e714
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_open_file__s_n
call fcn.30009b40
mov edi, dword [esp + 0x18]
add esp, 8
jmp 0x3001e743
test edi, edi
je 0x3001e73a
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_compile_rule_file__s_n
call fcn.30009b40
add esp, 8
mov ecx, edi
call fcn.3001dfd0
mov edi, dword [esp + 0x10]
jmp 0x3001e743
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x10], edi
push ebx
call fcn.3016bc3e
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 0x3001e5f1
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
push str.YaraInit:_Compiled__d_rule_files_n
jmp 0x3001e783
lea eax, [esp + 0x408]
push eax
push str.YaraInit:_Found_no_Yara_rules_in__s_n
call fcn.30009b40
add esp, 8
cmp dword [esi + 0x18], 0
je 0x3001e7a8
push 0x27f
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__rules__NULL
call fcn.3016c8c9
add esp, 0xc
cmp dword [esi + 0x1c], 0
je 0x3001e7c5
push 0x283
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016c8c9
add esp, 0xc
mov edx, str.default
mov ecx, esi
call fcn.30050c50
mov dword [esi + 0x24], eax
test eax, eax
je 0x3001e7e1
mov eax, dword [esi + 0x1c]
inc eax
mov dword [esi + 0x1c], eax
jmp 0x3001e7e8
mov edx, esi
call fcn.30058630
test eax, eax
je 0x3001e801
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Failed_to_add_internal_yara_rules._n
call fcn.30009b40
add esp, 8
cmp dword [esi + 0x1c], 0
je 0x3001e81e
push 0x2c3
push str.d:work3rdpartyyaralibyaracompiler.c
push str.compiler__errors__0
call fcn.3016c8c9
add esp, 0xc
mov dword [0x302455d0], 0
cmp dword [esi + 0x18], 0
jne 0x3001e875
mov ecx, esi
call fcn.30050db0
test eax, eax
je 0x3001e875
mov ecx, eax
call fcn.3001dfd0
test esi, esi
je 0x3001e84b
mov ecx, esi
call fcn.30050920
cmp dword [0x302455d0], 0
je 0x3001e859
call fcn.300515d0
call fcn.300513d0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x718]
xor ecx, esp
call fcn.3015f3bd
mov esp, ebp
pop ebp
ret
cmp dword [0x30270340], 0
mov edi, dword [esi + 0x18]
mov dword [0x302455d0], edi
je 0x3001e8f4
lea eax, [esp + 0x1f8]
push 0x30208db0
push eax
call fcn.3016bb02
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x3001e8b0
mov edi, 3
mov ecx, edi
call fcn.3001dfd0
jmp 0x3001e8f4
mov ecx, dword [edi]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], fcn.3016d4bd
call fcn.30051d80
push ebx
mov edi, eax
call fcn.3016bc3e
add esp, 4
test edi, edi
je 0x3001e8df
mov ecx, edi
call fcn.3001dfd0
jmp 0x3001e8f4
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Compiled_rules_saved_to_file__s_n
call fcn.30009b40
add esp, 8
mov ecx, esi
call fcn.30050920
lea eax, [esp + 0x20]
mov dword [0x30272514], 1
push eax
mov dword [0x30272518], 1
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x3001e935
push str.YaraInit:_Failed_to_get_OS_version
call fcn.30009b60
add esp, 4
jmp 0x3001e964
cmp dword [esp + 0x24], 6
jne 0x3001e945
cmp dword [esp + 0x28], 1
ja 0x3001e947
jmp 0x3001e964
jbe 0x3001e964
push 0x301e7978
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
mov ecx, esi
call fcn.30002350
mov edx, eax
mov ecx, esi
call fcn.3001e1c0
mov ecx, dword [esp + 0x724]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.3015f3bd
mov esp, ebp
pop ebp
ret