Function at 0x47ea20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
bsr eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x20], 0
mov esi, 0xffffffff
mov dword [ebp - 0xc], edi
cmovne esi, eax
mov ecx, 0x20
sub ecx, esi
mov ebx, edi
mov dword [ebp - 0x14], ecx
lea eax, [edi + edx]
mov dword [ebp - 4], eax
cmp edx, 0xf
jb 0x47ec9e
add eax, 0xfffffff1
mov dword [ebp - 0x18], ebx
imul esi, dword [edi + 1], 0x1e35a7bd
lea edx, [edi + 1]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
shr esi, cl
mov ecx, 0x20
nop dword [eax]
mov eax, ecx
mov dword [ebp - 8], edx
shr eax, 5
inc ecx
mov dword [ebp + 8], edx
add edx, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x20], ecx
cmp edx, dword [ebp - 0x1c]
ja 0x47eca3
imul esi, dword [edx], 0x1e35a7bd
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0xc]
shr esi, cl
mov ecx, dword [ebp - 0x10]
movzx eax, word [eax + ecx*2]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0xc]
mov word [ebx + ecx*2], ax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x18]
mov eax, dword [eax]
cmp eax, dword [ecx]
mov ecx, dword [ebp - 0x20]
jne 0x47ea80
mov edx, dword [ebp - 8]
lea esi, [edi + 1]
sub edx, ebx
mov dword [ebp - 8], edx
lea eax, [edx - 1]
cmp eax, 0x3c
jge 0x47eb0c
shl al, 2
mov byte [edi], al
cmp edx, 0x10
jg 0x47eb23
mov eax, dword [ebx]
mov dword [esi], eax
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [esi + 0xc], eax
jmp 0x47eb31
xor ecx, ecx
nop
mov byte [esi], al
inc ecx
sar eax, 8
inc esi
test eax, eax
jg 0x47eb10
sub cl, 5
shl cl, 2
mov byte [edi], cl
push edx
push ebx
push esi
call fcn.004c5bb0
mov edx, dword [ebp - 8]
add esp, 0xc
lea edi, [esi + edx]
mov esi, dword [ebp - 4]
mov edx, dword [ebp + 8]
add esi, 0xfffffffc
mov dword [ebp - 8], esi
mov ebx, dword [ebp - 0x10]
mov eax, edx
mov dword [ebp - 0x20], eax
xor edx, edx
add eax, 4
cmp eax, esi
ja 0x47eb8e
lea esi, [ebx + 4]
sub esi, eax
mov ecx, dword [eax]
cmp ecx, dword [esi + eax]
jne 0x47eb6f
add eax, 4
add edx, 4
cmp eax, dword [ebp - 8]
jbe 0x47eb56
mov esi, dword [ebp - 8]
cmp eax, esi
ja 0x47eb8e
mov ecx, dword [edx + ebx + 4]
xor ecx, dword [eax]
bsf eax, ecx
mov ecx, 0x20
mov dword [ebp - 0x18], 0
cmovne ecx, eax
sar ecx, 3
add edx, ecx
jmp 0x47eba3
mov esi, dword [ebp - 4]
cmp eax, esi
jae 0x47eba3
mov cl, byte [edx + ebx + 4]
cmp cl, byte [eax]
jne 0x47eba3
inc eax
inc edx
cmp eax, esi
jb 0x47eb95
mov esi, dword [ebp + 8]
lea ecx, [edx + 4]
mov ebx, dword [ebp - 0x20]
add esi, ecx
sub ebx, dword [ebp - 0x10]
mov dword [ebp + 8], esi
cmp ecx, 0x44
jl 0x47ebe7
movzx esi, bx
mov eax, esi
shr edx, 6
mov dword [ebp - 0x20], eax
mov eax, edx
shl eax, 6
sub ecx, eax
nop dword [eax + eax]
mov byte [edi], 0xfe
mov word [edi + 1], si
add edi, 3
sub edx, 1
jne 0x47ebd0
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp + 8]
jmp 0x47ebea
movzx eax, bx
movzx edx, ax
cmp ecx, 0x40
jle 0x47ebff
mov byte [edi], 0xee
mov word [edi + 1], dx
add edi, 3
sub ecx, 0x3c
cmp ecx, 0xc
jge 0x47ec24
cmp ebx, 0x800
jae 0x47ec24
mov eax, ebx
shl cl, 2
shr eax, 3
and al, 0xe0
sub al, 0xf
add al, cl
mov byte [edi], al
mov byte [edi + 1], bl
add edi, 2
jmp 0x47ec33
shl cl, 2
sub cl, 2
mov byte [edi], cl
mov word [edi + 1], dx
add edi, 3
mov ebx, esi
mov dword [ebp - 0x18], ebx
movzx eax, bx
cmp ebx, dword [ebp - 0x1c]
jae 0x47eca3
sub eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
movzx esi, ax
mov eax, dword [ebp + 8]
lea edx, [esi - 1]
imul eax, dword [eax - 1], 0x1e35a7bd
shr eax, cl
mov ecx, dword [ebp + 0xc]
mov word [ecx + eax*2], dx
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
imul eax, dword [edx], 0x1e35a7bd
shr eax, cl
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [eax]
mov word [ecx], si
mov esi, dword [ebp - 8]
cmp dword [edx], eax
je 0x47eb40
imul esi, dword [edx + 1], 0x1e35a7bd
lea edx, [ebx + 1]
mov ecx, dword [ebp - 0x14]
jmp 0x47ea72
mov edi, dword [ebp + 8]
jmp 0x47eca6
mov eax, dword [ebp - 4]
cmp ebx, eax
jae 0x47ecf0
sub eax, ebx
lea esi, [edi + 1]
mov dword [ebp - 4], eax
dec eax
cmp eax, 0x3c
jge 0x47ecbd
shl al, 2
jmp 0x47ecd3
xor ecx, ecx
nop
mov byte [esi], al
lea ecx, [ecx + 1]
sar eax, 8
inc esi
test eax, eax
jg 0x47ecc0
lea eax, [ecx - 5]
shl al, 2
mov byte [edi], al
mov edi, dword [ebp - 4]
push edi
push ebx
push esi
lfence
call fcn.004c5bb0
add esp, 0xc
lea eax, [esi + edi]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret