Function at 0x420e70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x38], edx
mov dword [ebp - 8], ecx
mov eax, 2
imul ecx, eax, 0
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
xor ecx, 0x7ff
shr ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x20]
shr ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0x3c], eax
mov ecx, 2
shl ecx, 3
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx]
sar eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + eax*4]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0xc], 0
jmp 0x420ee2
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x38]
jae 0x420f3c
imul edx, dword [ebp - 0xc], 0x440
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 4]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0xc]
shl edx, 4
mov eax, dword [ebp + 8]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.00420d90
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x20
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x28]
add eax, 0x10
push eax
call fcn.00420d90
jmp 0x420ed9
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0x10
jbe 0x4210a3
mov eax, dword [ebp + 8]
add eax, 0x200
mov dword [ebp - 0x2c], eax
mov ecx, 0x440
imul edx, ecx, 0
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0x44]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 4]
sub edx, 0xf
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
shr eax, 1
mov dword [ebp - 4], eax
mov ecx, 2
shl ecx, 3
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx]
xor eax, 0x7ff
sar eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + eax*4]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 0x80
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x10]
and eax, 1
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x10]
shr ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + edx*2]
mov edx, dword [ebp - 0x44]
neg edx
and edx, 0x7ff
xor ecx, edx
shr ecx, 4
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
add edx, dword [eax + ecx*4]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x10], 2
jae 0x420fba
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
movzx edx, word [ecx + eax*2 + 0x100]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
shr eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
add edx, dword [ecx + eax*4]
mov eax, dword [ebp - 4]
shl eax, 1
mov ecx, dword [ebp - 0x34]
mov dword [ecx + eax*4], edx
mov edx, dword [ebp - 0x30]
xor edx, 0x7ff
shr edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + edx*4]
mov edx, dword [ebp - 4]
shl edx, 1
mov eax, dword [ebp - 0x34]
mov dword [eax + edx*4 + 4], ecx
cmp dword [ebp - 4], 0
jne 0x420f9f
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
lea eax, [edx*4 - 0x40]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x1c], 1
jmp 0x42106e
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x38]
jae 0x4210a3
mov eax, dword [ebp - 0x48]
push eax
mov ecx, 0x440
imul edx, ecx, 0
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0x44]
push ecx
imul edx, dword [ebp - 0x1c], 0x440
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0x44]
push ecx
call fcn.004df940
add esp, 0xc
jmp 0x421065
mov esp, ebp
pop ebp
ret 8