Function at 0x41b520
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov ebx, dword [esp + 0x3c]
mov esi, 0xffffffff
mov eax, 0xfffffffe
nop word cs:[eax + eax]
add eax, 2
cmp byte [ebx + esi + 1], 0
lea esi, [esi + 1]
jne 0x41b540
mov ecx, esi
and ecx, 3
mov edi, esi
or edi, 3
imul edi, ecx
xor ecx, 3
mov edx, esi
and edx, 0xfffffffc
imul edx, ecx
add edi, edx
shr edi, 2
mov dword [esp + 4], edi
mov ecx, esi
xor ecx, 0xfffffffe
and eax, 0xfffffffc
add eax, ecx
cmp byte [ebx + eax + 1], 0x3d
je 0x41b586
cmp byte [ebx + esi - 1], 0x2e
jne 0x41b58a
dec dword [esp + 4]
movzx eax, byte [ebx + esi - 2]
cmp eax, 0x3d
je 0x41b599
cmp eax, 0x2e
jne 0x41b59d
dec dword [esp + 4]
mov dword [esp], 0
test esi, esi
je 0x41b684
mov dword [esp], 0
mov ebp, 2
jmp 0x41b5d3
mov dword [esp], edi
lea eax, [ebp + 4]
add ebp, 2
cmp ebp, esi
mov ebp, eax
jae 0x41b684
mov edi, dword [esp + 0x3c]
movzx eax, byte [edi + ebp - 2]
push eax
call fcn.00420580
add esp, 4
mov bh, al
movzx eax, byte [edi + ebp - 1]
push eax
call fcn.00420580
add esp, 4
mov bl, al
shl bh, 2
shr al, 4
and al, 3
or al, bh
mov ecx, dword [esp + 0x40]
mov edi, dword [esp]
mov byte [ecx + edi], al
inc edi
cmp ebp, esi
jae 0x41b5c0
mov eax, dword [esp + 0x3c]
movzx eax, byte [eax + ebp]
push eax
call fcn.00420580
add esp, 4
cmp al, 0x40
je 0x41b5c0
mov bh, al
mov eax, edi
and eax, 1
mov ecx, edi
xor ecx, 1
lea edx, [ecx + eax*2]
shl bl, 4
mov al, bh
shr al, 2
and al, 0xf
or al, bl
mov ecx, dword [esp + 0x40]
mov byte [ecx + edi], al
lea eax, [ebp + 1]
cmp eax, esi
jae 0x41b67c
mov edi, edx
mov eax, dword [esp + 0x3c]
movzx eax, byte [eax + ebp + 1]
push eax
call fcn.00420580
add esp, 4
cmp al, 0x40
je 0x41b5c0
shl bh, 6
add al, bh
mov edx, dword [esp + 0x40]
mov byte [edx + edi], al
inc edi
jmp 0x41b5c0
mov dword [esp], edx
jmp 0x41b5c3
mov ebx, dword [esp + 4]
cmp dword [esp], ebx
mov eax, 0
jne 0x41b79f
lea edi, [esp + 8]
mov edx, dword [esp + 0x40]
mov eax, edx
mov ecx, 8
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov esi, edx
mov eax, ebx
add eax, 0xffffffe0
je 0x41b79b
lea ecx, [ebx - 0x41]
xor edi, edi
cmp ecx, 0xffffffe7
jb 0x41b747
xor edi, edi
cmp eax, 0x20
jb 0x41b711
mov edi, eax
and edi, 0xffffffe0
movups xmm0, xmmword [esp + 8]
movups xmm1, xmmword [esp + 0x18]
xor ecx, ecx
nop dword [eax]
movups xmm2, xmmword [esi + ecx + 0x20]
xorps xmm2, xmm0
movups xmm3, xmmword [esi + ecx + 0x30]
xorps xmm3, xmm1
movups xmmword [esi + ecx], xmm2
movups xmmword [esi + ecx + 0x10], xmm3
add ecx, 0x20
cmp edi, ecx
jne 0x41b6e0
cmp eax, edi
mov ebx, dword [esp + 4]
je 0x41b79b
test bl, 0x18
je 0x41b747
mov ecx, edi
mov edi, eax
and edi, 0xfffffff8
nop dword [eax + eax]
mov edx, ecx
and edx, 0x18
movsd xmm0, qword [esi + ecx + 0x20]
movsd xmm1, qword [esp + edx + 8]
xorps xmm1, xmm0
movlps qword [esi + ecx], xmm1
add ecx, 8
cmp edi, ecx
jne 0x41b720
cmp eax, edi
mov ebx, dword [esp + 4]
je 0x41b79b
lea edx, [ebx - 0x21]
mov ecx, edi
test bl, 1
je 0x41b767
mov ecx, edi
and ecx, 0x18
movzx ecx, byte [esp + ecx + 8]
xor cl, byte [esi + edi + 0x20]
mov byte [esi + edi], cl
mov ecx, edi
or ecx, 1
cmp edx, edi
je 0x41b79b
nop dword [eax + eax]
mov edx, ecx
and edx, 0x1f
movzx edx, byte [esp + edx + 8]
xor dl, byte [esi + ecx + 0x20]
mov byte [esi + ecx], dl
lea edx, [ecx + 1]
and edx, 0x1f
movzx edx, byte [esp + edx + 8]
xor dl, byte [esi + ecx + 0x21]
mov byte [esi + ecx + 1], dl
add ecx, 2
cmp eax, ecx
jne 0x41b770
mov byte [esi + eax], 0
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret