#include "classes.h" // 00828e50 void * RoomSet::GetVariantSet(uint32_t type) { uint32_t *variantSet; uint64_t *allocatedBytes; uint32_t insertKey; uint32_t *insertValue; uint8_t local_14 [8]; int local_c; uint64_t prevAllocatedBytes; uint32_t roomType; _Find_lower_bound<>(local_14,&type); roomType = type; if (((*GHIDRA_CAST((local_c + 0xd)) == '\0') && (*GHIDRA_CAST((local_c + 0x10)) <= type)) && (local_c != *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[10])) + 0x2)))))) { return *(void **)(local_c + 0x14); } if (g_mainHeap == (void *)0x0) { allocatedBytes = &g_allocatedBytesNoHeap; } else { allocatedBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } variantSet = malloc(8); if (variantSet == GHIDRA_CAST(0x0)) { FUN_00a23200(0x7fcb9dd6); } else { prevAllocatedBytes = *allocatedBytes; *GHIDRA_CAST(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) + 8; *variantSet = 8; *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(allocatedBytes) + 4)) + GHIDRA_UINT((0xfffffff7 < GHIDRA_UINT(prevAllocatedBytes))); variantSet = variantSet + 1; if (variantSet != GHIDRA_CAST(0x0)) { *variantSet = 0; goto LAB_00828ec0; } } variantSet = GHIDRA_CAST(0x0); LAB_00828ec0: insertKey = roomType; insertValue = variantSet; msvc::map::insert(local_14,&insertKey); return variantSet; }