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

Disassembly:
push ebp
lea ebp, [esp - 0x1cc]
sub esp, 0x1cc
push 0xffffffffffffffff
push 0x1005fe4d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x10087700]
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 0x10065818
push str..DataLocalEventEntryLevel.bmd
call fcn.10049454
mov edi, eax
add esp, 8
test edi, edi
jne 0x100120bd
push 0x10
push 0x10065840
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.10049a68
push edi
call fcn.1004a0c7
push edi
mov esi, eax
call fcn.1004a4c1
push esi
call fcn.10043701
push edi
push esi
push 1
push eax
mov dword [ebp - 0x14], eax
call fcn.10049644
push edi
call fcn.1004936d
add esp, 0x2c
xor ecx, ecx
test esi, esi
jle 0x10012113
mov edx, dword [ebp - 0x14]
nop word [eax + eax]
mov eax, ecx
and eax, 0x1f
mov al, byte [eax + 0x10087140]
xor byte [ecx + edx], al
inc ecx
cmp ecx, esi
jl 0x10012100
lea ecx, [ebp]
call fcn.1003ddc0
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.1003e970
cmp dword [ebp - 0x3c], 0
je 0x10012177
lea ecx, [ebp - 0x3c]
call fcn.1003e700
push eax
lea eax, [ebp + 0xc8]
push str.EventEntryLevel.bmd_file_load_error___s_
push eax
call fcn.100021c0
add esp, 0xc
lea eax, [ebp + 0xc8]
push 0x10
push 0x10065898
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.1003e340
push str.IllusionTemple
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x18]
call fcn.1003e340
push 0x100658c0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1003e340
lea ecx, [ebp - 0x10]
call fcn.1003dee0
test eax, eax
je 0x10012232
push 0
push 0x100658c8
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
mov edi, eax
cmp edi, 4
ja 0x10012215
push 0
push 0x100658d0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
push 0
mov esi, eax
lea ecx, [ebp - 0x10]
push 0x100658d4
lea eax, [ebp - 0x2c]
push eax
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
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.1003eca0
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
call fcn.1003dee0
test eax, eax
jne 0x100121b6
push str.Rest
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
call fcn.1003e340
push str.Entry
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.1003e340
lea ecx, [ebp - 0x10]
call fcn.1003dee0
test eax, eax
je 0x100122dc
push 0
push str.Level
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x10]
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
mov edi, eax
cmp edi, 6
ja 0x100122bf
push 0
push 0x100658f0
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
push 0
mov esi, eax
lea ecx, [ebp - 0x10]
push 0x100658f4
lea eax, [ebp - 0x28]
push eax
call fcn.1003e2d0
mov ecx, eax
call fcn.1003e280
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.1003eca0
lea ecx, [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
call fcn.1003dee0
test eax, eax
jne 0x10012260
push dword [ebp - 0x14]
call fcn.1004370a
add esp, 4
mov ecx, ebx
call fcn.10012410
mov ecx, ebx
call fcn.10012320
lea ecx, [ebp]
call fcn.1003dea0
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.1004344b
lea esp, [ebp + 0x1cc]
pop ebp
ret