--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
#include "classes.h"
|
|
|
|
// 0041c770
|
|
void shared_ptr::assign(void *other)
|
|
{
|
|
char isOk;
|
|
uint32_t otherPtr;
|
|
int *otherRefCount;
|
|
|
|
*GHIDRA_CAST<uint32_t *>(this) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 0;
|
|
otherRefCount = *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(other) + 4));
|
|
otherPtr = *GHIDRA_CAST<uint32_t *>(other);
|
|
if (otherRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
isOk = (**(code **)(*otherRefCount + 4))();
|
|
if (isOk != '\0') {
|
|
if (*GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 4)) != GHIDRA_CAST<int *>(0x0)) {
|
|
isOk = (**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 4)) + 0xc))();
|
|
if ((isOk != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) {
|
|
(*g_renderTargetReleaseFn)(this);
|
|
}
|
|
}
|
|
*GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 4)) = otherRefCount;
|
|
*GHIDRA_CAST<uint32_t *>(this) = otherPtr;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 007090c0
|
|
void shared_ptr::operator_assign(void *other)
|
|
{
|
|
char isLastRef;
|
|
uint32_t swapWord;
|
|
uint32_t *extraout_EAX;
|
|
uint8_t tmp [4];
|
|
int *tmpCtrl;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
uint32_t 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<uint32_t *>((GHIDRA_CAST<char *>(this) + 4));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = swapWord;
|
|
swapWord = *extraout_EAX;
|
|
*extraout_EAX = *GHIDRA_CAST<uint32_t *>(this);
|
|
*GHIDRA_CAST<uint32_t *>(this) = swapWord;
|
|
local_8 = 0;
|
|
if (tmpCtrl != GHIDRA_CAST<int *>(0x0)) {
|
|
isLastRef = (**(code **)(*tmpCtrl + 0xc))(swapWord);
|
|
if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) {
|
|
(*g_renderTargetReleaseFn)(tmp);
|
|
}
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|