Function at 0x4316c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov edx, dword [edx]
mov ecx, dword [ecx]
mov edi, dword [eax]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ecx
test edx, edx
je 0x431768
mov al, byte [edi]
mov ebx, 2
and eax, 0xff
mov esi, eax
cmp eax, 0x7f
ja 0x431735
mov eax, edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
dec eax
mov dword [edx], eax
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
cmp esi, 0xfffe
ja 0x431850
mov eax, dword [ebp + 0x18]
cmp dword [eax], 1
ja 0x43186f
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, 7
mov dword [edx], edi
jmp 0x43176d
xor ecx, ecx
xor edx, edx
mov cl, byte [ebx + 0x49ab51]
mov dl, byte [ebx + 0x49ab4b]
mov eax, ecx
xor eax, 0xffffffff
and eax, esi
cmp eax, edx
je 0x431763
inc ebx
cmp ebx, 7
jne 0x431735
mov eax, 0x2a
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp - 0x14], ebx
jae 0x431775
mov eax, 0x16
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
and esi, ecx
lea ecx, [edi + 1]
cmp ebx, 1
jbe 0x4317c1
xor edx, edx
mov dl, byte [edi + 1]
mov eax, edx
and eax, 0xc0
add eax, 0xffffff80
jne 0x431756
lea eax, [ebx + edi]
lea ecx, [edi + 2]
mov dword [ebp - 0x18], eax
jmp 0x4317b1
xor edx, edx
mov dl, byte [ecx]
mov eax, edx
and eax, 0xc0
add eax, 0xffffff80
jne 0x431756
inc ecx
mov eax, esi
and edx, 0x3f
shl eax, 6
cmp ecx, dword [ebp - 0x18]
lea esi, [edx + eax]
jne 0x4317a0
cmp esi, 0x7f
jbe 0x431756
cmp esi, 0x7ff
ja 0x4317d3
cmp ebx, 2
ja 0x431756
cmp esi, 0xffff
ja 0x4317e4
cmp ebx, 3
ja 0x431756
cmp esi, 0x1fffff
ja 0x4317f5
cmp ebx, 4
ja 0x431756
cmp esi, 0x3ffffff
ja 0x431806
cmp ebx, 5
ja 0x431756
test esi, esi
js 0x431756
lea eax, [esi - 0xd800]
cmp eax, 0x7ff
jbe 0x431756
mov edx, dword [ebp + 0xc]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
sub eax, ebx
cmp esi, 0x10ffff
mov dword [ecx], eax
jbe 0x431709
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax], edi
mov eax, 0x2a
mov dword [edx], ecx
jmp 0x43175b
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 3
ja 0x4318b4
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax], edi
mov eax, 7
mov dword [edx], ecx
jmp 0x43176d
mov eax, dword [ebp + 8]
test eax, eax
je 0x4318a6
mov ecx, dword [ebp - 0x10]
mov edx, esi
mov byte [ecx + 1], dl
xor edx, edx
mov ecx, esi
movzx eax, ch
mov ecx, dword [ebp - 0x10]
mov byte [edx + ecx], al
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov edi, dword [eax]
mov esi, dword [edx]
add edi, 2
sub esi, 2
mov dword [eax], edi
xor eax, eax
mov dword [edx], esi
jmp 0x43176d
mov eax, dword [ebp - 0x10]
mov ecx, esi
mov edx, 1
mov byte [eax], cl
jmp 0x431880
lea eax, [esi - 0x10000]
mov ebx, dword [ebp + 8]
mov edx, eax
and eax, 0x3ff
shr edx, 0xa
add edx, 0xd800
lea ecx, [eax + 0xdc00]
test ebx, ebx
je 0x431911
mov eax, dword [ebp - 0x10]
mov byte [eax + 1], dl
movzx eax, dh
mov edx, dword [ebp - 0x10]
mov byte [edx], al
mov byte [edx + 3], cl
mov edx, 2
movzx eax, ch
mov ecx, dword [ebp - 0x10]
mov byte [edx + ecx], al
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
add edx, 4
mov dword [eax], edx
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
sub eax, 4
mov dword [edx], eax
xor eax, eax
jmp 0x43176d
mov eax, dword [ebp - 0x10]
mov byte [eax], dl
movzx eax, dh
mov edx, dword [ebp - 0x10]
mov byte [edx + 1], al
mov byte [edx + 2], cl
mov edx, 3
jmp 0x4318ed