--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>
112 lines
4.2 KiB
C++
112 lines
4.2 KiB
C++
#include "classes.h"
|
|
|
|
// 00a284d0
|
|
void * KAGE::Network::Multiplayer::Lobby::get_member(void *outProfile, uint32_t index)
|
|
{
|
|
int extraout_EAX;
|
|
int iVar1;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b11cad;
|
|
local_10 = ExceptionList;
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
|
if (iVar1 == 0) {
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(outProfile) + 4)) = 0;
|
|
*GHIDRA_CAST<uint8_t ***>(outProfile) = System::UserProfile::vftable;
|
|
return outProfile;
|
|
}
|
|
ExceptionList = &local_10;
|
|
if (GHIDRA_UINT((*GHIDRA_CAST<int *>((iVar1 + 0x14)) - *GHIDRA_CAST<int *>((iVar1 + 0x10)) >> 3)) <= index) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Invalid lobby user index"));
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
|
}
|
|
iVar1 = *GHIDRA_CAST<int *>((iVar1 + 0x10));
|
|
*GHIDRA_CAST<uint8_t ***>(outProfile) = System::UserProfileBase::vftable;
|
|
(GHIDRA_CAST<UserProfile *>(((void *)(iVar1 + index * 8))))->UserProfile::find_or_create();
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(outProfile) + 4)) = extraout_EAX;
|
|
local_8 = 0;
|
|
*GHIDRA_CAST<uint8_t ***>(outProfile) = System::UserProfile::vftable;
|
|
if (((extraout_EAX != 0) && (*GHIDRA_CAST<int *>((extraout_EAX + 8)) != 0 || *GHIDRA_CAST<int *>((extraout_EAX + 0xc)) != 0)
|
|
) && (*GHIDRA_CAST<int *>((extraout_EAX + 0x14)) == 0)) {
|
|
System::UserProfile::load_steam_avatar(outProfile);
|
|
}
|
|
ExceptionList = local_10;
|
|
return outProfile;
|
|
}
|
|
|
|
// 00a285f0
|
|
void KAGE::Network::Multiplayer::Lobby::get_members(void *outMembers, uint8_t isIncludeLocalUser)
|
|
{
|
|
uint8_t isLocalUser;
|
|
int extraout_EAX;
|
|
void *memberCursor;
|
|
uint8_t **profile;
|
|
int profileData;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
int lobbyImpl;
|
|
uint32_t *membersEnd;
|
|
|
|
puStack_c = &LAB_00b09575;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
lobbyImpl = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
|
if ((lobbyImpl != 0) &&
|
|
(memberCursor = *(void **)(lobbyImpl + 0x10), memberCursor != *(void **)(lobbyImpl + 0x14))) {
|
|
do {
|
|
local_8 = 0xffffffff;
|
|
profile = System::UserProfileBase::vftable;
|
|
(GHIDRA_CAST<UserProfile *>((memberCursor)))->UserProfile::find_or_create();
|
|
local_8 = 0;
|
|
profile = System::UserProfile::vftable;
|
|
profileData = extraout_EAX;
|
|
if ((extraout_EAX != 0) &&
|
|
((*GHIDRA_CAST<int *>((extraout_EAX + 8)) != 0 || *GHIDRA_CAST<int *>((extraout_EAX + 0xc)) != 0 &&
|
|
(*GHIDRA_CAST<int *>((extraout_EAX + 0x14)) == 0)))) {
|
|
System::UserProfile::load_steam_avatar(&profile);
|
|
}
|
|
local_8 = 1;
|
|
if ((isIncludeLocalUser != 0) ||
|
|
(isLocalUser = System::UserProfile::is_local_user(&profile), isLocalUser == 0)) {
|
|
membersEnd = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(outMembers) + 4));
|
|
if (membersEnd == *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(outMembers) + 8))) {
|
|
msvc::vector<UserProfile>::_Emplace_reallocate(membersEnd,&profile);
|
|
}
|
|
else {
|
|
*membersEnd = System::UserProfileBase::vftable;
|
|
membersEnd[1] = profileData;
|
|
*membersEnd = System::UserProfile::vftable;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(outMembers) + 4)) = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(outMembers) + 4)) + 8;
|
|
}
|
|
}
|
|
memberCursor = (void *)(GHIDRA_INT(memberCursor) + 8);
|
|
} while (memberCursor != *(void **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) + 0x14));
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 00a72740
|
|
KAGE::Network::Multiplayer::Lobby::Lobby(void *other)
|
|
{
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
puStack_c = &LAB_00b12750;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
*GHIDRA_CAST<uint8_t ***>(this) = ConstLobby::vftable;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = 0;
|
|
local_8 = 0;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((GHIDRA_CAST<uint32_t *>((GHIDRA_INT(this) + 4)))))->msvc::shared_ptr::assign((void *)(GHIDRA_INT(other) + 4));
|
|
*GHIDRA_CAST<uint8_t ***>(this) = vftable;
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|