signed __int64 __fastcall sub_7101098650(__int64 this, __int64 x1_0, __int64 a3, __int64 a1)
{
agl::utl::IParameterObj *v5; // x23
void (__fastcall *v7)(__int64, __int64); // x20
__int64 v8; // x28
signed __int64 v9; // x9
_BOOL8 v10; // x8
unsigned __int8 v11; // cf
signed __int64 v12; // x9
signed int v13; // w10
unsigned __int64 size; // x0
_QWORD *v15; // x0
signed __int64 v16; // x24
signed __int64 v17; // x21
signed __int64 v18; // x25
__int64 v19; // x8
signed __int64 v20; // x9
__int64 v21; // x8
signed __int64 v22; // x2
__int64 v23; // x20
unsigned __int64 v24; // x27
signed __int64 v25; // x26
__int64 v26; // x27
unsigned __int64 v27; // x26
unsigned __int16 v28; // w8
unsigned __int64 v29; // x9
_DWORD *v30; // x10
signed __int64 v31; // x27
signed __int64 v32; // x8
_DWORD *v33; // x25
signed __int64 v34; // x24
unsigned __int64 v35; // x8
_DWORD *v36; // x9
_DWORD *v37; // x25
unsigned __int64 v38; // x8
_DWORD *v39; // x9
_DWORD *v40; // x25
unsigned __int64 v41; // x8
_DWORD *v42; // x9
_DWORD *v43; // x25
unsigned __int64 v44; // x8
_DWORD *v45; // x9
_DWORD *v46; // x25
signed __int64 v47; // x1
void (__fastcall *v48)(__int64, __int64); // x22
signed __int64 v49; // x0
signed __int64 v50; // x22
int v51; // w27
signed __int64 v52; // x9
_BOOL8 v53; // x8
signed __int64 v54; // x9
signed int v55; // w10
unsigned __int64 v56; // x0
_QWORD *v57; // x0
signed __int64 v58; // x24
signed __int64 v59; // x22
_QWORD *v60; // x25
signed int v61; // w20
bool v62; // nf
unsigned __int8 v63; // vf
void (__fastcall *v64)(__int64, __int64); // x20
signed __int64 v66; // [xsp+10h] [xbp-130h]
sead::Heap *heap; // [xsp+18h] [xbp-128h]
signed __int64 v68; // [xsp+20h] [xbp-120h]
__int64 v69; // [xsp+30h] [xbp-110h]
signed __int64 v70; // [xsp+38h] [xbp-108h]
signed __int64 v71; // [xsp+38h] [xbp-108h]
__int64 v72; // [xsp+40h] [xbp-100h]
__int64 v73; // [xsp+48h] [xbp-F8h]
char a3a[24]; // [xsp+50h] [xbp-F0h]
char *v75; // [xsp+68h] [xbp-D8h]
__int64 v76; // [xsp+B8h] [xbp-88h]
sead::SafeStringBase a2; // [xsp+C0h] [xbp-80h]
sead::SafeStringBase a4a; // [xsp+D0h] [xbp-70h]
__int64 v79; // [xsp+E8h] [xbp-58h]
heap = (sead::Heap *)a1;
v5 = (agl::utl::IParameterObj *)(this + 0x2B0);
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "TableNum";
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "テーブルの数";
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(this + 0x2E0),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)(this + 0x2B0));
*(_DWORD *)(this + 0x2F8) = 0;
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = "Header";
agl::utl::IParameterList::addObj(this, v5, &a3a[0x10]);
if ( !x1_0 )
return 1LL;
v7 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)this + 0x50LL);
agl::utl::ResParameterArchive::ResParameterArchive(&v79, x1_0);
v7(this, v79);
v8 = *(unsigned int *)(this + 0x2F8);
if ( (signed int)v8 < 1 )
return 1LL;
v9 = 0x108LL * (signed int)v8;
v10 = is_mul_ok((signed int)v8, 0x108uLL) == 0;
v11 = __CFADD__(v9, 8LL);
v12 = v9 + 8;
if ( v11 )
v13 = 1;
else
v13 = 0;
if ( (unsigned int)v10 | v13 )
size = 1LL;
else
size = v12;
v15 = operator new[](size, heap, 8u);
v69 = x1_0;
if ( v15 )
{
*v15 = (signed int)v8;
v16 = (signed __int64)(v15 + 1);
v17 = (signed __int64)&v15[0x21 * (signed int)v8 + 1];
v18 = (signed __int64)(v15 + 1);
do
{
agl::utl::IParameterObj::IParameterObj(v18);
*(_QWORD *)v18 = &off_71024C0C50;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0x30));
*(_QWORD *)(v18 + 0x30) = &off_71024C1750;
*(_QWORD *)(v18 + 0x48) = &`vtable for'sead::SafeStringBase<char>;
*(_QWORD *)(v18 + 0x50) = &sead::SafeStringBase<char>::cNullChar;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0x58));
*(_QWORD *)(v18 + 0x58) = &off_71024C11B0;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0x78));
*(_QWORD *)(v18 + 0x78) = &off_71024C11B0;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0x98));
*(_QWORD *)(v18 + 0x98) = &off_71024C11B0;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0xB8));
*(_QWORD *)(v18 + 0xB8) = &off_71024C11B0;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v18 + 0xD8));
*(_QWORD *)(v18 + 0xD8) = &off_71024C11B0;
*(_DWORD *)(v18 + 0xF8) = 0;
*(_QWORD *)(v18 + 0x100) = 0LL;
v18 += 0x108LL;
}
while ( v18 != v17 );
*(_DWORD *)(this + 0x310) = v8;
*(_QWORD *)(this + 0x318) = v16;
}
agl::utl::ResParameterArchive::ResParameterArchive(&v76, x1_0);
v19 = v76 + *(unsigned int *)(v76 + 0x14);
v20 = v19 + 0x30;
v68 = v20;
v21 = 4 * (unsigned int)(unsigned __int16)*(_DWORD *)(v19 + 0x38);
v22 = v20 + v21;
if ( (signed int)v8 <= 0 )
{
agl::utl::IParameterObj::applyResParameterObj_(v5, 0LL, v22, 0LL, 0LL);
}
else
{
v23 = 0LL;
v70 = v20 + v21;
v24 = 0LL;
do
{
sead::FormatFixedSafeString<128>::FormatFixedSafeString((sead::BufferedSafeString *)&a3a[0x10], &nullbyte, v22);
v25 = v24 + 1;
sead::BufferedSafeStringBase<char>::format(
(sead::BufferedSafeString *)&a3a[0x10],
"Table%02d",
(unsigned int)(v24 + 1));
if ( *(unsigned int *)(this + 0x310) <= v24 )
v26 = *(_QWORD *)(this + 0x318);
else
v26 = *(_QWORD *)(this + 0x318) + v23;
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = &nullbyte;
*(_QWORD *)a3a = &`vtable for'sead::SafeStringBase<char>;
*(_QWORD *)&a3a[8] = "テーブル名";
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = &nullbyte;
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v26 + 0x30),
(sead::SafeStringBase *)&a3a[0x10],
(sead::BufferedSafeString *)a3a,
&a4a,
v5);
sead::SafeStringBase<char>::operator=((sead::SafeStringBase *)(v26 + 0x48), &a2);
v23 += 0x108LL;
v24 = v25;
}
while ( v8 != v25 );
agl::utl::IParameterObj::applyResParameterObj_(v5, 0LL, v70, 0LL, 0LL);
x1_0 = v69;
if ( (signed int)v8 >= 1 )
{
v27 = 0LL;
do
{
v28 = *(_DWORD *)(v68 + 8);
v29 = *(unsigned int *)(this + 0x310);
v30 = *(_DWORD **)(this + 0x318);
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "RepeatNumMin";
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
v31 = 0x42 * v27;
v71 = v27 + 1;
v32 = v68 + 4 * (unsigned int)v28;
if ( v29 <= v27 )
v33 = v30;
else
v33 = &v30[0x42 * v27];
v34 = v32 + 8 * (v27 + 1);
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "抽選回数最小";
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v33 + 0x16),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)v33);
v33[0x1C] = 0;
v35 = *(unsigned int *)(this + 0x310);
v36 = *(_DWORD **)(this + 0x318);
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
if ( v35 <= v27 )
v37 = v36;
else
v37 = &v36[v31];
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "RepeatNumMax";
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "抽選回数最大";
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v37 + 0x1E),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)v37);
v37[0x24] = 0;
v38 = *(unsigned int *)(this + 0x310);
v39 = *(_DWORD **)(this + 0x318);
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
if ( v38 <= v27 )
v40 = v39;
else
v40 = &v39[v31];
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "ApproachType";
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "姿勢";
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v40 + 0x26),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)v40);
v40[0x2C] = 0;
v41 = *(unsigned int *)(this + 0x310);
v42 = *(_DWORD **)(this + 0x318);
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
if ( v41 <= v27 )
v43 = v42;
else
v43 = &v42[v31];
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "OccurrenceSpeedType";
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "発生速度";
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v43 + 0x2E),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)v43);
v43[0x34] = 0;
v44 = *(unsigned int *)(this + 0x310);
v45 = *(_DWORD **)(this + 0x318);
*(_QWORD *)&a3a[0x10] = &`vtable for'sead::SafeStringBase<char>;
v75 = &nullbyte;
if ( v44 <= v27 )
v46 = v45;
else
v46 = &v45[v31];
a4a.vptr = &`vtable for'sead::SafeStringBase<char>;
a4a.cstr = "ColumnNum";
a2.vptr = &`vtable for'sead::SafeStringBase<char>;
a2.cstr = "行数";
agl::utl::ParameterBase::initializeListNode(
(agl::utl::ParameterBase *)(v46 + 0x36),
&a4a,
(sead::BufferedSafeString *)&a2,
(sead::SafeStringBase *)&a3a[0x10],
(agl::utl::IParameterObj *)v46);
v46[0x3C] = 0;
if ( *(unsigned int *)(this + 0x310) <= v27 )
v47 = *(_QWORD *)(this + 0x318);
else
v47 = *(_QWORD *)(this + 0x318) + v31 * 4;
agl::utl::IParameterList::addObj(this, v47, v47 + 0x48);
v48 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)this + 0x50LL);
agl::utl::ResParameterArchive::ResParameterArchive(&v73, v69);
v48(this, v73);
if ( *(unsigned int *)(this + 0x310) <= v27 )
v49 = *(_QWORD *)(this + 0x318);
else
v49 = *(_QWORD *)(this + 0x318) + v31 * 4;
agl::utl::IParameterObj::applyResParameterObj_(v49, 0LL, v34, 0LL, 0LL);
if ( *(unsigned int *)(this + 0x310) <= v27 )
v50 = *(_QWORD *)(this + 0x318);
else
v50 = *(_QWORD *)(this + 0x318) + v31 * 4;
v51 = *(_DWORD *)(v50 + 0xF0);
if ( v51 > 0 )
{
v52 = 0x48LL * v51;
v53 = is_mul_ok(v51, 0x48uLL) == 0;
v11 = __CFADD__(v52, 8LL);
v54 = v52 + 8;
v55 = v11 ? 1 : 0;
v56 = (unsigned int)v53 | v55 ? 1LL : v54;
v57 = operator new[](v56, heap, 8u);
if ( v57 )
{
v66 = v50;
*v57 = v51;
v58 = (signed __int64)(v57 + 1);
v59 = (signed __int64)&v57[9 * v51 + 1];
v60 = v57 + 1;
do
{
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)v60);
*v60 = &off_71024C1750;
v60[3] = &`vtable for'sead::SafeStringBase<char>;
v60[4] = &sead::SafeStringBase<char>::cNullChar;
agl::utl::ParameterBase::ParameterBase((agl::utl::ParameterBase *)(v60 + 5));
v60[5] = &off_71024C1110;
v60 += 9;
}
while ( v60 != (_QWORD *)v59 );
*(_DWORD *)(v66 + 0xF8) = v51;
*(_QWORD *)(v66 + 0x100) = v58;
}
}
++v27;
}
while ( v71 != v8 );
x1_0 = v69;
*(_DWORD *)&a3a[0x10] = 0;
if ( (signed int)v8 >= 1 )
{
v61 = 1;
do
{
sub_7101098CE4(this, &a3a[0x10]);
*(_DWORD *)&a3a[0x10] = v61;
v63 = __OFSUB__(v61, (_DWORD)v8);
v62 = v61++ - (signed int)v8 < 0;
}
while ( v62 ^ v63 );
}
goto LABEL_63;
}
}
*(_DWORD *)&a3a[0x10] = 0;
LABEL_63:
v64 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)this + 0x50LL);
agl::utl::ResParameterArchive::ResParameterArchive(&v72, x1_0);
v64(this, v72);
return 1LL;
}