Files
isaac-port/generated-src/lobby_localhost.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

103 lines
3.0 KiB
C++

#include "classes.h"
// 00a9f2b0
void LobbyLocalhost::read_welcome_message(void *data)
{
uint32_t uVar1;
int tagCompare;
void *pvVar2;
uint8_t **local_40;
void *externalSize;
uint32_t local_38;
void *bufferBegin;
void *bufferEnd;
int bufferCapacityEnd;
void *externalData;
int bufferPos;
uint32_t position;
uint32_t bufferStart;
uint8_t **innerStream;
char local_14 [4];
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
local_8 = 0xffffffff;
puStack_c = &LAB_00b14e3d;
local_10 = ExceptionList;
uVar1 = __security_cookie ^ GHIDRA_UINT((local_14 + 0x10));
ExceptionList = &local_10;
strncpy(this,"lhwm",4);
bufferBegin = (void *)0x0;
bufferCapacityEnd = 0;
local_38 = 0xff;
externalSize = (void *)0xff;
externalData = data;
bufferStart = 0;
position = 0;
bufferPos = 0;
bufferEnd = (void *)0x0;
local_40 = KAGE::Filesys::BufferedStream::vftable;
innerStream = KAGE::Filesys::BufferedStream::vftable;
local_8 = 0;
memory_stream_read(&innerStream,local_14,4,1);
tagCompare = strncmp(local_14,"lhwm",4);
if (tagCompare != 0) {
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Invalid localhost welcome message\n"));
}
data = (void *)0x0;
if ((code *)innerStream[5] == memory_stream_read) {
memory_stream_read(&innerStream,&data,4,1);
}
else {
(*(code *)innerStream[5])(&data,4,1,uVar1);
}
pvVar2 = bufferBegin;
if (externalData != (void *)0x0) {
pvVar2 = externalData;
}
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = GHIDRA_INT(pvVar2) + position;
position = position + GHIDRA_INT(data) * 8;
*(void **)(GHIDRA_CAST<char *>(this) + 4) = data;
data = (void *)(GHIDRA_INT(bufferEnd) - GHIDRA_INT(bufferBegin));
if (externalData != (void *)0x0) {
data = externalSize;
}
if ((position < bufferStart) || (data < (void *)(position - bufferStart))) {
(GHIDRA_CAST<KAGE::Filesys::BufferedStream *>((&local_40)))->KAGE::Filesys::BufferedStream::rebuffer();
}
bufferPos = position - bufferStart;
data = (void *)0x0;
if ((code *)innerStream[5] == memory_stream_read) {
memory_stream_read(&innerStream,&data,4,1);
}
else {
(*(code *)innerStream[5])(&data);
}
*(void **)(GHIDRA_CAST<char *>(this) + 0xc) = data;
innerStream = KAGE::Filesys::StreamBase::vftable;
local_40 = KAGE::Filesys::BufferedStreamBase::vftable;
externalSize = (void *)0x0;
local_38 = 0;
bufferEnd = bufferBegin;
externalData = (void *)0x0;
bufferPos = 0;
position = 0;
bufferStart = 0;
if (bufferBegin != (void *)0x0) {
uVar1 = bufferCapacityEnd - GHIDRA_INT(bufferBegin);
pvVar2 = bufferBegin;
if (0xfff < uVar1) {
pvVar2 = *(void **)(GHIDRA_CAST<char *>(bufferBegin) + -4);
uVar1 = uVar1 + 0x23;
if (0x1f < GHIDRA_UINT((GHIDRA_INT(bufferBegin) + (-4 - GHIDRA_INT(pvVar2))))) {
/* WARNING: Subroutine does not return */
_invalid_parameter_noinfo_noreturn();
}
}
operator_delete(pvVar2,uVar1);
}
ExceptionList = local_10;
return;
}