Function at 0x420db7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 8
pop ebx
cdq
mov ecx, ebx
idiv ecx
test edx, edx
jne 0x420ffe
cmp dword [ebp + 0xc], 0x10
jl 0x420ffe
push dword [ebp + 0x18]
call dword [0x49a308]
mov esi, eax
mov al, byte [ebp + 0x10]
mov byte [ebp - 0x40], al
lea eax, [ebp - 0x40]
push 5
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3f], esi
push eax
call fcn.0041fcf1
mov al, byte [ebp + 0x14]
push 5
mov byte [ebp - 0x30], al
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x2f], esi
call fcn.0041fcf1
lea eax, [ebp - 0x40]
push 0x20
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0041fcf1
mov esi, dword [ebp + 0x1c]
lea eax, [ebp - 0x20]
add esp, 0x24
xor edi, edi
sub esi, eax
lea eax, [ebp + edi - 0x20]
mov cl, byte [esi + eax]
xor byte [eax], cl
inc edi
cmp edi, 0x10
jb 0x420e34
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.00421005
mov cl, byte [ebp - 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x24]
and ecx, 7
sub eax, ecx
add esp, 0xc
sub eax, 0xa
cmp dword [edx], eax
jl 0x420ffe
test eax, eax
jl 0x420ffe
mov dword [edx], eax
xor eax, eax
lea edi, [ebp - 0x10]
mov dword [ebp + 0x14], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
mov edi, esi
mov dword [ebp + 0x1c], eax
add esi, ebx
lea eax, [ecx + 1]
mov dword [ebp + 0x18], 1
cmp eax, ebx
jge 0x420ea2
inc eax
inc dword [ebp + 0x18]
jmp 0x420efc
jne 0x420efc
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x420ffe
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x420eba
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00421005
add dword [ebp + 0x14], ebx
mov edx, dword [ebp + 0x24]
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x18], 2
jle 0x420e98
mov edx, dword [edx]
test edx, edx
mov dword [ebp + 0x24], edx
je 0x420f84
cmp eax, ebx
jge 0x420f27
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov cl, byte [eax + ecx]
xor cl, byte [ebp + eax - 8]
inc dword [ebp + 0x20]
inc eax
dec dword [ebp + 0x24]
mov byte [edx], cl
jmp 0x420f7e
jne 0x420f7e
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x420ffe
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x420f3f
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00421005
add dword [ebp + 0x14], ebx
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x24], 0
jne 0x420f0b
mov dword [ebp + 0x18], 1
cmp eax, ebx
jge 0x420fa1
mov ecx, dword [ebp + 0x1c]
mov cl, byte [eax + ecx]
xor cl, byte [ebp + eax - 8]
jne 0x420ffe
inc eax
inc dword [ebp + 0x18]
jmp 0x420ff4
jne 0x420ff4
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x420ffe
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x420fb9
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00421005
add dword [ebp + 0x14], ebx
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x18], 7
jle 0x420f8b
mov al, 1
jmp 0x421000
xor al, al
pop edi
pop esi
pop ebx
leave
ret