Function at 0x100138a0
Capabilities:
Encode data using xor
Read file on windows
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x1cc]
sub esp, 0x1cc
push 0xffffffffffffffff
push 0x10065dcd
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x1008c880]
xor eax, ebp
mov dword [ebp + 0x1c8], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0x1006b7e0
push str..DataLocalEventEntryLevel.bmd
call fcn.1004d39f
mov edi, eax
add esp, 8
test edi, edi
jne 0x1001390d
push 0x10
push 0x1006b808
push str.EventEntryLevel.bmd_file_not_found
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 2
push 0
push edi
call fcn.1004d9b3
push edi
call fcn.1004e012
push edi
mov esi, eax
call fcn.1004e1d8
push esi
call fcn.100463f9
push edi
push esi
push 1
push eax
mov dword [ebp - 0x14], eax
call fcn.1004d58f
push edi
call fcn.1004d2b8
add esp, 0x2c
xor ecx, ecx
test esi, esi
jle 0x10013963
mov edx, dword [ebp - 0x14]
nop word [eax + eax]
mov eax, ecx
and eax, 0x1f
mov al, byte [eax + 0x1008c578]
xor byte [ecx + edx], al
inc ecx
cmp ecx, esi
jl 0x10013950
lea ecx, [ebp]
call fcn.10040d30
push 0
push 0x74
push esi
push dword [ebp - 0x14]
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp]
call fcn.100418e0
cmp dword [ebp - 0x3c], 0
je 0x100139c7
lea ecx, [ebp - 0x3c]
call fcn.10041670
push eax
lea eax, [ebp + 0xc8]
push str.EventEntryLevel.bmd_file_load_error___s_
push eax
call fcn.10002150
add esp, 0xc
lea eax, [ebp + 0xc8]
push 0x10
push 0x1006b860
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push str.EventEntryLevel
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp]
call fcn.100412b0
push str.IllusionTemple
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x18]
call fcn.100412b0
push 0x1006b888
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.100412b0
lea ecx, [ebp - 0x10]
call fcn.10040e50
test eax, eax
je 0x10013a82
push 0
push 0x1006b890
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041240
mov ecx, eax
call fcn.100411f0
mov edi, eax
cmp edi, 4
ja 0x10013a65
push 0
push 0x1006b898
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041240
mov ecx, eax
call fcn.100411f0
push 0
mov esi, eax
lea ecx, [ebp - 0x10]
push 0x1006b89c
lea eax, [ebp - 0x2c]
push eax
call fcn.10041240
mov ecx, eax
call fcn.100411f0
mov dword [ebx + edi*8 + 0x3c], esi
mov dword [ebx + edi*8 + 0x40], eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041c10
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
call fcn.10040e50
test eax, eax
jne 0x10013a06
push str.Rest
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
call fcn.100412b0
push str.Entry
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.100412b0
lea ecx, [ebp - 0x10]
call fcn.10040e50
test eax, eax
je 0x10013b2c
push 0
push str.Level
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041240
mov ecx, eax
call fcn.100411f0
mov edi, eax
cmp edi, 6
ja 0x10013b0f
push 0
push 0x1006b8b8
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041240
mov ecx, eax
call fcn.100411f0
push 0
mov esi, eax
lea ecx, [ebp - 0x10]
push 0x1006b8bc
lea eax, [ebp - 0x28]
push eax
call fcn.10041240
mov ecx, eax
call fcn.100411f0
mov dword [ebx + edi*8 + 4], esi
mov dword [ebx + edi*8 + 8], eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.10041c10
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
call fcn.10040e50
test eax, eax
jne 0x10013ab0
push dword [ebp - 0x14]
call fcn.10046402
add esp, 4
mov ecx, ebx
call fcn.10013c60
mov ecx, ebx
call fcn.10013b70
lea ecx, [ebp]
call fcn.10040e10
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1c8]
xor ecx, ebp
call fcn.100463c8
lea esp, [ebp + 0x1cc]
pop ebp
ret