Function at 0x1004b9e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov dword [ebp - 8], edx
mov esi, 1
mov edx, dword [ebp + 0xc]
push edi
mov edi, ecx
mov ecx, edx
shl esi, cl
mov ecx, esi
mov dword [ebp - 4], esi
shr ecx, 1
test edx, edx
lea eax, [edi + 4]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x28], eax
lea ebx, [esi - 1]
mov eax, 1
mov dword [ebp - 0x10], ebx
cmovne eax, ecx
mov ecx, esi
shr ecx, 3
add ecx, 3
lea eax, [edi + eax*4]
mov edi, ebx
mov dword [ebp - 0x2c], eax
mov eax, esi
shr eax, 1
xor esi, esi
add eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp - 0x1c], eax
lea eax, [ecx + eax*2]
xor ecx, ecx
mov dword [ebp - 0xc], eax
mov eax, edx
bts ecx, eax
xor edx, edx
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [ebp + 8]
cmovae edx, ecx
add eax, 2
add eax, ecx
adc esi, edx
shrd eax, esi, 1
shr esi, 1
add eax, 2
adc esi, 0
shld esi, eax, 2
shl eax, 2
test esi, esi
jb 0x1004ba90
ja 0x1004ba84
cmp eax, dword [ebp + 0x14]
jbe 0x1004ba90
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov word [ecx], ax
mov eax, dword [ebp + 0x10]
mov word [ecx + 2], dx
lea esi, [edx + 1]
xor ecx, ecx
mov word [eax], cx
mov ecx, 1
cmp esi, ecx
jb 0x1004bb02
mov edx, dword [ebp - 8]
sub eax, edx
mov ebx, eax
nop dword [eax + eax]
movzx eax, word [edx]
movzx esi, word [ebx + edx]
mov dword [ebp + 0x14], eax
cmp ax, 0xffff
jne 0x1004bae7
lea eax, [esi + 1]
mov esi, dword [ebp + 0x10]
mov word [esi + ecx*2], ax
lea eax, [ecx - 1]
mov esi, dword [ebp - 0xc]
mov byte [edi + esi + 2], al
dec edi
jmp 0x1004baf3
mov eax, dword [ebp + 0x14]
add eax, esi
mov esi, dword [ebp + 0x10]
mov word [esi + ecx*2], ax
mov esi, dword [ebp + 8]
inc ecx
inc esi
add edx, 2
cmp ecx, esi
jbe 0x1004bac0
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
movzx eax, cx
mov edx, eax
inc eax
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0xc]
mov word [edx], ax
xor eax, eax
cmp edi, ebx
jne 0x1004bbed
lea edi, [edx + 2]
xor esi, esi
mov edx, dword [ebp + 8]
add edi, ecx
mov dword [ebp + 0x14], edi
xorps xmm0, xmm0
mov dword [ebp - 0x18], esi
movlpd qword [ebp - 0x20], xmm0
add edx, 1
je 0x1004bb9c
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 8]
movsx ecx, word [ecx + eax*2]
mov dword [ebp - 0x1c], ecx
mov dword [esi + edi], ebx
mov dword [esi + edi + 4], edx
cmp ecx, 8
jle 0x1004bb79
add edi, esi
add ecx, 0xfffffff7
shr ecx, 2
and ecx, 0x3ffffffe
mov dword [edi + 8], ebx
lea esi, [edi + 8]
mov dword [edi + 0xc], edx
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp + 0x14]
add esi, ecx
mov ecx, dword [ebp + 8]
inc eax
add ebx, 0x1010101
mov dword [ebp - 0x18], esi
adc edx, 0x1010101
inc ecx
cmp eax, ecx
jb 0x1004bb41
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
xor esi, esi
xor edi, edi
test ecx, ecx
je 0x1004bc34
mov eax, dword [ebp + 0x14]
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], ecx
movzx eax, byte [edi + eax]
mov ecx, esi
mov edx, dword [ebp - 0xc]
and ecx, ebx
mov byte [ecx + edx + 2], al
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
lea ecx, [esi + edx]
movzx eax, byte [eax + edi]
lea esi, [esi + edx*2]
and ecx, ebx
add edi, 2
mov ebx, dword [ebp - 0xc]
mov byte [ecx + ebx + 2], al
mov ebx, dword [ebp - 0x10]
and esi, ebx
mov eax, dword [ebp + 0x14]
cmp edi, dword [ebp - 4]
jb 0x1004bbb1
xor esi, esi
jmp 0x1004bc3a
xor ecx, ecx
mov dword [ebp + 0x14], ecx
test esi, esi
je 0x1004bc31
mov edx, dword [ebp - 8]
movsx edx, word [edx + ecx*2]
test edx, edx
jle 0x1004bc29
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
mov byte [eax + esi + 2], cl
mov ecx, dword [ebp - 0x14]
add eax, ecx
and eax, ebx
cmp eax, edi
jbe 0x1004bc1e
add eax, ecx
and eax, ebx
cmp eax, edi
ja 0x1004bc16
sub edx, 1
jne 0x1004bc04
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x1c]
inc ecx
mov dword [ebp + 0x14], ecx
cmp ecx, esi
jb 0x1004bbf6
mov ecx, dword [ebp - 4]
xor esi, esi
test ecx, ecx
je 0x1004bc66
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
movzx edi, ax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
movzx eax, byte [esi + eax + 2]
lea edx, [ecx + eax*2]
movzx eax, word [edx]
lea ecx, [edi + esi]
inc esi
mov word [ebx + eax*2], cx
inc word [edx]
mov ecx, dword [ebp - 4]
cmp esi, ecx
jb 0x1004bc43
mov edx, dword [ebp - 0x2c]
xor edi, edi
mov esi, dword [ebp - 8]
xor ebx, ebx
add edx, 8
movsx esi, word [esi + ebx*2]
cmp esi, 0xffffffff
je 0x1004bcbf
test esi, esi
je 0x1004bcb2
cmp esi, 1
je 0x1004bcbf
mov ecx, dword [ebp + 0xc]
lea eax, [esi - 1]
bsr eax, eax
sub ecx, eax
shl esi, cl
shl ecx, 0x10
sub ecx, esi
mov esi, dword [ebp - 8]
mov dword [edx], ecx
mov ecx, edi
movsx eax, word [esi + ebx*2]
sub ecx, eax
mov dword [edx - 4], ecx
movsx eax, word [esi + ebx*2]
mov ecx, dword [ebp - 4]
add edi, eax
jmp 0x1004bcd3
mov eax, dword [ebp + 0xc]
inc eax
shl eax, 0x10
sub eax, ecx
mov dword [edx], eax
jmp 0x1004bcd0
mov eax, dword [ebp + 0xc]
shl eax, 0x10
sub eax, ecx
mov dword [edx], eax
lea eax, [edi - 1]
mov dword [edx - 4], eax
inc edi
mov esi, dword [ebp - 8]
inc ebx
add edx, 8
cmp ebx, dword [ebp + 8]
jbe 0x1004bc73
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret