[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] munjeni:
Yes I asking that. I will try to port those two functions to see what I will get for pointers

Edit:

I'm stupid to understand how to port it propertly after segmentation fault lines, but indeed this function read increment structure almost the same like my tool, I'm done some backport of the first function from previous post

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <inttypes.h>

#define _BYTE uint8_t
#define _WORD uint16_t
#define _DWORD uint32_t
#define _QWORD unsigned long long
#define __int64 long long
#define __int32 int
#define __int16 short
#define __int8 char

struct struct_a1_1
{
int int0;
_DWORD dword4;
_BYTE gap8[4];
_DWORD dwordC;
_DWORD dword10;
_BYTE gap14[1028];
__int64 (*pfunc418)(void);
_QWORD qword420;
}__attribute__((packed, aligned(4)));

int main(void)
{
struct struct_a1_1 a1;
struct struct_a1_1 v1; // x19
__int64 v2; // x8
unsigned int v3; // w9
__int64 v4; // x6
char *v5; // x10
unsigned __int64 v6; // x0
__int64 v7; // x8
int v8; // w9
unsigned __int16 *v9; // x0
int v10; // w19
const char *v12; // x5
signed __int64 v13; // x2
const char *v14; // x5
signed __int64 v15; // x2
const char *v16; // x5
signed __int64 v17; // x2

printf("reading from update_package_renamed...\n\n");

FILE *fp = fopen("update_package_renamed", "rb");
if (fp == NULL) {
printf("Error opening!\n");
return 1;
}

if ((fread(&a1, 1, sizeof(struct struct_a1_1), fp)) != sizeof(struct struct_a1_1)) {
printf("Error, short read!\n");
return 0;
}

v1 = a1;

if ((v2 = a1.qword420) == 0 )
{
printf("package info is not initialised\n");
return 0;
}

if ( a1.dword4 != 1 )
{
printf("package header type is unexpected (0x%x)\n", a1.dword4);
return 0;
}
printf("DEBUG: package header type = 0x%x\n", a1.dword4);

if ( a1.dwordC != 0x10000 )
{
printf("RedBend sector size is unexpected (0x%x)\n", a1.dwordC);
return 0;
}
printf("DEBUG: RedBend sector size = 0x%x\n\n", a1.dwordC);

v3 = a1.dword10;

if ( v3 )
{
v4 = 0LL;
v5 = &a1.gap14[4];

while ( 1 )
{
if ( *((_DWORD *)v5 - 1) >= 0x40u )
{
printf("increments[%lld] type is unexpected (0x%x)\n", v4, *((_DWORD *)v5 - 1));
return 0;
}
printf("DEBUG: increments[%lld] type = 0x%x\n", v4, *((_DWORD *)v5 - 1));

if ( (v2 + 16) < v5 )
break;

if ( !(*((_QWORD *)v5 + 2) & 3LL) )
{
printf("increments[%lld] is not FS or image update (0x%llx)\n", v4, (*((_QWORD *)v5 + 2) & 3LL));
return 0;
}
printf("DEBUG: increments[%lld] FS or image update = 0x%llx\n", v4, (*((_QWORD *)v5 + 2)));

if ( (unsigned int)(*((_DWORD *)v5 + 6) - 1) >= 3 )
{
printf("increments[%lld] has not been generated by valid generator (0x%x)\n", v4, (unsigned int)(*((_DWORD *)v5 + 6) - 1));
return 0;
}
printf("DEBUG: increments[%lld] generated by valid generator = 0x%x\n\n", v4, (unsigned int)(*((_DWORD *)v5 + 6) - 1));

v4 = (unsigned int)(v4 + 1);
v5 += 32;

if ( (unsigned int)v4 >= v3 )
goto LABEL_12;
}

printf("increments[%lld] size is bigger than package\n", v4);
return 0;
}

LABEL_12:
printf("position now = 0x%lx 0x%llx\n", ftell(fp), a1.qword420);

printf("AFTER THIS LINE SEGMENTATION FAULT\n");

if ( *(_QWORD *)(a1.qword420 + 16LL) < (unsigned __int64)a1.pfunc418() )
return 0;

if ( *(_QWORD *)(v1.qword420 + 16LL) < (unsigned __int64)v1.pfunc418() )
return 0;

v6 = v1.pfunc418();
v7 = v1.qword420;

if ( *(_QWORD *)(v7 + 16) < v6 )
return 0;

v8 = v1.int0;
v9 = *(unsigned __int16 **)(v7 + 8);

if ( *(unsigned __int16 *)((char *)v9 + (unsigned int)(v1.int0 - 4)) )
return 0;

v10 = *(unsigned __int16 *)((char *)v9 + (unsigned int)(v8 - 2));

//if ( (unsigned __int16)sub_15288(v9, v8 - 2) != v10 )
//	return 0;

fclose(fp);

return 0;
}

this is result

reading from update_package_renamed...

DEBUG: package header type = 0x1
DEBUG: RedBend sector size = 0x10000

DEBUG: increments[0] type = 0x0
DEBUG: increments[0] FS or image update = 0x2
DEBUG: increments[0] generated by valid generator = 0x0

DEBUG: increments[1] type = 0x1
DEBUG: increments[1] FS or image update = 0x2
DEBUG: increments[1] generated by valid generator = 0x0

DEBUG: increments[2] type = 0x2
DEBUG: increments[2] FS or image update = 0x6
DEBUG: increments[2] generated by valid generator = 0x0

DEBUG: increments[3] type = 0x3
DEBUG: increments[3] FS or image update = 0x6
DEBUG: increments[3] generated by valid generator = 0x0

DEBUG: increments[4] type = 0x4
DEBUG: increments[4] FS or image update = 0x6
DEBUG: increments[4] generated by valid generator = 0x0

DEBUG: increments[5] type = 0x5
DEBUG: increments[5] FS or image update = 0x6
DEBUG: increments[5] generated by valid generator = 0x0

DEBUG: increments[6] type = 0x7
DEBUG: increments[6] FS or image update = 0x2
DEBUG: increments[6] generated by valid generator = 0x0

DEBUG: increments[7] type = 0x8
DEBUG: increments[7] FS or image update = 0x2
DEBUG: increments[7] generated by valid generator = 0x0

DEBUG: increments[8] type = 0x9
DEBUG: increments[8] FS or image update = 0x2
DEBUG: increments[8] generated by valid generator = 0x0

DEBUG: increments[9] type = 0x10
DEBUG: increments[9] FS or image update = 0x2
DEBUG: increments[9] generated by valid generator = 0x0

DEBUG: increments[10] type = 0x11
DEBUG: increments[10] FS or image update = 0x2
DEBUG: increments[10] generated by valid generator = 0x0

DEBUG: increments[11] type = 0x12
DEBUG: increments[11] FS or image update = 0x2
DEBUG: increments[11] generated by valid generator = 0x0

position now = 0x428 0x2751e7d28d90cde6
AFTER THIS LINE SEGMENTATION FAULT
[COLOR="Red"]Segmentation fault[/COLOR]

Is there any plugin which can better translate pseudo code?