Function at 0x49c6d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp edi, 0x1000000
mov esi, ecx
mov dword [ebp - 8], esi
jb 0x49c8da
mov ebx, dword [ebp + 8]
push ebx
call fcn.0049b160
cmp eax, 3
je 0x49c8da
mov edx, dword [ebx + 8]
mov ecx, dword [ebx]
mov eax, dword [ebx + 0xc]
sub edx, ecx
cmp edi, 0xff000000
mov dword [ebp - 0x18], edx
jae 0x49c827
mov ecx, dword [ebx + 4]
cmp ecx, eax
mov dword [ebp - 0xc], ecx
jge 0x49c8cf
jmp 0x49c730
mov esi, dword [ebp - 8]
nop
lea esp, [esp]
mov eax, dword [esi + 4]
mov edi, dword [ebx]
imul eax, ecx
mov esi, dword [esi + 0x10]
add eax, edi
lea esi, [esi + eax*4]
mov al, byte [0x6bdfa6]
test al, al
mov dword [ebp - 0x14], esi
je 0x49c7b3
cmp edx, 0x10
jbe 0x49c7b3
mov eax, dword [ebx + 8]
sub eax, edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
je 0x49c813
lea eax, [ebp - 4]
mov dword [ebp - 0x10], eax
pxor mm7, mm7
movq mm5, qword [0x661bc8]
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
movd mm1, dword [esi]
punpcklbw mm1, mm7
movq mm4, mm1
punpckhwd mm4, mm4
punpckhdq mm4, mm4
movd mm0, dword [edi]
punpcklbw mm0, mm7
movq mm2, mm4
pxor mm2, mm5
pmullw mm0, mm2
psrlw mm0, 8
paddw mm0, mm1
packuswb mm0, mm7
movd dword [edi], mm0
add edi, 4
dec dword [ebp - 0xc]
jg 0x49c78d
jmp 0x49c813
cmp edi, dword [ebx + 8]
jge 0x49c813
mov ecx, dword [ebp + 0xc]
shr ecx, 0x18
mov edx, pe_nt_image_headers32
sub edx, ecx
mov eax, dword [esi]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edx
mov ebx, ecx
and ebx, 0xffff00ff
imul ebx, edx
and ecx, 0xff00ff
imul ecx, edx
shr eax, 8
and eax, 0xff00ff
and ebx, 0xff00ff
xor eax, ebx
mov ebx, dword [ebp + 8]
xor eax, ecx
add eax, dword [ebp + 0xc]
mov dword [esi], eax
mov eax, dword [ebx + 8]
add esi, 4
inc edi
cmp edi, eax
jl 0x49c7c5
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebx + 0xc]
inc ecx
cmp ecx, eax
mov dword [ebp - 0xc], ecx
jl 0x49c728
jmp 0x49c8cf
mov edx, dword [ebx + 4]
cmp edx, eax
jge 0x49c8cf
mov edi, dword [esi + 4]
mov eax, dword [ebx]
imul edi, edx
mov ecx, dword [ebx + 8]
sub ecx, eax
add edi, eax
cmp byte [0x6bdfa5], 0
mov eax, dword [esi + 0x10]
lea eax, [eax + edi*4]
mov dword [ebp - 0x18], ecx
mov dword [ebp + 8], eax
je 0x49c8b5
test al, 0xf
je 0x49c872
mov edi, dword [ebp + 0xc]
lea ecx, [ecx]
test ecx, ecx
je 0x49c8c3
add eax, 4
mov dword [eax - 4], edi
dec ecx
test al, 0xf
mov dword [ebp + 8], eax
jne 0x49c860
test ecx, ecx
je 0x49c8c3
mov eax, ecx
shr eax, 2
mov dword [ebp - 0xc], eax
movq mm0, qword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
punpckldq mm0, mm0
test eax, eax
je 0x49c89e
movntq qword [edi], mm0
movntq qword [edi + 8], mm0
add edi, 0x10
dec dword [ebp - 0xc]
jg 0x49c88f
mov dword [ebp + 8], edi
emms
and ecx, 3
mov esi, dword [ebp - 8]
je 0x49c8c3
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
rep stosd dword es:[edi], eax
jmp 0x49c8c3
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
rep stosd dword es:[edi], eax
mov esi, dword [ebp - 8]
mov eax, dword [ebx + 0xc]
inc edx
cmp edx, eax
jl 0x49c832
mov al, byte [0x6bdfa6]
test al, al
je 0x49c8da
emms
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8