Function at 0x457898
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov byte [ebp - 0x11], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov ecx, eax
shl ecx, 2
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x457938
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0
jle 0x457938
test ecx, ecx
jle 0x457911
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, ecx
mov edx, dword [ebp - 4]
push ecx
mov ecx, dword [edx + 0xc]
cdq
idiv ecx
pop ecx
test edx, edx
jne 0x457911
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, dword [ebp - 8]
push ecx
mov ecx, 3
cdq
idiv ecx
pop ecx
test edx, edx
jne 0x457911
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, ecx
mov edx, dword [ebp - 4]
push ecx
mov ecx, dword [edx + 0xc]
cdq
idiv ecx
pop ecx
mov edx, dword [ebp - 4]
imul dword [edx + 0x18]
add ecx, eax
cmp byte [ebp - 0x11], 0
je 0x457938
mov eax, dword [ebp - 4]
sub ecx, dword [eax + 0x18]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x11], 0
je 0x457947
mov eax, dword [ebp - 4]
add ecx, dword [eax + 0x18]
cmp ecx, dword [edi]
jle 0x457954
mov dword [edi], ecx
xor eax, eax
jmp 0x457de8
mov dword [edi], ecx
mov eax, dword [ebp - 4]
cmp byte [eax + 0x11], 0
je 0x457981
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x18]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x12
call fcn.00402c74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
add ebx, eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x11], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, dword [ebp - 8]
cmp eax, 3
jge 0x4579cf
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x4579bf
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
mov al, byte [esi + eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
inc dword [ebp - 0xc]
dec dword [ebp - 0x18]
jne 0x4579a2
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add dword [eax + 4], edx
mov al, 1
jmp 0x457de8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
test eax, eax
jle 0x457b57
mov edx, dword [ebp - 4]
mov edx, 2
sub edx, eax
test edx, edx
jl 0x457a13
inc edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
mov al, byte [esi + eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
add edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
inc dword [ebp - 0xc]
dec dword [ebp - 0x18]
jne 0x4579f6
mov eax, dword [ebp - 4]
push dword [eax + 4]
mov eax, 3
pop edx
sub eax, edx
add esi, eax
mov edx, dword [ebp - 4]
sub dword [ebp - 8], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
shr eax, 2
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1c], al
mov eax, dword [ebp - 4]
mov al, byte [eax]
and al, 3
and eax, 0xff
shl eax, 4
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1d], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1e], al
mov eax, dword [ebp - 4]
mov al, byte [eax + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1f], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x457ac8
mov edx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
add edx, 4
cmp eax, edx
jle 0x457ae6
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x1c
mov ecx, 4
call fcn.00402c74
add ebx, 4
mov eax, dword [ebp - 4]
add dword [eax + 8], 4
jmp 0x457b57
mov edx, dword [ebp - 4]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x1c
mov ecx, dword [ebp - 0xc]
call fcn.00402c74
mov eax, dword [ebp - 0xc]
add ebx, eax
cmp dword [ebp - 8], 0
jg 0x457b19
cmp dword [ebp - 0xc], 4
jl 0x457b19
cmp byte [ebp - 0x11], 0
jne 0x457b34
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x18]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x12
call fcn.00402c74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
add ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
lea eax, [eax + edx + 0x1c]
mov edi, 4
sub edi, dword [ebp - 0xc]
mov ecx, edi
mov edx, ebx
call fcn.00402c74
add ebx, edi
mov eax, dword [ebp - 4]
mov dword [eax + 8], edi
cmp dword [ebp - 8], 3
jl 0x457dbb
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x457ba3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
test eax, eax
jns 0x457b7d
add eax, 3
sar eax, 2
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
cmp eax, dword [ebp - 0x10]
jge 0x457bb1
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x10], eax
jmp 0x457bb1
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x457c29
inc eax
mov dword [ebp - 0x18], eax
mov edi, esi
xor eax, eax
mov al, byte [edi]
shr eax, 2
mov al, byte [eax + 0x4d9324]
mov byte [ebx], al
inc ebx
mov al, byte [edi]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [edi + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4d9324]
mov byte [ebx], al
inc ebx
mov al, byte [edi + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
xor edx, edx
mov dl, byte [edi + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4d9324]
mov byte [ebx], al
inc ebx
mov al, byte [edi + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4d9324]
mov byte [ebx], al
inc ebx
add esi, 3
dec dword [ebp - 0x18]
jne 0x457bbd
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
sub dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0xc], 0
jle 0x457db1
mov eax, dword [ebp - 0x10]
shl eax, 2
mov edx, dword [ebp - 4]
add dword [edx + 8], eax
cmp dword [ebp - 8], 3
jl 0x457d6b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
test eax, eax
jle 0x457d6b
xor eax, eax
mov al, byte [esi]
shr eax, 2
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1c], al
mov al, byte [esi]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [esi + 1]
shr edx, 4
or eax, edx
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1d], al
mov al, byte [esi + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
xor edx, edx
mov dl, byte [esi + 2]
shr edx, 6
or eax, edx
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1e], al
mov al, byte [esi + 2]
and al, 0x3f
and eax, 0xff
mov al, byte [eax + 0x4d9324]
mov edx, dword [ebp - 4]
mov byte [edx + 0x1f], al
add esi, 3
sub dword [ebp - 8], 3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x1c
mov ecx, dword [ebp - 0xc]
call fcn.00402c74
mov eax, dword [ebp - 0xc]
add ebx, eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0
jle 0x457d38
cmp dword [ebp - 0xc], 4
jl 0x457d1d
cmp dword [ebp - 8], 0
jg 0x457d1d
cmp byte [ebp - 0x11], 0
jne 0x457d38
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x18]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x12
call fcn.00402c74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
add ebx, eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
lea eax, [eax + edx + 0x1c]
mov ecx, 4
sub ecx, dword [ebp - 0xc]
mov edx, ebx
call fcn.00402c74
mov eax, 4
sub eax, dword [ebp - 0xc]
add ebx, eax
mov eax, 4
sub eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x457db1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0xc]
jne 0x457db1
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0
jle 0x457db1
cmp dword [ebp - 8], 0
jg 0x457d96
cmp byte [ebp - 0x11], 0
jne 0x457db1
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x18]
mov edx, ebx
mov eax, dword [ebp - 4]
add eax, 0x12
call fcn.00402c74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
add ebx, eax
cmp dword [ebp - 8], 3
jge 0x457b61
cmp dword [ebp - 8], 0
jle 0x457dd9
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [ebp - 8]
call fcn.00402c74
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [eax + 4], edx
jmp 0x457de6
cmp byte [ebp - 0x11], 0
je 0x457de6
mov eax, dword [ebp - 4]
mov byte [eax + 0x11], 1
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8