Function at 0x414270
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 0x194]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 0x190]
push ebx
sub eax, edx
push esi
mov esi, dword [ebp + 0x4c]
push edi
mov edi, dword [ebp + 0x19c]
sub eax, edi
imul eax, dword [ebp + 0x28]
add eax, ecx
lea esi, [esi + eax*2]
add esi, eax
mov eax, dword [ebp + 0xf0]
sub eax, edx
sub eax, edi
imul eax, dword [ebp + 0xec]
mov edi, dword [ebp + 0x110]
add eax, ecx
lea ebx, [edi + eax*2]
mov edi, dword [ebp + 0x1a0]
add ebx, eax
test edi, edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ebx
jne 0x414325
mov eax, dword [ebp + 0x19c]
push edi
push edx
push ecx
sub esp, 0xc4
mov edi, esp
push eax
mov ecx, 0x31
lea esi, [ebp + 0xcc]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x198]
push ecx
push edx
mov edx, dword [ebp + 0x190]
push edx
sub esp, 0xc4
mov ecx, 0x31
lea esi, [ebp + 8]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.00413a80
add esp, 0x1a4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x503870
call fcn.00401040
xor eax, eax
add esp, 4
cmp edi, eax
jle 0x4144b6
cmp dword [ebp + 0x19c], eax
mov dword [ebp + 0x190], eax
jle 0x41463f
mov eax, dword [ebp + 0x198]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xec]
lea eax, [eax + eax*2]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x28]
lea edx, [eax + eax*2]
mov dword [ebp - 0x1c], edx
sar ecx, 3
mov eax, ebx
mov edx, esi
mov dword [ebp + 0x194], ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
jmp 0x414390
mov ecx, dword [ebp + 0x194]
lea esp, [esp]
test ecx, ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
je 0x414410
mov eax, dword [ebp + 0x194]
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
pxor mm6, mm6
movd mm7, dword [ebp + 0x1a0]
punpcklwd mm7, mm7
punpckldq mm7, mm7
movq mm0, qword [ecx]
movq mm2, qword [ecx + 8]
movq mm4, qword [ecx + 0x10]
lea ecx, [ecx + 0x18]
movq mm1, mm0
movq mm3, mm2
movq mm5, mm4
punpckhbw mm0, mm6
punpcklbw mm1, mm6
punpckhbw mm2, mm6
punpcklbw mm3, mm6
punpckhbw mm4, mm6
punpcklbw mm5, mm6
paddw mm0, mm7
paddw mm1, mm7
paddw mm2, mm7
paddw mm3, mm7
paddw mm4, mm7
paddw mm5, mm7
packuswb mm1, mm0
packuswb mm3, mm2
packuswb mm5, mm4
movq qword [ebx], mm1
movq qword [ebx + 8], mm3
movq qword [ebx + 0x10], mm5
lea ebx, [ebx + 0x18]
dec eax
jne 0x4143b6
emms
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 0x194]
mov ecx, dword [ebp + 0x198]
shl eax, 3
cmp eax, ecx
mov dword [ebp - 0x18], eax
jge 0x414484
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0xec]
sub eax, ecx
imul eax, dword [ebp + 0x190]
mov ecx, dword [ebp - 4]
lea eax, [eax + eax*2]
sub eax, esi
mov esi, dword [ebp + 0x198]
add eax, ecx
lea ecx, [eax + ebx + 2]
sub esi, dword [ebp - 0x18]
nop
movzx eax, byte [ecx - 2]
add eax, edi
jns 0x41445a
xor eax, eax
mov byte [edx], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x414466
xor eax, eax
mov byte [edx + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x414472
xor eax, eax
mov byte [edx + 2], al
add edx, 3
add ecx, 3
dec esi
jne 0x414450
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x190]
add edx, eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x20]
inc ecx
cmp ecx, dword [ebp + 0x19c]
mov dword [ebp + 0x190], ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
jl 0x414386
jmp 0x41463f
jge 0x414658
cmp dword [ebp + 0x19c], eax
mov dword [ebp + 0x190], eax
jle 0x41463f
mov eax, dword [ebp + 0x198]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xec]
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0x28]
sar ecx, 3
lea eax, [eax + eax*2]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp + 0x194], esi
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp + 0x194]
mov eax, edi
mov dword [ebp - 0x20], edx
cdq
xor eax, edx
sub eax, edx
test ecx, ecx
mov edi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp + 0x1a0], edi
je 0x414595
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
pxor mm6, mm6
movd mm7, dword [ebp + 0x1a0]
punpcklwd mm7, mm7
punpckldq mm7, mm7
movq mm0, qword [ecx]
movq mm2, qword [ecx + 8]
movq mm4, qword [ecx + 0x10]
lea ecx, [ecx + 0x18]
movq mm1, mm0
movq mm3, mm2
movq mm5, mm4
punpckhbw mm0, mm6
punpcklbw mm1, mm6
punpckhbw mm2, mm6
punpcklbw mm3, mm6
punpckhbw mm4, mm6
punpcklbw mm5, mm6
psubw mm0, mm7
psubw mm1, mm7
psubw mm2, mm7
psubw mm3, mm7
psubw mm4, mm7
psubw mm5, mm7
packuswb mm1, mm0
packuswb mm3, mm2
packuswb mm5, mm4
movq qword [ebx], mm1
movq qword [ebx + 8], mm3
movq qword [ebx + 0x10], mm5
lea ebx, [ebx + 0x18]
dec eax
jne 0x41453b
emms
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0x198]
lea ebx, [ecx*8]
cmp ebx, eax
jge 0x414608
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0xec]
mov edx, dword [ebp - 0x10]
sub eax, ecx
imul eax, dword [ebp + 0x190]
mov ecx, dword [ebp + 0x194]
lea eax, [eax + eax*2]
sub eax, edx
mov edx, dword [ebp + 0x198]
add eax, ecx
mov ecx, dword [ebp - 8]
lea ecx, [eax + ecx + 2]
sub edx, ebx
movzx eax, byte [ecx - 2]
add eax, edi
jns 0x4145e1
xor eax, eax
mov byte [esi], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x4145ed
xor eax, eax
mov byte [esi + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x4145f9
xor eax, eax
mov byte [esi + 2], al
add esi, 3
add ecx, 3
dec edx
jne 0x4145d7
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp + 0x194]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0x190]
add ebx, edx
mov edx, dword [ebp - 0x14]
add esi, edx
mov edx, dword [ebp + 0x19c]
inc eax
cmp eax, edx
mov dword [ebp + 0x190], eax
mov dword [ebp + 0x194], ebx
mov dword [ebp - 0xc], esi
jl 0x414500
push 0x503870
call fcn.00401060
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x503870
call fcn.00401060
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret