Function at 0x40a7c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x50]
push ebp
mov ebp, dword [esp + 0x58]
push esi
cmp ebx, 0x20
push edi
mov dword [esp + 0x10], ebp
jae 0x40a855
mov esi, dword [esp + 0x58]
mov ecx, ebx
mov eax, ecx
lea edi, [esp + 0x34]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add ebx, 0xfffffff0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x64]
lea eax, [esp + ebx + 0x34]
push esi
push eax
push eax
call fcn.0040ab00
lea ecx, [esp + 0x40]
push esi
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.0040ab00
add esp, 0x18
xor eax, eax
test ebx, ebx
jbe 0x40a82f
mov cl, byte [esp + eax + 0x44]
mov dl, byte [esp + eax + 0x34]
xor dl, cl
mov byte [esp + eax + 0x34], dl
inc eax
cmp eax, ebx
jb 0x40a81c
mov ecx, ebx
lea esi, [esp + 0x34]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x68]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov dword [eax], ebx
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret
mov esi, dword [esp + 0x58]
lea ecx, [esp + 0x14]
mov edx, esi
mov dword [esp + 0x5c], ecx
add esi, 0x10
add ebx, 0xfffffff0
mov eax, dword [edx]
lea ebp, [esp + 0x24]
mov dword [esp + 0x14], eax
mov dword [esp + 0x60], esi
mov ecx, dword [edx + 4]
mov dword [esp + 0x18], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [edx + 0xc]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x14]
mov dword [edx], 0
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.0040ab00
add esp, 0xc
test ebx, ebx
je 0x40a9ec
jmp 0x40a8bb
mov esi, dword [esp + 0x60]
cmp ebx, 0x10
jae 0x40a8dc
mov ecx, ebx
mov edi, ebp
mov eax, ecx
mov dword [esp + 0x58], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x60]
jmp 0x40a905
mov ecx, esi
mov edx, ebp
add esi, 0x10
mov dword [esp + 0x58], 0x10
mov eax, dword [ecx]
mov dword [esp + 0x60], esi
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
sub ebx, dword [esp + 0x58]
cmp ebx, 0x10
jae 0x40a976
lea edx, [esp + 0x34]
xor eax, eax
sub ebp, edx
lea edi, [esp + eax + 0x34]
inc eax
cmp eax, 0x10
mov cl, byte [edi + ebp]
mov byte [edi], cl
jb 0x40a916
test ebx, ebx
je 0x40a93d
mov ecx, ebx
lea edi, [esp + 0x44]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x64]
lea eax, [esp + ebx + 0x34]
push ecx
push eax
push eax
call fcn.0040ab00
add esp, 0xc
xor eax, eax
test ebx, ebx
jbe 0x40a969
mov dl, byte [esp + eax + 0x34]
mov cl, byte [esp + eax + 0x44]
xor cl, dl
mov byte [esp + eax + 0x44], cl
inc eax
cmp eax, ebx
jb 0x40a956
add ebx, 0x10
lea ebp, [esp + 0x34]
mov dword [esp + 0x58], ebx
xor ebx, ebx
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x34]
push eax
push ecx
push ebp
call fcn.0040ab00
mov edi, dword [esp + 0x68]
lea edx, [esp + 0x40]
add esp, 0xc
xor esi, esi
sub edi, edx
mov dl, byte [esp + esi + 0x34]
lea eax, [esp + esi + 0x34]
mov cl, byte [edi + eax]
xor dl, cl
inc esi
cmp esi, 0x10
mov byte [eax], dl
jb 0x40a995
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x10]
mov edx, ecx
lea esi, [esp + 0x34]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x10]
add esi, eax
mov edx, dword [ecx]
mov dword [esp + 0x10], esi
add edx, eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x5c], ebp
mov dword [ecx], edx
test ebx, ebx
mov ebp, eax
jne 0x40a8b7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret