Function at 0x4c19a5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x18]
push ebx
and eax, 2
push esi
mov esi, ecx
cmp al, 2
sete byte [ebp - 1]
cmp byte [esi + 0x12c], 8
push edi
ja 0x4c19da
mov cl, byte [esi + 0x11e]
movzx eax, cl
dec eax
je 0x4c19e5
dec eax
dec eax
je 0x4c19e5
sub eax, 6
je 0x4c19e5
mov dword [esi], 0x1c
jmp 0x4c1d5e
xor ebx, ebx
cmp cl, 3
jne 0x4c19f4
mov dword [esi + 0x108], ebx
jmp 0x4c19fe
mov dword [esi + 0x108], 1
mov al, byte [esi + 0x11c]
cmp al, bl
je 0x4c1a27
mov ecx, dword [ebp + 8]
movzx eax, al
push eax
lea eax, [esi + 4]
push eax
call fcn.004bdff5
test al, al
jne 0x4c1a27
mov dword [esi], 3
jmp 0x4c1d5e
mov al, byte [esi + 0x12d]
mov edi, dword [ebp + 0x14]
mov cl, al
push 0x400
shr al, 5
and cl, 0xf
and al, 1
push ebx
push edi
mov byte [esi + 0x104], cl
mov byte [ebp + 0x1b], al
call fcn.005803a0
add esp, 0xc
cmp byte [esi + 0x11d], bl
je 0x4c1ab0
movzx eax, word [esi + 0x121]
movzx ecx, word [esi + 0x11f]
add eax, ecx
mov dword [ebp - 0x10], ebx
test eax, eax
jle 0x4c1ad9
add edi, 2
movzx eax, byte [esi + 0x123]
push eax
lea eax, [edi + 1]
push dword [ebp + 8]
mov ecx, esi
push eax
lea eax, [edi - 1]
push edi
push eax
lea eax, [edi - 2]
push eax
call fcn.004c1d67
movzx eax, word [esi + 0x121]
movzx ecx, word [esi + 0x11f]
inc dword [ebp - 0x10]
add eax, ecx
add edi, 4
cmp dword [ebp - 0x10], eax
jl 0x4c1a74
jmp 0x4c1ad9
cmp dword [esi + 0x108], ebx
jne 0x4c1d58
xor ecx, ecx
lea eax, [edi + 2]
or byte [eax + 1], 0xff
mov byte [eax - 2], cl
mov byte [eax - 1], cl
mov byte [eax], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x4c1ac1
mov al, byte [esi + 0x11e]
cmp al, 9
je 0x4c1aeb
cmp al, 0xa
je 0x4c1aeb
cmp al, 0xb
jne 0x4c1af2
or dword [esi + 0x108], 4
movzx eax, word [esi + 0x128]
cmp byte [ebp - 1], bl
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ebx
je 0x4c1b1e
lea eax, [eax*8 + 0x1f]
push 0x20
cdq
pop ecx
mov dword [ebp - 0x10], 0x428
idiv ecx
shl eax, 2
mov dword [ebp - 8], eax
movzx edi, word [esi + 0x12a]
imul edi, eax
add edi, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.004c9116
push edi
lea ecx, [ebp - 0x24]
call fcn.004c9122
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x4c1b4e
mov dword [esi], 1
jmp 0x4c1d5e
cmp byte [ebp - 1], bl
mov ecx, eax
mov dword [ebp - 0x18], ecx
je 0x4c1bc3
mov dword [eax], 0x28
push 0x400
movzx ecx, word [esi + 0x128]
mov dword [eax + 4], ecx
push dword [ebp + 0x14]
movzx ecx, word [esi + 0x12a]
mov dword [eax + 8], ecx
mov word [eax + 0xc], 1
mov word [eax + 0xe], 8
mov dword [eax + 0x10], ebx
movzx ecx, word [esi + 0x12a]
imul ecx, dword [ebp - 8]
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x20], 0x100
mov dword [eax + 0x24], ebx
mov eax, dword [ebp - 0x1c]
add eax, 0x28
push eax
call dword [0x63878c]
mov ecx, dword [ebp - 0x18]
add esp, 0xc
cmp byte [ebp + 0x1b], bl
sete al
mov byte [ebp + 0x1b], al
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x114], ebx
add eax, ecx
cmp byte [ebp + 0x1b], bl
mov dword [esi + 0x118], ebx
mov dword [ebp - 0xc], eax
jne 0x4c1be4
sub ecx, dword [ebp - 8]
add ecx, edi
mov dword [ebp - 0xc], ecx
cmp word [esi + 0x12a], bx
mov dword [ebp - 0x10], ebx
jbe 0x4c1cd2
mov edi, 0x6387e8
cmp dword [esi], ebx
jne 0x4c1cd2
mov eax, dword [ebp - 0xc]
cmp word [esi + 0x128], bx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
jbe 0x4c1c5e
movzx eax, byte [esi + 0x12c]
push dword [ebp + 0x14]
mov ecx, esi
push eax
lea eax, [ebp - 2]
push dword [ebp + 8]
push eax
lea eax, [ebp - 3]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 1]
push eax
call fcn.004c1e92
test eax, eax
je 0x4c1c58
mov ecx, dword [ebp - 0x14]
mov al, byte [ebp - 1]
inc dword [ebp - 0x14]
inc dword [ebp - 0x18]
mov byte [ecx], al
movzx eax, word [esi + 0x128]
cmp dword [ebp - 0x18], eax
jb 0x4c1c13
jmp 0x4c1c5e
mov dword [esi], 3
cmp byte [ebp + 0x1b], bl
mov eax, dword [ebp - 8]
jne 0x4c1c6b
sub dword [ebp - 0xc], eax
jmp 0x4c1c6e
add dword [ebp - 0xc], eax
mov ecx, edi
call fcn.004b50e3
cmp dword [eax + 4], 1
jne 0x4c1cb1
mov ecx, edi
call fcn.004b50e3
cmp dword [eax], ebx
je 0x4c1cb1
mov ecx, edi
call fcn.004b50e3
mov ecx, edi
mov dword [ebp - 0x18], eax
call fcn.004b50e3
push dword [eax + 8]
movzx eax, word [esi + 0x12a]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x10]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x4c1cb3
xor eax, eax
cmp eax, ebx
jne 0x4c1ccc
movzx eax, word [esi + 0x12a]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x4c1bf9
jmp 0x4c1cd2
mov dword [esi], 0xe
movzx eax, word [esi + 0x128]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x10]
movzx eax, word [esi + 0x12a]
mov dword [ecx], eax
lea eax, [esi + 0x31d]
push eax
mov ecx, esi
push dword [ebp + 8]
call fcn.004c225a
test al, al
je 0x4c1d4e
push str.Found_TGA_footer_n
push ebx
call fcn.0053cac5
mov eax, dword [esi + 0x31d]
pop ecx
cmp eax, ebx
pop ecx
je 0x4c1d39
lea ecx, [esi + 0x12e]
push ecx
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.004c22b5
test al, al
je 0x4c1d39
push str.Found_TGA_extension_n
push ebx
call fcn.0053cac5
pop ecx
pop ecx
cmp dword [esi + 0x321], ebx
je 0x4c1d4e
push str.TGA_has_developer_ext_n
push ebx
call fcn.0053cac5
pop ecx
pop ecx
lea ecx, [ebp - 0x24]
call fcn.004c9283
jmp 0x4c1d60
mov dword [esi], 0x20
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14