Function at 0x407aeb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 0x18]
lea esi, [eax + 1]
mov ebx, ecx
movzx ecx, byte [eax]
xor eax, eax
mov ah, byte [esi]
mov dword [ebp - 0x18], esi
or ecx, eax
inc esi
movzx eax, byte [esi]
shl eax, 0x10
or ecx, eax
inc esi
movzx eax, byte [esi]
shl eax, 0x18
or ecx, eax
inc esi
movzx edx, byte [esi]
xor eax, eax
inc esi
mov ah, byte [esi]
mov dword [ebp - 4], ecx
or edx, eax
inc esi
xor eax, eax
mov ah, byte [esi + 1]
mov al, byte [esi]
mov esi, dword [ebp + 8]
shl eax, 0x10
or edx, eax
add esi, 0xfffffff8
mov dword [ebp - 8], edx
mov dword [ebp + 8], esi
js 0x407c0c
lea eax, [esi + 8]
shr eax, 3
mov dword [ebp - 0x14], eax
imul eax, eax, 0xfffffff8
add esi, eax
mov dword [ebp + 8], esi
movzx eax, byte [edi]
xor ecx, ecx
inc edi
mov ch, byte [edi]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
or eax, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x10
or eax, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x18
or eax, ecx
xor ecx, ecx
inc edi
movzx esi, byte [edi]
inc edi
mov ch, byte [edi]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], eax
or esi, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x10
or esi, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x18
or esi, ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], esi
lea esi, [ebp - 0x20]
inc edi
call fcn.004079ee
mov eax, dword [ebp - 4]
xor eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 8]
xor ecx, dword [ebp - 0x1c]
mov byte [ebx], al
add esp, 0xc
mov edx, eax
shr edx, 8
inc ebx
mov byte [ebx], dl
mov edx, eax
shr eax, 0x18
inc ebx
shr edx, 0x10
mov byte [ebx], dl
inc ebx
mov byte [ebx], al
inc ebx
mov byte [ebx], cl
inc ebx
mov eax, ecx
shr eax, 8
mov byte [ebx], al
inc ebx
mov eax, ecx
shr eax, 0x10
mov byte [ebx], al
mov eax, dword [ebp - 0xc]
inc ebx
shr ecx, 0x18
mov byte [ebx], cl
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
inc ebx
dec dword [ebp - 0x14]
mov dword [ebp - 8], eax
jne 0x407b5a
mov ecx, dword [ebp - 4]
mov edx, eax
cmp dword [ebp + 8], 0xfffffff8
je 0x407cd3
movzx eax, byte [edi]
xor ecx, ecx
inc edi
mov ch, byte [edi]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
or eax, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x10
or eax, ecx
inc edi
movzx ecx, byte [edi]
shl ecx, 0x18
or eax, ecx
xor ecx, ecx
inc edi
movzx esi, byte [edi]
inc edi
mov ch, byte [edi]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], eax
or esi, ecx
xor ecx, ecx
mov ch, byte [edi + 2]
inc edi
mov cl, byte [edi]
shl ecx, 0x10
or esi, ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], esi
lea esi, [ebp - 0x20]
call fcn.004079ee
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
xor eax, dword [ebp - 0x20]
xor ecx, dword [ebp - 0x1c]
lea ebx, [ebx + edx + 8]
add edx, 7
add esp, 0xc
cmp edx, 7
ja case.default.0x407c85
jmp dword [edx*4 + 0x407d0f]
dec ebx
mov edx, ecx
shr edx, 0x18
mov byte [ebx], dl
dec ebx
mov edx, ecx
shr edx, 0x10
mov byte [ebx], dl
dec ebx
mov edx, ecx
shr edx, 8
mov byte [ebx], dl
dec ebx
mov byte [ebx], cl
dec ebx
mov ecx, eax
shr ecx, 0x18
mov byte [ebx], cl
dec ebx
mov ecx, eax
shr ecx, 0x10
mov byte [ebx], cl
dec ebx
mov ecx, eax
shr ecx, 8
mov byte [ebx], cl
mov byte [ebx - 1], al
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], eax
mov edx, eax
mov eax, dword [ebp + 0x18]
mov byte [eax], cl
mov eax, dword [ebp - 0x18]
mov ebx, ecx
shr ebx, 8
mov byte [eax], bl
mov ebx, ecx
shr ebx, 0x10
inc eax
mov byte [eax], bl
shr ecx, 0x18
inc eax
mov byte [eax], cl
inc eax
mov byte [eax], dl
mov ecx, edx
shr ecx, 8
inc eax
mov byte [eax], cl
mov ecx, edx
inc eax
pop edi
shr ecx, 0x10
shr edx, 0x18
pop esi
mov byte [eax], cl
mov byte [eax + 1], dl
pop ebx
leave
ret