Function at 0x4857d8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov esi, dword [esp + 0x2c]
push 0
push 0x14
push 1
call fcn.004392c8
mov ecx, esi
add esp, 0xc
mov esi, eax
mov dword [eax], ecx
lea edi, [ecx - 1]
mov dword [eax + 4], edi
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], 0
test ecx, ecx
jne 0x485831
push 0x273
push 0x4f3242
push 0x4f7812
call fcn.004adb0b
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov ebp, esi
add ebp, 0xc
push 0
push 4
push ecx
call fcn.004392c8
add esp, 0xc
mov dword [esp], eax
push 0
push 4
push dword [esp + 0x34]
call fcn.004392c8
mov edx, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 4], eax
test edx, edx
je 0x485a3a
mov ecx, dword [esp + 0x28]
and edx, 3
mov dword [esp + 8], edx
xor edx, edx
cmp edi, 3
mov eax, dword [esp]
jb 0x4858b1
mov edi, dword [esp + 0x2c]
and edi, 0xfffffffc
xor edx, edx
nop
nop
nop
nop
movzx ebx, word [ecx + edx*2]
mov dword [eax + edx*4], ebx
movzx ebx, word [ecx + edx*2 + 2]
mov dword [eax + edx*4 + 4], ebx
movzx ebx, word [ecx + edx*2 + 4]
mov dword [eax + edx*4 + 8], ebx
movzx ebx, word [ecx + edx*2 + 6]
mov dword [eax + edx*4 + 0xc], ebx
add edx, 4
cmp edi, edx
jne 0x485888
cmp dword [esp + 8], 0
je 0x4858d6
mov eax, dword [esp]
lea edi, [eax + edx*4]
mov eax, dword [esp + 8]
lea ecx, [ecx + edx*2]
xor edx, edx
nop
movzx ebx, word [ecx + edx*2]
mov dword [edi + edx*4], ebx
add edx, 1
cmp eax, edx
jne 0x4858c8
mov ecx, dword [esp + 0x2c]
cmp ecx, 2
jb 0x485a3f
mov edx, ecx
mov eax, dword [esp]
mov dword [esp + 0xc], ebp
jmp 0x48594b
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00439368
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 0
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebx*4]
mov dword [edi + ecx*4], eax
add ecx, 1
mov edx, ecx
mov eax, edi
cmp ecx, 1
jbe 0x485a42
mov edi, dword [esp + 4]
mov dword [esp + 4], eax
xor ebx, ebx
xor ecx, ecx
mov dword [esp], edi
mov dword [esp + 0x10], edx
jmp 0x485986
mov eax, edi
mov ebp, dword [esp + 0xc]
mov edi, dword [esp]
mov ecx, dword [esp + 8]
mov dword [edi + ecx*4], eax
add ecx, 1
add ebx, 2
mov edx, dword [esp + 0x10]
cmp ebx, edx
jae 0x48593e
mov eax, ebx
or eax, 1
cmp eax, edx
mov dword [esp + 8], ecx
je 0x4858f8
mov ecx, ebp
mov edx, dword [esp + 4]
mov ebp, dword [edx + ebx*4]
mov edi, dword [edx + eax*4]
imul edi, ebp
add ebp, 2
push 0
push 1
push dword [esi + 8]
push 4
push ecx
push dword [esi + 0x10]
call fcn.00439368
add esp, 0x18
mov dword [esi + 0x10], eax
movzx ecx, bp
mov edx, dword [esi + 8]
lea ebp, [edx + 1]
mov dword [esi + 8], ebp
mov dword [eax + edx*4], ecx
cmp cx, 1
je 0x4859e3
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
cmp edi, 0x4000
jb 0x485968
mov ebp, dword [esp + 0xc]
nop
nop
nop
nop
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00439368
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 1
add edi, 0xff
mov eax, edi
shr eax, 8
cmp edi, 0x3fffff
mov edi, eax
ja 0x4859f8
jmp 0x48596e
mov edi, dword [esp]
jmp 0x485a47
mov edi, dword [esp]
cmp ecx, 1
je 0x485a5e
push 0x2b5
push 0x4f3242
push 0x4f7288
call fcn.004adb0b
add esp, 0xc
mov ebx, edi
mov edi, dword [edi]
cmp edi, 2
jb 0x485aa5
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00439368
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 1
add edi, 0xff
mov eax, edi
shr eax, 8
cmp edi, 0x1ff
mov edi, eax
ja 0x485a68
push ebx
call fcn.00439358
add esp, 4
push dword [esp + 4]
call fcn.00439358
add esp, 4
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret