Function at 0x41cf50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x28
cmp dword [ecx], 0xffffffff
je 0x41cfaa
mov dh, byte [ebp + 0x18]
movzx eax, byte [ebp + 0x14]
mov ah, byte [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dl, ah
not dl
or dl, 0xf
add dl, ah
inc dl
shl al, 7
or al, dl
mov byte [esp + 6], al
mov al, dh
shl al, 7
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
cmp ebx, 0x7d
mov dword [esp + 0x20], ecx
ja 0x41cfb1
or al, bl
mov byte [esp + 7], al
xor esi, esi
jmp 0x41cff0
xor ebx, ebx
jmp 0x41d1f1
or al, 0x7f
mov byte [esp + 7], al
cmp ebx, 0xffff
ja 0x41cfdb
mov eax, ebx
rol ax, 8
movzx eax, ax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
mov esi, 2
jmp 0x41cff0
mov eax, ebx
bswap eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov esi, 8
lea eax, [ebx + 0xe]
push eax
call fcn.004097b0
add esp, 4
mov ebx, eax
lea eax, [esp + 6]
mov edx, eax
mov edi, ebx
xor ecx, ecx
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov edi, ebx
mov ecx, 1
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov eax, ebx
add ebx, 2
cmp dword [ebp + 0xc], 0x7e
mov dword [esp + 0x1c], eax
jb 0x41d057
mov ecx, esi
shr ecx, 2
lea eax, [esp + 0x10]
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, esi
and eax, 0xfffffff8
add ebx, eax
add eax, esp
add eax, 0x10
mov ecx, esi
shr ecx, 1
and ecx, 1
mov edi, ebx
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
and esi, 2
add ebx, esi
mov edx, dword [ebp + 8]
cmp byte [ebp + 0x18], 0
je 0x41d0bf
mov edx, dword [ebp + 0x1c]
mov esi, edx
mov edi, ebx
mov ecx, 1
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
lea esi, [ebx + 4]
lea eax, [edx + 4]
mov edi, esi
xor ecx, ecx
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
cmp byte [edx], 0
jne 0x41d09c
cmp byte [edx + 1], 0
jne 0x41d09c
cmp byte [edx + 2], 0
jne 0x41d09c
cmp byte [edx + 3], 0
je 0x41d1fd
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
test edx, edx
je 0x41d180
movzx eax, byte [esi]
mov ecx, edx
and ecx, 3
cmp edx, 4
jae 0x41d12e
xor edi, edi
jmp 0x41d166
mov esi, dword [ebp + 0xc]
mov ecx, esi
shr ecx, 2
mov eax, edx
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, esi
mov eax, esi
and eax, 0xfffffffc
lea esi, [ebx + eax]
mov dword [esp + 0xc], eax
add edx, eax
mov eax, ecx
and eax, 3
mov ecx, eax
shr ecx, 1
mov dword [esp + 8], edx
mov edi, esi
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edi, dword [ebp + 0xc]
mov ecx, eax
or ecx, 1
xor eax, 0xfffffffe
and edi, 2
add esi, edi
and eax, ecx
je 0x41d180
mov ecx, dword [esp + 8]
add ecx, edi
mov dword [esp + 0x18], eax
push eax
push ecx
push esi
call fcn.004097e0
add esp, 0xc
mov eax, dword [esp + 0xc]
or eax, dword [esp + 0x18]
add ebx, edi
add ebx, eax
mov esi, ebx
jmp 0x41d180
and dword [esp + 8], 0xfffffffc
xor edi, edi
mov edx, dword [ebp + 0x1c]
nop
nop
nop
nop
nop
nop
nop
nop
xor al, byte [edx]
mov byte [ebx + edi + 5], al
xor al, byte [edx + 1]
mov byte [ebx + edi + 6], al
xor al, byte [edx + 2]
mov byte [ebx + edi + 7], al
xor al, byte [edx + 3]
mov byte [ebx + edi + 8], al
add edi, 4
cmp dword [esp + 8], edi
jne 0x41d140
add esi, edi
test ecx, ecx
mov edx, dword [ebp + 0x1c]
je 0x41d180
nop
nop
nop
mov ebx, edi
and ebx, 3
xor al, byte [edx + ebx]
mov byte [esi + 1], al
inc esi
inc edi
dec ecx
jne 0x41d170
mov edi, dword [esp + 0x1c]
sub esi, edi
push 0xd0026952
push dword [0x44bfdc]
call fcn.0043f2d0
add esp, 8
push 0
push esi
push edi
mov esi, dword [esp + 0x2c]
push dword [esi]
call eax
cmp eax, 0xffffffff
setne bl
jne 0x41d1e8
cmp dword [esi], 0xffffffff
je 0x41d1e8
push 0x59ea2086
push dword [0x44bfdc]
call fcn.0043f2d0
add esp, 8
push 2
push dword [esi]
call eax
push 0x2e775759
push dword [0x44bfdc]
call fcn.0043f2d0
add esp, 8
push dword [esi]
call eax
mov dword [esi], 0xffffffff
push edi
call fcn.004097c0
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x18
mov ecx, dword [ebp + 0xc]
shr ecx, 2
mov edx, dword [ebp + 8]
mov eax, edx
mov edi, esi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, dword [ebp + 0xc]
mov eax, ecx
and eax, 0xfffffffc
add esi, eax
mov dword [esp + 0x18], eax
add edx, eax
mov eax, ecx
and eax, 3
mov ecx, eax
shr ecx, 1
mov dword [esp + 8], edx
mov dword [esp + 0xc], edx
mov edi, esi
mov edx, dword [esp + 0xc]
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edi, dword [ebp + 0xc]
mov ecx, eax
or ecx, 1
xor eax, 0xfffffffe
and edi, 2
add esi, edi
and eax, ecx
je 0x41d180
mov ecx, dword [esp + 8]
add ecx, edi
mov dword [esp + 0xc], eax
push eax
push ecx
push esi
call fcn.004097e0
add esp, 0xc
mov eax, dword [esp + 0x18]
or eax, dword [esp + 0xc]
add eax, edi
lea esi, [ebx + eax]
add esi, 4
jmp 0x41d180