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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov ecx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [edi], eax
mov eax, dword [edx + 8]
mov dword [esi], eax
mov eax, dword [edi + ecx*2]
mov dword [edx + 4], eax
mov eax, dword [esi + ecx*2]
mov dword [edx + 8], eax
mov ecx, dword [ebp + 0x18]
lea ebx, [ecx*8]
mov eax, 0x10000
xor edx, edx
mov dword [ebp - 0x18], ebx
idiv ebx
test ecx, ecx
jle 0x1028da08
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
movzx ebx, word [eax]
movzx eax, word [eax + 2]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
sub ecx, ebx
movsx ecx, cx
movsx eax, word [ebp - 0x10]
mov dword [ebp - 0x10], eax
imul ecx, eax
sar ecx, 0xf
inc ecx
sar ecx, 1
sub edx, dword [ebp - 0x14]
movsx eax, dx
imul eax, dword [ebp - 0x10]
sar eax, 0xf
inc eax
sar eax, 1
xor edx, edx
inc edx
cmp dword [ebp - 0x18], 2
cmovge edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x14]
add edx, eax
shl edx, 0x10
shl eax, 0x10
mov dword [ebp - 0x20], eax
xor eax, eax
add ebx, ecx
shl ebx, 0x10
shl ecx, 0x10
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], edx
mov ebx, eax
movsx eax, word [edi + eax*2]
movsx ecx, word [edi + ebx*2 + 4]
add ecx, eax
movsx edx, word [edi + ebx*2 + 2]
mov eax, ebx
mov dword [ebp - 0x28], ebx
lea ebx, [ecx + edx*2]
mov edi, ebx
shl edi, 9
movsx ecx, word [esi + eax*2 + 2]
shl ecx, 8
sar ebx, 7
mov eax, dword [ebp - 0x10]
sar eax, 0x10
imul ebx, eax
mov esi, 0xffff
and edi, esi
imul edi, eax
mov eax, edx
sar edx, 5
mov esi, dword [ebp - 0x14]
sar esi, 0x10
imul edx, esi
add edx, ecx
shl eax, 0xb
mov ecx, 0xffff
and eax, ecx
imul eax, esi
mov esi, dword [ebp + 0x10]
sar eax, 0x10
add eax, edx
add eax, ebx
mov ebx, dword [ebp - 0x28]
lea edx, [ebx + 1]
sar edi, 0x10
add eax, edi
mov ecx, 0x7fff
cmp eax, 0x7fff7f
jg 0x1028d9e7
sar eax, 7
inc eax
sar eax, 1
cmp eax, 0xffff8001
jge 0x1028d9e2
mov eax, 0xffff8000
mov ecx, eax
mov esi, dword [ebp + 0x10]
mov word [esi + ebx*2 + 2], cx
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x10]
add ebx, dword [ebp - 0x24]
mov eax, edx
cmp dword [ebp - 0x1c], edx
mov edi, dword [ebp + 0xc]
mov edx, ecx
jne 0x1028d94f
mov edx, dword [ebp + 0x1c]
mov ebx, dword [ebp - 0x18]
cmp ebx, edx
jge 0x1028dac5
mov eax, dword [ebp + 0x14]
movsx ecx, word [eax + 4]
mov dword [ebp - 0x14], ecx
movsx eax, word [eax]
mov dword [ebp - 0x10], eax
movsx edx, word [edi + ebx*2]
mov eax, esi
movsx esi, word [edi + ebx*2 + 4]
add esi, edx
mov ecx, ebx
movsx ebx, word [edi + ebx*2 + 2]
lea edi, [esi + ebx*2]
movsx edx, word [eax + ecx*2 + 2]
shl edx, 8
mov esi, ebx
sar ebx, 5
mov eax, dword [ebp - 0x14]
imul ebx, eax
add ebx, edx
shl esi, 0xb
mov edx, 0xffff
and esi, edx
imul esi, eax
sar esi, 0x10
add esi, ebx
mov edx, edi
sar edi, 7
mov eax, dword [ebp - 0x10]
imul edi, eax
add esi, edi
lea edi, [ecx + 1]
shl edx, 9
mov ebx, 0xffff
and edx, ebx
imul edx, eax
mov eax, dword [ebp + 0x10]
sar edx, 0x10
add esi, edx
mov edx, 0x7fff
cmp esi, 0x7fff7f
jg 0x1028daae
sar esi, 7
inc esi
sar esi, 1
cmp esi, 0xffff8001
jge 0x1028daa9
mov esi, 0xffff8000
mov edx, esi
mov eax, dword [ebp + 0x10]
mov word [eax + ecx*2 + 2], dx
mov ebx, edi
mov edx, dword [ebp + 0x1c]
cmp edx, edi
mov esi, eax
mov edi, dword [ebp + 0xc]
jne 0x1028da26
mov ebx, dword [ebp + 0x14]
movzx eax, word [ebx]
mov ecx, dword [ebp + 8]
mov word [ecx], ax
movzx eax, word [ebx + 4]
mov word [ecx + 2], ax
test edx, edx
jle 0x1028db2f
xor eax, eax
movzx ecx, word [edi + eax*2 + 2]
movzx edx, word [esi + eax*2 + 2]
xor ebx, ebx
cmp cx, dx
setns bl
add ebx, 0x7fff
mov esi, ecx
sub si, dx
cmovo esi, ebx
mov edi, ecx
add di, dx
movsx edi, di
sar edi, 0xf
xor edi, 0xffff8000
add cx, dx
cmovo ecx, edi
mov edi, dword [ebp + 0xc]
mov word [edi + eax*2 + 2], cx
mov ecx, dword [ebp + 0x10]
mov word [ecx + eax*2 + 2], si
mov esi, dword [ebp + 0x10]
inc eax
cmp dword [ebp + 0x1c], eax
jne 0x1028dadf
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret