Function at 0x10001320
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
je 0x1000133a
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 4]
test ecx, ecx
jne 0x1000133f
jmp 0x1000152c
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], edx
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
cmp dword [ebp + 0xc], 0xffffffff
jne 0x10001368
mov eax, dword [ebp + 8]
push eax
call fcn.10016b60
add esp, 4
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0x10], 0x80000000
jne 0x1000137a
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x38]
mov dword [ebp + 0x10], edx
cmp dword [ebp + 0x14], 0x80000000
jne 0x1000138c
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3c]
mov dword [ebp + 0x14], ecx
mov dword [ebp - 0xc], 0
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x14], edx
mov eax, dword [sym.imp.Engine.dll_unsigned_short_int____cdecl___int__int__int__g_RGB]
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
movzx edx, byte [ebp - 0x14]
push edx
movzx eax, byte [ebp - 0x13]
push eax
movzx ecx, byte [ebp - 0x12]
push ecx
call dword [ebp - 0x24]
add esp, 0xc
movzx edx, ax
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x30]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 0x30]
cmp dword [ebp + 0x1c], ecx
jge 0x100013d6
mov dword [ebp + 0x1c], 0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jge 0x10001517
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 8]
movzx edx, byte [ecx]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x2c]
push edx
push 0
movzx eax, byte [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 4]
call fcn.100011b0
cmp dword [ebp - 0x1c], 0xa
je 0x1000143c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + eax*4 + 0x28]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x10]
xor eax, 1
mov dword [ebp - 0x10], eax
jmp 0x1000144f
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
add edx, dword [ecx + 0x34]
mov dword [ebp + 0x14], edx
cmp dword [ebp + 0x1c], 0
je 0x10001512
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x30]
cmp ecx, dword [ebp + 0x1c]
jle 0x100014a2
mov edx, dword [ebp - 8]
cmp edx, dword [ebp + 0xc]
jge 0x10001486
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 8]
movzx ecx, byte [eax]
cmp ecx, 0xa
jne 0x10001486
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
add ecx, dword [eax + 0x34]
mov dword [ebp + 0x14], ecx
mov dword [ebp - 0x10], 0
jmp 0x10001512
cmp dword [ebp - 0xc], 0
je 0x10001512
mov edx, dword [ebp - 8]
add edx, 3
cmp edx, dword [ebp + 0xc]
jge 0x10001512
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x30]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
add ecx, dword [eax + edx*4 + 0x28]
cmp ecx, dword [ebp + 0x1c]
jl 0x10001512
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call sub.Engine.dll_TGetSecondVisibleCharacterThisLine
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x10001512
mov ecx, dword [ebp - 0x20]
push ecx
call sub.Engine.dll_TIsCharacterNotAlowAtLineHead
add esp, 4
test eax, eax
je 0x10001512
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x14]
add eax, dword [edx + 0x34]
mov dword [ebp + 0x14], eax
mov dword [ebp - 0x10], 0
jmp 0x100013d6
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 0x38], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x3c], ecx
mov esp, ebp
pop ebp
ret 0x18