#include "classes.h" // 0041c770 void shared_ptr::assign(void *other) { char isOk; undefined4 otherPtr; int *otherRefCount; *GHIDRA_CAST(this) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = 0; otherRefCount = *GHIDRA_CAST((GHIDRA_CAST(other) + 4)); otherPtr = *GHIDRA_CAST(other); if (otherRefCount != GHIDRA_CAST(0x0)) { isOk = (**(code **)(*otherRefCount + 4))(); if (isOk != '\0') { if (*GHIDRA_CAST((GHIDRA_CAST(this) + 4)) != GHIDRA_CAST(0x0)) { isOk = (**(code **)(**GHIDRA_CAST((GHIDRA_CAST(this) + 4)) + 0xc))(); if ((isOk != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(this); } } *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = otherRefCount; *GHIDRA_CAST(this) = otherPtr; } } return; } // 007090c0 void shared_ptr::operator_assign(void *other) { char isLastRef; uint swapWord; undefined4 *extraout_EAX; undefined1 tmp [4]; int *tmpCtrl; void *local_10; undefined1 *puStack_c; undefined4 local_8; undefined4 swapWord; local_8 = 0xffffffff; puStack_c = &LAB_00af0cf0; local_10 = ExceptionList; swapWord = __security_cookie ^ GHIDRA_UINT((tmp + 0x18)); ExceptionList = &local_10; assign(tmp,other); swapWord = extraout_EAX[1]; extraout_EAX[1] = *GHIDRA_CAST((GHIDRA_CAST(this) + 4)); *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = swapWord; swapWord = *extraout_EAX; *extraout_EAX = *GHIDRA_CAST(this); *GHIDRA_CAST(this) = swapWord; local_8 = 0; if (tmpCtrl != GHIDRA_CAST(0x0)) { isLastRef = (**(code **)(*tmpCtrl + 0xc))(swapWord); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(tmp); } } ExceptionList = local_10; return; }