Function at 0x52edd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, dword [ecx + 0x18]
mov ebx, dword [ecx]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0x10]
sar eax, 1
push edi
mov edi, dword [ecx + 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x24]
sar ecx, 1
movzx edx, si
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], edi
mov dword [ebp + 8], ebx
mov dword [ebp - 0x18], ecx
test edi, edi
je 0x52f01e
movzx edi, si
not esi
movzx ecx, si
mov dword [ebp - 0x20], ecx
movzx ecx, si
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x1c]
add ecx, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x18]
add ecx, ecx
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
dec ecx
mov dword [ebp - 0x14], ecx
mov ecx, eax
xor ecx, ebx
test cl, 2
je 0x52ef2e
test al, 2
je 0x52ee82
movzx ebx, word [ebx]
movzx esi, word [eax]
mov edi, ebx
movzx ecx, dx
and ebx, esi
and ebx, dword [ebp - 0x20]
and edi, ecx
mov ecx, dword [ebp - 4]
mov edx, esi
mov esi, dword [ebp - 0xc]
movzx ecx, cx
and edx, ecx
add edi, edx
shr edi, 1
add edi, ebx
mov ebx, dword [ebp + 8]
mov word [eax], di
add ebx, 2
add eax, 2
dec esi
mov edi, dword [ebx - 2]
add ebx, 2
cmp esi, 1
jle 0x52eef4
mov ecx, dword [ebp - 8]
mov edx, ecx
shr ecx, 1
shl edx, 0xf
or edx, ecx
mov ecx, dword [ebp - 8]
shl ecx, 0x10
or ecx, dword [ebp - 8]
not ecx
mov dword [ebp + 8], edx
mov dword [ebp - 0x24], ecx
lea ecx, [esi - 2]
shr ecx, 1
inc ecx
mov dword [ebp - 0x18], ecx
neg ecx
lea esi, [esi + ecx*2]
mov dword [ebp - 0x28], esi
jmp 0x52eec0
mov ecx, dword [ebx]
mov esi, dword [eax]
mov edx, dword [ebp - 0x24]
shl ecx, 0x10
shr edi, 0x10
add ecx, edi
mov edi, dword [ebx]
and edx, ecx
add ebx, 4
and edx, esi
shr ecx, 1
and ecx, dword [ebp + 8]
shr esi, 1
add edx, ecx
and esi, dword [ebp + 8]
add edx, esi
mov dword [eax], edx
add eax, 4
sub dword [ebp - 0x18], 1
jne 0x52eec0
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x52ef21
movzx esi, word [eax]
add ebx, 2
mov ecx, dword [ebp - 4]
mov edx, esi
and esi, dword [ebp - 0x10]
movzx ecx, cx
and edx, ecx
shr edi, 0x10
mov ecx, edi
and esi, edi
and ecx, dword [ebp - 8]
add edx, ecx
shr edx, 1
add edx, esi
mov word [eax], dx
add eax, 2
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffffe
add ebx, ecx
jmp 0x52f007
test bl, 2
je 0x52ef6e
mov ecx, dword [ebp + 8]
movzx ebx, word [eax]
mov edi, ebx
movzx esi, word [ecx]
movzx ecx, dx
and ebx, esi
and ebx, dword [ebp - 0x10]
and edi, ecx
mov ecx, dword [ebp - 4]
mov edx, esi
mov esi, dword [ebp - 0xc]
movzx ecx, cx
and edx, ecx
add edi, edx
shr edi, 1
add edi, ebx
mov ebx, dword [ebp + 8]
mov word [eax], di
add ebx, 2
mov edi, dword [ebp - 8]
add eax, 2
mov dword [ebp + 8], ebx
dec esi
cmp esi, 1
jle 0x52efcc
mov edx, edi
mov ecx, edi
shl edx, 0xf
shr ecx, 1
or edx, ecx
mov dword [ebp + 8], edx
mov edx, edi
shl edx, 0x10
or edx, edi
lea edi, [esi - 2]
shr edi, 1
not edx
inc edi
mov dword [ebp - 0x28], edx
mov ecx, edi
neg ecx
lea esi, [esi + ecx*2]
mov dword [ebp - 0x24], esi
lea ecx, [ecx]
mov ecx, dword [eax]
and edx, ecx
mov esi, dword [ebx]
and edx, esi
shr ecx, 1
add ebx, 4
and ecx, dword [ebp + 8]
shr esi, 1
add edx, ecx
and esi, dword [ebp + 8]
add edx, esi
mov dword [eax], edx
add eax, 4
mov edx, dword [ebp - 0x28]
sub edi, 1
jne 0x52efa0
mov esi, dword [ebp - 0x24]
mov dword [ebp + 8], ebx
test esi, esi
je 0x52f004
mov ecx, dword [ebp + 8]
movzx ebx, word [eax]
mov edi, ebx
movzx esi, word [ecx]
mov ecx, dword [ebp - 4]
mov edx, esi
movzx ecx, cx
and ebx, esi
and ebx, dword [ebp - 0x10]
and edi, ecx
mov ecx, dword [ebp - 4]
movzx ecx, cx
and edx, ecx
add edi, edx
shr edi, 1
add edi, ebx
mov ebx, dword [ebp + 8]
mov word [eax], di
add ebx, 2
add eax, 2
add ebx, dword [ebp - 0x1c]
add eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ebp + 8], ebx
test ecx, ecx
jne 0x52ee38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret