Function at 0x4b6b90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x28], edi
test byte [esi + 0x78], 0x10
mov dword [ebp - 0x2c], eax
jne 0x4b6f52
cmp dword [esi + 0x6c], 0
mov ecx, dword [ebp + 0x10]
je 0x4b6bd5
mov eax, dword [esi + 0x70]
add eax, ecx
cmp eax, dword [esi + 0x64]
ja 0x4b6f52
cmp dword [ebp + 0x18], ecx
jb 0x4b6f52
xor eax, eax
mov dword [edx], ecx
mov dword [ebp - 0x24], eax
push ebx
test ecx, ecx
je 0x4b6f2f
nop
mov ecx, dword [esi + 0x70]
mov eax, 0x10
mov ebx, dword [ebp + 0x10]
mov edx, ecx
and edx, 0xf
sub eax, edx
mov dword [ebp - 0x1c], edx
cmp eax, ebx
cmovbe ebx, eax
mov dword [ebp - 0x30], ebx
lea eax, [ecx + ebx]
mov dword [esi + 0x70], eax
mov al, byte [esi + 0x75]
cmp al, 1
je 0x4b6c29
cmp al, 3
je 0x4b6c29
lea eax, [ebx + edx]
mov dword [ebp - 0x20], eax
jmp 0x4b6d70
xor al, al
mov byte [ebp - 0x15], al
test ebx, ebx
je 0x4b6cf9
cmp ebx, 0x40
jb 0x4b6cf9
mov ecx, dword [ebp - 0x1c]
lea edx, [ebx - 1]
mov byte [ebp - 0x15], al
lea eax, [edx + ecx]
movzx ecx, cl
movzx eax, al
add ecx, esi
add eax, esi
mov dword [ebp - 0x20], eax
movzx eax, dl
add eax, edi
cmp ecx, eax
ja 0x4b6c6a
cmp dword [ebp - 0x20], edi
jae 0x4b6cf3
mov edx, dword [ebp - 0x1c]
mov eax, ebx
and eax, 0xffffffc0
mov bh, 0x20
xor ecx, ecx
mov dword [ebp - 0x20], eax
mov bl, cl
nop dword [eax + eax]
movups xmm1, xmmword [ecx + edi]
lea eax, [ecx + esi]
add bl, 0x40
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
mov al, bh
sub al, 0x10
movzx ecx, al
movups xmm1, xmmword [ecx + edi]
lea eax, [ecx + esi]
movzx ecx, bh
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
lea eax, [ecx + esi]
movups xmm0, xmmword [eax + edx]
movups xmm1, xmmword [ecx + edi]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
mov al, bh
add bh, 0x40
add al, 0x10
movzx ecx, al
movups xmm1, xmmword [ecx + edi]
lea eax, [ecx + esi]
movzx ecx, bl
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
cmp ecx, dword [ebp - 0x20]
jb 0x4b6c80
mov byte [ebp - 0x15], bl
mov ebx, dword [ebp - 0x30]
jmp 0x4b6cf6
mov edx, dword [ebp - 0x1c]
mov al, byte [ebp - 0x15]
movzx edi, al
cmp edi, ebx
jae 0x4b6d1c
mov eax, dword [ebp - 0x28]
lea ecx, [edi + esi]
movzx eax, byte [edi + eax]
xor byte [ecx + edx], al
mov al, byte [ebp - 0x15]
inc al
movzx edi, al
mov byte [ebp - 0x15], al
cmp edi, ebx
jb 0x4b6d00
lea eax, [ebx + edx]
mov dword [ebp - 0x20], eax
cmp eax, 0x10
je 0x4b6d2f
mov eax, dword [esi + 0x70]
cmp eax, dword [esi + 0x64]
jne 0x4b6d50
lea eax, [ebp - 0x34]
push eax
push esi
push 0x10
lea eax, [esi + 0x20]
push esi
push eax
call fcn.004a5920
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4b6f29
mov edx, dword [ebp - 0x1c]
push dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
push edi
push ebx
push edx
push esi
call fcn.004b6850
add esp, 0x14
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4b6f24
mov edx, dword [ebp - 0x1c]
mov al, byte [esi + 0x75]
test al, al
je 0x4b6d7f
cmp al, 2
jne 0x4b6ee0
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
push edx
push esi
call fcn.004b6850
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x24], edi
test edi, edi
jne 0x4b6f31
xor al, al
mov byte [ebp - 0x15], al
test ebx, ebx
je 0x4b6e6c
cmp ebx, 0x40
jb 0x4b6e6c
mov ecx, dword [ebp - 0x1c]
lea edx, [ebx - 1]
mov byte [ebp - 0x15], al
lea eax, [edx + ecx]
movzx ecx, cl
movzx edi, al
add ecx, esi
movzx eax, dl
add edi, esi
lea eax, [ebp + eax - 0x14]
cmp ecx, eax
ja 0x4b6dde
lea eax, [ebp - 0x14]
cmp edi, eax
jae 0x4b6e69
mov edx, dword [ebp - 0x1c]
mov edi, ebx
and edi, 0xffffffc0
mov bh, 0x20
xor ecx, ecx
mov bl, cl
nop dword [eax]
movups xmm1, xmmword [ebp + ecx - 0x14]
lea eax, [ecx + esi]
add bl, 0x40
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
mov al, bh
sub al, 0x10
movzx ecx, al
movups xmm1, xmmword [ebp + ecx - 0x14]
lea eax, [ecx + esi]
movzx ecx, bh
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
lea eax, [ecx + esi]
movups xmm0, xmmword [eax + edx]
movups xmm1, xmmword [ebp + ecx - 0x14]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
mov al, bh
add bh, 0x40
add al, 0x10
movzx ecx, al
movups xmm1, xmmword [ebp + ecx - 0x14]
lea eax, [ecx + esi]
movzx ecx, bl
movups xmm0, xmmword [eax + edx]
pxor xmm1, xmm0
movups xmmword [eax + edx], xmm1
cmp ecx, edi
jb 0x4b6df0
mov byte [ebp - 0x15], bl
mov ebx, dword [ebp - 0x30]
mov al, byte [ebp - 0x15]
jmp 0x4b6e6f
mov al, byte [ebp - 0x15]
mov edx, dword [ebp - 0x1c]
movzx edi, al
cmp edi, ebx
jae 0x4b6e9a
nop word [eax + eax]
movzx eax, byte [ebp + edi - 0x14]
lea ecx, [edi + esi]
xor byte [ecx + edx], al
mov al, byte [ebp - 0x15]
inc al
movzx edi, al
mov byte [ebp - 0x15], al
cmp edi, ebx
jb 0x4b6e80
push ebx
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x2c]
call sub.VCRUNTIME140.dll_memcpy
lea eax, [ebp - 0x14]
push 0x10
push eax
call fcn.004a0f10
add esp, 0x14
cmp dword [ebp - 0x20], 0x10
je 0x4b6ec3
mov eax, dword [esi + 0x70]
cmp eax, dword [esi + 0x64]
jne 0x4b6ee6
lea eax, [ebp - 0x34]
push eax
push esi
push 0x10
lea eax, [esi + 0x20]
push esi
push eax
call fcn.004a5920
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x24], edi
test edi, edi
jne 0x4b6f29
cmp dword [ebp - 0x20], 0x10
je 0x4b6eee
mov eax, dword [esi + 0x70]
cmp eax, dword [esi + 0x64]
jne 0x4b6f09
xor dl, dl
cmp byte [esi + 0x74], dl
jbe 0x4b6f09
movzx eax, dl
mov ecx, esi
sub ecx, eax
add byte [ecx + 0x1f], 1
jne 0x4b6f09
inc dl
cmp dl, byte [esi + 0x74]
jb 0x4b6ef5
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x28]
sub eax, ebx
add dword [ebp - 0x2c], ebx
add edi, ebx
mov dword [ebp + 0x10], eax
mov dword [ebp - 0x28], edi
test eax, eax
jne 0x4b6bf0
mov edi, dword [ebp - 0x24]
jmp 0x4b6f31
or dword [esi + 0x78], 0x10
jmp 0x4b6f31
xor edi, edi
lea eax, [ebp - 0x14]
push 0x10
push eax
call fcn.004a0f10
add esp, 8
mov eax, edi
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xfffffff3
pop edi
xor ecx, ebp
pop esi
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret