Function at 0x415080
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 0x19c]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 0x198]
push ebx
sub eax, edx
push esi
mov esi, dword [ebp + 0x4c]
push edi
mov edi, dword [ebp + 0x1a4]
sub eax, edi
imul eax, dword [ebp + 0x28]
add eax, ecx
lea esi, [esi + eax*2]
add esi, eax
mov eax, dword [ebp + 0xf4]
sub eax, edx
sub eax, edi
imul eax, dword [ebp + 0xf0]
mov edi, dword [ebp + 0x114]
add eax, ecx
lea ebx, [edi + eax*2]
mov edi, dword [ebp + 0x1a8]
add ebx, eax
test edi, edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], ebx
jne 0x415135
mov eax, dword [ebp + 0x1a4]
push edi
push edx
push ecx
sub esp, 0xc8
mov edi, esp
push eax
mov ecx, 0x32
lea esi, [ebp + 0xd0]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x1a0]
push ecx
push edx
mov edx, dword [ebp + 0x198]
push edx
sub esp, 0xc8
mov ecx, 0x32
lea esi, [ebp + 8]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.004144a0
add esp, 0x1ac
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x52f398
call fcn.00401040
xor eax, eax
add esp, 4
cmp edi, eax
jle 0x4152d8
cmp dword [ebp + 0x1a4], eax
mov dword [ebp + 0x198], eax
jle 0x415455
mov eax, dword [ebp + 0x1a0]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xf0]
lea eax, [eax + eax*2]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x28]
lea edx, [eax + eax*2]
mov dword [ebp - 0xc], edx
sar ecx, 3
mov eax, ebx
mov edx, esi
mov dword [ebp + 0x19c], ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edx
jmp 0x4151a6
mov ecx, dword [ebp + 0x19c]
test ecx, ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
je 0x41522d
mov eax, dword [ebp + 0x19c]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
pxor mm6, mm6
movd mm7, dword [ebp + 0x1a8]
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
movntq qword [ebx], mm1
movntq qword [ebx + 8], mm3
prefetcht0 byte [ecx + 0x400]
movntq qword [ebx + 0x10], mm5
lea ebx, [ebx + 0x18]
dec eax
jne 0x4151cc
emms
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 0x19c]
add eax, eax
add eax, eax
add eax, eax
cmp eax, dword [ebp + 0x1a0]
mov dword [ebp - 0x20], eax
jge 0x4152a6
mov eax, dword [ebp + 0xf0]
sub eax, dword [ebp + 0x28]
imul eax, dword [ebp + 0x198]
lea eax, [eax + eax*2]
sub eax, esi
add eax, dword [ebp - 4]
mov esi, dword [ebp + 0x1a0]
sub esi, dword [ebp - 0x20]
lea ecx, [eax + ebx + 2]
lea esp, [esp]
movzx eax, byte [ecx - 2]
add eax, edi
jns 0x41527a
xor eax, eax
mov byte [edx], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x415286
xor eax, eax
mov byte [edx + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x415292
xor eax, eax
mov byte [edx + 2], al
add edx, 3
add ecx, 3
sub esi, 1
jne 0x415270
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp + 0x198]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add edx, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
add ecx, 1
cmp ecx, dword [ebp + 0x1a4]
mov dword [ebp + 0x198], ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], eax
jl 0x4151a0
jmp 0x415455
jge 0x41546e
cmp dword [ebp + 0x1a4], eax
mov dword [ebp + 0x198], eax
jle 0x415455
mov eax, dword [ebp + 0x1a0]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xf0]
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 - 0x10], edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], ebx
mov dword [ebp + 0x19c], esi
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp + 0x19c]
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 + 0x1a8], edi
je 0x4153be
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
pxor mm6, mm6
movd mm7, dword [ebp + 0x1a8]
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
movntq qword [ebx], mm1
movntq qword [ebx + 8], mm3
prefetcht0 byte [ecx + 0x400]
movntq qword [ebx + 0x10], mm5
lea ebx, [ebx + 0x18]
dec eax
jne 0x41535d
emms
mov ecx, dword [ebp - 4]
lea ebx, [ecx*8]
cmp ebx, dword [ebp + 0x1a0]
jge 0x41542b
mov eax, dword [ebp + 0xf0]
sub eax, dword [ebp + 0x28]
mov ecx, dword [ebp - 8]
imul eax, dword [ebp + 0x198]
mov edx, dword [ebp + 0x1a0]
lea eax, [eax + eax*2]
sub eax, dword [ebp - 0x18]
add eax, dword [ebp + 0x19c]
sub edx, ebx
lea ecx, [eax + ecx + 2]
movzx eax, byte [ecx - 2]
add eax, edi
jns 0x415402
xor eax, eax
mov byte [esi], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x41540e
xor eax, eax
mov byte [esi + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x41541a
xor eax, eax
mov byte [esi + 2], al
add esi, 3
add ecx, 3
sub edx, 1
jne 0x4153f8
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x198]
add dword [ebp + 0x19c], edx
mov edx, dword [ebp - 0x10]
add dword [ebp - 0x14], edx
add eax, 1
cmp eax, dword [ebp + 0x1a4]
mov dword [ebp + 0x198], eax
jl 0x415322
push 0x52f398
call fcn.00401060
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x52f398
call fcn.00401060
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret