Function at 0x41a1e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], edx
xor edi, edi
mov edx, dword [esp + 0x44]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edi
test edx, edx
je 0x41a605
mov eax, dword [esp + 0x10]
mov ecx, eax
mov ebp, dword [esp + 0x48]
and ecx, 0x20
mov ebx, dword [0x7aa6b8]
mov dword [esp + 0x28], ecx
nop dword [eax]
mov esi, 0x800
cmp edx, esi
cmovb esi, edx
cmp word [esp + 0x28], 0
mov dword [esp + 0x1c], esi
je 0x41a2e7
mov dword [0x7aa6b0], 0
test edi, edi
jne 0x41a29e
mov ebx, eax
and ebx, 1
push ebp
lea eax, [ebx*8 + 9]
mov word [esp + 0x34], ax
xor eax, eax
mov dword [esp + 0x36], eax
mov eax, dword [ebp + 0xc]
call eax
movzx edi, al
mov eax, dword [ebp + 0xc]
push ebp
call eax
mov edx, dword [esp + 0x18]
add esp, 8
movzx eax, al
shl ax, 8
or ax, di
mov edi, ebx
xor edi, 1
movzx eax, ax
inc edi
mov dword [esp + 0x18], eax
shl edi, 0xe
test dl, 0x10
je 0x41a2a2
xor eax, eax
mov word [0x7aa6bc], ax
jmp 0x41a2a2
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
movzx eax, si
push ecx
push eax
push ecx
test dl, 1
lea ecx, [esp + 0x3c]
mov edx, ebp
je 0x41a2be
call fcn.00419f90
jmp 0x41a2c3
call fcn.00419c70
add esp, 0xc
test eax, eax
je 0x41a5f8
cmp eax, esi
jne 0x41a5ee
mov ebx, dword [0x7aa6b8]
sub edi, esi
mov dword [esp + 0x24], edi
jmp 0x41a3ad
test al, 1
je 0x41a372
mov dword [esp + 0x2c], esi
test al, 8
je 0x41a32d
test esi, esi
jle 0x41a361
nop dword [eax + eax]
mov eax, dword [ebp + 0xc]
dec esi
push ebp
call eax
movzx eax, al
shl ax, 8
movzx edi, ax
mov eax, dword [ebp + 0xc]
push ebp
call eax
movzx eax, al
lea ebx, [ebx + 2]
or ax, di
add esp, 8
mov word [ebx - 2], ax
test esi, esi
jg 0x41a300
jmp 0x41a35d
test esi, esi
jle 0x41a361
mov esi, dword [esp + 0x2c]
mov eax, dword [ebp + 0xc]
dec esi
push ebp
call eax
movzx edi, al
mov eax, dword [ebp + 0xc]
push ebp
call eax
movzx eax, al
lea ebx, [ebx + 2]
shl ax, 8
add esp, 8
or ax, di
mov word [ebx - 2], ax
test esi, esi
jg 0x41a335
mov esi, dword [esp + 0x1c]
mov eax, dword [ebp + 0x10]
push ebp
call eax
mov ebx, dword [0x7aa6b8]
add esp, 4
jmp 0x41a3a7
mov eax, dword [ebp + 8]
push esi
push ebx
push ebp
call eax
mov ebx, dword [0x7aa6b8]
add esp, 0xc
lea ecx, [ebx + esi]
lea edx, [ebx + esi*2]
test esi, esi
jle 0x41a3a7
mov edi, esi
nop
movsx ax, byte [ecx - 1]
lea ecx, [ecx - 1]
lea edx, [edx - 2]
shl ax, 8
mov word [edx], ax
sub edi, 1
jne 0x41a390
sub dword [0x7aa6b0], esi
mov edx, dword [esp + 0x10]
test dl, 0x10
je 0x41a3d7
xor eax, eax
test esi, esi
jle 0x41a3d7
mov cx, word [0x7aa6bc]
add word [ebx + eax*2], cx
mov cx, word [ebx + eax*2]
inc eax
cmp eax, esi
jl 0x41a3c3
mov word [0x7aa6bc], cx
mov al, dl
xor al, byte [esp + 0x3c]
test al, 4
je 0x41a469
xor ecx, ecx
test esi, esi
jle 0x41a469
cmp esi, 0x20
jb 0x41a45a
mov eax, esi
and eax, 0x8000001f
jns 0x41a402
dec eax
or eax, 0xffffffe0
inc eax
movaps xmm2, xmmword [0x4a98b0]
mov edx, esi
sub edx, eax
lea eax, [ebx + 0x20]
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add ecx, 0x20
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [eax - 0x60], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x50]
pxor xmm1, xmm0
movups xmmword [eax - 0x50], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x30]
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
cmp ecx, edx
jl 0x41a410
cmp ecx, esi
jge 0x41a469
mov eax, 0xffff8000
nop
xor word [ebx + ecx*2], ax
inc ecx
cmp ecx, esi
jl 0x41a460
cmp dword [esp + 0x40], 0
mov edx, dword [esp + 0x44]
je 0x41a4c7
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x1c], ecx
test esi, esi
jle 0x41a4c3
test edx, edx
je 0x41a4c3
mov edx, dword [esp + 0x40]
xor eax, eax
nop word [eax + eax]
cmp edi, esi
jge 0x41a4a0
movsx ecx, word [ebx + edi*2]
inc edi
add eax, ecx
sub edx, 1
jne 0x41a490
mov ecx, dword [esp + 0x40]
sub ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x44]
dec edx
mov dword [esp + 0x44], edx
mov word [ebx + ecx*2], ax
inc ecx
mov dword [esp + 0x1c], ecx
cmp edi, esi
jl 0x41a480
mov esi, ecx
jmp 0x41a4cd
sub edx, esi
mov dword [esp + 0x44], edx
test byte [esp + 0x3c], 1
je 0x41a4fa
xor ecx, ecx
test esi, esi
jle 0x41a5dd
mov edi, dword [esp + 0x20]
mov ax, word [ebx + ecx*2]
inc ecx
mov word [edi], ax
add edi, 2
cmp ecx, esi
jl 0x41a4e2
mov dword [esp + 0x20], edi
jmp 0x41a5dd
xor edi, edi
test esi, esi
jle 0x41a5dd
mov edx, dword [esp + 0x14]
cmp esi, 0x20
jb 0x41a5c2
lea eax, [esi - 1]
lea ecx, [edx - 1]
lea eax, [ebx + eax*2]
add ecx, esi
cmp edx, eax
ja 0x41a528
cmp ecx, ebx
jae 0x41a5c2
mov eax, esi
and eax, 0x8000001f
jns 0x41a536
dec eax
or eax, 0xffffffe0
inc eax
mov ecx, esi
sub ecx, eax
mov eax, 8
movd xmm1, eax
lea eax, [ebx + 0x20]
movups xmm0, xmmword [eax - 0x20]
add edi, 0x20
lea eax, [eax + 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4a9870]
packuswb xmm0, xmm0
movq qword [edx], xmm0
movups xmm0, xmmword [eax - 0x50]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4a9870]
packuswb xmm0, xmm0
movq qword [edx + 8], xmm0
movups xmm0, xmmword [eax - 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4a9870]
packuswb xmm0, xmm0
movq qword [edx + 0x10], xmm0
movups xmm0, xmmword [eax - 0x30]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4a9870]
packuswb xmm0, xmm0
movq qword [edx + 0x18], xmm0
add edx, 0x20
cmp edi, ecx
jl 0x41a546
mov dword [esp + 0x2c], edi
mov dword [esp + 0x14], edx
cmp edi, esi
jge 0x41a5d9
lea ecx, [ebx + edi*2]
sub esi, edi
mov al, byte [ecx + 1]
lea ecx, [ecx + 2]
mov byte [edx], al
inc edx
sub esi, 1
jne 0x41a5c7
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x44]
test edx, edx
je 0x41a605
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
jmp 0x41a220
mov dword [0x4d9b5c], 0xf
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x28
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret