Function at 0x48e8f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x18
cmp dword [esp + 0x20], 0
push ebx
push esi
push edi
push ebp
jne 0x48e90a
mov ax, 0x65
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
cmp dword [esp + 0x34], 0
jne 0x48e91d
mov ax, 0x65
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
push eax
mov esi, dword [0x4c258c]
mov dword [edx], 0
call esi
mov ecx, eax
mov eax, dword [eax + 4]
lea eax, [eax*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
imul eax, dword [ecx + 8]
cmp word [ecx + 0xe], 0x18
lea edi, [eax*4]
mov eax, dword [esp + 0x30]
push eax
jne 0x48eb7e
add edi, 0x428
call dword [0x4c2590]
push edi
push 0x42
call dword [0x4c2588]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x48e98d
mov ax, 0x66
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x14]
push eax
call esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
push eax
call esi
mov ecx, eax
mov esi, eax
xor ax, ax
mov edi, dword [esp + 0x10]
cmp dword [esi], 0
jle 0x48e9be
inc ax
mov dl, byte [ecx]
mov byte [edi], dl
inc ecx
movsx edx, ax
inc edi
cmp edx, dword [esi]
jl 0x48e9af
xor ax, ax
mov byte [edi], al
inc edi
inc edi
inc edi
mov byte [edi - 2], al
mov byte [edi - 1], al
mov byte [edi], 0
inc edi
inc ax
cmp ax, 0x100
jl 0x48e9c1
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
lea eax, [eax*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
imul eax, dword [ecx + 8]
shl eax, 2
mov dword [ecx + 0x14], eax
mov word [ecx + 0xe], 8
mov dword [ecx + 0x20], 0x100
mov dword [ecx + 0x24], 0x100
mov eax, dword [esi]
add eax, esi
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 0x20]
test eax, eax
jne 0x48ea31
mov cx, word [ecx + 0xe]
cmp cx, 8
jbe 0x48ea2a
xor eax, eax
jmp 0x48ea34
mov eax, 1
shl eax, cl
shl eax, 2
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx]
add ecx, dword [esp + 0x10]
add ecx, eax
xor eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
cmp dword [esi + 8], eax
jle 0x48eb26
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x2c], 0
je 0x48ea8a
mov eax, dword [esp + 0x1c]
push 0
cdq
idiv dword [esi + 8]
push eax
push 0x401
mov eax, dword [esp + 0x38]
push eax
call dword [case.0x427228.0]
push 0x1b
call dword [0x4c3300]
test ax, ax
jl 0x48eb51
mov edi, dword [esi + 4]
xor eax, eax
mov ax, word [esi + 0xe]
imul eax, edi
add eax, 0x1f
mov ecx, dword [esp + 0x20]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
imul eax, dword [esp + 0x18]
lea ebx, [ecx + eax*4]
xor eax, eax
mov ecx, dword [esp + 0x10]
mov ax, word [ecx + 0xe]
imul eax, dword [ecx + 4]
add eax, 0x1f
mov ecx, dword [esp + 0x24]
cdq
and edx, 0x1f
xor ebp, ebp
add eax, edx
sar eax, 5
imul eax, dword [esp + 0x18]
test edi, edi
lea ecx, [ecx + eax*4]
jle 0x48eb10
mov di, 0x64
inc ecx
inc ebp
inc ebx
movzx ax, byte [ebx - 1]
movzx dx, byte [ebx]
imul ax, ax, 0xb
imul dx, dx, 0x3b
add ax, dx
inc ebx
movzx dx, byte [ebx]
imul dx, dx, 0x1e
add ax, dx
inc ebx
sub dx, dx
div di
mov byte [ecx - 1], al
cmp dword [esi + 4], ebp
jg 0x48eada
add dword [esp + 0x1c], 0x64
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp dword [esi + 8], eax
jg 0x48ea57
mov eax, dword [esp + 0x30]
push eax
call dword [0x4c2590]
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2590]
xor ax, ax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
pop ebp
pop edi
pop esi
pop ebx
mov dword [edx], ecx
add esp, 0x18
ret
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2590]
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2594]
mov ecx, dword [esp + 0x30]
push ecx
call dword [0x4c2590]
mov ax, 0x64
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
call dword [0x4c2590]
lea eax, [esp + 0x14]
mov ecx, dword [esp + 0x30]
push eax
push ecx
call fcn.0048e850
add esp, 8
test ax, ax
jne 0x48ec5b
xor bx, bx
mov eax, dword [esp + 0x14]
push eax
call esi
mov esi, dword [eax]
mov edi, eax
add esi, edi
cmp dword [edi + 0x20], 0
jle 0x48ec43
cmp dword [esp + 0x2c], 0
je 0x48ebf1
movsx eax, bx
shl eax, 2
push 0
sub edx, edx
lea ecx, [eax + eax*4]
lea eax, [ecx + ecx*4]
div dword [edi + 0x20]
mov edx, dword [esp + 0x30]
push eax
push 0x401
push edx
call dword [case.0x427228.0]
push 0x1b
call dword [0x4c3300]
test ax, ax
jl 0x48ec63
sub dx, dx
lea ebp, [esi + 1]
movzx ax, byte [esi + 2]
imul ax, ax, 0x1e
movzx cx, byte [esi]
imul cx, cx, 0xb
add ax, cx
movzx cx, byte [ebp]
imul cx, cx, 0x3b
add ax, cx
mov cx, 0x64
div cx
cmp ax, 0xff
jbe 0x48ec28
mov ax, 0xff
inc bx
mov byte [esi], al
lea esi, [ebp + 1]
mov byte [ebp], al
inc esi
mov byte [esi - 1], al
inc esi
movsx eax, bx
cmp eax, dword [edi + 0x20]
jl 0x48ebb9
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2590]
mov edx, dword [esp + 0x34]
xor ax, ax
mov ecx, dword [esp + 0x14]
mov dword [edx], ecx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2590]
mov eax, dword [esp + 0x14]
push eax
call dword [0x4c2594]
mov ax, 0x64
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret