Function at 0x4c31d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
movzx edx, word [ecx + 0x7a]
push ebx
push ebp
xor ebp, ebp
push esi
xor eax, eax
push edi
mov dword [esp + 0x18], ebp
cmp edx, 8
je 0x4c338f
cmp edx, 0x10
jne 0x4c351f
mov edi, dword [esp + 0x28]
movzx ecx, word [ecx + 0x6e]
shr edi, 1
mov dword [esp + 0x28], edi
cmp cx, 1
jne 0x4c3294
lea esi, [edi - 1]
xor ebx, ebx
cmp esi, 2
mov dword [esp + 0x10], eax
jl 0x4c3261
mov ecx, dword [esp + 0x24]
add esi, 0xfffffffe
shr esi, 1
add ecx, 2
inc esi
lea eax, [esi + esi]
mov dword [esp + 0x18], eax
nop
movsx edi, word [ecx]
movsx eax, word [ecx - 2]
sub eax, edi
cdq
xor eax, edx
sub eax, edx
movsx edx, word [ecx + 2]
add ebx, eax
mov eax, edi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x10], eax
add ecx, 4
sub esi, 1
jne 0x4c3230
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
lea ecx, [edi - 1]
cmp eax, ecx
jae 0x4c327e
mov ecx, dword [esp + 0x24]
movsx edx, word [ecx + eax*2 + 2]
movsx eax, word [ecx + eax*2]
sub eax, edx
cdq
mov ebp, eax
xor ebp, edx
sub ebp, edx
mov eax, dword [esp + 0x10]
add eax, ebx
add eax, ebp
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
cmp cx, 2
jne 0x4c351f
lea esi, [edi - 3]
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
cmp esi, eax
jbe 0x4c337d
mov ecx, dword [esp + 0x24]
lea eax, [esi + 1]
cdq
sub eax, edx
sar eax, 1
cmp eax, 2
jl 0x4c3343
lea ebx, [esi - 3]
shr ebx, 2
add ecx, 6
inc ebx
lea edx, [ebx*4]
mov dword [esp + 0x1c], edx
lea esp, [esp]
movsx edi, word [ecx - 2]
movsx eax, word [ecx - 6]
movsx esi, word [ecx]
sub eax, edi
cdq
mov ebp, eax
movsx eax, word [ecx - 4]
xor ebp, edx
sub eax, esi
sub ebp, edx
cdq
xor eax, edx
sub eax, edx
movsx edx, word [ecx + 2]
add ebp, eax
mov eax, edi
sub eax, edx
cdq
mov edi, eax
xor edi, edx
sub edi, edx
movsx edx, word [ecx + 4]
mov eax, esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
sar ebp, 1
add dword [esp + 0x14], ebp
sar edi, 1
add dword [esp + 0x10], edi
add ecx, 8
sub ebx, 1
jne 0x4c32e0
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
lea eax, [edi - 3]
cmp ebx, eax
jae 0x4c3371
movsx edx, word [ecx + ebx*2 + 6]
movsx eax, word [ecx + ebx*2 + 2]
sub eax, edx
cdq
mov ebp, eax
movsx eax, word [ecx + ebx*2]
xor ebp, edx
sub ebp, edx
movsx edx, word [ecx + ebx*2 + 4]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
sar ebp, 1
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
add eax, ecx
add ebp, eax
shr edi, 1
mov eax, ebp
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
movzx ecx, word [ecx + 0x6e]
cmp cx, 1
jne 0x4c3429
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x14], eax
lea eax, [edi - 1]
xor ebx, ebx
xor ecx, ecx
cmp eax, 2
jl 0x4c33f7
dec eax
mov dword [esp + 0x24], eax
lea ebx, [ebx]
movzx edi, byte [esi + ecx + 1]
movzx eax, byte [esi + ecx]
sub eax, edi
cdq
xor eax, edx
sub eax, edx
movzx edx, byte [esi + ecx + 2]
shl eax, 8
add ebx, eax
mov eax, edi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
shl eax, 8
add dword [esp + 0x14], eax
add ecx, 2
cmp ecx, dword [esp + 0x24]
jb 0x4c33c0
mov edi, dword [esp + 0x28]
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4c3413
movzx edx, byte [ecx + esi + 1]
movzx eax, byte [ecx + esi]
sub eax, edx
cdq
mov ebp, eax
xor ebp, edx
sub ebp, edx
shl ebp, 8
mov eax, dword [esp + 0x14]
add eax, ebx
add eax, ebp
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
cmp cx, 2
jne 0x4c351f
mov ebx, dword [esp + 0x28]
lea edi, [ebx - 3]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
cmp edi, eax
jbe 0x4c3517
mov esi, dword [esp + 0x24]
lea eax, [edi + 1]
cdq
sub eax, edx
sar eax, 1
cmp eax, 2
jl 0x4c34d8
add edi, 0xfffffffe
mov dword [esp + 0x24], edi
jmp 0x4c3470
movzx ebx, byte [ecx + esi + 2]
movzx eax, byte [ecx + esi]
movzx edi, byte [ecx + esi + 3]
sub eax, ebx
cdq
mov ebp, eax
movzx eax, byte [ecx + esi + 1]
xor ebp, edx
sub eax, edi
sub ebp, edx
cdq
xor eax, edx
sub eax, edx
movzx edx, byte [ecx + esi + 4]
add ebp, eax
mov eax, ebx
sub eax, edx
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
movzx edx, byte [ecx + esi + 5]
mov eax, edi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebx, eax
shl ebp, 8
shl ebx, 8
sar ebp, 1
add dword [esp + 0x10], ebp
sar ebx, 1
add dword [esp + 0x14], ebx
add ecx, 4
cmp ecx, dword [esp + 0x24]
jb 0x4c3470
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x28]
lea eax, [ebx - 3]
cmp ecx, eax
jae 0x4c350b
movzx edx, byte [ecx + esi + 3]
movzx eax, byte [ecx + esi + 1]
sub eax, edx
cdq
mov edi, eax
movzx eax, byte [ecx + esi]
xor edi, edx
sub edi, edx
movzx edx, byte [ecx + esi + 2]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
shl edi, 8
mov ebp, edi
sar ebp, 1
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add eax, ecx
add ebp, eax
shr ebx, 1
mov eax, ebp
xor edx, edx
div ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8