Function at 0xa54e482
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push ebx
xor ebx, ebx
lea eax, [eax + edx*2]
add eax, 2
mov dword [ebp - 0x14], eax
xor eax, eax
inc eax
shl eax, cl
push esi
mov dword [ebp - 0x10], eax
xor esi, esi
dec eax
push edi
lea edi, [edx + 1]
mov dword [ebp - 4], eax
lea edx, [ebx + ecx]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0x10]
bts eax, edx
xor ecx, ecx
cmp edx, 0x20
cmovae ecx, eax
xor eax, ecx
cmp edx, 0x40
lea edx, [edi*2 + 2]
mov edi, dword [ebp - 8]
cmovae ecx, eax
add edx, eax
adc esi, ecx
add edx, 8
adc esi, ebx
cmp esi, ebx
ja 0xa54e70d
jb 0xa54e4f7
cmp edx, dword [ebp + 0x1c]
ja 0xa54e70d
cmp dword [ebp + 0x10], 0xff
ja 0xa54e70d
mov eax, dword [ebp + 0x14]
cmp eax, 0xc
jbe 0xa54e513
push 0xffffffffffffffd4
jmp 0xa54e70f
mov esi, dword [ebp - 0xc]
lea ecx, [eax - 1]
xor edx, edx
mov word [ebp + 0x10], ax
inc edx
mov eax, edx
mov word [ebp + 0x12], dx
shl ax, cl
mov edx, ebx
movzx eax, ax
mov dword [ebp - 0x18], eax
test edi, edi
je 0xa54e58e
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x18]
lea ecx, [ecx + esi*4]
add ecx, 6
sub ebx, eax
mov dword [ebp + 0x1c], ecx
movzx ecx, word [ebx + eax]
mov edi, ecx
mov dword [ebp - 0xc], edi
or edi, 0xffffffff
cmp cx, di
jne 0xa54e56b
mov ecx, dword [ebp + 0x1c]
dec esi
mov byte [ecx], dl
sub ecx, 4
mov dword [ebp + 0x1c], ecx
xor ecx, ecx
inc ecx
jmp 0xa54e57d
cmp cx, word [ebp - 0x18]
jl 0xa54e577
xor ecx, ecx
mov word [ebp + 0x12], cx
mov ecx, dword [ebp - 0xc]
movzx ecx, cx
mov word [eax], cx
inc edx
add eax, 2
cmp edx, dword [ebp - 8]
jb 0xa54e549
mov dword [ebp - 0xc], esi
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov edx, ebx
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
mov ecx, eax
shr eax, 1
shr ecx, 3
add eax, 3
add eax, ecx
mov dword [ebp + 0x10], eax
cmp esi, dword [ebp - 4]
jne 0xa54e680
cmp dword [ebp - 8], 0
xorps xmm0, xmm0
mov eax, ebx
movlpd qword [ebp - 0x1c], xmm0
jbe 0xa54e626
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov dword [ebp + 0x1c], ecx
movsx esi, word [edi + edx*2]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
mov dword [eax + edi], ecx
mov dword [eax + edi + 4], ebx
mov edi, dword [ebp + 0xc]
cmp esi, 8
jle 0xa54e610
mov edi, dword [ebp - 0x14]
add edi, eax
mov dword [edi + 8], ecx
lea ecx, [esi - 9]
shr ecx, 2
lea esi, [edi + 8]
mov dword [edi + 0xc], ebx
and ecx, 0x3ffffffe
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
add eax, esi
mov esi, 0x1010101
inc edx
add ecx, esi
mov dword [ebp + 0x1c], ecx
adc ebx, esi
cmp edx, dword [ebp - 8]
jb 0xa54e5cf
xor ebx, ebx
cmp dword [ebp - 0x10], 0
mov edx, ebx
mov dword [ebp + 0x1c], ebx
mov esi, ebx
mov dword [ebp - 0xc], ebx
jbe 0xa54e709
mov eax, dword [ebp - 4]
mov edi, ebx
mov ebx, edx
mov edx, dword [ebp - 0x14]
add edx, esi
mov esi, dword [ebp + 8]
mov ecx, ebx
and ecx, eax
mov al, byte [edi + edx]
inc edi
mov byte [esi + ecx*4 + 6], al
mov esi, dword [ebp + 0x10]
add ebx, esi
mov eax, dword [ebp - 4]
cmp edi, 2
jb 0xa54e646
mov edx, dword [ebp + 0x1c]
push 0
pop ebx
lea edx, [edx + esi*2]
mov esi, dword [ebp - 0xc]
add esi, 2
and edx, eax
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0xc], esi
cmp esi, dword [ebp - 0x10]
jb 0xa54e63d
jmp 0xa54e6ca
cmp dword [ebp - 8], 0
mov ecx, ebx
jbe 0xa54e6c4
xor eax, eax
mov esi, ebx
cmp ax, word [edi]
mov eax, dword [ebp + 0x10]
jge 0xa54e6b2
mov ebx, dword [ebp + 8]
mov byte [ebx + ecx*4 + 6], dl
add ecx, eax
and ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
ja 0xa54e69b
movsx eax, word [edi]
inc esi
cmp esi, eax
mov eax, dword [ebp + 0x10]
jl 0xa54e697
xor ebx, ebx
inc edx
add edi, 2
cmp edx, dword [ebp - 8]
jb 0xa54e688
test ecx, ecx
je 0xa54e6c4
or eax, 0xffffffff
jmp 0xa54e710
cmp dword [ebp - 0x10], 0
jbe 0xa54e709
mov edi, dword [ebp + 8]
add edi, 7
movzx edx, byte [edi - 1]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x18]
movzx esi, word [eax + edx*2]
mov dword [ebp + 8], esi
lea eax, [esi + 1]
mov word [ecx + edx*2], ax
mov ecx, esi
bsr eax, ecx
mov cl, byte [ebp + 0x14]
sub cl, al
mov eax, dword [ebp - 0x10]
shl si, cl
sub si, ax
mov byte [edi], cl
inc ebx
mov word [edi - 3], si
lea edi, [edi + 4]
cmp ebx, eax
jb 0xa54e6d0
xor eax, eax
jmp 0xa54e710
push 0xffffffffffffffd2
pop eax
pop edi
pop esi
pop ebx
leave
ret