Function at 0x409740
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
not ecx
test edi, edi
je 0x40976e
test bl, 3
je 0x40976e
movzx eax, byte [ebx]
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x4a6ec0]
inc ebx
dec edi
jne 0x409751
push esi
cmp edi, 0x20
jb 0x40997e
mov eax, edi
shr eax, 5
mov dword [ebp - 4], eax
xor ecx, dword [ebx]
add ebx, 8
mov edx, ecx
shr edx, 0x10
mov eax, ecx
shr eax, 8
and eax, 0xff
and edx, 0xff
mov dword [ebp + 8], ebx
mov edx, dword [edx*4 + 0x4a72c0]
xor edx, dword [eax*4 + 0x4a76c0]
mov eax, ecx
shr eax, 0x18
mov esi, dword [ebp + 8]
xor edx, dword [eax*4 + 0x4a6ec0]
movzx eax, cl
xor edx, dword [eax*4 + 0x4a7ac0]
xor edx, dword [ebx - 4]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov eax, edx
mov ebx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor ebx, dword [eax*4 + 0x4a76c0]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x4a6ec0]
movzx eax, dl
xor ebx, dword [eax*4 + 0x4a7ac0]
xor ebx, dword [esi]
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
mov eax, ebx
mov edx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x4a76c0]
mov eax, ebx
shr eax, 0x18
xor edx, dword [eax*4 + 0x4a6ec0]
movzx eax, bl
xor edx, dword [eax*4 + 0x4a7ac0]
xor edx, dword [esi + 4]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov eax, edx
mov ebx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor ebx, dword [eax*4 + 0x4a76c0]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x4a6ec0]
movzx eax, dl
xor ebx, dword [eax*4 + 0x4a7ac0]
xor ebx, dword [esi + 8]
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
mov eax, ebx
mov edx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x4a76c0]
mov eax, ebx
shr eax, 0x18
xor edx, dword [eax*4 + 0x4a6ec0]
movzx eax, bl
xor edx, dword [eax*4 + 0x4a7ac0]
xor edx, dword [esi + 0xc]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov eax, edx
mov ebx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor ebx, dword [eax*4 + 0x4a76c0]
mov eax, edx
shr eax, 0x18
add esi, 0x14
xor ebx, dword [eax*4 + 0x4a6ec0]
movzx eax, dl
sub edi, 0x20
xor ebx, dword [eax*4 + 0x4a7ac0]
mov dword [ebp + 8], esi
xor ebx, dword [esi - 4]
mov ecx, ebx
shr ecx, 0x10
and ecx, 0xff
mov eax, ebx
mov edx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x4a76c0]
mov eax, ebx
shr eax, 0x18
xor edx, dword [eax*4 + 0x4a6ec0]
movzx eax, bl
mov ebx, esi
xor edx, dword [eax*4 + 0x4a7ac0]
add ebx, 4
xor edx, dword [ebx - 4]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov eax, edx
mov ecx, dword [ecx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x4a76c0]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x4a6ec0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4a7ac0]
dec dword [ebp - 4]
jne 0x409780
cmp edi, 4
jb 0x4099ce
mov esi, edi
shr esi, 2
xor ecx, dword [ebx]
add ebx, 4
mov edx, ecx
shr edx, 0x10
and edx, 0xff
mov eax, ecx
mov edx, dword [edx*4 + 0x4a72c0]
shr eax, 8
and eax, 0xff
sub edi, 4
xor edx, dword [eax*4 + 0x4a76c0]
mov eax, ecx
shr eax, 0x18
xor edx, dword [eax*4 + 0x4a6ec0]
movzx eax, cl
xor edx, dword [eax*4 + 0x4a7ac0]
mov ecx, edx
dec esi
jne 0x409988
pop esi
test edi, edi
je 0x4099ed
movzx eax, byte [ebx]
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x4a6ec0]
lea ebx, [ebx + 1]
dec edi
jne 0x4099d3
not ecx
pop edi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret