//
// sub_100629F78 from 0x100629f78 to 0x10062a0b0 (312 bytes)
//
// 1 xrefs:
// > ??> @ 0x100869d58
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100629F78(_QWORD *a1, __int64 a2, const void *a3)
{
_DWORD *v6; // x22
char *v7; // x0
char *v8; // x8
int v9; // w0
__int64 v10; // x9
__int16 v11; // w1
int v12; // w3
int v13; // w9
int v14; // w0
int v15; // w0
v6 = (_DWORD *)a1[15];
if ( a1[12] )
goto LABEL_11;
v7 = (char *)sub_10062B3EC(0);
v8 = (char *)&unk_100869E80;
if ( v7 && *v7 )
{
v9 = sub_10058B8EC(v7);
if ( v9 )
{
if ( off_100869E70 )
{
v8 = (char *)&unk_100869E68;
while ( *(_DWORD *)v8 != v9 )
{
v10 = *((_QWORD *)v8 + 4);
v8 += 24;
if ( !v10 )
goto LABEL_9;
}
goto LABEL_10;
}
LABEL_9:
v11 = 106;
v12 = 160;
}
else
{
v11 = 107;
v12 = 151;
}
sub_100624720(103, v11, (__int64)"gost_crypt.c", v12);
return 0;
}
LABEL_10:
*v6 = *(_DWORD *)v8;
v13 = *((_DWORD *)v8 + 4);
v6[1] = 0;
v6[2] = v13;
sub_100626F2C(v6 + 3, *((char **)v8 + 1));
a1[12] = a1[15];
LABEL_11:
if ( a2 )
sub_100626EF0((__int64)(v6 + 3), a2);
if ( a3 )
{
v14 = sub_1005EB108((__int64)a1);
memcpy(a1 + 3, a3, v14);
}
v15 = sub_1005EB108((__int64)a1);
memcpy(a1 + 5, a1 + 3, v15);
return 1;
}