Function at 0x491110
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.00628620
cmp dword [ebp + 0x18], 0
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov ebx, edx
mov edx, ecx
mov esi, dword [eax]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
je 0x491239
test esi, esi
je 0x49115f
mov ecx, dword [ebp + 0x10]
test edi, edi
je 0x49115f
movzx eax, byte [edx]
dec edi
xor byte [esi + ecx], al
inc edx
movzx eax, byte [esi + ecx]
inc esi
mov byte [ebx], al
inc ebx
mov dword [ebp - 4], edx
and esi, 0xf
jne 0x491143
cmp edi, 0x10
jb 0x4911ea
mov ecx, dword [ebp + 0x10]
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x10], eax
mov eax, edx
sub eax, ecx
mov dword [ebp + 0x18], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0xc], eax
shl eax, 4
add ebx, eax
add edx, eax
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
jmp 0x491196
mov ecx, dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
push ecx
call dword [ebp + 0x1c]
add esp, 0xc
cmp esi, 0x10
jae 0x4911d5
mov ecx, dword [ebp + 0x10]
mov edx, 0xf
sub edx, esi
add ecx, esi
mov esi, dword [ebp + 0x18]
shr edx, 2
inc edx
nop dword [eax]
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
mov eax, dword [ecx - 4]
mov dword [ebx + ecx - 4], eax
sub edx, 1
jne 0x4911c0
add dword [ebp + 0x18], 0x10
sub edi, 0x10
add ebx, 0x10
xor esi, esi
sub dword [ebp - 0xc], 1
jne 0x491193
mov ebx, dword [ebp - 8]
test edi, edi
je 0x491345
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push eax
push eax
call dword [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
add esp, 0xc
sub dword [ebp - 4], edx
sub ebx, edx
lea ecx, [esi + edx]
add esi, edi
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 4]
movzx eax, byte [ecx + esi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
movzx eax, byte [ecx - 1]
mov byte [ecx + ebx - 1], al
sub edi, 1
jne 0x491213
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp - 0xc]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 0x18], edi
test esi, esi
je 0x491268
mov eax, dword [ebp + 0x10]
test edi, edi
je 0x491268
mov al, byte [esi + eax]
dec edi
mov cl, byte [edx]
inc edx
xor al, cl
mov dword [ebp - 4], edx
mov byte [ebx], al
inc ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp + 0x18], edi
mov byte [esi + eax], cl
inc esi
and esi, 0xf
jne 0x491243
mov edx, dword [ebp + 0x1c]
cmp edi, 0x10
jb 0x4912ff
mov ecx, dword [ebp + 0x10]
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0xc], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0x10], eax
jmp 0x49128b
mov ecx, dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
push ecx
call edx
add esp, 0xc
cmp esi, 0x10
jae 0x4912e0
mov edi, dword [ebp + 0x10]
mov eax, 0xf
mov edx, dword [ebp - 4]
sub eax, esi
add edi, esi
mov dword [ebp - 0x14], eax
sub edx, ebx
mov esi, eax
mov ebx, dword [ebp - 0xc]
shr esi, 2
mov dword [ebp - 0x18], edx
inc esi
nop word [eax + eax]
mov eax, dword [edi]
lea ecx, [ebx + edi]
mov edx, dword [ecx + edx]
lea edi, [edi + 4]
xor eax, edx
mov dword [ecx], eax
mov dword [edi - 4], edx
mov edx, dword [ebp - 0x18]
sub esi, 1
jne 0x4912c0
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 0x18]
add dword [ebp - 0xc], 0x10
sub edi, 0x10
add dword [ebp - 4], 0x10
add ebx, 0x10
mov edx, dword [ebp + 0x1c]
xor esi, esi
sub dword [ebp - 0x10], 1
mov dword [ebp + 0x18], edi
mov dword [ebp - 8], ebx
jne 0x491288
test edi, edi
je 0x491345
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push eax
push eax
call edx
mov edx, dword [ebp + 0x10]
add esp, 0xc
sub dword [ebp - 4], ebx
sub ebx, edx
lea ecx, [esi + edx]
add esi, edi
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 4]
mov dword [ebp + 0x18], ecx
mov eax, dword [ebp + 0x18]
add ecx, ebx
mov dl, byte [ecx + esi]
mov al, byte [eax]
xor al, dl
mov byte [ecx], al
mov ecx, dword [ebp + 0x18]
mov byte [ecx], dl
inc ecx
mov dword [ebp + 0x18], ecx
sub edi, 1
jne 0x491326
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret