Function at 0x481800
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebx, ecx
xor edx, edx
push esi
push edi
mov edi, dword [esp + 0x28]
mov ebp, 1
lea ecx, [ebx + 8]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ecx
movzx ecx, word [ecx]
mov eax, dword [edi + 8]
inc eax
mov dword [esp + 0x10], ecx
imul eax, ecx
movzx ecx, word [ebx + 0xa]
dec eax
div dword [edi + 4]
lea edx, [ebx + 0xa]
mov esi, eax
cmp ecx, esi
jbe 0x48184c
nop
movzx eax, word [edx + 2]
lea edx, [edx + 2]
inc ebp
cmp eax, esi
ja 0x481840
movzx eax, word [ebx + ebp*2 + 6]
xor edx, edx
imul eax, dword [edi + 4]
mov ecx, dword [edi]
div dword [esp + 0x10]
lea esi, [ecx - 1]
xor edx, edx
add esi, eax
movzx eax, word [ebx + ebp*2 + 8]
imul eax, dword [edi + 4]
div dword [esp + 0x10]
sub dword [edi + 8], eax
add ecx, eax
mov dword [edi], ecx
nop dword [eax + eax]
mov eax, ecx
xor eax, esi
test eax, 0x8000
je 0x4818a7
test ecx, 0x4000
je 0x481904
test esi, 0x4000
jne 0x481904
or esi, 0x4000
and ecx, 0x3fff
and ecx, 0x7fff
and esi, 0x7fff
add ecx, ecx
add esi, esi
mov dword [edi], ecx
or esi, 1
mov edx, dword [edi + 0xc]
cmp edx, 0x10000
jb 0x4818e9
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x18]
jb 0x4818d8
or cl, 0xff
mov byte [edi + 0x10], 1
jmp 0x4818de
mov cl, byte [eax]
inc eax
mov dword [edi + 0x14], eax
movzx edx, cl
mov ecx, dword [edi]
or edx, 0x100
lea eax, [edx + edx]
shr edx, 7
mov dword [edi + 0xc], eax
and edx, 1
mov eax, dword [edi + 8]
add eax, eax
or edx, eax
mov dword [edi + 8], edx
jmp 0x481880
sub esi, ecx
lea ecx, [ebx + 8]
inc esi
dec ebp
mov dword [edi + 4], esi
movzx edi, byte [ebx + ebp + 0x8a]
lea ecx, [ecx + ebp*2]
mov dword [esp + 0x20], edi
nop dword [eax]
add word [ecx], 8
lea ecx, [ecx - 2]
mov eax, ebp
dec ebp
test eax, eax
jne 0x481920
mov edx, dword [esp + 0x28]
mov eax, 0xed8
cmp word [edx], ax
jbe 0x481a5f
add dword [ebx + 4], 0xffffffff
mov esi, dword [ebx]
jne 0x481a34
xor ebp, ebp
mov dword [ebx + 4], 0x32
test esi, esi
je 0x481979
mov edi, edx
nop dword [eax + eax]
movzx ecx, word [edi]
lea edi, [edi + 2]
movzx eax, word [edi]
inc ebp
sub ecx, eax
inc ecx
sar ecx, 1
mov word [edi - 2], cx
mov esi, dword [ebx]
cmp ebp, esi
jb 0x481960
xor edi, edi
lea eax, [esi - 1]
mov dword [esp + 0x10], edi
test eax, eax
je 0x481a0e
mov eax, 0xffffff77
lea ebp, [ebx + 0x8a]
sub eax, ebx
mov dword [esp + 0x1c], eax
nop dword [eax + eax]
lea edi, [eax + ebp]
mov ecx, esi
cmp edi, esi
jae 0x4819f0
lea esi, [ebp + 1]
lea eax, [edx + 2]
nop
movzx ecx, word [edx]
movzx ebx, word [eax]
mov edx, ecx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x28]
cmp cx, bx
jae 0x4819e1
mov ecx, dword [esp + 0x28]
mov dl, byte [ebp]
mov word [ecx], bx
mov cl, byte [esi]
mov byte [ebp], cl
mov ecx, dword [esp + 0x14]
mov word [eax], cx
mov byte [esi], dl
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
inc edi
add eax, 2
inc esi
mov ecx, dword [ebx]
cmp edi, ecx
jb 0x4819b0
mov edi, dword [esp + 0x10]
lea eax, [ecx - 1]
inc edi
add edx, 2
inc ebp
mov dword [esp + 0x10], edi
cmp edi, eax
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x1c]
mov esi, ecx
jb 0x4819a0
lea edx, [edi + 4]
lea edx, [ebx + edx*2]
mov cx, word [edx + 2]
lea edx, [edx - 2]
add word [edx + 2], cx
mov ecx, edi
dec edi
test ecx, ecx
jne 0x481a14
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
dec esi
lea ecx, [ebx + 8]
lea ecx, [ecx + esi*2]
nop dword [eax + eax]
shr word [ecx], 1
movzx eax, word [ecx]
movzx edx, word [ecx + 2]
cmp ax, dx
ja 0x481a55
lea eax, [edx + 1]
mov word [ecx], ax
mov eax, esi
sub ecx, 2
dec esi
test eax, eax
jne 0x481a40
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4