Function at 0x1003aa76
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x110], eax
xor eax, eax
mov ecx, dword [0x1013d248]
mov edx, 0x20
mov dword [ebp - 0x114], eax
mov eax, edx
mov dword [ebp - 0x118], ecx
call fcn.1003a1b0
mov eax, esp
mov ecx, dword [ebp - 0x118]
add ecx, 0xffffe38f
mov dword [0x1013d244], ecx
mov ecx, dword [ebp - 0x114]
mov edx, dword [ebp - 0x114]
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x124], edx
jmp 0x1003ac78
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x12c]
lea edx, [0x1012cfe8]
mov esi, eax
add esi, 1
imul edi, eax, 0x98
mov ebx, edx
add ebx, edi
add ebx, 4
imul edi, eax, 0x98
mov dword [ebp - 0x130], eax
mov eax, edx
add eax, edi
add eax, 0x94
mov edi, dword [ebp - 0x134]
add edi, ecx
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x130]
imul eax, eax, 0x98
add edx, eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax]
mov edx, dword [edx]
movzx ebx, word [ebx]
xor ebx, eax
sub esp, 0xc
mov dword [esp], edi
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x140], ecx
mov dword [ebp - 0x144], ebx
call fcn.1003b101
add esp, 0xc
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x140]
add eax, ecx
mov edx, dword [ebp - 0x13c]
cmp edx, 0x1b3
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x12c], eax
jne 0x1003aae2
mov dword [0x1013d244], 0xede
lea eax, [0x1003c275]
mov ecx, 0x20
lea edx, [ebp - 0x10c]
mov dword [0x1013d248], 0x956
sub esp, 0xc
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x20
mov dword [ebp - 0x148], edx
mov dword [ebp - 0x14c], ecx
call fcn.1003a910
add esp, 0xc
mov dword [0x1013d244], 0x1f08
sub esp, 0x10
mov eax, dword [ebp - 0x148]
mov dword [esp], eax
mov ecx, dword [ebp - 0x134]
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x150]
mov dword [esp + 0xc], edx
call fcn.1003b3ae
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 0x134]
add ecx, 0xaa1b8
mov edx, dword [ebp - 0x110]
mov dword [edx], ecx
mov dword [0x1013d248], 0xe1f
mov dword [edx + 4], 0x133a00
mov ecx, dword [ebp - 0x134]
add ecx, 0xa5cd2
mov dword [edx + 8], ecx
mov dword [edx + 0xc], 0x2000
mov ecx, dword [0x1013d248]
add ecx, 0xfffff859
mov dword [0x1013d244], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x120]
lea edx, [0x1012cfe8]
imul esi, eax, 0x98
mov edi, edx
add edi, esi
add edi, 0x94
mov esi, dword [edi]
imul edi, eax, 0x98
add edx, edi
add edx, 4
movzx edx, word [edx]
xor edx, esi
add edx, ecx
add eax, 1
cmp eax, 0x1b3
mov ecx, edx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x124], eax
jne 0x1003ac78
lea eax, [0x1003c267]
mov ecx, 0xe
sub esp, 0xc
mov edx, dword [ebp - 0x11c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], 0xe
mov dword [ebp - 0x154], ecx
call fcn.1003b6eb
add esp, 0xc
mov dword [0x1013d244], 0x846
call fcn.1003baed
mov dword [ebp - 0x158], eax
sub esp, 8
mov eax, dword [ebp - 0x158]
mov dword [esp], eax
mov ecx, dword [ebp - 0x11c]
mov dword [esp + 4], ecx
call fcn.1003a655
add esp, 8
mov dword [0x1013d264], eax
mov ecx, dword [0x1013d244]
add ecx, 0xfffff5c8
mov dword [0x1013d248], ecx
sub esp, 0x10
mov ecx, esp
mov edx, dword [ebp - 0x150]
mov dword [ecx + 4], edx
mov dword [ecx + 0xc], 4
mov dword [ecx + 8], 0x1000
mov dword [ecx], 0
call eax
xor ecx, ecx
mov edx, dword [0x1013d248]
add edx, 0xffffe65e
mov dword [0x1013d244], edx
mov edx, ecx
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x12c], edx
mov dword [ebp - 0x128], ecx
jmp 0x1003aae2