Function at 0x420420
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x60]
cmp ebx, 0xf
jbe 0x42063d
lea eax, [ebp + ebx]
mov esi, eax
and esi, 3
je 0x420686
mov edx, dword [esp + 0x64]
mov ecx, eax
mov edi, ebx
sub ecx, esi
add edx, ebx
movzx ebx, byte [edx - 1]
xor byte [eax - 1], bl
sub eax, 1
sub edx, 1
cmp ecx, eax
jne 0x420453
mov eax, edi
mov edi, dword [esp + 0x64]
sub eax, esi
mov ebx, eax
mov esi, eax
add eax, dword [esp + 0x64]
and ebx, 3
shr esi, 2
add edi, ebx
lea edx, [ebp + ebx]
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edx
test al, 3
je 0x42065e
and edi, 3
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
lea edx, [esi*4]
mov dword [esp + 0x34], edx
lea eax, [edi*8]
and ecx, 0xfffffffc
mov dword [esp + 0x18], eax
mov eax, edi
mov dword [esp + 0x1c], ecx
neg eax
add ecx, edx
lea eax, [eax*8 + 0x20]
movzx edx, byte [ecx + edi - 1]
mov dword [esp + 0x28], eax
lea eax, [edi - 1]
mov dword [esp + 0x2c], edx
test eax, eax
je 0x4204fe
mov eax, dword [esp + 0x1c]
lea eax, [edi + eax - 2]
add eax, dword [esp + 0x34]
movzx edi, byte [eax]
shl edx, 8
or edx, edi
mov edi, eax
sub eax, 1
cmp ecx, edi
jne 0x4204e9
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
movzx ecx, byte [esp + 0x28]
shl eax, cl
test esi, 1
jne 0x420566
mov edx, dword [esp + 0x1c]
sub esi, 1
movzx ecx, byte [esp + 0x18]
mov edi, dword [edx + esi*4]
mov edx, edi
mov dword [esp + 0x2c], edi
shr edx, cl
movzx ecx, byte [esp + 0x28]
or eax, edx
mov edx, dword [esp + 0x20]
shl edi, cl
xor dword [edx + esi*4], eax
test esi, 1
jne 0x42055d
mov dword [esp + 8], 0x66
mov dword [esp + 4], str..._nettle_3.5.1_memxor.c
mov dword [esp], 0x426a39
call dword [sym.imp.msvcrt.dll__assert]
cmp esi, 2
je 0x4206cf
mov ecx, dword [esp + 0x20]
lea edi, [esi*4 - 4]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x60], ebp
mov ebp, dword [esp + 0x28]
lea ecx, [ecx + edi - 4]
lea edx, [eax + edi]
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x38], ecx
lea ecx, [esi - 3]
lea edi, [eax + edi - 8]
mov eax, dword [esp + 0x38]
shr ecx, 1
mov dword [esp + 0x34], ecx
shl ecx, 3
sub edi, ecx
mov dword [esp + 0x1c], edi
mov esi, dword [edx]
movzx ecx, byte [esp + 0x18]
sub edx, 8
mov edi, esi
shr edi, cl
mov ecx, ebp
shl ebx, cl
movzx ecx, byte [esp + 0x18]
or edi, ebx
xor dword [eax + 4], edi
mov ebx, dword [edx + 4]
mov edi, ebx
shr edi, cl
mov ecx, ebp
shl esi, cl
or esi, edi
xor dword [eax], esi
sub eax, 8
cmp dword [esp + 0x1c], edx
jne 0x4205ae
movzx ecx, byte [esp + 0x28]
mov edi, ebx
mov esi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x60]
mov ebx, dword [esp + 0x68]
shl edi, cl
mov ecx, dword [esp + 0x34]
lea eax, [esi - 3]
add ecx, ecx
cmp eax, ecx
jne 0x4206cf
mov ecx, dword [esp + 0x24]
mov edx, 3
sub edx, dword [esp + 0x30]
movzx eax, byte [ecx + edx]
je 0x42062b
sub edx, 1
shl eax, 8
movzx esi, byte [ecx + edx]
or eax, esi
test edx, edx
jne 0x42061b
mov esi, dword [esp + 0x18]
mov ecx, esi
shl eax, cl
shr eax, cl
or edi, eax
mov eax, dword [esp + 0x20]
xor dword [eax], edi
mov edx, dword [esp + 0x64]
test ebx, ebx
je 0x420654
sub ebx, 1
movzx eax, byte [edx + ebx]
xor byte [ebp + ebx], al
test ebx, ebx
jne 0x420645
add esp, 0x4c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, 1
jne 0x4206ba
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
sub esi, 2
mov ecx, dword [edx + esi*4 + 4]
xor dword [eax + esi*4 + 4], ecx
mov ecx, dword [edx + esi*4]
xor dword [eax + esi*4], ecx
cmp esi, 1
ja 0x42066e
jmp 0x42063d
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x64]
mov esi, ebx
shr esi, 2
add eax, ebx
and ebx, 3
add edx, ebx
mov dword [esp + 0x24], edx
lea edx, [ebp + ebx]
mov dword [esp + 0x20], edx
test al, 3
je 0x42065e
mov eax, dword [esp + 0x24]
and eax, 3
mov dword [esp + 0x30], eax
jmp 0x420497
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub esi, 1
mov eax, dword [edx + esi*4]
xor dword [edi + esi*4], eax
mov eax, edi
jmp 0x42066e
mov dword [esp + 8], 0x6f
mov dword [esp + 4], str..._nettle_3.5.1_memxor.c
mov dword [esp], 0x426a3f
call dword [sym.imp.msvcrt.dll__assert]
jmp 0x420608