Function at 0x5c9690
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x24]
mov eax, dword [ebp + 8]
test eax, eax
push esi
push edi
jne 0x5c96f9
mov eax, dword [esp + 0x34]
test eax, eax
je 0x5c97bd
mov eax, dword [ebp + 0x10]
push 0x100
mov byte [ebp + 4], 6
mov dword [ebp + 8], 0x40
call dword [eax]
mov edi, eax
add esp, 4
xor eax, eax
test edi, edi
mov dword [ebp], edi
jne 0x5c96dc
pop edi
pop esi
mov dword [ebp + 8], eax
pop ebp
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 0x30]
mov ecx, 0x40
rep stosd dword es:[edi], eax
call fcn.005c9660
mov ecx, dword [ebp + 8]
mov esi, eax
dec ecx
and esi, ecx
jmp 0x5c9936
mov ecx, dword [esp + 0x30]
xor eax, eax
mov ax, word [ecx]
test ax, ax
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], eax
je 0x5c9733
mov edx, dword [esp + 0x10]
imul edx, edx, 0xf4243
movzx eax, ax
xor edx, eax
add ecx, 2
xor eax, eax
mov ax, word [ecx]
test ax, ax
mov dword [esp + 0x10], edx
jne 0x5c9713
mov ebx, dword [ebp + 8]
mov esi, dword [esp + 0x10]
mov edi, dword [ebp]
dec ebx
and esi, ebx
mov eax, dword [edi + esi*4]
xor dl, dl
test eax, eax
mov dword [esp + 0x2c], edi
je 0x5c97b5
lea ecx, [ecx]
mov ecx, dword [edi + esi*4]
mov eax, dword [ecx]
mov ecx, dword [esp + 0x20]
cmp cx, word [eax]
jne 0x5c977a
mov edi, dword [esp + 0x30]
sub edi, eax
test cx, cx
je 0x5c97c7
mov cx, word [edi + eax + 2]
add eax, 2
cmp cx, word [eax]
je 0x5c9764
mov edi, dword [esp + 0x2c]
test dl, dl
jne 0x5c979a
mov ecx, dword [esp + 0x10]
mov edx, ebx
not edx
and edx, ecx
xor ecx, ecx
mov cl, byte [ebp + 4]
mov eax, ebx
shr eax, 2
dec ecx
shr edx, cl
and dl, al
or dl, 1
movzx eax, dl
cmp esi, eax
jae 0x5c97aa
mov ecx, dword [ebp + 8]
sub ecx, eax
add esi, ecx
jmp 0x5c97ac
sub esi, eax
mov eax, dword [ebp]
cmp dword [eax + esi*4], 0
jne 0x5c9750
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x5c97d6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + esi*4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov al, byte [ebp + 4]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, al
dec ecx
shr edx, cl
test edx, edx
je 0x5c9936
inc al
movzx ecx, al
mov esi, 1
shl esi, cl
mov byte [esp + 0x2c], al
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x20], ecx
lea edi, [esi*4]
push edi
mov dword [esp + 0x1c], esi
lea ebx, [esi - 1]
call dword [eax]
mov edx, eax
add esp, 4
xor eax, eax
test edx, edx
mov dword [esp + 0x14], edx
je 0x5c997a
mov ecx, edi
mov edi, edx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x1c], ecx
jbe 0x5c98cb
lea esp, [esp]
mov eax, dword [ebp]
mov eax, dword [eax + ecx*4]
test eax, eax
mov dword [esp + 0x24], eax
je 0x5c98bf
mov edx, dword [eax]
call fcn.005c9660
mov edi, eax
mov eax, dword [esp + 0x14]
mov esi, edi
and esi, ebx
mov ecx, dword [eax + esi*4]
xor dl, dl
test ecx, ecx
je 0x5c98b0
test dl, dl
jne 0x5c9893
mov ecx, dword [esp + 0x20]
mov edx, ebx
not edx
and edx, edi
dec ecx
shr edx, cl
mov ecx, ebx
shr ecx, 2
and dl, cl
or dl, 1
movzx ecx, dl
cmp esi, ecx
jae 0x5c98a8
mov eax, dword [esp + 0x18]
sub eax, ecx
add esi, eax
mov eax, dword [esp + 0x14]
jmp 0x5c98aa
sub esi, ecx
cmp dword [eax + esi*4], 0
jne 0x5c9878
mov ecx, dword [esp + 0x24]
mov dword [eax + esi*4], ecx
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 8]
inc ecx
cmp ecx, eax
mov dword [esp + 0x1c], ecx
jb 0x5c9850
mov eax, dword [ebp]
mov edx, dword [ebp + 0x10]
push eax
call dword [edx + 8]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dl, byte [esp + 0x30]
mov dword [ebp + 8], esi
mov esi, edi
and esi, ebx
mov dword [ebp], ecx
mov byte [ebp + 4], dl
mov edx, dword [ecx + esi*4]
add esp, 4
xor al, al
test edx, edx
je 0x5c9936
lea ebx, [ebx]
test al, al
jne 0x5c991a
mov ecx, dword [esp + 0x20]
mov eax, ebx
not eax
and eax, edi
dec ecx
shr eax, cl
mov edx, ebx
shr edx, 2
and al, dl
or al, 1
movzx ecx, al
cmp esi, ecx
jae 0x5c992b
mov edx, dword [esp + 0x18]
sub edx, ecx
add esi, edx
jmp 0x5c992d
sub esi, ecx
mov ecx, dword [ebp]
cmp dword [ecx + esi*4], 0
jne 0x5c9900
mov ebx, dword [esp + 0x34]
mov eax, dword [ebp + 0x10]
push ebx
call dword [eax]
mov ecx, dword [ebp]
mov dword [ecx + esi*4], eax
mov edx, dword [ebp]
mov edi, dword [edx + esi*4]
add esp, 4
xor eax, eax
test edi, edi
je 0x5c997a
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x30]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp]
mov ecx, dword [eax + esi*4]
mov dword [ecx], edx
inc dword [ebp + 0xc]
mov eax, dword [ebp]
mov eax, dword [eax + esi*4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret