#include "classes.h" // 0060c620 void Entity_Effect::ExtraDataRef::Set(void *extraData) { void *refCount = this; char isLastRef; uint uVar1; ReferenceCountBase *refCount; void *local_10; undefined1 *puStack_c; undefined4 local_8; local_8 = 0xffffffff; puStack_c = &LAB_00af6694; local_10 = ExceptionList; uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; refCount = operator_new(0x18); local_8 = 0; if (refCount == GHIDRA_CAST(0x0)) { refCount = GHIDRA_CAST(0x0); } else { (GHIDRA_CAST((refCount)))->ReferenceCountBase::ReferenceCountBase(); *GHIDRA_CAST(refCount) = ReferenceCount::vftable; *(void **)(refCount + 0x14) = extraData; } local_8 = 0xffffffff; if (*GHIDRA_CAST((GHIDRA_CAST(refCount) + 4)) != GHIDRA_CAST(0x0)) { isLastRef = (**(code **)(**GHIDRA_CAST((GHIDRA_CAST(refCount) + 4)) + 0xc))(uVar1); if ((isLastRef != '\0') && (DAT_00c7e854 != (code *)0x0)) { (*DAT_00c7e854)(refCount); } } *GHIDRA_CAST((GHIDRA_CAST(refCount) + 4)) = refCount; *(void **)refCount = extraData; ExceptionList = local_10; return; }