Skip to content

Instantly share code, notes, and snippets.

@BalintCsala
Created June 27, 2020 02:51
Show Gist options
  • Save BalintCsala/8caf45e48bb0e749f829ca4036801560 to your computer and use it in GitHub Desktop.
Save BalintCsala/8caf45e48bb0e749f829ca4036801560 to your computer and use it in GitHub Desktop.
/* public: __cdecl StrongholdStart::StrongholdStart(class Dimension & __ptr64,class Random &
__ptr64,int,int) __ptr64 */
void __thiscall
StrongholdStart(StrongholdStart *this,Dimension *param_1,Random *param_2,int param_3,int param_4)
{
longlong **pplVar1;
longlong lVar2;
longlong *plVar3;
code *pcVar4;
void *pvVar5;
uint uVar6;
code **ppcVar7;
code **ppcVar8;
void *pvVar9;
StrongholdStart *this_00;
PieceWeight *pPVar10;
char *pcVar11;
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*p_Var12;
Random *pRVar13;
undefined4 uVar14;
int iVar15;
int iVar16;
int in_stack_fffffffffffffe70;
bool in_stack_fffffffffffffe80;
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
local_178;
undefined7 uStack375;
__uint64 local_168;
ulonglong local_160;
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
local_158 [16];
undefined8 local_148;
undefined8 local_140;
undefined8 local_138;
undefined8 local_130;
undefined local_128;
code **local_120;
undefined8 local_118;
StrongholdStart *local_110;
undefined8 local_108;
undefined **local_f8;
undefined8 local_f0;
undefined local_e8 [16];
undefined4 local_d8;
undefined4 local_d4;
undefined4 local_d0;
char local_c8;
longlong local_c0;
longlong local_b8;
undefined8 local_a8;
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
local_a0 [32];
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
local_80 [32];
vector<class_PieceWeight,class_std::allocator<class_PieceWeight>_> local_60 [24];
ulonglong local_48;
local_118 = 0xfffffffffffffffe;
local_48 = __security_cookie ^ (ulonglong)&stack0xfffffffffffffe48;
*(undefined8 *)(this + 8) = 0;
*(undefined8 *)(this + 0x10) = 0;
*(undefined8 *)(this + 0x18) = 0;
*(int *)(this + 0x20) = param_3;
*(int *)(this + 0x24) = param_4;
*(undefined8 *)(this + 0x28) = 0;
*(undefined8 *)(this + 0x30) = 0;
*(undefined8 *)(this + 0x38) = 0;
*(undefined8 *)this = 0x1412015d0;
iVar16 = DAT_1416a8040 + param_4 * 0x10;
iVar15 = DAT_1416a8038 + param_3 * 0x10;
local_110 = this;
ppcVar7 = (code **)operator_new(0xb0);
local_120 = ppcVar7;
memset(ppcVar7,0,0xb0);
ppcVar7[1] = (code *)0x0;
ppcVar7[2] = (code *)0x0;
ppcVar7[3] = (code *)0x0;
ppcVar7[4] = (code *)0xff;
uVar14 = 0;
*(undefined4 *)(ppcVar7 + 5) = 0;
*(undefined ***)ppcVar7 = &`vftable';
*(undefined *)(ppcVar7 + 6) = 1;
uVar6 = _genRandInt32((Random *)param_2);
*(uint *)(ppcVar7 + 4) = uVar6 & 3;
*(undefined4 *)(ppcVar7 + 5) = uVar14;
*(int *)(ppcVar7 + 1) = iVar15;
*(undefined4 *)((longlong)ppcVar7 + 0xc) = 0x40;
*(int *)(ppcVar7 + 2) = iVar16;
*(int *)((longlong)ppcVar7 + 0x1c) = iVar16 + 4;
*(undefined4 *)(ppcVar7 + 3) = 0x4a;
*(int *)((longlong)ppcVar7 + 0x14) = iVar15 + 4;
*(undefined ***)ppcVar7 = &`vftable';
ppcVar7[7] = (code *)0x0;
ppcVar7[8] = (code *)0x0;
ppcVar7[9] = (code *)0x0;
ppcVar7[10] = (code *)0x0;
ppcVar7[0xd] = (code *)0x0;
ppcVar7[0xe] = (code *)0xf;
*(undefined *)(ppcVar7 + 0xb) = 0;
ppcVar7[0x11] = (code *)0x0;
ppcVar7[0x12] = (code *)0xf;
*(undefined *)(ppcVar7 + 0xf) = 0;
ppcVar7[0x13] = (code *)0x0;
ppcVar7[0x14] = (code *)0x0;
ppcVar7[0x15] = (code *)0x0;
local_108 = 0;
ppcVar8 = *(code ***)(this + 0x30);
if (*(code ***)(this + 0x38) == ppcVar8) {
local_120 = ppcVar7;
_Emplace_reallocate<class_std::unique_ptr<class_SwamplandHut,struct_std::default_delete<class_SwamplandHut>_>_>
((
vector<class_std::unique_ptr<class_StructurePiece,struct_std::default_delete<class_StructurePiece>_>,class_std::allocator<class_std::unique_ptr<class_StructurePiece,struct_std::default_delete<class_StructurePiece>_>_>_>
*)(this + 0x28),
(unique_ptr<class_StructurePiece,struct_std::default_delete<class_StructurePiece>_> *
)ppcVar8,(
unique_ptr<class_SwamplandHut,struct_std::default_delete<class_SwamplandHut>_>
*)&local_120);
ppcVar8 = local_120;
}
else {
*(code ***)ppcVar8 = ppcVar7;
*(longlong *)(this + 0x30) = *(longlong *)(this + 0x30) + 8;
ppcVar8 = (code **)0x0;
local_120 = ppcVar7;
}
if (ppcVar8 != (code **)0x0) {
(**(code **)*ppcVar8)(ppcVar8,1);
}
memset(&local_f8,0,0xb0);
lVar2 = *(longlong *)(*(longlong *)(this + 0x30) + -8);
local_f0 = *(undefined8 *)(lVar2 + 8);
/* WARNING: Load size is inaccurate */
local_e8 = *(undefined *)(lVar2 + 0x10);
local_d8 = *(undefined4 *)(lVar2 + 0x20);
local_d4 = *(undefined4 *)(lVar2 + 0x24);
local_d0 = *(undefined4 *)(lVar2 + 0x28);
local_c8 = *(char *)(lVar2 + 0x30);
local_f8 = &`vftable';
vector<class_BlockActor*___ptr64,class_std::allocator<class_BlockActor*___ptr64>_>
((vector<class_BlockActor*___ptr64,class_std::allocator<class_BlockActor*___ptr64>_> *)
&local_c0,
(vector<class_BlockActor*___ptr64,class_std::allocator<class_BlockActor*___ptr64>_> *)
(lVar2 + 0x38));
local_a8 = *(undefined8 *)(lVar2 + 0x50);
basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>
((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)
local_a0,(basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>
*)(lVar2 + 0x58));
basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>
((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)
local_80,(basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>
*)(lVar2 + 0x78));
vector<class_PieceWeight,class_std::allocator<class_PieceWeight>_>
(local_60,(vector<class_PieceWeight,class_std::allocator<class_PieceWeight>_> *)
(lVar2 + 0x98));
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"Straight",8);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 0x28;
local_130 = 0;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"PrisonHall",10);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 5;
local_130 = 5;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"LeftTurn",8);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 0x14;
local_130 = 0;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"RightTurn",9);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 0x14;
local_130 = 0;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"RoomCrossing",0xc);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 10;
local_130 = 6;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"StraightStairsDown",0x12);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 5;
local_130 = 5;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"StairsDown",10);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 5;
local_130 = 5;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"FiveCrossing",0xc);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 5;
local_130 = 4;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"ChestCorridor",0xd);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 5;
local_130 = 4;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"Library",7);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
uVar6 = (uint)local_168;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 10;
local_130 = 0x500000002;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (0xf < local_160) {
pcVar11 = (char *)(local_160 + 1);
pvVar5 = (void *)CONCAT71(uStack375,local_178);
pvVar9 = pvVar5;
if ((char *)0xfff < pcVar11) {
pcVar11 = (char *)(local_160 + 0x28);
pvVar9 = *(void **)((longlong)pvVar5 + -8);
if (0x1f < (ulonglong)((longlong)pvVar5 + (-8 - (longlong)pvVar9))) {
_invalid_parameter_noinfo_noreturn();
pcVar4 = (code *)swi(3);
(*pcVar4)();
return;
}
}
??_V@YAXPEAX@Z(pvVar9,pcVar11,uVar6);
}
local_168 = 0;
local_160 = 0xf;
local_178 = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)&local_178,
"PortalRoom",10);
local_148 = 0;
local_140 = 0xf;
local_158[0] = (basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>)0x0;
p_Var12 = &local_178;
if (0xf < local_160) {
p_Var12 = (
_Variant_storage_<0,int,bool,float,class_std::basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_>,enum_GeneratorType,enum_GameType,class_BlockPos,unsigned_int,struct_LevelDataValue::Tag>
*)CONCAT71(uStack375,local_178);
}
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_158,
(char *)p_Var12,local_168);
local_138 = 10;
local_130 = 0x600000001;
local_128 = 0;
pPVar10 = (PieceWeight *)local_158;
push_back(local_60,pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_158,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(&local_178,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)pPVar10);
if (local_c8 != '\0') {
assign((basic_string<char,struct_std::char_traits<char>,class_std::allocator<char>_> *)local_a0,
"FiveCrossing",0xc);
}
pRVar13 = param_2;
generateSmallDoorChildForward
((StrongholdPiece *)&local_f8,(SHStartPiece *)&local_f8,
(
vector<class_std::unique_ptr<class_StructurePiece,struct_std::default_delete<class_StructurePiece>_>,class_std::allocator<class_std::unique_ptr<class_StructurePiece,struct_std::default_delete<class_StructurePiece>_>_>_>
*)(this + 0x28),param_2,1,in_stack_fffffffffffffe70);
if (local_c0 != local_b8) {
do {
iVar15 = nextInt((Random *)param_2,(int)(local_b8 - local_c0 >> 3));
pplVar1 = (longlong **)(local_c0 + (longlong)iVar15 * 8);
plVar3 = *pplVar1;
pcVar11 = (char *)(local_b8 - (longlong)(pplVar1 + 1));
memmove();
local_b8 = local_b8 + -8;
if (plVar3 == (longlong *)0x0) {
handleAssert("structurePiece is null in StrongholdStart","false",pcVar11,SUB81(pRVar13,0),
0x173,
"f:\\darwinwork\\855\\s\\handheld\\src-vanilla\\vanilla_shared\\src\\common\\world\\level\\levelgen\\structure\\strongholdfeature.cpp"
,"StrongholdStart::StrongholdStart",in_stack_fffffffffffffe80);
}
else {
pRVar13 = param_2;
(**(code **)(*plVar3 + 0x20))(plVar3);
}
} while (local_c0 != local_b8);
}
this_00 = this;
calculateBoundingBox((StructureStart *)this);
moveToLevel((StructureStart *)this_00,param_2,(int)*(short *)(param_1 + 0x40) + -5);
this[0x40] = (StrongholdStart)0x1;
_Tidy(local_60);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_80,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)param_2);
?_Tidy_deallocate@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ
(local_a0,(<lambda_c96c396a28b26fdf4f60f42a41d7e2d7> *)param_2);
~vector<class_std::_List_unchecked_iterator<class_std::_List_val<struct_std::_List_simple_types<struct_std::pair<class_HashedString_const_,class_std::shared_ptr<class_JsonUtil::JsonSchemaChildOptionBase<class_JsonUtil::JsonParseState<class_JsonUtil::EmptyClass,class_NearestAttackableTargetDefinition>,class_BaseGoalDefinition>_>_>_>_>_>,class_std::allocator<class_std::_List_unchecked_iterator<class_std::_List_val<struct_std::_List_simple_types<struct_std::pair<class_HashedString_const_,class_std::shared_ptr<class_JsonUtil::JsonSchemaChildOptionBase<class_JsonUtil::JsonParseState<class_JsonUtil::EmptyClass,class_NearestAttackableTargetDefinition>,class_BaseGoalDefinition>_>_>_>_>_>_>_>
((
vector<class_std::_List_unchecked_iterator<class_std::_List_val<struct_std::_List_simple_types<struct_std::pair<class_HashedString_const_,class_std::shared_ptr<class_JsonUtil::JsonSchemaChildOptionBase<class_JsonUtil::JsonParseState<class_JsonUtil::EmptyClass,class_NearestAttackableTargetDefinition>,class_BaseGoalDefinition>_>_>_>_>_>,class_std::allocator<class_std::_List_unchecked_iterator<class_std::_List_val<struct_std::_List_simple_types<struct_std::pair<class_HashedString_const_,class_std::shared_ptr<class_JsonUtil::JsonSchemaChildOptionBase<class_JsonUtil::JsonParseState<class_JsonUtil::EmptyClass,class_NearestAttackableTargetDefinition>,class_BaseGoalDefinition>_>_>_>_>_>_>_>
*)&local_c0);
__security_check_cookie(local_48 ^ (ulonglong)&stack0xfffffffffffffe48);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment