Function at 0x426170
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0xc]
test eax, eax
push ebx
mov ebx, 0xb
cmovne ebx, eax
mov dword [ebp - 0x1c], ebx
push esi
cmp ebx, 5
jb 0x426370
cmp ebx, 0xc
jbe 0x4261a1
pop esi
mov eax, 0xffffffd4
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
bsr eax, eax
bsr ecx, esi
add eax, 2
inc ecx
cmp ecx, eax
cmovb eax, ecx
cmp ebx, eax
jb 0x426370
xor eax, eax
cmp dword [ebp + 0x1c], eax
push edi
sete al
mov edi, 0x3e
push 0
push esi
push 0x40000000
lea eax, [eax*2 - 1]
sub edi, ebx
movzx eax, ax
push 0
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edi
call fcn.0046b500
xor ecx, ecx
mov dword [ebp - 0x20], edx
xor edx, edx
mov dword [ebp - 0x24], eax
lea eax, [edi - 0x14]
mov dword [ebp - 0x10], 0
bts ecx, eax
mov dword [ebp + 0xc], 0
cmp eax, 0x20
mov edi, 1
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [ebp + 0x18]
cmovae edx, ecx
mov dword [ebp - 0x2c], ecx
mov ecx, ebx
mov dword [ebp - 0x28], edx
shl edi, cl
mov edx, esi
shr edx, cl
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x30], edx
nop word [eax + eax]
mov ecx, dword [ecx + ebx*4]
cmp ecx, esi
je 0x426367
test ecx, ecx
jne 0x426256
xor edx, edx
jmp 0x426300
cmp ecx, edx
ja 0x426266
mov ecx, dword [ebp - 0x18]
dec edi
movzx edx, cx
jmp 0x4262fd
mov eax, dword [ebp - 0x20]
mul ecx
mov esi, eax
mov eax, dword [ebp - 0x24]
mul ecx
mov ecx, dword [ebp - 0x14]
add esi, edx
mov dword [ebp - 8], eax
mov edx, esi
mov dword [ebp - 4], esi
call fcn.0046b2d0
movzx esi, ax
cmp si, 8
jge 0x4262d0
mov ecx, dword [ebp - 0x14]
movsx edi, si
mov eax, edi
cdq
call fcn.0046b2b0
sub dword [ebp - 8], eax
mov ecx, dword [edi*4 + 0x48a8a8]
sbb dword [ebp - 4], edx
mov eax, dword [ebp - 0x28]
mul ecx
mov edi, eax
mov eax, dword [ebp - 0x2c]
mul ecx
add edi, edx
cmp dword [ebp - 4], edi
jb 0x4262c9
ja 0x4262c2
cmp dword [ebp - 8], eax
jbe 0x4262c9
mov eax, 1
jmp 0x4262cb
xor eax, eax
mov edi, dword [ebp - 0xc]
add esi, eax
movsx eax, si
sub edi, eax
movzx ecx, si
cmp si, word [ebp + 0xc]
mov eax, ebx
movzx edx, si
cmovle eax, dword [ebp - 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
movzx eax, ax
cmovle ecx, eax
movzx eax, cx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp + 8]
mov word [ecx + ebx*2], dx
inc ebx
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x10]
cmp ebx, eax
jbe 0x426240
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
movzx ebx, word [eax + ecx*2]
lea edx, [eax + ecx*2]
movsx ecx, bx
mov eax, edi
sar ecx, 1
neg eax
cmp eax, ecx
jl 0x426355
push dword [ebp - 0x18]
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
mov esi, dword [ebp - 0x1c]
push esi
push dword [ebp + 8]
call fcn.00426380
add esp, 0x18
cmp eax, 0xffffff88
jbe 0x42635e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x1c]
lea ecx, [ebx + edi]
mov word [edx], cx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret