Function at 0x41d1a4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, ecx
push esi
push edi
mov edx, dword [ebx + 0x1c]
sub edx, 6
test edx, edx
jle 0x41d1c3
mov esi, dword [ebp + 8]
mov ecx, edx
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
and dword [ebp - 4], 0
and dword [ebp + 8], 0
xor ecx, ecx
push 4
test edx, edx
pop esi
jle 0x41d21d
mov dword [ebp - 8], 8
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x41d21d
cmp ecx, edx
jge 0x41d20a
lea eax, [ebp + ecx*4 - 0x3c]
cmp dword [ebp + 8], esi
jge 0x41d20d
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
add esi, edi
mov edi, dword [eax]
push 4
inc ecx
mov dword [ebx + esi*4], edi
pop esi
add eax, esi
inc dword [ebp + 8]
cmp ecx, edx
jl 0x41d1eb
cmp dword [ebp + 8], esi
jne 0x41d219
inc dword [ebp - 4]
add dword [ebp - 8], esi
and dword [ebp + 8], 0
cmp ecx, edx
jl 0x41d1db
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x41d36f
mov eax, edx
mov dword [ebp - 0xc], 0x411230
shl eax, 2
lea ecx, [ebp + eax - 0x3f]
mov dword [ebp - 0x10], ecx
lea ecx, [ebp + eax - 0x3e]
mov dword [ebp - 0x14], ecx
lea ecx, [ebp + eax - 0x3d]
lea eax, [ebp + eax - 0x40]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax]
mov al, byte [ebp - 0x3c]
xor al, byte [ecx + 0x40e030]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x3c], al
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x40e030]
xor byte [ebp - 0x3b], cl
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x40e030]
xor byte [ebp - 0x3a], cl
mov ecx, dword [ebp - 0x1c]
movzx ecx, byte [ecx]
mov cl, byte [ecx + 0x40e030]
xor byte [ebp - 0x39], cl
mov ecx, dword [ebp - 0xc]
add dword [ebp - 0xc], esi
xor al, byte [ecx]
cmp edx, 8
mov byte [ebp - 0x3c], al
je 0x41d2b7
cmp edx, 1
jle 0x41d30b
lea eax, [ebp - 0x38]
lea ecx, [edx - 1]
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x41d2ab
jmp 0x41d30b
push 3
lea eax, [ebp - 0x38]
pop ecx
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x41d2bd
movzx eax, byte [ebp - 0x30]
push 3
mov al, byte [eax + 0x40e030]
pop ecx
xor byte [ebp - 0x2c], al
movzx eax, byte [ebp - 0x2f]
mov al, byte [eax + 0x40e030]
xor byte [ebp - 0x2b], al
movzx eax, byte [ebp - 0x2e]
mov al, byte [eax + 0x40e030]
xor byte [ebp - 0x2a], al
movzx eax, byte [ebp - 0x2d]
mov al, byte [eax + 0x40e030]
xor byte [ebp - 0x29], al
lea eax, [ebp - 0x28]
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x41d301
and dword [ebp - 8], 0
test edx, edx
jle 0x41d363
mov eax, dword [ebp - 4]
lea ecx, [eax*4 + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x41d363
cmp dword [ebp - 8], edx
jge 0x41d350
mov eax, dword [ebp - 8]
lea eax, [ebp + eax*4 - 0x3c]
mov edi, dword [ebp + 8]
cmp edi, esi
jge 0x41d350
inc dword [ebp - 8]
lea esi, [ecx + edi]
mov edi, dword [eax]
push 4
mov dword [ebx + esi*4], edi
pop esi
add eax, esi
inc dword [ebp + 8]
cmp dword [ebp - 8], edx
jl 0x41d331
cmp dword [ebp + 8], esi
jne 0x41d35e
inc dword [ebp - 4]
add ecx, esi
and dword [ebp + 8], 0
cmp dword [ebp - 8], edx
jl 0x41d31d
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
jbe 0x41d251
pop edi
pop esi
pop ebx
leave
ret 4