Function at 0x4e0175
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
push ebx
push ebp
lea ecx, [ecx + eax*2]
mov dword [esp + 0x18], edx
add ecx, 2
lea ebx, [eax*2 + 2]
mov dword [esp + 0x14], ecx
lea ecx, [eax + 1]
mov dword [esp + 8], ecx
xor eax, eax
xor ecx, ecx
bts eax, edx
push esi
push edi
xor esi, esi
lea edi, [ecx + 1]
mov ecx, edx
shl edi, cl
mov dword [esp + 0x14], edi
lea ecx, [edi - 1]
mov dword [esp + 0x54], ecx
mov ebp, ecx
xor ecx, ecx
cmp edx, 0x20
cmovae ecx, eax
xor eax, ecx
cmp edx, 0x40
cmovae ecx, eax
add ebx, eax
adc esi, ecx
add ebx, 8
adc esi, 0
test esi, esi
ja 0x4e0476
jb 0x4e01ef
cmp ebx, dword [esp + 0x5c]
ja 0x4e0476
cmp dword [esp + 0x50], 0xff
ja 0x4e0476
mov eax, dword [esp + 0x20]
cmp eax, 0xc
jbe 0x4e020d
push 0xffffffffffffffd4
jmp 0x4e0478
or dword [esp + 0x5c], 0xffffffff
lea ecx, [eax - 1]
mov esi, dword [esp + 0x10]
xor edx, edx
mov ebx, dword [esp + 0x4c]
inc edx
mov word [esp + 0x50], ax
mov eax, edx
shl ax, cl
xor ecx, ecx
movzx eax, ax
mov word [esp + 0x52], dx
mov dword [esp + 0x18], eax
test esi, esi
je 0x4e0291
mov esi, dword [esp + 0x48]
mov edi, ebx
mov eax, dword [esp + 0x58]
add esi, 6
mov ebx, dword [esp + 0x10]
sub edi, eax
lea esi, [esi + ebp*4]
movzx edx, word [edi + eax]
cmp dx, word [esp + 0x5c]
jne 0x4e0268
mov byte [esi], cl
xor edx, edx
dec ebp
sub esi, 4
inc edx
jmp 0x4e027a
cmp dx, word [esp + 0x18]
jl 0x4e027a
xor ebx, ebx
mov word [esp + 0x52], bx
mov ebx, dword [esp + 0x10]
mov word [eax], dx
inc ecx
add eax, 2
cmp ecx, ebx
jb 0x4e0252
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x10]
push 4
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x50]
call fcn.004e4a90
lea eax, [edi - 1]
mov ecx, edi
add esp, 0xc
shr ecx, 3
cmp ebp, eax
mov eax, edi
jne 0x4e0417
shr eax, 1
xor ebp, ebp
add eax, 3
mov dword [esp + 0x18], ebp
add eax, ecx
xorps xmm0, xmm0
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x5c], eax
movlpd qword [esp + 0x28], xmm0
test esi, esi
je 0x4e0380
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x4c]
movsx ecx, word [edi + ebp*2]
add eax, dword [esp + 0x1c]
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x34]
push 8
push ecx
push eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], esi
mov dword [esp + 0x34], eax
call fcn.004e4a90
mov ecx, dword [esp + 0x5c]
add esp, 0xc
mov dword [esp + 0x24], 8
cmp ecx, 8
jle 0x4e035a
mov edi, dword [esp + 0x24]
mov ebp, ecx
push 8
lea eax, [esp + 0x40]
mov dword [esp + 0x40], ebx
push eax
mov eax, dword [esp + 0x30]
add eax, edi
mov dword [esp + 0x48], esi
push eax
call fcn.004e4a90
add edi, 8
add esp, 0xc
cmp edi, ebp
jl 0x4e0329
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
add eax, ecx
inc ebp
mov ecx, 0x1010101
mov dword [esp + 0x5c], eax
add ebx, ecx
mov dword [esp + 0x18], ebp
adc esi, ecx
cmp ebp, dword [esp + 0x10]
jb 0x4e02ea
mov edi, dword [esp + 0x14]
xor edx, edx
xor esi, esi
mov dword [esp + 0x50], edx
test edi, edi
je 0x4e0413
mov ebp, edx
xor ebx, ebx
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x1c]
lea eax, [ebx + esi]
mov ecx, ebp
and ecx, dword [esp + 0x54]
inc ebx
mov al, byte [eax + edi]
mov edi, dword [esp + 0x30]
add ebp, edi
mov byte [edx + ecx*4 + 6], al
cmp ebx, 2
jb 0x4e0398
mov edx, dword [esp + 0x50]
add esi, 2
lea edx, [edx + edi*2]
mov edi, dword [esp + 0x14]
and edx, dword [esp + 0x54]
mov dword [esp + 0x50], edx
cmp esi, edi
jb 0x4e0390
test edi, edi
je 0x4e0413
mov esi, dword [esp + 0x48]
mov ebx, edi
mov ebp, dword [esp + 0x58]
add esi, 7
movzx ecx, byte [esi - 1]
movzx eax, word [ebp + ecx*2]
mov edx, eax
inc eax
mov word [ebp + ecx*2], ax
mov eax, edx
mov cl, byte [esp + 0x20]
bsr eax, eax
sub cl, al
shl dx, cl
sub dx, di
mov byte [esi], cl
mov word [esi - 3], dx
lea esi, [esi + 4]
sub ebx, 1
jne 0x4e03e3
xor eax, eax
jmp 0x4e0479
add ecx, 3
shr eax, 1
add eax, ecx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x50], eax
test esi, esi
je 0x4e03d2
mov edi, dword [esp + 0x10]
xor eax, eax
xor esi, esi
cmp ax, word [ebx]
mov eax, dword [esp + 0x50]
jge 0x4e045d
mov edi, dword [esp + 0x48]
mov byte [edi + ecx*4 + 6], dl
add ecx, eax
and ecx, dword [esp + 0x54]
cmp ecx, ebp
ja 0x4e0443
movsx eax, word [ebx]
inc esi
cmp esi, eax
mov eax, dword [esp + 0x50]
jl 0x4e043f
mov edi, dword [esp + 0x10]
inc edx
add ebx, 2
cmp edx, edi
jb 0x4e042e
mov edi, dword [esp + 0x14]
test ecx, ecx
je 0x4e03d2
or eax, 0xffffffff
jmp 0x4e0479
push 0xffffffffffffffd2
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret