Function at 0x409df0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, dword [esp + 0x40]
mov edi, 0xffffffff
mov ebp, edi
cmp byte [esi + edi + 1], 0
lea edi, [edi + 1]
jne 0x409e00
mov eax, edi
and eax, 0xfffffffc
mov ecx, edi
and ecx, 3
mov edx, edi
or edx, 3
imul edx, ecx
xor ecx, 3
imul ecx, eax
add edx, ecx
shr edx, 2
movzx eax, byte [esi + edi - 1]
cmp eax, 0x3d
je 0x409e38
cmp eax, 0x2e
jne 0x409e39
dec edx
movzx eax, byte [esi + edi - 2]
cmp eax, 0x3d
je 0x409e48
cmp eax, 0x2e
jne 0x409e49
dec edx
mov dword [esp + 8], edx
mov edx, 0
test edi, edi
je 0x409f44
xor ecx, ecx
mov esi, 2
jmp 0x409e82
lea eax, [esi + 4]
add esi, 2
mov ecx, edx
cmp esi, edi
mov esi, eax
jae 0x409f44
mov dword [esp + 4], ecx
mov eax, dword [esp + 0x40]
mov ebp, edi
mov edi, eax
movzx eax, byte [eax + esi - 2]
push eax
call fcn.0040eea0
add esp, 4
mov ebx, eax
movzx eax, byte [edi + esi - 1]
mov edi, ebp
mov ebp, dword [esp + 4]
push eax
call fcn.0040eea0
add esp, 4
mov bh, al
shl bl, 2
shr al, 4
and al, 3
or al, bl
lea edx, [ebp + 1]
mov ecx, dword [esp + 0x44]
mov byte [ecx + ebp], al
cmp esi, edi
jae 0x409e70
mov eax, dword [esp + 0x40]
movzx eax, byte [eax + esi]
push eax
mov dword [esp + 4], edx
call fcn.0040eea0
mov edx, dword [esp + 4]
add esp, 4
cmp al, 0x40
je 0x409e70
mov bl, al
shl bh, 4
shr al, 2
and al, 0xf
or al, bh
lea edx, [ebp + 2]
mov ecx, dword [esp + 0x44]
mov byte [ecx + ebp + 1], al
lea eax, [esi + 1]
cmp eax, edi
jae 0x409e70
mov eax, dword [esp + 0x40]
movzx eax, byte [eax + esi + 1]
push eax
mov dword [esp + 4], edx
call fcn.0040eea0
mov edx, dword [esp + 4]
add esp, 4
cmp al, 0x40
je 0x409e70
shl bl, 6
add al, bl
mov ecx, dword [esp + 0x44]
mov byte [ecx + ebp + 2], al
add ebp, 3
mov edx, ebp
jmp 0x409e70
mov ebx, dword [esp + 8]
cmp edx, ebx
mov eax, 0
jne 0x40a095
mov ebp, dword [esp + 0x44]
lea esi, [ebp + 0x20]
mov eax, ebx
xor eax, 0xffffffdf
add ebx, ebx
and ebx, 0xffffffbe
mov dword [esp + 4], eax
add ebx, eax
lea edi, [esp + 0xc]
mov edx, ebp
mov ecx, 8
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
lea edi, [esp + 0x2c]
xor edx, edx
mov eax, ebx
mov ebx, esi
xor ecx, ecx
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ebx, eax
inc eax
je 0x40a090
cmp eax, 8
jb 0x40a033
cmp ebx, 0x1f
ja 0x40a033
xor edx, edx
cmp eax, 0x20
jb 0x409ffd
mov edx, eax
and edx, 0xffffffe0
movups xmm0, xmmword [esp + 0xc]
movups xmm1, xmmword [esp + 0x1c]
xor ecx, ecx
nop word cs:[eax + eax]
movups xmm2, xmmword [ebp + ecx + 0x20]
xorps xmm2, xmm0
movups xmm3, xmmword [ebp + ecx + 0x30]
xorps xmm3, xmm1
movups xmmword [ebp + ecx], xmm2
movups xmmword [ebp + ecx + 0x10], xmm3
add ecx, 0x20
cmp edx, ecx
jne 0x409fd0
cmp eax, edx
je 0x40a090
test al, 0x18
je 0x40a033
mov ecx, edx
mov edx, eax
and edx, 0xfffffff8
nop word cs:[eax + eax]
movsd xmm0, qword [esi + ecx]
mov edi, ecx
and edi, 0x18
movsd xmm1, qword [esp + edi + 0xc]
xorps xmm1, xmm0
movlps qword [esi + ecx - 0x20], xmm1
add ecx, 8
cmp edx, ecx
jne 0x40a010
cmp eax, edx
je 0x40a090
mov ecx, edx
test byte [esp + 4], 1
jne 0x40a057
mov ecx, eax
mov eax, edx
and eax, 0x18
movzx eax, byte [esp + eax + 0xc]
xor al, byte [ebp + edx + 0x20]
mov byte [ebp + edx], al
mov eax, ecx
mov ecx, edx
or ecx, 1
cmp ebx, edx
je 0x40a090
nop dword [eax + eax]
mov edx, eax
mov eax, ecx
and eax, 0x1f
movzx eax, byte [esp + eax + 0xc]
xor al, byte [ebp + ecx + 0x20]
mov byte [ebp + ecx], al
lea eax, [ecx + 1]
and eax, 0x1f
movzx eax, byte [esp + eax + 0xc]
xor al, byte [ebp + ecx + 0x21]
mov byte [ebp + ecx + 1], al
mov eax, edx
add ecx, 2
cmp eax, ecx
jne 0x40a060
mov byte [ebp + eax], 0
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret