Function at 0x41d650
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 0x41d6a2
mov ah, byte [ebp + 0x18]
mov al, byte [ebp + 0x14]
movzx edx, byte [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
and dl, 0xf
shl al, 7
or al, dl
mov byte [esp + 6], al
mov al, ah
shl al, 7
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
cmp ebx, 0x7d
mov dword [esp + 0x20], ecx
ja 0x41d6a9
or al, bl
mov byte [esp + 7], al
xor esi, esi
jmp 0x41d6f7
xor ebx, ebx
jmp 0x41d901
cmp ebx, 0xffff
ja 0x41d6dc
mov ecx, eax
xor cl, 0x81
add al, 0x80
or al, cl
not al
mov byte [esp + 7], al
mov eax, ebx
rol ax, 8
movzx eax, ax
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0
mov esi, 2
jmp 0x41d6f7
or al, 0x7f
mov byte [esp + 7], al
mov eax, ebx
bswap eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov esi, 8
lea eax, [ebx + 0xe]
push eax
call fcn.004095c0
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 ecx, 1
mov edi, ebx
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 0x41d760
mov ecx, esi
shr ecx, 2
lea eax, [esp + 8]
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, 8
mov ecx, esi
not ecx
or ecx, 3
add ecx, esi
inc ecx
mov edi, ebx
add ebx, ecx
shr ecx, 1
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov eax, dword [ebp + 8]
cmp byte [ebp + 0x18], 0
je 0x41d7c7
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 0x41d7a5
cmp byte [edx + 1], 0
jne 0x41d7a5
cmp byte [edx + 2], 0
jne 0x41d7a5
cmp byte [edx + 3], 0
je 0x41d90d
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
test edx, edx
je 0x41d890
movzx eax, byte [esi]
mov ecx, edx
and ecx, 3
cmp edx, 4
jae 0x41d83b
xor edi, edi
jmp 0x41d875
mov dword [esp], eax
mov edx, dword [ebp + 0xc]
mov ecx, edx
shr ecx, 2
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and eax, 0xfffffffc
lea esi, [ebx + eax]
mov dword [esp + 0x18], eax
add dword [esp], eax
mov eax, edx
not eax
or eax, 3
add eax, edx
inc eax
mov edx, dword [esp]
mov ecx, eax
shr ecx, 1
mov dword [esp + 0x14], ebx
mov ebx, edx
mov edi, esi
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ebx, eax
or ebx, 1
mov edi, eax
xor edi, 0xfffffffe
and eax, 0xfffffffe
add esi, eax
and edi, ebx
je 0x41d890
mov ecx, eax
mov ebx, eax
add edx, ecx
push edi
push edx
push esi
call fcn.004095f0
add esp, 0xc
mov eax, dword [esp + 0x18]
add eax, edi
mov esi, dword [esp + 0x14]
add esi, ebx
add esi, eax
jmp 0x41d890
and dword [esp], 0xfffffffc
xor edi, edi
mov edx, ebx
mov ebx, dword [ebp + 0x1c]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
xor al, byte [ebx]
mov byte [edx + edi + 5], al
xor al, byte [ebx + 1]
mov byte [edx + edi + 6], al
xor al, byte [ebx + 2]
mov byte [edx + edi + 7], al
xor al, byte [ebx + 3]
mov byte [edx + edi + 8], al
add edi, 4
cmp dword [esp], edi
jne 0x41d850
add esi, edi
test ecx, ecx
mov edx, dword [ebp + 0x1c]
je 0x41d890
nop
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 0x41d880
mov edi, dword [esp + 0x1c]
sub esi, edi
push 0xd0026952
push dword [0x44ace4]
call fcn.0043ef60
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 0x41d8f8
cmp dword [esi], 0xffffffff
je 0x41d8f8
push 0x59ea2086
push dword [0x44ace4]
call fcn.0043ef60
add esp, 8
push 2
push dword [esi]
call eax
push 0x2e775759
push dword [0x44ace4]
call fcn.0043ef60
add esp, 8
push dword [esi]
call eax
mov dword [esi], 0xffffffff
push edi
call fcn.004095d0
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x18
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov edx, dword [ebp + 0xc]
mov ecx, edx
shr ecx, 2
mov edi, esi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and eax, 0xfffffffc
add esi, eax
mov dword [esp + 0x18], eax
add dword [esp], eax
mov eax, edx
not eax
or eax, 3
add eax, edx
inc eax
mov ecx, eax
shr ecx, 1
mov edx, dword [esp]
mov edi, esi
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edx, eax
or edx, 1
mov edi, eax
xor edi, 0xfffffffe
and eax, 0xfffffffe
add esi, eax
and edi, edx
je 0x41d890
mov ecx, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp]
add eax, ecx
push edi
push eax
push esi
call fcn.004095f0
add esp, 0xc
mov eax, dword [esp + 0x18]
add eax, edi
add eax, dword [esp + 0x14]
lea esi, [ebx + eax]
add esi, 4
jmp 0x41d890