Function at 0x413a80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 0x18c]
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x188]
push ebx
sub eax, edx
push esi
mov esi, dword [ebp + 0x48]
push edi
mov edi, dword [ebp + 0x194]
sub eax, edi
imul eax, dword [ebp + 0x24]
add eax, ecx
lea esi, [esi + eax*2]
add esi, eax
mov eax, dword [ebp + 0xe8]
sub eax, edx
sub eax, edi
imul eax, dword [ebp + 0xe4]
mov edi, dword [ebp + 0x108]
add eax, ecx
lea ebx, [edi + eax*2]
mov edi, dword [ebp + 0x198]
add ebx, eax
test edi, edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ebx
jne 0x413b35
mov eax, dword [ebp + 0x194]
push edi
push edx
push ecx
sub esp, 0xc0
mov edi, esp
push eax
mov ecx, 0x30
lea esi, [ebp + 0xc8]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x190]
push ecx
push edx
mov edx, dword [ebp + 0x188]
push edx
sub esp, 0xc0
mov ecx, 0x30
lea esi, [ebp + 8]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.004132a0
add esp, 0x19c
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x4f5f10
call fcn.00401040
xor eax, eax
add esp, 4
cmp edi, eax
jle 0x413cc6
cmp dword [ebp + 0x194], eax
mov dword [ebp + 0x188], eax
jle 0x413e4f
mov eax, dword [ebp + 0x190]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xe4]
lea eax, [eax + eax*2]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x24]
lea edx, [eax + eax*2]
mov dword [ebp - 0x1c], edx
sar ecx, 3
mov eax, ebx
mov edx, esi
mov dword [ebp + 0x18c], ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
jmp 0x413ba0
mov ecx, dword [ebp + 0x18c]
lea esp, [esp]
test ecx, ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
je 0x413c20
mov eax, dword [ebp + 0x18c]
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
pxor mm6, mm6
movd mm7, dword [ebp + 0x198]
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 0x413bc6
emms
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 0x18c]
mov ecx, dword [ebp + 0x190]
shl eax, 3
cmp eax, ecx
mov dword [ebp - 0x18], eax
jge 0x413c94
mov ecx, dword [ebp + 0x24]
mov eax, dword [ebp + 0xe4]
sub eax, ecx
imul eax, dword [ebp + 0x188]
mov ecx, dword [ebp - 4]
lea eax, [eax + eax*2]
sub eax, esi
mov esi, dword [ebp + 0x190]
add eax, ecx
lea ecx, [eax + ebx + 2]
sub esi, dword [ebp - 0x18]
nop
movzx eax, byte [ecx - 2]
add eax, edi
jns 0x413c6a
xor eax, eax
mov byte [edx], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x413c76
xor eax, eax
mov byte [edx + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x413c82
xor eax, eax
mov byte [edx + 2], al
add edx, 3
add ecx, 3
dec esi
jne 0x413c60
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x188]
add edx, eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x20]
inc ecx
cmp ecx, dword [ebp + 0x194]
mov dword [ebp + 0x188], ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
jl 0x413b96
jmp 0x413e4f
jge 0x413e68
cmp dword [ebp + 0x194], eax
mov dword [ebp + 0x188], eax
jle 0x413e4f
mov eax, dword [ebp + 0x190]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0xe4]
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0x24]
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 + 0x18c], esi
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp + 0x18c]
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 + 0x198], edi
je 0x413da5
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
pxor mm6, mm6
movd mm7, dword [ebp + 0x198]
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 0x413d4b
emms
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0x190]
lea ebx, [ecx*8]
cmp ebx, eax
jge 0x413e18
mov ecx, dword [ebp + 0x24]
mov eax, dword [ebp + 0xe4]
mov edx, dword [ebp - 0x10]
sub eax, ecx
imul eax, dword [ebp + 0x188]
mov ecx, dword [ebp + 0x18c]
lea eax, [eax + eax*2]
sub eax, edx
mov edx, dword [ebp + 0x190]
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 0x413df1
xor eax, eax
mov byte [esi], al
movzx eax, byte [ecx - 1]
add eax, edi
jns 0x413dfd
xor eax, eax
mov byte [esi + 1], al
movzx eax, byte [ecx]
add eax, edi
jns 0x413e09
xor eax, eax
mov byte [esi + 2], al
add esi, 3
add ecx, 3
dec edx
jne 0x413de7
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp + 0x18c]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0x188]
add ebx, edx
mov edx, dword [ebp - 0x14]
add esi, edx
mov edx, dword [ebp + 0x194]
inc eax
cmp eax, edx
mov dword [ebp + 0x188], eax
mov dword [ebp + 0x18c], ebx
mov dword [ebp - 0xc], esi
jl 0x413d10
push 0x4f5f10
call fcn.00401060
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x4f5f10
call fcn.00401060
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret