Function at 0x508230
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14
mov al, byte [ecx + 0x100]
mov dl, byte [ecx + 0x102]
mov byte [ebp - 0x12], al
mov al, byte [ecx + 0x101]
mov byte [ebp - 0x10], al
mov al, byte [ebp - 0x12]
mov byte [ebp - 0x11], al
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
add eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov al, byte [ebp - 0x11]
inc eax
movzx eax, al
mov dword [ebp - 0x1c], eax
mov al, byte [ebp - 0x10]
lea edi, [eax + edx]
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x18]
cmp eax, 3
jbe 0x50835f
mov eax, dword [ebp - 0x18]
mov esi, dword [eax]
mov eax, dword [ebp - 0x1c]
mov al, byte [ecx + eax]
add edi, eax
mov ebx, edi
movzx ebx, bl
mov dl, byte [ecx + ebx]
mov byte [ecx + ebx], al
mov ebx, dword [ebp - 0x1c]
add eax, edx
movzx eax, al
mov byte [ecx + ebx], dl
movzx eax, byte [ecx + eax]
xor eax, esi
mov dword [ebp - 0x10], eax
mov al, byte [ebp - 0x11]
lea ebx, [eax + 2]
mov al, byte [ebp - 0x10]
movzx ebx, bl
mov dl, byte [ecx + ebx]
add edi, edx
add eax, edi
movzx edi, al
mov byte [ebp - 0x1c], al
movzx esi, byte [ecx + edi]
mov byte [ecx + edi], dl
add edx, esi
mov eax, esi
movzx edx, dl
mov byte [ecx + ebx], al
mov al, byte [ebp - 0x11]
movzx esi, byte [ecx + edx]
add byte [ebp - 0x11], 4
lea edx, [eax + 3]
mov al, byte [ebp - 0x1c]
shl esi, 8
xor esi, dword [ebp - 0x10]
mov dword [ebp - 0x10], esi
movzx esi, dl
mov edx, dword [ebp - 0x10]
mov bl, byte [ecx + esi]
shr edx, 8
add eax, ebx
add eax, edx
movzx edi, al
mov dl, byte [ecx + edi]
mov byte [ecx + edi], bl
add ebx, edx
mov byte [ecx + esi], dl
movzx esi, byte [ebp - 0x11]
movzx ebx, bl
movzx edi, byte [ecx + ebx]
shl edi, 0x10
xor edi, dword [ebp - 0x10]
mov bl, byte [ecx + esi]
mov edx, edi
add eax, ebx
shr edx, 0x10
add eax, edx
movzx edx, al
mov byte [ebp - 0x10], al
mov al, byte [ecx + edx]
mov byte [ecx + edx], bl
add ebx, eax
mov byte [ecx + esi], al
movzx ebx, bl
movzx esi, byte [ecx + ebx]
shl esi, 0x18
xor edi, esi
mov eax, edi
shr eax, 0x18
mov edx, eax
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x18], 4
mov dword [eax], edi
jmp 0x508263
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
shr ebx, 2
and eax, 0xfffffffc
add eax, dword [ebp + 0xc]
imul esi, ebx, 0xfffffffc
mov dword [ebp - 0x20], esi
movzx esi, byte [ebp - 0x12]
lea ebx, [esi + ebx*4]
mov esi, ebx
mov byte [ebp - 0x11], bl
lea ebx, [esi + 1]
mov esi, dword [ebp - 0x20]
mov byte [ebp - 0x18], bl
add esi, dword [ebp + 0x10]
je 0x50842a
cmp esi, 2
je 0x5083cf
cmp esi, 3
jne 0x5083fe
mov esi, dword [ebp - 0x1c]
inc eax
mov dl, byte [ecx + esi]
lea ebx, [edi + edx]
movzx edi, bl
mov byte [ebp - 0x10], bl
movzx esi, byte [ecx + edi]
mov byte [ecx + edi], dl
mov edi, dword [ebp - 0x1c]
mov ebx, esi
add edx, esi
mov byte [ecx + edi], bl
mov bl, byte [ebp - 0x18]
movzx edx, dl
mov dl, byte [ecx + edx]
xor dl, byte [eax - 1]
mov byte [eax - 1], dl
mov byte [ebp - 0x11], bl
mov bl, byte [ebp - 0x10]
inc byte [ebp - 0x11]
inc eax
movzx esi, byte [ebp - 0x11]
add ebx, edx
mov dl, byte [ecx + esi]
add ebx, edx
movzx edi, bl
mov byte [ebp - 0x10], bl
mov bl, byte [ecx + edi]
mov byte [ecx + edi], dl
add edx, ebx
mov byte [ecx + esi], bl
movzx edx, dl
mov dl, byte [ecx + edx]
xor dl, byte [eax - 1]
mov byte [eax - 1], dl
mov bl, byte [ebp - 0x10]
inc byte [ebp - 0x11]
movzx esi, byte [ebp - 0x11]
add ebx, edx
mov dl, byte [ecx + esi]
add ebx, edx
movzx edi, bl
mov byte [ebp - 0x10], bl
mov bl, byte [ecx + edi]
mov byte [ecx + edi], dl
add edx, ebx
mov byte [ecx + esi], bl
movzx edx, dl
mov dl, byte [ecx + edx]
xor dl, byte [eax]
mov byte [eax], dl
mov byte [ecx + 0x102], dl
add edx, dword [ebp - 0x10]
xor eax, eax
mov byte [ebp - 0x10], dl
mov dl, byte [ecx + eax]
add byte [ebp - 0x10], dl
movzx ebx, byte [ebp - 0x10]
movzx edi, byte [ecx + ebx]
mov byte [ecx + ebx], dl
mov edx, edi
mov byte [ecx + eax], dl
inc eax
cmp eax, 0x100
jne 0x508438
mov al, byte [ebp - 0x11]
xor edx, edx
xor esi, esi
inc eax
mov byte [ebp - 0x1c], al
mov al, byte [ebp - 0x1c]
lea ebx, [eax + edx]
movzx eax, bl
mov dword [ebp - 0x18], eax
mov al, byte [ecx + eax]
add byte [ebp - 0x10], al
movzx edi, byte [ebp - 0x10]
mov bl, byte [ecx + edi]
mov byte [ecx + edi], al
mov edi, dword [ebp - 0x18]
add eax, ebx
mov byte [ecx + edi], bl
mov edi, dword [ebp + 8]
movzx eax, al
mov al, byte [ecx + eax]
xor al, byte [edi + edx]
inc edx
or esi, eax
cmp edx, 0xa
jne 0x508461
mov al, byte [ebp - 0x11]
add eax, 0xa
mov byte [ecx + 0x100], al
mov al, byte [ebp - 0x10]
mov byte [ecx + 0x101], al
mov eax, esi
test al, al
sete al
add esp, 0x14
pop ebx
pop esi
pop edi
pop ebp
ret 0xc