Function at 0x53bed0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], ecx
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [eax + edx*2]
mov dword [esp + 0x2c], ecx
add eax, 2
mov dword [esp + 0x14], eax
lea eax, [edx + 1]
mov dword [esp + 0x1c], eax
xor edx, edx
mov eax, 1
shl eax, cl
mov dword [esp + 0x10], eax
push esi
xor esi, esi
lea ebx, [eax - 1]
mov eax, ecx
xor ecx, ecx
mov dword [esp + 0x1c], ebx
bts ecx, eax
cmp eax, 0x20
push edi
cmovae edx, ecx
mov edi, ebx
mov ebx, dword [ebp + 8]
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
lea eax, [ebx*2 + 2]
mov ebx, edi
add eax, ecx
adc esi, edx
add eax, 8
adc esi, 0
test esi, esi
ja 0x53c1e0
jb 0x53bf58
cmp eax, dword [ebp + 0x14]
ja 0x53c1e0
cmp dword [ebp + 8], 0xff
ja 0x53c1e0
mov ecx, dword [esp + 0x34]
cmp ecx, 0xc
jbe 0x53bf7a
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x24]
mov eax, 1
mov word [esp + 0x28], cx
dec ecx
mov word [esp + 0x2a], ax
shl ax, cl
movzx eax, ax
mov dword [esp + 0x30], eax
test esi, esi
je 0x53bff2
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
add esi, 6
mov ecx, dword [ebp + 0x10]
sub ebx, ecx
xor edx, edx
lea esi, [esi + edi*4]
movzx eax, word [ecx + ebx]
cmp ax, 0xffff
jne 0x53bfc8
mov byte [esi], dl
dec edi
sub esi, 4
mov eax, 1
jmp 0x53bfdd
cmp ax, word [esp + 0x30]
jl 0x53bfda
xor eax, eax
mov word [esp + 0x2a], ax
movzx eax, word [ecx + ebx]
movzx eax, ax
mov word [ecx], ax
inc edx
add ecx, 2
cmp edx, dword [esp + 0x24]
jb 0x53bfb1
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
mov dword [ecx], eax
mov eax, dword [esp + 0x18]
mov ecx, eax
shr ecx, 3
shr eax, 1
cmp edi, ebx
jne 0x53c103
add eax, 3
xor edi, edi
add eax, ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [esp + 0x38], xmm0
test esi, esi
je 0x53c0a7
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x2c], ecx
nop dword [eax]
movsx esi, word [edx + eax*2]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x38], esi
mov dword [edi + edx], ecx
mov dword [edi + edx + 4], ebx
mov edx, dword [esp + 0x10]
cmp esi, 8
jle 0x53c086
add edi, dword [esp + 0x1c]
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 [esp + 0x2c]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x28]
add edi, esi
inc eax
add ecx, 0x1010101
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
adc ebx, 0x1010101
cmp eax, dword [esp + 0x24]
jb 0x53c040
mov ebx, dword [esp + 0x20]
xor edx, edx
xor esi, esi
cmp dword [esp + 0x18], edx
jbe 0x53c1d7
mov edi, dword [esp + 0x1c]
nop dword [eax]
movzx eax, byte [esi + edi]
mov ecx, edx
mov edi, dword [esp + 0x14]
and ecx, ebx
mov byte [edi + ecx*4 + 6], al
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
add ecx, edx
and ecx, ebx
movzx eax, byte [esi + edi + 1]
add esi, 2
mov edi, dword [esp + 0x14]
mov byte [edi + ecx*4 + 6], al
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x1c]
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x18]
and edx, ebx
cmp esi, eax
jb 0x53c0c0
jmp 0x53c17e
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test esi, esi
je 0x53c176
mov ecx, dword [esp + 0x10]
xor ebx, ebx
xor esi, esi
cmp bx, word [ecx]
mov ecx, dword [esp + 0x1c]
jge 0x53c158
mov ebx, dword [esp + 0x14]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [esp + 0x20]
and eax, ebx
cmp eax, edi
jbe 0x53c148
nop dword [eax]
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x53c140
mov ecx, dword [esp + 0x10]
inc esi
movsx ecx, word [ecx]
cmp esi, ecx
mov ecx, dword [esp + 0x1c]
jl 0x53c125
add dword [esp + 0x10], 2
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esp + 0x24]
jb 0x53c114
test eax, eax
je 0x53c176
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x53c1d7
mov edi, dword [esp + 0x14]
mov ebx, eax
add edi, 7
nop word [eax + eax]
movzx eax, byte [edi - 1]
lea edi, [edi + 4]
mov ecx, dword [ebp + 0x10]
movzx esi, word [ecx + eax*2]
lea ecx, [ecx + eax*2]
mov edx, esi
mov dword [esp + 0x38], 0
lea eax, [esi + 1]
mov word [ecx], ax
mov cl, byte [esp + 0x34]
bsr eax, edx
setne dl
neg dl
sbb dl, dl
and dl, al
sub cl, dl
shl si, cl
sub si, word [esp + 0x18]
mov byte [edi - 4], cl
mov word [edi - 7], si
sub ebx, 1
jne 0x53c190
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd2
pop ebx
mov esp, ebp
pop ebp
ret