Function at 0x13c92
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi]
cmp byte [eax + 2], 4
je 0x13cb6
push 0xa
push esi
call fcn.000131a8
mov bx, ax
add ebx, 0x14
jmp 0x13cc0
mov dword [ebp - 4], 8
mov ebx, dword [ebp - 4]
movzx eax, bx
push 8
cdq
pop ecx
idiv ecx
push ecx
pop eax
sub eax, edx
add ebx, eax
test bx, bx
mov dword [ebp - 4], ebx
jbe 0x13cf5
movzx eax, bx
lea edi, [ebp - 0x70]
mov dword [ebp + 8], eax
push 0x100
push esi
call fcn.000131a8
or al, 4
mov byte [edi], al
inc edi
dec dword [ebp + 8]
jne 0x13ce0
mov eax, dword [esi]
xor edi, edi
cmp dword [eax + 4], 0xd4c0f
jbe 0x13d50
mov al, byte [eax + 2]
cmp al, 4
je 0x13d19
cmp al, 8
je 0x13d19
push 3
push esi
call fcn.000131a8
mov edi, eax
jmp 0x13d27
push 5
push esi
call fcn.000131a8
mov edi, ebx
sub edi, eax
dec edi
dec edi
push 0x100
push esi
movzx ebx, di
call fcn.000131a8
and al, 0xab
or al, 0x23
mov byte [ebp + ebx - 0x70], al
mov eax, dword [esi]
mov cl, byte [eax + 0x114]
mov byte [ebp + ebx - 0x6f], cl
mov ebx, dword [ebp - 4]
mov cl, 4
jmp 0x13d52
mov cl, 2
mov al, byte [eax + 2]
mov byte [ebp + 0xb], 0x9b
cmp al, 4
je 0x13f0f
cmp al, 8
je 0x13f0f
movzx ax, cl
test ax, ax
jbe 0x13dcc
and dword [ebp - 8], 0
movzx eax, ax
mov dword [ebp - 0xc], eax
push 3
push esi
call fcn.000131a8
lea edi, [edi + eax + 2]
push 8
movzx eax, di
cdq
pop ecx
idiv ecx
cmp edx, 7
jne 0x13d97
inc edi
push 0x100
push esi
movzx ebx, di
call fcn.000131a8
or al, 0x7f
mov ecx, dword [ebp - 8]
and al, byte [ebp + 0xb]
add byte [ebp + 0xb], 0x10
add dword [ebp - 8], 8
mov byte [ebp + ebx - 0x70], al
mov eax, dword [esi]
mov eax, dword [eax + 0x110]
shr eax, cl
dec dword [ebp - 0xc]
mov byte [ebp + ebx - 0x6f], al
jne 0x13d7c
push 3
push esi
call fcn.000131a8
lea ebx, [edi + eax + 2]
push 8
movzx eax, bx
cdq
pop ecx
idiv ecx
cmp edx, 7
jne 0x13de7
inc ebx
push 0x100
push esi
movzx edi, bx
call fcn.000131a8
and al, 0xbb
or al, 0x3b
mov byte [ebp + edi - 0x70], al
mov eax, dword [esi]
mov cl, byte [eax + 2]
cmp cl, 0xf
je 0x13e1b
cmp cl, 0x10
je 0x13e1b
cmp cl, 0x11
je 0x13e1b
cmp cl, 0x12
je 0x13e1b
mov cl, byte [eax + 0xc]
jmp 0x13e20
xor ecx, ecx
mov cl, byte [eax + 0xd]
mov byte [ebp + edi - 0x6f], cl
mov al, byte [eax + 2]
cmp al, 0xd
je 0x13e2f
cmp al, 0xe
jne 0x13e61
inc ebx
push 8
inc ebx
pop ecx
movzx eax, bx
cdq
idiv ecx
cmp edx, 7
jne 0x13e40
inc ebx
push 0x100
push esi
movzx edi, bx
call fcn.000131a8
and al, 0xeb
or al, 0x6b
xor ecx, ecx
mov byte [ebp + edi - 0x70], al
mov eax, dword [esi]
mov cl, byte [eax + 0xd]
mov byte [ebp + edi - 0x6f], cl
movzx eax, word [ebp - 4]
sub eax, edi
cmp eax, 6
jle 0x13e81
push 4
push esi
call fcn.000131a8
mov bx, ax
mov eax, dword [ebp - 4]
add eax, 0xfffffffb
add ebx, eax
jmp 0x13e83
inc ebx
inc ebx
movzx eax, bx
push 8
cdq
pop ecx
idiv ecx
cmp edx, 7
jne 0x13e92
inc ebx
push 0x100
push esi
movzx edi, bx
call fcn.000131a8
and al, 0xcb
or al, 0x4b
mov byte [ebp + edi - 0x70], al
mov eax, dword [esi]
mov cl, byte [eax + 2]
cmp cl, 0xf
je 0x13ec6
cmp cl, 0x10
je 0x13ec6
cmp cl, 0x11
je 0x13ec6
cmp cl, 0x12
je 0x13ec6
mov al, byte [eax + 0xe]
jmp 0x13ec9
mov al, byte [eax + 0xc]
inc ebx
mov byte [ebp + edi - 0x6f], al
cmp bx, word [ebp - 4]
jb 0x13f0c
movzx eax, bx
push 8
cdq
pop ecx
idiv ecx
mov eax, ebx
sub eax, edx
add eax, ecx
inc ebx
cmp bx, ax
mov dword [ebp - 4], eax
jae 0x13f0c
movzx eax, bx
movzx ebx, word [ebp - 4]
lea edi, [ebp + eax - 0x70]
sub ebx, eax
push 0x100
push esi
call fcn.000131a8
or al, 4
mov byte [edi], al
inc edi
dec ebx
jne 0x13ef9
mov ebx, dword [ebp - 4]
test bx, bx
jbe 0x13f3b
lea ecx, [ebp - 0x70]
movzx edi, bx
mov al, byte [ecx]
mov dl, al
xor dl, byte [esi + 0x28]
mov byte [ecx], dl
mov dl, al
sub edx, 0x52
add al, 0x2e
sar edx, 7
and dl, 1
shl al, 1
xor dl, al
inc ecx
dec edi
mov byte [esi + 0x28], dl
jne 0x13f1a
xor edi, edi
shr bx, 3
je 0x13f5b
movzx eax, di
lea eax, [ebp + eax*8 - 0x70]
push eax
push dword [esi + 0x29]
call dword [esi + 0xa]
test eax, eax
jne 0x13f64
inc edi
cmp di, bx
jb 0x13f43
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 1
pop eax
jmp 0x13f5d