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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 7
push esi
mov eax, dword [esi]
mov ebx, dword [eax + 4]
sub ebx, 0xc5c10
call fcn.000131a8
mov di, ax
push 8
add edi, 0xa
pop ecx
movzx eax, di
cdq
idiv ecx
and dword [ebp - 4], 0
push ecx
pop eax
sub eax, edx
add edi, eax
test di, di
mov dword [ebp + 8], edi
jbe 0x13a54
push 0x100
push esi
call fcn.000131a8
movzx ecx, word [ebp - 4]
or al, 4
cmp al, 0xaa
mov byte [ebp + ecx - 0x44], al
je 0x13a4e
cmp al, 0x55
je 0x13a4e
cmp al, 0xc3
je 0x13a4e
cmp al, 0x3c
je 0x13a4e
inc dword [ebp - 4]
cmp word [ebp - 4], di
jb 0x13a26
mov al, byte [ebp - 0x44]
push 3
mov cl, al
add al, 0x2e
sub ecx, 0x52
push esi
sar ecx, 7
and cl, 1
shl al, 1
xor cl, al
mov byte [esi + 0x28], cl
call fcn.000131a8
mov di, ax
push 3
inc edi
push esi
movzx eax, di
mov byte [ebp + eax - 0x44], 0xaa
call fcn.000131a8
lea edi, [edi + eax + 1]
push 8
movzx eax, di
cdq
pop ecx
mov dword [ebp - 4], edi
idiv ecx
cmp edx, 7
jne 0x13aa0
inc edi
mov dword [ebp - 4], edi
movzx edi, di
push 0x100
push esi
mov byte [ebp + edi - 0x44], 0x55
call fcn.000131a8
push 3
push esi
mov byte [ebp + edi - 0x43], al
mov byte [esi + 0x26], al
call fcn.000131a8
mov ecx, dword [ebp - 4]
push 8
lea edi, [ecx + eax + 2]
pop ecx
movzx eax, di
cdq
idiv ecx
cmp edx, 7
jne 0x13ad8
inc edi
push 0x100
push esi
call fcn.000131a8
mov cx, ax
movzx eax, di
and cl, 0x8b
mov byte [ebp + eax - 0x44], cl
mov ecx, dword [esi]
mov byte [ebp + eax - 0x43], bl
cmp dword [ecx + 4], 0xd4c0f
jbe 0x13ba0
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 0x13b1e
inc edi
push 0x100
push esi
call fcn.000131a8
mov cx, ax
movzx eax, di
and cl, 0xab
or cl, 0x20
mov byte [ebp + eax - 0x44], cl
mov ecx, ebx
shr ecx, 8
mov byte [ebp + eax - 0x43], cl
movzx ecx, word [ebp + 8]
sub ecx, eax
cmp ecx, 6
jle 0x13b62
push 4
push esi
call fcn.000131a8
mov di, ax
mov eax, dword [ebp + 8]
add eax, 0xfffffffb
add edi, eax
jmp 0x13b64
inc edi
inc edi
movzx eax, di
push 8
cdq
pop ecx
idiv ecx
cmp edx, 7
jne 0x13b73
inc edi
push 0x100
push esi
call fcn.000131a8
mov cx, ax
movzx eax, di
and cl, 0xbb
or cl, 0x30
mov byte [ebp + eax - 0x44], cl
mov ecx, dword [esi]
shr ebx, 0x10
mov cl, byte [ecx + 3]
and bl, 0xf
shl cl, 4
or bl, cl
jmp 0x13bef
movzx ecx, word [ebp + 8]
sub ecx, eax
cmp ecx, 6
jle 0x13bc0
push 4
push esi
call fcn.000131a8
mov di, ax
mov eax, dword [ebp + 8]
add eax, 0xfffffffb
add edi, eax
jmp 0x13bc2
inc edi
inc edi
movzx eax, di
push 8
cdq
pop ecx
idiv ecx
cmp edx, 7
jne 0x13bd1
inc edi
push 0x100
push esi
call fcn.000131a8
mov cx, ax
movzx eax, di
and cl, 0x9b
or cl, 0x10
mov byte [ebp + eax - 0x44], cl
shr ebx, 8
inc edi
mov byte [ebp + eax - 0x43], bl
cmp di, word [ebp + 8]
jb 0x13c32
movzx eax, di
push 8
cdq
pop ecx
idiv ecx
mov eax, edi
sub eax, edx
add eax, ecx
inc edi
cmp di, ax
mov dword [ebp + 8], eax
jae 0x13c32
movzx eax, di
movzx edi, word [ebp + 8]
lea ebx, [ebp + eax - 0x44]
sub edi, eax
push 0x100
push esi
call fcn.000131a8
or al, 4
mov byte [ebx], al
inc ebx
dec edi
jne 0x13c1f
mov ebx, dword [ebp + 8]
cmp bx, 1
jbe 0x13c63
movzx edi, bx
lea ecx, [ebp - 0x43]
dec edi
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 0x13c42
xor edi, edi
shr bx, 3
je 0x13c83
movzx eax, di
lea eax, [ebp + eax*8 - 0x44]
push eax
push dword [esi + 0x29]
call dword [esi + 0xa]
test eax, eax
jne 0x13c8c
inc edi
cmp di, bx
jb 0x13c6b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
push 1
pop eax
jmp 0x13c85