Function at 0x408970
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x34]
push ebp
push esi
mov esi, ecx
push edi
mov edi, ebx
mov dword [esp + 0x24], 1
mov eax, dword [esi]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [eax + 0x18], ebx
mov eax, dword [esp + 0x44]
imul edi, eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi]
mov dword [esp + 0x28], edx
mov dword [ecx + 0x1c], eax
mov edx, dword [esi]
shl edi, 2
mov ebp, dword [edx + 0x20]
mov ecx, ebx
test ebp, ebp
je 0x4089e3
cmp ecx, 1
jg 0x4089be
cmp eax, 1
jle 0x4089e3
sar ecx, 1
jne 0x4089c7
mov ecx, 1
sar eax, 1
jne 0x4089d0
mov eax, 1
mov ebp, eax
imul ebp, ecx
lea edi, [edi + ebp*4]
mov ebp, dword [esp + 0x24]
inc ebp
mov dword [esp + 0x24], ebp
jmp 0x4089b4
mov eax, dword [esp + 0x24]
mov ecx, edi
mov dword [edx + 0x24], eax
call fcn.00435b70
mov ecx, dword [esi]
mov ebp, eax
mov dword [ecx + 0x30], ebp
mov ecx, edi
call fcn.00435b70
mov edx, dword [esi]
mov dword [esp + 0x10], eax
mov dword [edx + 0x34], eax
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
lea ecx, [eax + eax*2]
call fcn.00435b70
mov ecx, dword [esi]
mov dword [esp + 0x20], eax
mov dword [ecx + 0x38], eax
mov eax, edi
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov ecx, edi
call fcn.00435b70
mov edx, dword [esi]
mov ecx, edi
mov dword [esp + 0x14], eax
mov dword [edx + 0x3c], eax
call fcn.00435b70
mov ecx, dword [esi]
mov dword [esp + 0x18], eax
mov dword [ecx + 0x40], eax
mov ecx, edi
call fcn.00435b70
mov edx, dword [esi]
mov dword [esp + 0x1c], eax
mov dword [edx + 0x44], eax
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x408cca
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x44]
mov eax, ebx
imul eax, edx
mov esi, dword [esp + 0x10]
mov dword [esp + 0x34], eax
sub eax, ebx
push edx
mov edx, dword [esp + 0x2c]
push ebx
lea ecx, [eax*4]
push edx
add ebp, ecx
add esi, ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x1c], esi
add ecx, eax
mov esi, dword [esp + 0x24]
mov dword [esp + 0x30], ebp
lea edi, [ecx + eax*2]
mov ecx, dword [esp + 0x20]
add eax, eax
mov dword [esp + 0x2c], edi
add ecx, eax
add esi, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x28]
add ecx, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x48]
push eax
push ecx
mov dword [esp + 0x2c], esi
call fcn.00409f60
mov edx, dword [esp + 0x58]
add esp, 0x14
test edx, edx
mov dword [esp + 0x3c], eax
mov esi, eax
jle 0x408c4f
mov dword [esp + 0x2c], edx
test ebx, ebx
jle 0x408bee
mov dword [esp + 0x28], ebx
mov edx, dword [esi]
xor edx, 0xff000000
mov dword [ebp], edx
mov eax, dword [esi]
push eax
call fcn.004332d0
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
add esp, 4
add esi, 5
mov dword [ecx], eax
mov dx, word [esi - 5]
mov word [edi], dx
mov al, byte [esi - 3]
mov byte [edi + 2], al
xor eax, eax
mov al, byte [esi - 3]
xor ecx, ecx
mov cl, byte [esi - 4]
mov edi, eax
shr edi, 3
mov eax, edi
xor edx, edx
mov dl, byte [esi - 5]
shr ecx, 2
shl eax, 6
or eax, ecx
shr edx, 3
shl eax, 5
or eax, edx
mov word [ebx], ax
xor eax, eax
mov al, byte [ebp + 3]
mov ebx, dword [esp + 0x18]
shr eax, 4
mov ebp, eax
add ebx, 2
and ebp, 0xfff8
mov dword [esp + 0x18], ebx
shl ebp, 2
or ebp, edi
and edi, 0xfffe
shl eax, 5
sar ecx, 1
shl ebp, 5
or eax, edi
or ebp, ecx
shl eax, 4
and ecx, 0xfffe
mov edi, dword [esp + 0x20]
shl ebp, 5
or eax, ecx
mov ecx, dword [esp + 0x1c]
or ebp, edx
add edi, 3
shl eax, 3
sar edx, 1
or eax, edx
mov edx, dword [esp + 0x10]
add edx, 4
mov word [ebx - 2], bp
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
mov word [ecx], ax
mov eax, dword [esp + 0x28]
add ebp, 4
add edx, 2
add ecx, 2
dec eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
jne 0x408afb
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x10]
lea eax, [ebx*8]
sub ecx, eax
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
lea ecx, [ebx*4]
sub ecx, ebx
sub ebp, eax
neg ecx
lea eax, [ebx*4]
mov dword [esp + 0x24], ebp
lea edi, [edi + ecx*2]
mov ecx, dword [esp + 0x14]
sub ecx, eax
sub edx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x1c]
sub ecx, eax
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], eax
jne 0x408aef
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x10]
add eax, ebx
mov dword [esp + 0x2c], ebx
lea ecx, [eax*4]
add ebp, ecx
add esi, ecx
lea ecx, [eax + edi]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x18]
lea ecx, [ecx + eax*2]
add eax, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
add edi, eax
add esi, eax
add ecx, eax
mov dword [esp + 0x14], edi
sar ebx, 1
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x40], ebx
jne 0x408ca7
mov ebx, 1
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], edx
sar edx, 1
mov dword [esp + 0x44], edx
jne 0x408cbb
mov dword [esp + 0x44], 1
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
jne 0x408a6d
mov ecx, dword [esp + 0x3c]
call fcn.00435be0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0xc