Function at 0x4289a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
test eax, eax
mov dword [esp + 0x40], edx
je 0x4289b4
cmp dword [eax], 0xffffffff
jne 0x4289be
add esp, 0x28
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [eax]
sub edx, ecx
mov dword [esp + 4], edx
test edx, edx
jge 0x4289d4
add esp, 0x28
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 4]
mov ecx, 0x15180
mov eax, ebx
cdq
idiv ecx
lea ecx, [eax + 0x5e2b]
shl eax, 7
mov dword [esp + 0x18], ecx
lea eax, [eax + eax*8]
lea eax, [eax + eax*4]
mov edx, eax
shl eax, 4
sub eax, edx
sub ebx, eax
lea eax, [ecx*4]
cdq
mov dword [esp + 0x20], ebx
mov ebx, 0x5b5
idiv ebx
mov dword [esp + 0x14], eax
lea edi, [eax + eax*4]
lea ebx, [eax - 1]
mov edx, ebx
sar edx, 0x1f
and edx, 3
add ebx, edx
lea edx, [edi + edi*8]
shl edi, 6
sar ebx, 2
add edx, edi
add edx, ebx
sub ecx, edx
dec ecx
mov dword [esp], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], 0x460c04
mov ecx, eax
sar ecx, 0x1f
xor eax, ecx
sub eax, ecx
and eax, 3
xor eax, ecx
sub eax, ecx
sete cl
and ecx, 0xff
cmp dword [esp + 0x48], 0
mov dword [esp + 0x10], ecx
je 0x428b60
mov ecx, dword [0x4c050c]
mov ecx, dword [ecx + 0x1c]
cmp byte [ecx], 0
jne 0x428a90
mov ecx, dword [esp + 0x40]
mov dword [ecx + 0x20], 0xffffffff
jmp 0x428b6b
mov edi, dword [esp]
push edi
mov edi, dword [esp + 0x20]
push edi
sub esp, 0xc
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x20]
mov ebx, dword [esp + 0x60]
call fcn.004288a5
test ebx, ebx
sete cl
and ecx, 0xff
push ecx
mov edi, dword [esp + 0x38]
push edi
sub esp, 0xc
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
call fcn.004287c9
add esp, 0x28
test ebx, ebx
mov ecx, dword [esp + 0x40]
mov dword [ecx + 0x20], eax
jne 0x428aed
cmp eax, 1
jne 0x428b6b
mov ebx, dword [esp + 0x40]
cmp dword [ebx + 0x20], 0
jle 0x428b6b
mov ebx, dword [0x4c050c]
mov ecx, dword [esp + 0x20]
add ecx, dword [ebx + 0x40]
mov ebx, 0x15180
mov eax, ecx
cdq
idiv ebx
test eax, eax
jle 0x428b58
inc dword [esp + 0x18]
cmp dword [esp + 0x24], 0x16d
jne 0x428b30
inc dword [esp + 0x14]
xor eax, eax
jmp 0x428b39
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
mov ebx, dword [0x4c050c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
add eax, dword [ebx + 0x40]
mov ebx, 0x15180
cdq
idiv ebx
mov dword [esp + 0x20], edx
jmp 0x428b6b
mov dword [esp + 0x20], ecx
jmp 0x428b6b
mov eax, dword [esp + 0x40]
mov dword [eax + 0x20], 0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
add eax, 4
mov edx, 0x460c04
mov dword [ecx + 0x14], eax
mov ebx, dword [esp + 0x24]
mov dword [ecx + 0x1c], ebx
mov dword [ecx + 0x10], 0
mov edi, dword [esp + 0x1c]
add edi, 4
neg edx
mov dword [esp + 0x1c], edi
lea eax, [edi + edx]
mov esi, eax
sar esi, 0x1f
and esi, 3
add eax, esi
mov esi, dword [esp + 0x10]
sar eax, 2
cmp eax, 2
setge al
and eax, 0xff
neg eax
and eax, esi
add eax, dword [edi]
cmp eax, ebx
jg 0x428bf1
add edi, 4
inc dword [ecx + 0x10]
lea eax, [edx + edi]
mov ebp, eax
sar ebp, 0x1f
and ebp, 3
add eax, ebp
sar eax, 2
cmp eax, 2
setge al
and eax, 0xff
neg eax
and eax, esi
add eax, dword [edi]
cmp eax, ebx
jle 0x428bc2
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
sub ecx, 4
mov ebx, dword [ebp + 0x1c]
sub ebx, dword [ecx]
sub ecx, 0x460c04
mov edi, ecx
inc ebx
sar edi, 0x1f
and edi, 3
mov dword [ebp + 0xc], ebx
add ecx, edi
sar ecx, 2
cmp ecx, 2
setge cl
and ecx, 0xff
neg ecx
and ecx, dword [esp + 0x10]
sub ebx, ecx
mov dword [ebp + 0xc], ebx
mov ebx, 7
mov eax, dword [esp + 0x18]
add eax, 5
cdq
idiv ebx
mov dword [ebp + 0x18], edx
mov ebx, 0xe10
mov ecx, dword [esp + 0x20]
mov eax, ecx
cdq
idiv ebx
mov ebx, edx
xchg ecx, eax
mov dword [ebp + 8], ecx
mov edi, 0x3c
lea edx, [ecx*4]
shl ecx, 6
sub ecx, edx
cdq
idiv edi
xchg ebx, eax
sub ebx, ecx
cdq
mov dword [ebp + 4], ebx
mov ebx, 0x3c
idiv ebx
mov eax, ebp
mov dword [eax], edx
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret