Files
isaac-port/generated-src/shape.cpp
T
shweetandClaude Opus 5.5 9d4d4f5c64 Build 29: zero-length placeholder structs, generated-src with standard types
--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>
2026-11-19 21:41:34 -05:00

97 lines
4.4 KiB
C++

#include "classes.h"
// 0042f850
Shape::Shape(void *other)
{
void *nameDst = this;
uint32_t uVar1;
size_t indexBytes;
uint32_t allocBytes;
void *pvVar2;
void *pvVar3;
uint32_t pointsEnd;
void *namesAlloc;
uint32_t extraout_ECX;
char *nameDst;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
uint32_t *namesBegin;
local_8 = 0xffffffff;
puStack_c = &LAB_00af1ee6;
local_10 = ExceptionList;
uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
ExceptionList = &local_10;
*GHIDRA_CAST<uint32_t *>(nameDst) = *GHIDRA_CAST<uint32_t *>(other);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 4)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(other) + 4));
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 8)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0xc)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x10)) = 0;
pvVar3 = *(void **)(GHIDRA_CAST<char *>(other) + 8);
if (pvVar3 != *(void **)(GHIDRA_CAST<char *>(other) + 0xc)) {
indexBytes = GHIDRA_INT(*(void **)(GHIDRA_CAST<char *>(other) + 0xc)) - GHIDRA_INT(pvVar3);
allocBytes = GHIDRA_INT(indexBytes) >> 1;
if (0x7fffffff < allocBytes) {
/* WARNING: Subroutine does not return */
FUN_0040cee0(uVar1);
}
allocBytes = allocBytes * 2;
pvVar2 = msvc::_Allocate(allocBytes);
*(void **)(GHIDRA_CAST<char *>(nameDst) + 8) = pvVar2;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0xc) = pvVar2;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x10) = (void *)(GHIDRA_INT(pvVar2) + allocBytes);
pvVar2 = *(void **)(GHIDRA_CAST<char *>(nameDst) + 8);
memmove(pvVar2,pvVar3,indexBytes);
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0xc) = (void *)(allocBytes + GHIDRA_INT(pvVar2));
}
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0;
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x14)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x18)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x1c)) = 0;
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(other) + 0x14)) != *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(other) + 0x18))) {
allocBytes = (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(other) + 0x18)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(other) + 0x14))) / 0x14;
if (0xccccccc < allocBytes) goto LAB_0042fa29;
allocBytes = allocBytes * 0x14;
pvVar3 = msvc::_Allocate(allocBytes);
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x14) = pvVar3;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x18) = pvVar3;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x1c) = (void *)(GHIDRA_INT(pvVar3) + allocBytes);
pointsEnd = FUN_0042f800(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x14)),extraout_ECX);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x18)) = pointsEnd;
}
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
FUN_0042f1a0(GHIDRA_INT(other) + 0x20);
namesBegin = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(nameDst) + 0x2c));
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 2;
*namesBegin = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x30)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(nameDst) + 0x34)) = 0;
pvVar3 = *(void **)(GHIDRA_CAST<char *>(other) + 0x2c);
pvVar2 = *(void **)(GHIDRA_CAST<char *>(other) + 0x30);
if (pvVar3 != pvVar2) {
allocBytes = (GHIDRA_INT(pvVar2) - GHIDRA_INT(pvVar3)) / 0x18;
if (0xaaaaaaa < allocBytes) {
LAB_0042fa29:
/* WARNING: Subroutine does not return */
FUN_0040cee0(uVar1);
}
allocBytes = allocBytes * 0x18;
namesAlloc = msvc::_Allocate(allocBytes);
*namesBegin = namesAlloc;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x30) = namesAlloc;
*(void **)(GHIDRA_CAST<char *>(nameDst) + 0x34) = (void *)(GHIDRA_INT(namesAlloc) + allocBytes);
nameDst = GHIDRA_CAST<char *>(*namesBegin);
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),4);
do {
(GHIDRA_CAST<msvc::string *>((nameDst)))->msvc::string::string(pvVar3);
nameDst = nameDst + 0x18;
pvVar3 = (void *)(GHIDRA_INT(pvVar3) + 0x18);
} while (pvVar3 != pvVar2);
*GHIDRA_CAST<char **>((GHIDRA_CAST<char *>(nameDst) + 0x30)) = nameDst;
}
ExceptionList = local_10;
return nameDst;
}