#include "classes.h" // 00694d20 std_string * EntityConfig_Entity::GetName(std_string *outName, uint32_t language) { std_string *textEnd; uint8_t *text; uint32_t resolvedLanguage; char *ch; StringTable *stringTable; if ((this->name)._size == 0) { text = &s_empty; } else { text = GHIDRA_CAST(&this->name); if (0xf < (this->name)._capacity) { text = *GHIDRA_CAST((GHIDRA_CAST(text))->_buf); } resolvedLanguage = language; if (language == 0x14) { resolvedLanguage = *GHIDRA_CAST(&g_manager->_stringTable); } stringTable = &g_manager->_stringTable; if ((GHIDRA_CAST(text))->_buf[0] == '#') { language = language & 0xffffff; StringTable::get_string (stringTable,GHIDRA_CAST("Entities"),resolvedLanguage, GHIDRA_CAST(((GHIDRA_CAST(text))->_buf + 1)),GHIDRA_CAST((GHIDRA_INT(&language) + 3))); if ((*GHIDRA_CAST((GHIDRA_CAST(&(language)) + 0x3))) == '\0') { language = language & 0xffffff; text = StringTable::get_string (stringTable,GHIDRA_CAST("Entities"),resolvedLanguage, GHIDRA_CAST(((GHIDRA_CAST(text))->_buf + 1)),GHIDRA_CAST((GHIDRA_INT(&language) + 3))); } } } outName->_buf[0] = '\0'; outName->_buf[1] = '\0'; outName->_buf[2] = '\0'; outName->_buf[3] = '\0'; outName->_size = 0; outName->_capacity = 0xf; outName->_buf[0] = '\0'; textEnd = GHIDRA_CAST(text); do { ch = textEnd->_buf; textEnd = GHIDRA_CAST((textEnd->_buf + 1)); } while (*ch != '\0'); (GHIDRA_CAST((outName->_buf)))->msvc::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT(((GHIDRA_CAST(text))->_buf + 1))); return outName; }