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