Function at 0x3001ec70
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 [0x30215e88]
xor eax, esp
mov dword [esp + 0x718], eax
mov edx, dword [0x3026d89c]
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 0x3001eca0
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
lea eax, [esp + 0x518]
push eax
call fcn.301664c0
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
add esp, 0xc
cmp dword [0x3026b2b8], 0
jne 0x3001ecd7
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.3001e370
add esp, 0xc
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x1fc]
push str._scapemon.yac
push eax
call fcn.3001e370
mov eax, dword [0x3026745c]
add esp, 0xc
inc eax
mov dword [0x3026745c], eax
cmp eax, 1
jg 0x3001ee0e
push 0
call fcn.30164993
add esp, 4
push eax
call fcn.3016422d
add esp, 4
mov esi, 0xffffffbf
lea eax, [esi - 0x20]
lea ecx, [esi + 0x41]
cmp eax, 0x19
ja 0x3001ed57
lea eax, [ecx - 0x20]
jmp 0x3001ed60
mov al, cl
cmp esi, 0x19
ja 0x3001ed60
add al, 0x20
push ecx
mov byte [esi + 0x30267641], al
call fcn.30165bce
mov byte [esi + 0x30267541], al
add esp, 4
inc esi
lea eax, [esi + 0x41]
cmp eax, 0x100
jl 0x3001ed47
push 0
push 0x8000
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x30267480], eax
test eax, eax
je 0x3001ee0e
mov esi, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call esi
mov dword [0x302674f8], eax
cmp eax, 0xffffffff
je 0x3001ee0e
call esi
mov dword [0x302674fc], eax
cmp eax, 0xffffffff
je 0x3001ee0e
mov ecx, dword [fcn.3005a410]
test ecx, ecx
je 0x3001eddc
mov esi, 0x3022ea50
lea eax, [esi - 0x10]
push eax
call ecx
add esp, 4
test eax, eax
jne 0x3001ee0e
mov ecx, dword [esi + 0x18]
add esi, 0x18
test ecx, ecx
jne 0x3001edc5
mov dword [0x30267460], 0x4000
mov dword [0x30267468], 0x2710
mov dword [0x30267478], 0x40000000
mov dword [0x3026747c], 0
mov dword [0x30267470], 0x200
lea eax, [esp + 0x1f8]
push 0x301f71f0
push eax
call fcn.30166354
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001eee9
lea eax, [esp + 0x1f8]
push 0x30203c54
push eax
call fcn.30166354
mov edi, eax
add esp, 8
test edi, edi
jne 0x3001ee4d
lea esi, [eax + 3]
jmp 0x3001ee92
lea edx, [esp + 0xc]
mov dword [esp + 0x14], edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], fcn.301697c8
call fcn.30052f20
mov esi, eax
test esi, esi
jne 0x3001ee89
mov ecx, dword [esp + 0xc]
mov edx, 0x3023f990
call fcn.300529e0
mov esi, eax
test esi, esi
jne 0x3001ee89
mov ecx, dword [esp + 0xc]
call fcn.30052cd0
push edi
call fcn.30166490
add esp, 4
push ebx
call fcn.30166490
add esp, 4
lea eax, [esp + 0x1f8]
push eax
test esi, esi
jne 0x3001eeb9
push str.YaraInit:_Compiled_rules_loaded_from_existing_file__s_n
call fcn.3000a0d0
add esp, 8
jmp 0x3001f1da
cmp esi, 3
jne 0x3001eed0
push str.YaraInit:_Unable_to_load_existing_compiled_rules_file__s_n
call fcn.3000a0d0
add esp, 8
jmp 0x3001f1da
push str.YaraInit:_Error_loading_existing_compiled_rules_file__s_n
call fcn.3000a0d0
add esp, 8
mov ecx, esi
call fcn.3001e930
jmp 0x3001f1da
lea ecx, [esp + 0xc]
call fcn.30051b80
mov esi, dword [esp + 0xc]
test eax, eax
je 0x3001ef0c
push str.YaraInit:_yr_compiler_create_failure_n
call fcn.3000a0d0
add esp, 4
jmp 0x3001f11f
cmp dword [0x3026b2e8], 0
je 0x3001f0c1
lea eax, [esp + 0x408]
push eax
lea eax, [esp + 0x61c]
push str._s.yar
push eax
call fcn.3001e370
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 0x3001f0ac
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.3001e390
add esp, 0x14
test byte [esp + 0xb8], 0x10
jne 0x3001f086
lea eax, [esp + 0x300]
push 0x301f71f0
push eax
call fcn.30166354
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x3001f082
mov edx, str.default
mov ecx, esi
call fcn.30052170
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001f024
lea edx, [esp + 0x300]
mov ecx, esi
call fcn.30051fc0
mov dword [esi + 0x24], eax
test eax, eax
jne 0x3001f024
mov edx, esi
mov ecx, ebx
call fcn.30059750
mov edi, eax
mov eax, dword [esi + 0x238]
test eax, eax
jle 0x3001f02a
dec eax
mov dword [esi + 0x238], eax
push dword [esi + eax*4 + 0x1f8]
push 0
push dword [0x30267480]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esi + 0x238]
mov dword [esi + eax*4 + 0x1f8], 0
jmp 0x3001f02a
inc dword [esi + 0x1c]
mov edi, dword [esi + 0x1c]
cmp edi, 3
jne 0x3001f04a
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_open_file__s_n
call fcn.3000a0d0
mov edi, dword [esp + 0x18]
add esp, 8
jmp 0x3001f079
test edi, edi
je 0x3001f070
lea eax, [esp + 0x300]
push eax
push str.YaraInit:_Unable_to_compile_rule_file__s_n
call fcn.3000a0d0
add esp, 8
mov ecx, edi
call fcn.3001e930
mov edi, dword [esp + 0x10]
jmp 0x3001f079
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x10], edi
push ebx
call fcn.30166490
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 0x3001ef61
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
push str.YaraInit:_Compiled__d_rule_files_n
jmp 0x3001f0b9
lea eax, [esp + 0x408]
push eax
push str.YaraInit:_Found_no_Yara_rules_in__s_n
call fcn.3000a0d0
add esp, 8
mov edx, str.default
mov ecx, esi
call fcn.30052170
mov dword [esi + 0x24], eax
test eax, eax
je 0x3001f0dd
mov eax, dword [esi + 0x1c]
inc eax
mov dword [esi + 0x1c], eax
jmp 0x3001f0e4
mov edx, esi
call fcn.30059650
test eax, eax
je 0x3001f0fd
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Failed_to_add_internal_yara_rules._n
call fcn.3000a0d0
add esp, 8
mov dword [0x3023f990], 0
cmp dword [esi + 0x18], 0
jne 0x3001f154
mov ecx, esi
call fcn.300522c0
test eax, eax
je 0x3001f154
mov ecx, eax
call fcn.3001e930
test esi, esi
je 0x3001f12a
mov ecx, esi
call fcn.30051e40
cmp dword [0x3023f990], 0
je 0x3001f138
call fcn.30052a70
call fcn.300528e0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x718]
xor ecx, esp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret
cmp dword [0x3026b2e8], 0
mov edi, dword [esi + 0x18]
mov dword [0x3023f990], edi
je 0x3001f1d3
lea eax, [esp + 0x1f8]
push 0x30204078
push eax
call fcn.30166354
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x3001f18f
mov edi, 3
mov ecx, edi
call fcn.3001e930
jmp 0x3001f1d3
mov ecx, dword [edi]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], fcn.30167d0d
call fcn.30053210
push ebx
mov edi, eax
call fcn.30166490
add esp, 4
test edi, edi
je 0x3001f1be
mov ecx, edi
call fcn.3001e930
jmp 0x3001f1d3
lea eax, [esp + 0x1f8]
push eax
push str.YaraInit:_Compiled_rules_saved_to_file__s_n
call fcn.3000a0d0
add esp, 8
mov ecx, esi
call fcn.30051e40
lea eax, [esp + 0x20]
mov dword [0x3026d8b4], 1
push eax
mov dword [0x3026d8b8], 1
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x3001f214
push str.YaraInit:_Failed_to_get_OS_version
call fcn.3000a0f0
add esp, 4
jmp 0x3001f243
cmp dword [esp + 0x24], 6
jne 0x3001f224
cmp dword [esp + 0x28], 1
ja 0x3001f226
jmp 0x3001f243
jbe 0x3001f243
push 0x301e2b38
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
mov ecx, esi
call fcn.30002590
mov edx, eax
mov ecx, esi
call fcn.3001eb20
mov ecx, dword [esp + 0x724]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret