Function at 0x4ce800
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0x90
push ebp
mov ebp, dword [esp + 0x9c]
push esi
mov esi, dword [esp + 0xa8]
push eax
push ecx
mov ecx, dword [esp + 0xbc]
lea eax, [esp + 0x4c]
push edx
mov edx, dword [esp + 0xbc]
push eax
push ecx
push edx
push ebp
push esi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4ce856
pop esi
mov eax, 1
pop ebp
add esp, 0x90
ret
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [esp + 0x64]
push edi
mov edi, dword [esp + 0x60]
mov esi, dword [esi + 8]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x64]
sub ebx, edi
mov edi, dword [esp + 0x54]
imul edi, edx
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x50]
sub ecx, eax
imul eax, dword [esp + 0x10]
lea edi, [edi + esi*4]
mov dword [esp + 0x3c], ebx
add edi, dword [ebp + 4]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x1c], edx
lea eax, [eax + ebp*2]
mov ebp, dword [esp + 0xb0]
add eax, dword [ebp + 4]
cmp byte [esp + 0x4c], 0
je 0x4cebea
mov ebp, ebx
mov edx, ebx
sar ebp, 3
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x58]
and edx, 7
sub esi, ebp
mov ebp, dword [esp + 0x1c]
add esi, edx
mov dword [esp + 0x14], edx
lea esi, [ebp + esi*4]
mov dword [esp + 0x28], esi
mov esi, edx
sub esi, ebx
mov ebx, dword [esp + 0x10]
test ecx, ecx
lea esi, [ebx + esi*2]
mov dword [esp + 0x1c], esi
jle 0x4ced2e
mov dword [esp + 0x18], ecx
mov ebx, dword [esp + 0x20]
test ebx, ebx
jle 0x4ceb4e
mov esi, dword [esp + 0xb4]
lea ecx, [edi + 0xa]
shl esi, 4
mov dword [esp + 0x10], ebx
xor edx, edx
xor ebp, ebp
mov dl, byte [ecx - 8]
mov bp, word [eax]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [edi]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax], dx
xor edx, edx
mov dl, byte [ecx - 4]
mov bp, word [eax + 2]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx - 6]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax + 2], dx
xor edx, edx
mov dl, byte [ecx]
mov bp, word [eax + 4]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx - 2]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax + 4], dx
xor edx, edx
mov dl, byte [ecx + 4]
mov bp, word [eax + 6]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx + 2]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
mov word [eax + 6], dx
xor edx, edx
mov dl, byte [ecx + 8]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
xor ebp, ebp
add edi, 0x20
mov bp, word [eax + 8]
add eax, 0x10
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx + 6]
add ecx, 0x20
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax - 8], dx
xor edx, edx
mov dl, byte [ecx - 0x14]
mov bp, word [eax - 6]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx - 0x16]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax - 6], dx
xor edx, edx
mov dl, byte [ecx - 0x10]
mov bp, word [eax - 4]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx - 0x12]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
xor ebp, ebp
mov word [eax - 4], dx
xor edx, edx
mov dl, byte [ecx - 0xc]
mov bp, word [eax - 2]
add edx, esi
shl edx, 4
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov ebx, edx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [ecx - 0xe]
add ebp, edx
mov dx, word [ebx*2 + 0x82ee04]
add dx, word [ebp*2 + 0x82ee04]
mov word [eax - 2], dx
mov edx, dword [esp + 0x10]
dec edx
mov dword [esp + 0x10], edx
jne 0x4ce90e
mov edx, dword [esp + 0x14]
test edx, edx
jle 0x4cebc2
mov esi, dword [esp + 0xb4]
mov ebp, eax
shl esi, 4
mov ecx, edi
mov dword [esp + 0x10], edx
xor edx, edx
xor ebx, ebx
mov dl, byte [ecx + 2]
mov bx, word [ebp]
add edx, esi
add ecx, 4
shl edx, 4
add ebp, 2
mov dl, byte [edx + 0xa2ee04]
and edx, 0xf0
shl edx, 0xc
mov dword [esp + 0x24], edx
xor edx, 0xf0000
add edx, ebx
xor ebx, ebx
mov bx, word [ecx - 4]
add ebx, dword [esp + 0x24]
mov dx, word [edx*2 + 0x82ee04]
add dx, word [ebx*2 + 0x82ee04]
mov word [ebp - 2], dx
mov edx, dword [esp + 0x10]
dec edx
mov dword [esp + 0x10], edx
jne 0x4ceb64
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
add eax, ebx
add edi, esi
dec ecx
mov dword [esp + 0x18], ecx
jne 0x4ce8f1
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x90
ret
mov esi, dword [esp + 0x8c]
imul edx, dword [esp + 0x9c]
shl esi, 2
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x84]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x94]
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x88]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x90]
test ecx, ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], esi
jle 0x4ced2e
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x28]
add ecx, esi
mov dword [esp + 0x18], ecx
js 0x4cec72
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
add edi, ebp
sub ecx, esi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x44], edi
test ebx, ebx
mov dword [esp + 0x14], ecx
jle 0x4ced12
mov esi, dword [esp + 0xb4]
mov edx, eax
shl esi, 4
mov dword [esp + 0x24], ebx
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x38]
add ecx, ebx
mov dword [esp + 0x14], ecx
js 0x4cecb3
mov ebx, dword [esp + 0x48]
add edi, 4
sub ecx, ebx
mov dword [esp + 0x14], ecx
xor ecx, ecx
xor ebp, ebp
mov cl, byte [edi + 2]
mov bp, word [edx]
add ecx, esi
add edx, 2
shl ecx, 4
mov cl, byte [ecx + 0xa2ee04]
and ecx, 0xf0
shl ecx, 0xc
mov ebx, ecx
xor ebx, 0xf0000
add ebx, ebp
xor ebp, ebp
mov bp, word [edi]
add ebp, ecx
mov cx, word [ebx*2 + 0x82ee04]
add cx, word [ebp*2 + 0x82ee04]
mov ebp, dword [esp + 0x30]
add edi, ebp
mov word [edx - 2], cx
mov ecx, dword [esp + 0x24]
dec ecx
mov dword [esp + 0x24], ecx
jne 0x4cec96
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x10]
add eax, esi
lea edi, [ecx + edx]
mov ecx, dword [esp + 0x20]
dec ecx
mov dword [esp + 0x20], ecx
jne 0x4cec52
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x90
ret