Function at 0x49cfd0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x49cfdb
xor eax, eax
ret
mov eax, dword [0x4d6b18]
push edi
push esi
push ebp
test eax, eax
push ebx
je 0x49d03d
xor ebp, ebp
xor esi, esi
mov al, byte [esi + 0x4d6b20]
mov ecx, 0x1f
sub ecx, eax
mov eax, 1
shl eax, cl
or ebp, eax
inc esi
cmp esi, 0xe
jb 0x49cfec
xor esi, esi
mov ecx, 0x4ffaf8
mov eax, esi
mov edi, 8
test al, 1
je 0x49d020
shr eax, 1
xor eax, ebp
jmp 0x49d022
shr eax, 1
dec edi
jne 0x49d016
mov dword [ecx], eax
add ecx, 4
inc esi
cmp ecx, 0x4ffef8
jl 0x49d00f
mov dword [0x4d6b18], 0
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
cmp esi, 0x10
not eax
jb 0x49d217
mov edi, esi
shr edi, 4
mov ecx, eax
xor ebx, ebx
mov bl, byte [edx]
and ecx, 0xff
xor ecx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [ecx*4 + 0x4ffaf8]
xor eax, ebx
inc edx
mov ecx, eax
xor ebx, ebx
mov bl, byte [edx]
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
shr ecx, 8
mov eax, dword [eax*4 + 0x4ffaf8]
xor eax, ecx
inc edx
mov ecx, eax
xor ebx, ebx
and ecx, 0xff
mov bl, byte [edx]
sub esi, 0x10
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov ecx, dword [ecx*4 + 0x4ffaf8]
shr eax, 8
xor ecx, eax
inc edx
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [edx + 1]
mov eax, dword [eax*4 + 0x4ffaf8]
shr ecx, 8
xor eax, ecx
inc edx
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
shr eax, 8
mov ecx, dword [ecx*4 + 0x4ffaf8]
xor eax, ecx
inc edx
dec edi
jne 0x49d055
test esi, esi
jbe 0x49d239
mov ecx, eax
xor ebx, ebx
mov bl, byte [edx]
and ecx, 0xff
xor ecx, ebx
shr eax, 8
mov ecx, dword [ecx*4 + 0x4ffaf8]
xor eax, ecx
inc edx
dec esi
jne 0x49d21b
pop ebx
pop ebp
pop esi
pop edi
not eax
ret