From 0f5e178c8fc0b45e31693b786817899efb45ef72 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Mon, 13 Jan 2025 00:20:28 +0000 Subject: [PATCH] lsteamclient: Implement WOW64 callback handling. --- lsteamclient/gen_wrapper.py | 11 +- lsteamclient/unix_private.h | 6 +- lsteamclient/unix_steam_utils_manual.cpp | 4 +- lsteamclient/unixlib.cpp | 338 +++++++++++++++++++++-- lsteamclient/unixlib_generated.cpp | 112 ++++++++ 5 files changed, 438 insertions(+), 33 deletions(-) diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py index e5847c5d..9139c0dd 100755 --- a/lsteamclient/gen_wrapper.py +++ b/lsteamclient/gen_wrapper.py @@ -1731,8 +1731,8 @@ with open('unixlib_generated.cpp', 'w') as file: abis['w32'].write_converter('u64', {}) abis['u64'].write_converter('w32', path_conv_fields) - def write_callbacks(u_abi, w_abi): - out(u'const struct callback_def callback_data[] =\n{\n'); + def write_callbacks(prefix, u_abi, w_abi): + out(f'const struct callback_def {prefix}callback_data[] =\n{{\n'); values = set() for cbid, sdkver, abis in sorted(callbacks, key=lambda x: x[0]): name, value = abis[u_abi].name, (cbid, abis[w_abi].size, abis[u_abi].size) @@ -1746,9 +1746,12 @@ with open('unixlib_generated.cpp', 'w') as file: out(u'};\n'); out(u'#ifdef __i386__\n') - write_callbacks("u32", "w32") + out(u'const struct callback_def wow64_callback_data[] = {};\n') + write_callbacks("", "u32", "w32") out(u'#endif\n') out(u'#ifdef __x86_64__\n') - write_callbacks("u64", "w64") + write_callbacks("wow64_", "u64", "w32") + write_callbacks("", "u64", "w64") out(u'#endif\n') + out(u'const unsigned int wow64_callback_data_size = ARRAY_SIZE(wow64_callback_data);\n'); out(u'const unsigned int callback_data_size = ARRAY_SIZE(callback_data);\n'); diff --git a/lsteamclient/unix_private.h b/lsteamclient/unix_private.h index 1697e4d2..fd668c2a 100644 --- a/lsteamclient/unix_private.h +++ b/lsteamclient/unix_private.h @@ -66,10 +66,12 @@ struct callback_def void (*conv_w_from_u)(void *dst, const void *src); }; extern const struct callback_def callback_data[]; +extern const struct callback_def wow64_callback_data[]; extern const unsigned int callback_data_size; +extern const unsigned int wow64_callback_data_size; -void *alloc_callback_wtou( int id, void *callback, int *callback_len ); -void convert_callback_utow( int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len ); +void *alloc_callback_wtou( int id, void *callback, int *callback_len, bool wow64 ); +void convert_callback_utow( int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len, bool wow64 ); extern NTSTATUS steamclient_init( void * ); extern NTSTATUS steamclient_init_registry( void * ); diff --git a/lsteamclient/unix_steam_utils_manual.cpp b/lsteamclient/unix_steam_utils_manual.cpp index c87cb593..f375974d 100644 --- a/lsteamclient/unix_steam_utils_manual.cpp +++ b/lsteamclient/unix_steam_utils_manual.cpp @@ -12,7 +12,7 @@ static NTSTATUS ISteamUtils_GetAPICallResult( Iface *iface, Params *params ) int u_callback_len = params->cubCallback; void *u_callback; - if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len ))) + if (!(u_callback = alloc_callback_wtou( params->iCallbackExpected, params->pCallback, &u_callback_len, false ))) { params->_ret = FALSE; return 0; @@ -23,7 +23,7 @@ static NTSTATUS ISteamUtils_GetAPICallResult( Iface *iface, Params *params ) if (params->_ret && u_callback != params->pCallback) { convert_callback_utow( params->iCallbackExpected, u_callback, u_callback_len, - params->pCallback, params->cubCallback ); + params->pCallback, params->cubCallback, false ); free( u_callback ); } diff --git a/lsteamclient/unixlib.cpp b/lsteamclient/unixlib.cpp index 862c676c..c8e8b58c 100644 --- a/lsteamclient/unixlib.cpp +++ b/lsteamclient/unixlib.cpp @@ -25,22 +25,24 @@ struct callback_entry static struct list callbacks = LIST_INIT( callbacks ); static pthread_mutex_t callbacks_lock = PTHREAD_MUTEX_INITIALIZER; -static const struct callback_def *find_first_callback_def_by_id( int id ); +static const struct callback_def *find_first_callback_def_by_id( int id, bool wow64 ); -static int callback_len_utow( int cb_id, int u_len ) +static int callback_len_utow( int cb_id, int u_len, bool wow64 ) { const struct callback_def *c, *end; - if (!(c = find_first_callback_def_by_id( cb_id ))) return u_len; + if (!(c = find_first_callback_def_by_id( cb_id, wow64 ))) return u_len; + + if (wow64) end = wow64_callback_data + wow64_callback_data_size; + else end = callback_data + callback_data_size; - end = callback_data + callback_data_size; while (c != end && c->id == cb_id) { if (c->u_callback_len == u_len) return c->w_callback_len; ++c; } ERR( "Unix len %d not found for callback %d.\n", u_len, cb_id ); - return find_first_callback_def_by_id( cb_id )->w_callback_len; + return find_first_callback_def_by_id( cb_id, wow64 )->w_callback_len; } void queue_vtable_callback( struct w_iface *w_iface, enum callback_type type, uint64_t arg0, uint64_t arg1 ) @@ -319,7 +321,7 @@ NTSTATUS steamclient_Steam_BGetCallback( void *args ) TRACE( "id %d, u_size %d.\n", params->u_msg->m_iCallback, params->u_msg->m_cubParam ); params->w_msg->m_hSteamUser = params->u_msg->m_hSteamUser; params->w_msg->m_iCallback = params->u_msg->m_iCallback; - params->w_msg->m_cubParam = callback_len_utow( params->u_msg->m_iCallback, params->u_msg->m_cubParam ); + params->w_msg->m_cubParam = callback_len_utow( params->u_msg->m_iCallback, params->u_msg->m_cubParam, false ); params->_ret = true; } @@ -331,7 +333,7 @@ NTSTATUS steamclient_callback_message_receive( void *args ) struct steamclient_callback_message_receive_params *params = (struct steamclient_callback_message_receive_params *)args; convert_callback_utow( params->u_msg->m_iCallback, (void *)params->u_msg->m_pubParam, params->u_msg->m_cubParam, (void *)params->w_msg->m_pubParam, - params->w_msg->m_cubParam ); + params->w_msg->m_cubParam, false ); if (params->w_msg->m_iCallback == 703 /* SteamAPICallCompleted_t::k_iCallback */) { SteamAPICallCompleted_t_137 *c = (SteamAPICallCompleted_t_137 *)params->w_msg->m_pubParam; @@ -340,7 +342,7 @@ NTSTATUS steamclient_callback_message_receive( void *args ) { int len; - len = callback_len_utow( c->m_iCallback, c->m_cubParam ); + len = callback_len_utow( c->m_iCallback, c->m_cubParam, false ); TRACE( "SteamAPICallCompleted_t id %d, size %d -> %d.\n", c->m_iCallback, c->m_cubParam, len ); c->m_cubParam = len; } @@ -365,14 +367,14 @@ NTSTATUS steamclient_Steam_GetAPICallResult( void *args ) int u_callback_len = params->w_callback_len; void *u_callback; - if (!(u_callback = alloc_callback_wtou( params->id, params->w_callback, &u_callback_len ))) return false; + if (!(u_callback = alloc_callback_wtou( params->id, params->w_callback, &u_callback_len, false ))) return false; params->_ret = p_Steam_GetAPICallResult( params->pipe, params->call, u_callback, u_callback_len, params->id, params->failed ); if (params->_ret && u_callback != params->w_callback) { - convert_callback_utow( params->id, u_callback, u_callback_len, params->w_callback, params->w_callback_len ); + convert_callback_utow( params->id, u_callback, u_callback_len, params->w_callback, params->w_callback_len, false ); free( u_callback ); } @@ -1038,33 +1040,40 @@ unsigned int steamclient_unix_path_to_dos_path( bool api_result, const char *src return r; } -static const struct callback_def *find_first_callback_def_by_id( int id ) +static const struct callback_def *find_first_callback_def_by_id( int id, bool wow64 ) { + const struct callback_def *data; unsigned int l, r, m; + if (wow64) r = wow64_callback_data_size; + else r = callback_data_size; + if (wow64) data = wow64_callback_data; + else data = callback_data; + l = 0; - r = callback_data_size; while (l < r) { m = (l + r) /2; - if (callback_data[m].id == id) + if (data[m].id == id) { - while (m && callback_data[m - 1].id == id) --m; - return &callback_data[m]; + while (m && data[m - 1].id == id) --m; + return &data[m]; } - if (id < callback_data[m].id) r = m; - else l = m + 1; + if (id < data[m].id) r = m; + else l = m + 1; } return NULL; } -void *alloc_callback_wtou( int id, void *callback, int *callback_len ) +void *alloc_callback_wtou( int id, void *callback, int *callback_len, bool wow64 ) { const struct callback_def *c, *end, *best; - if (!(c = find_first_callback_def_by_id( id ))) return callback; + if (!(c = find_first_callback_def_by_id( id, wow64 ))) return callback; + + if (wow64) end = wow64_callback_data + wow64_callback_data_size; + else end = callback_data + callback_data_size; - end = callback_data + callback_data_size; best = NULL; while (c != end && c->id == id) { @@ -1080,7 +1089,7 @@ void *alloc_callback_wtou( int id, void *callback, int *callback_len ) if (!best) { ERR( "len %d is too small for callback %d, using default.\n", *callback_len, id ); - best = find_first_callback_def_by_id( id ); + best = find_first_callback_def_by_id( id, wow64 ); } if (best->w_callback_len != *callback_len) WARN( "Found len %d for id %d, len %d.\n", best->w_callback_len, id, *callback_len ); @@ -1088,17 +1097,19 @@ void *alloc_callback_wtou( int id, void *callback, int *callback_len ) return malloc( *callback_len ); } -void convert_callback_utow(int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len) +void convert_callback_utow( int id, void *u_callback, int u_callback_len, void *w_callback, int w_callback_len, bool wow64 ) { const struct callback_def *c, *end, *best; - if (!(c = find_first_callback_def_by_id( id ))) + if (!(c = find_first_callback_def_by_id( id, wow64 ))) { memcpy( w_callback, u_callback, u_callback_len ); return; } - end = callback_data + callback_data_size; + if (wow64) end = wow64_callback_data + wow64_callback_data_size; + else end = callback_data + callback_data_size; + best = NULL; while (c != end && c->id == id) { @@ -1117,7 +1128,7 @@ void convert_callback_utow(int id, void *u_callback, int u_callback_len, void *w if (!best) { ERR( "Could not find id %d, u_callback_len %d, w_callback_len %d.\n", id, u_callback_len, w_callback_len ); - best = find_first_callback_def_by_id( id ); + best = find_first_callback_def_by_id( id, wow64 ); } if (best->w_callback_len != w_callback_len || best->u_callback_len != u_callback_len) @@ -1127,3 +1138,280 @@ void convert_callback_utow(int id, void *u_callback, int u_callback_len, void *w if (best->conv_w_from_u) best->conv_w_from_u( w_callback, u_callback ); else memcpy( w_callback, u_callback, u_callback_len ); } + +#ifdef __x86_64__ + +struct buf32 +{ + uint32_t pos32; + char *pos; + + buf32() : pos(g_tmppath), pos32( (uint32_t)(UINT_PTR)g_tmppath ) {} + + template< typename T > void append_str( ptr32< T* >& dst, const char *src ) + { + size_t len = strlen( src ) + 1; + + if (g_tmppath + TEMP_PATH_BUFFER_LENGTH - pos < len) return; + memcpy( pos, src, len ); + pos += len; + + dst.value = pos32; + pos32 += len; + } + + void append_path( ptr32< const char * >& dst, const char *src ) + { + size_t len; + + steamclient_unix_path_to_dos_path( 1, src, pos, g_tmppath + TEMP_PATH_BUFFER_LENGTH - pos, 1 ); + len = strlen( pos ) + 1; + pos += len; + + dst.value = pos32; + pos32 += len; + } +}; + +u64_CallbackMsg_t::operator w32_CallbackMsg_t() const +{ + w32_CallbackMsg_t ret; + ret.m_hSteamUser = this->m_hSteamUser; + ret.m_iCallback = this->m_iCallback; + /*ret.m_pubParam = this->m_pubParam;*/ + ret.m_cubParam = this->m_cubParam; + return ret; +} + +u64_HTML_ChangedTitle_t::operator w32_HTML_ChangedTitle_t() const +{ + w32_HTML_ChangedTitle_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchTitle, this->pchTitle ); + return ret; +} + +u64_HTML_ComboNeedsPaint_t::operator w32_HTML_ComboNeedsPaint_t() const +{ + w32_HTML_ComboNeedsPaint_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pBGRA, this->pBGRA ); + ret.unWide = this->unWide; + ret.unTall = this->unTall; + return ret; +} + +u64_HTML_FileOpenDialog_t::operator w32_HTML_FileOpenDialog_t() const +{ + w32_HTML_FileOpenDialog_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchTitle, this->pchTitle ); + buf.append_path( ret.pchInitialFile, this->pchInitialFile ); + return ret; +} + +u64_HTML_FinishedRequest_t::operator w32_HTML_FinishedRequest_t() const +{ + w32_HTML_FinishedRequest_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + buf.append_str( ret.pchPageTitle, this->pchPageTitle ); + return ret; +} + +u64_HTML_JSAlert_t::operator w32_HTML_JSAlert_t() const +{ + w32_HTML_JSAlert_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchMessage, this->pchMessage ); + return ret; +} + +u64_HTML_JSConfirm_t::operator w32_HTML_JSConfirm_t() const +{ + w32_HTML_JSConfirm_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchMessage, this->pchMessage ); + return ret; +} + +u64_HTML_LinkAtPosition_t::operator w32_HTML_LinkAtPosition_t() const +{ + w32_HTML_LinkAtPosition_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + ret.x = this->x; + ret.y = this->y; + buf.append_path( ret.pchURL, this->pchURL ); + ret.bInput = this->bInput; + ret.bLiveLink = this->bLiveLink; + return ret; +} + +u64_HTML_NeedsPaint_t::operator w32_HTML_NeedsPaint_t() const +{ + w32_HTML_NeedsPaint_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pBGRA, this->pBGRA ); + ret.unWide = this->unWide; + ret.unTall = this->unTall; + ret.unUpdateX = this->unUpdateX; + ret.unUpdateY = this->unUpdateY; + ret.unUpdateWide = this->unUpdateWide; + ret.unUpdateTall = this->unUpdateTall; + ret.unScrollX = this->unScrollX; + ret.unScrollY = this->unScrollY; + ret.flPageScale = this->flPageScale; + ret.unPageSerial = this->unPageSerial; + return ret; +} + +u64_HTML_NewWindow_t_132x::operator w32_HTML_NewWindow_t_132x() const +{ + w32_HTML_NewWindow_t_132x ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + ret.unX = this->unX; + ret.unY = this->unY; + ret.unWide = this->unWide; + ret.unTall = this->unTall; + ret.unNewWindow_BrowserHandle_IGNORE = this->unNewWindow_BrowserHandle_IGNORE; + return ret; +} + +u64_HTML_NewWindow_t_130x::operator w32_HTML_NewWindow_t_130x() const +{ + w32_HTML_NewWindow_t_130x ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + ret.unX = this->unX; + ret.unY = this->unY; + ret.unWide = this->unWide; + ret.unTall = this->unTall; + return ret; +} + +u64_HTML_OpenLinkInNewTab_t::operator w32_HTML_OpenLinkInNewTab_t() const +{ + w32_HTML_OpenLinkInNewTab_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + return ret; +} + +u64_HTML_ShowToolTip_t::operator w32_HTML_ShowToolTip_t() const +{ + w32_HTML_ShowToolTip_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchMsg, this->pchMsg ); + return ret; +} + +u64_HTML_StartRequest_t::operator w32_HTML_StartRequest_t() const +{ + w32_HTML_StartRequest_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + buf.append_str( ret.pchTarget, this->pchTarget ); + buf.append_str( ret.pchPostData, this->pchPostData ); + ret.bIsRedirect = this->bIsRedirect; + return ret; +} + +u64_HTML_StatusText_t::operator w32_HTML_StatusText_t() const +{ + w32_HTML_StatusText_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchMsg, this->pchMsg ); + return ret; +} + +u64_HTML_URLChanged_t::operator w32_HTML_URLChanged_t() const +{ + w32_HTML_URLChanged_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_path( ret.pchURL, this->pchURL ); + buf.append_str( ret.pchPostData, this->pchPostData ); + ret.bIsRedirect = this->bIsRedirect; + buf.append_str( ret.pchPageTitle, this->pchPageTitle ); + ret.bNewNavigation = this->bNewNavigation; + return ret; +} + +u64_HTML_UpdateToolTip_t::operator w32_HTML_UpdateToolTip_t() const +{ + w32_HTML_UpdateToolTip_t ret; + struct buf32 buf; + + ret.unBrowserHandle = this->unBrowserHandle; + buf.append_str( ret.pchMsg, this->pchMsg ); + return ret; +} + +u64_RemoteStorageDownloadUGCResult_t_123::operator w32_RemoteStorageDownloadUGCResult_t_123() const +{ + w32_RemoteStorageDownloadUGCResult_t_123 ret; + ret.m_eResult = this->m_eResult; + ret.m_hFile = this->m_hFile; + ret.m_nAppID = this->m_nAppID; + ret.m_nSizeInBytes = this->m_nSizeInBytes; + ret.m_pchFileName = this->m_pchFileName; + ret.m_ulSteamIDOwner = this->m_ulSteamIDOwner; + return ret; +} + +u64_RemoteStorageDownloadUGCResult_t_116x::operator w32_RemoteStorageDownloadUGCResult_t_116x() const +{ + w32_RemoteStorageDownloadUGCResult_t_116x ret; + ret.m_eResult = this->m_eResult; + ret.m_hFile = this->m_hFile; + ret.m_nAppID = this->m_nAppID; + ret.m_nSizeInBytes = this->m_nSizeInBytes; + ret.m_pchFileName = this->m_pchFileName; + ret.m_ulSteamIDOwner = this->m_ulSteamIDOwner; + return ret; +} + +u64_RemoteStorageDownloadUGCResult_t_111x::operator w32_RemoteStorageDownloadUGCResult_t_111x() const +{ + w32_RemoteStorageDownloadUGCResult_t_111x ret; + struct buf32 buf; + + ret.m_eResult = this->m_eResult; + ret.m_hFile = this->m_hFile; + ret.m_nAppID = this->m_nAppID; + ret.m_nSizeInBytes = this->m_nSizeInBytes; + buf.append_str( ret.m_pchFileName, this->m_pchFileName ); + ret.m_ulSteamIDOwner = this->m_ulSteamIDOwner; + return ret; +} +#endif diff --git a/lsteamclient/unixlib_generated.cpp b/lsteamclient/unixlib_generated.cpp index d610bbba..2e5c14d1 100644 --- a/lsteamclient/unixlib_generated.cpp +++ b/lsteamclient/unixlib_generated.cpp @@ -21499,6 +21499,7 @@ u64_SubmitPlayerResultResultCallback_t::operator w32_SubmitPlayerResultResultCal #endif #ifdef __i386__ +const struct callback_def wow64_callback_data[] = {}; const struct callback_def callback_data[] = { { 152, 162, 24, 16, []( void *d, const void *s ){ *(w32_MicroTxnAuthorizationResponse_t_123 *)d = *(const u32_MicroTxnAuthorizationResponse_t_123 *)s; } }, @@ -21611,6 +21612,116 @@ const struct callback_def callback_data[] = }; #endif #ifdef __x86_64__ +const struct callback_def wow64_callback_data[] = +{ + { 152, 160, 24, 16, []( void *d, const void *s ){ *(w32_MicroTxnAuthorizationResponse_t_123 *)d = *(const u64_MicroTxnAuthorizationResponse_t_123 *)s; } }, + { 152, 122, 24, 24, []( void *d, const void *s ){ *(w32_MicroTxnAuthorizationResponse_t_109 *)d = *(const u64_MicroTxnAuthorizationResponse_t_109 *)s; } }, + { 209, 160, 40, 32, []( void *d, const void *s ){ *(w32_GSReputation_t_123 *)d = *(const u64_GSReputation_t_123 *)s; } }, + { 209, 122, 40, 40, []( void *d, const void *s ){ *(w32_GSReputation_t_108 *)d = *(const u64_GSReputation_t_108 *)s; } }, + { 513, 160, 16, 12, []( void *d, const void *s ){ *(w32_LobbyCreated_t_123 *)d = *(const u64_LobbyCreated_t_123 *)s; } }, + { 513, 122, 16, 16, []( void *d, const void *s ){ *(w32_LobbyCreated_t_099u *)d = *(const u64_LobbyCreated_t_099u *)s; } }, + { 1023, 160, 40, 36, []( void *d, const void *s ){ *(w32_FileDetailsResult_t *)d = *(const u64_FileDetailsResult_t *)s; } }, + { 1106, 160, 32, 28, []( void *d, const void *s ){ *(w32_LeaderboardScoreUploaded_t_123 *)d = *(const u64_LeaderboardScoreUploaded_t_123 *)s; } }, + { 1106, 122, 32, 32, []( void *d, const void *s ){ *(w32_LeaderboardScoreUploaded_t_104 *)d = *(const u64_LeaderboardScoreUploaded_t_104 *)s; } }, + { 1111, 160, 16, 12, []( void *d, const void *s ){ *(w32_LeaderboardUGCSet_t_123 *)d = *(const u64_LeaderboardUGCSet_t_123 *)s; } }, + { 1111, 122, 16, 16, []( void *d, const void *s ){ *(w32_LeaderboardUGCSet_t_111x *)d = *(const u64_LeaderboardUGCSet_t_111x *)s; } }, + { 1112, 160, 24, 20, []( void *d, const void *s ){ *(w32_PS3TrophiesInstalled_t_123 *)d = *(const u64_PS3TrophiesInstalled_t_123 *)s; } }, + { 1112, 122, 24, 24, []( void *d, const void *s ){ *(w32_PS3TrophiesInstalled_t_112x *)d = *(const u64_PS3TrophiesInstalled_t_112x *)s; } }, + { 1221, 160, 712, 704, []( void *d, const void *s ){ *(w32_SteamNetConnectionStatusChangedCallback_t_153a *)d = *(const u64_SteamNetConnectionStatusChangedCallback_t_153a *)s; } }, + /*{ 1221, 152, 712, 704 },*/ + { 1221, 151, 584, 576, []( void *d, const void *s ){ *(w32_SteamNetConnectionStatusChangedCallback_t_151 *)d = *(const u64_SteamNetConnectionStatusChangedCallback_t_151 *)s; } }, + { 1303, 151, 288, 280, []( void *d, const void *s ){ *(w32_RemoteStorageAppSyncProgress_t_123 *)d = *(const u64_RemoteStorageAppSyncProgress_t_123 *)s; } }, + { 1303, 122, 288, 288, []( void *d, const void *s ){ *(w32_RemoteStorageAppSyncProgress_t_111x *)d = *(const u64_RemoteStorageAppSyncProgress_t_111x *)s; } }, + { 1307, 160, 280, 272, []( void *d, const void *s ){ *(w32_RemoteStorageFileShareResult_t_128x *)d = *(const u64_RemoteStorageFileShareResult_t_128x *)s; } }, + { 1307, 128, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageFileShareResult_t_123 *)d = *(const u64_RemoteStorageFileShareResult_t_123 *)s; } }, + { 1307, 122, 16, 16, []( void *d, const void *s ){ *(w32_RemoteStorageFileShareResult_t_111x *)d = *(const u64_RemoteStorageFileShareResult_t_111x *)s; } }, + { 1308, 116, 40, 40, []( void *d, const void *s ){ *(w32_RemoteStorageDownloadUGCResult_t_111x *)d = *(const u64_RemoteStorageDownloadUGCResult_t_111x *)s; } }, + { 1309, 160, 24, 16, []( void *d, const void *s ){ *(w32_RemoteStoragePublishFileResult_t_125 *)d = *(const u64_RemoteStoragePublishFileResult_t_125 *)s; } }, + { 1309, 124, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStoragePublishFileResult_t_123 *)d = *(const u64_RemoteStoragePublishFileResult_t_123 *)s; } }, + { 1309, 122, 16, 16, []( void *d, const void *s ){ *(w32_RemoteStoragePublishFileResult_t_116x *)d = *(const u64_RemoteStoragePublishFileResult_t_116x *)s; } }, + { 1310, 117, 1744, 1744, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedFileDetailsResult_t_116x *)d = *(const u64_RemoteStorageGetPublishedFileDetailsResult_t_116x *)s; } }, + { 1311, 160, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageDeletePublishedFileResult_t_123 *)d = *(const u64_RemoteStorageDeletePublishedFileResult_t_123 *)s; } }, + { 1311, 122, 16, 16, []( void *d, const void *s ){ *(w32_RemoteStorageDeletePublishedFileResult_t_116x *)d = *(const u64_RemoteStorageDeletePublishedFileResult_t_116x *)s; } }, + { 1312, 160, 416, 412, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserPublishedFilesResult_t_123 *)d = *(const u64_RemoteStorageEnumerateUserPublishedFilesResult_t_123 *)s; } }, + { 1312, 122, 416, 416, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserPublishedFilesResult_t_116x *)d = *(const u64_RemoteStorageEnumerateUserPublishedFilesResult_t_116x *)s; } }, + { 1313, 160, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageSubscribePublishedFileResult_t_123 *)d = *(const u64_RemoteStorageSubscribePublishedFileResult_t_123 *)s; } }, + { 1313, 122, 4, 4, []( void *d, const void *s ){ *(w32_RemoteStorageSubscribePublishedFileResult_t_116x *)d = *(const u64_RemoteStorageSubscribePublishedFileResult_t_116x *)s; } }, + { 1314, 160, 616, 612, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserSubscribedFilesResult_t_123 *)d = *(const u64_RemoteStorageEnumerateUserSubscribedFilesResult_t_123 *)s; } }, + { 1314, 122, 616, 616, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserSubscribedFilesResult_t_116x *)d = *(const u64_RemoteStorageEnumerateUserSubscribedFilesResult_t_116x *)s; } }, + { 1315, 160, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageUnsubscribePublishedFileResult_t_123 *)d = *(const u64_RemoteStorageUnsubscribePublishedFileResult_t_123 *)s; } }, + { 1315, 122, 4, 4, []( void *d, const void *s ){ *(w32_RemoteStorageUnsubscribePublishedFileResult_t_116x *)d = *(const u64_RemoteStorageUnsubscribePublishedFileResult_t_116x *)s; } }, + { 1316, 160, 24, 16, []( void *d, const void *s ){ *(w32_RemoteStorageUpdatePublishedFileResult_t_125 *)d = *(const u64_RemoteStorageUpdatePublishedFileResult_t_125 *)s; } }, + { 1316, 124, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageUpdatePublishedFileResult_t_123 *)d = *(const u64_RemoteStorageUpdatePublishedFileResult_t_123 *)s; } }, + { 1316, 122, 16, 16, []( void *d, const void *s ){ *(w32_RemoteStorageUpdatePublishedFileResult_t_116x *)d = *(const u64_RemoteStorageUpdatePublishedFileResult_t_116x *)s; } }, + { 1317, 160, 296, 288, []( void *d, const void *s ){ *(w32_RemoteStorageDownloadUGCResult_t_123 *)d = *(const u64_RemoteStorageDownloadUGCResult_t_123 *)s; } }, + { 1317, 122, 296, 296, []( void *d, const void *s ){ *(w32_RemoteStorageDownloadUGCResult_t_116x *)d = *(const u64_RemoteStorageDownloadUGCResult_t_116x *)s; } }, + { 1318, 160, 9760, 9748, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedFileDetailsResult_t_126 *)d = *(const u64_RemoteStorageGetPublishedFileDetailsResult_t_126 *)s; } }, + { 1318, 125, 9752, 9744, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedFileDetailsResult_t_123 *)d = *(const u64_RemoteStorageGetPublishedFileDetailsResult_t_123 *)s; } }, + { 1318, 122, 9752, 9752, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedFileDetailsResult_t_119x *)d = *(const u64_RemoteStorageGetPublishedFileDetailsResult_t_119x *)s; } }, + /*{ 1318, 119, 9752, 9752 },*/ + { 1318, 118, 9496, 9496, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedFileDetailsResult_t_118 *)d = *(const u64_RemoteStorageGetPublishedFileDetailsResult_t_118 *)s; } }, + { 1319, 160, 624, 620, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateWorkshopFilesResult_t_125 *)d = *(const u64_RemoteStorageEnumerateWorkshopFilesResult_t_125 *)s; } }, + { 1319, 124, 616, 612, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateWorkshopFilesResult_t_123 *)d = *(const u64_RemoteStorageEnumerateWorkshopFilesResult_t_123 *)s; } }, + { 1319, 122, 616, 616, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateWorkshopFilesResult_t_119 *)d = *(const u64_RemoteStorageEnumerateWorkshopFilesResult_t_119 *)s; } }, + { 1320, 160, 32, 28, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedItemVoteDetailsResult_t_123 *)d = *(const u64_RemoteStorageGetPublishedItemVoteDetailsResult_t_123 *)s; } }, + { 1320, 122, 32, 32, []( void *d, const void *s ){ *(w32_RemoteStorageGetPublishedItemVoteDetailsResult_t_119 *)d = *(const u64_RemoteStorageGetPublishedItemVoteDetailsResult_t_119 *)s; } }, + { 1324, 160, 16, 12, []( void *d, const void *s ){ *(w32_RemoteStorageUpdateUserPublishedItemVoteResult_t_123 *)d = *(const u64_RemoteStorageUpdateUserPublishedItemVoteResult_t_123 *)s; } }, + { 1324, 122, 16, 16, []( void *d, const void *s ){ *(w32_RemoteStorageUpdateUserPublishedItemVoteResult_t_119 *)d = *(const u64_RemoteStorageUpdateUserPublishedItemVoteResult_t_119 *)s; } }, + { 1325, 160, 24, 16, []( void *d, const void *s ){ *(w32_RemoteStorageUserVoteDetails_t_123 *)d = *(const u64_RemoteStorageUserVoteDetails_t_123 *)s; } }, + { 1325, 122, 24, 24, []( void *d, const void *s ){ *(w32_RemoteStorageUserVoteDetails_t_119 *)d = *(const u64_RemoteStorageUserVoteDetails_t_119 *)s; } }, + { 1326, 160, 416, 412, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_123 *)d = *(const u64_RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_123 *)s; } }, + { 1326, 122, 416, 416, []( void *d, const void *s ){ *(w32_RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_119 *)d = *(const u64_RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_119 *)s; } }, + { 1327, 160, 24, 16, []( void *d, const void *s ){ *(w32_RemoteStorageSetUserPublishedFileActionResult_t_123 *)d = *(const u64_RemoteStorageSetUserPublishedFileActionResult_t_123 *)s; } }, + { 1327, 122, 24, 24, []( void *d, const void *s ){ *(w32_RemoteStorageSetUserPublishedFileActionResult_t_119 *)d = *(const u64_RemoteStorageSetUserPublishedFileActionResult_t_119 *)s; } }, + { 1330, 160, 24, 20, []( void *d, const void *s ){ *(w32_RemoteStoragePublishedFileUpdated_t *)d = *(const u64_RemoteStoragePublishedFileUpdated_t *)s; } }, + { 2101, 160, 32, 24, []( void *d, const void *s ){ *(w32_HTTPRequestCompleted_t_132x *)d = *(const u64_HTTPRequestCompleted_t_132x *)s; } }, + { 2101, 132, 24, 20, []( void *d, const void *s ){ *(w32_HTTPRequestCompleted_t_123 *)d = *(const u64_HTTPRequestCompleted_t_123 *)s; } }, + { 2101, 122, 24, 24, []( void *d, const void *s ){ *(w32_HTTPRequestCompleted_t_115 *)d = *(const u64_HTTPRequestCompleted_t_115 *)s; } }, + { 2102, 160, 16, 12, []( void *d, const void *s ){ *(w32_HTTPRequestHeadersReceived_t_123 *)d = *(const u64_HTTPRequestHeadersReceived_t_123 *)s; } }, + { 2102, 122, 16, 16, []( void *d, const void *s ){ *(w32_HTTPRequestHeadersReceived_t_121x *)d = *(const u64_HTTPRequestHeadersReceived_t_121x *)s; } }, + { 2103, 160, 24, 20, []( void *d, const void *s ){ *(w32_HTTPRequestDataReceived_t_123 *)d = *(const u64_HTTPRequestDataReceived_t_123 *)s; } }, + { 2103, 122, 24, 24, []( void *d, const void *s ){ *(w32_HTTPRequestDataReceived_t_121x *)d = *(const u64_HTTPRequestDataReceived_t_121x *)s; } }, + { 2803, 160, 40, 32, []( void *d, const void *s ){ *(w32_SteamInputConfigurationLoaded_t *)d = *(const u64_SteamInputConfigurationLoaded_t *)s; } }, + { 2804, 160, 32, 24, []( void *d, const void *s ){ *(w32_SteamInputGamepadSlotChange_t *)d = *(const u64_SteamInputGamepadSlotChange_t *)s; } }, + { 3402, 160, 9792, 9776, []( void *d, const void *s ){ *(w32_SteamUGCRequestUGCDetailsResult_t_160 *)d = *(const u64_SteamUGCRequestUGCDetailsResult_t_160 *)s; } }, + { 3402, 159, 9784, 9768, []( void *d, const void *s ){ *(w32_SteamUGCRequestUGCDetailsResult_t_128x *)d = *(const u64_SteamUGCRequestUGCDetailsResult_t_128x *)s; } }, + { 3402, 129, 9776, 9764, []( void *d, const void *s ){ *(w32_SteamUGCRequestUGCDetailsResult_t_129 *)d = *(const u64_SteamUGCRequestUGCDetailsResult_t_129 *)s; } }, + { 3402, 128, 9768, 9760, []( void *d, const void *s ){ *(w32_SteamUGCRequestUGCDetailsResult_t_126 *)d = *(const u64_SteamUGCRequestUGCDetailsResult_t_126 *)s; } }, + { 3403, 160, 24, 16, []( void *d, const void *s ){ *(w32_CreateItemResult_t *)d = *(const u64_CreateItemResult_t *)s; } }, + { 3405, 160, 32, 28, []( void *d, const void *s ){ *(w32_ItemInstalled_t_160 *)d = *(const u64_ItemInstalled_t_160 *)s; } }, + { 3405, 159, 16, 12, []( void *d, const void *s ){ *(w32_ItemInstalled_t_130 *)d = *(const u64_ItemInstalled_t_130 *)s; } }, + { 3406, 160, 24, 16, []( void *d, const void *s ){ *(w32_DownloadItemResult_t *)d = *(const u64_DownloadItemResult_t *)s; } }, + { 3412, 160, 24, 20, []( void *d, const void *s ){ *(w32_AddUGCDependencyResult_t *)d = *(const u64_AddUGCDependencyResult_t *)s; } }, + { 3413, 160, 24, 20, []( void *d, const void *s ){ *(w32_RemoveUGCDependencyResult_t *)d = *(const u64_RemoveUGCDependencyResult_t *)s; } }, + { 3414, 160, 24, 16, []( void *d, const void *s ){ *(w32_AddAppDependencyResult_t *)d = *(const u64_AddAppDependencyResult_t *)s; } }, + { 3415, 160, 24, 16, []( void *d, const void *s ){ *(w32_RemoveAppDependencyResult_t *)d = *(const u64_RemoveAppDependencyResult_t *)s; } }, + { 3416, 160, 152, 148, []( void *d, const void *s ){ *(w32_GetAppDependenciesResult_t *)d = *(const u64_GetAppDependenciesResult_t *)s; } }, + { 3417, 160, 16, 12, []( void *d, const void *s ){ *(w32_DeleteItemResult_t *)d = *(const u64_DeleteItemResult_t *)s; } }, + { 4502, 160, 48, 52, []( void *d, const void *s ){ *(w32_HTML_NeedsPaint_t *)d = *(const u64_HTML_NeedsPaint_t *)s; } }, + { 4503, 160, 20, 32, []( void *d, const void *s ){ *(w32_HTML_StartRequest_t *)d = *(const u64_HTML_StartRequest_t *)s; } }, + { 4505, 160, 24, 36, []( void *d, const void *s ){ *(w32_HTML_URLChanged_t *)d = *(const u64_HTML_URLChanged_t *)s; } }, + { 4506, 160, 12, 20, []( void *d, const void *s ){ *(w32_HTML_FinishedRequest_t *)d = *(const u64_HTML_FinishedRequest_t *)s; } }, + { 4507, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_OpenLinkInNewTab_t *)d = *(const u64_HTML_OpenLinkInNewTab_t *)s; } }, + { 4508, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_ChangedTitle_t *)d = *(const u64_HTML_ChangedTitle_t *)s; } }, + { 4513, 160, 20, 24, []( void *d, const void *s ){ *(w32_HTML_LinkAtPosition_t *)d = *(const u64_HTML_LinkAtPosition_t *)s; } }, + { 4514, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_JSAlert_t *)d = *(const u64_HTML_JSAlert_t *)s; } }, + { 4515, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_JSConfirm_t *)d = *(const u64_HTML_JSConfirm_t *)s; } }, + { 4516, 160, 12, 20, []( void *d, const void *s ){ *(w32_HTML_FileOpenDialog_t *)d = *(const u64_HTML_FileOpenDialog_t *)s; } }, + { 4517, 132, 16, 20, []( void *d, const void *s ){ *(w32_HTML_ComboNeedsPaint_t *)d = *(const u64_HTML_ComboNeedsPaint_t *)s; } }, + { 4521, 160, 28, 32, []( void *d, const void *s ){ *(w32_HTML_NewWindow_t_132x *)d = *(const u64_HTML_NewWindow_t_132x *)s; } }, + { 4521, 132, 24, 28, []( void *d, const void *s ){ *(w32_HTML_NewWindow_t_130x *)d = *(const u64_HTML_NewWindow_t_130x *)s; } }, + { 4523, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_StatusText_t *)d = *(const u64_HTML_StatusText_t *)s; } }, + { 4524, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_ShowToolTip_t *)d = *(const u64_HTML_ShowToolTip_t *)s; } }, + { 4525, 160, 8, 12, []( void *d, const void *s ){ *(w32_HTML_UpdateToolTip_t *)d = *(const u64_HTML_UpdateToolTip_t *)s; } }, + { 4704, 160, 24, 20, []( void *d, const void *s ){ *(w32_SteamInventoryStartPurchaseResult_t *)d = *(const u64_SteamInventoryStartPurchaseResult_t *)s; } }, + { 5211, 160, 16, 12, []( void *d, const void *s ){ *(w32_RequestPlayersForGameProgressCallback_t *)d = *(const u64_RequestPlayersForGameProgressCallback_t *)s; } }, + { 5212, 160, 64, 56, []( void *d, const void *s ){ *(w32_RequestPlayersForGameResultCallback_t *)d = *(const u64_RequestPlayersForGameResultCallback_t *)s; } }, + { 5213, 160, 24, 20, []( void *d, const void *s ){ *(w32_RequestPlayersForGameFinalResultCallback_t *)d = *(const u64_RequestPlayersForGameFinalResultCallback_t *)s; } }, + { 5214, 160, 24, 20, []( void *d, const void *s ){ *(w32_SubmitPlayerResultResultCallback_t *)d = *(const u64_SubmitPlayerResultResultCallback_t *)s; } }, + { 5215, 160, 16, 12, []( void *d, const void *s ){ *(w32_EndGameResultCallback_t *)d = *(const u64_EndGameResultCallback_t *)s; } }, + { 5301, 160, 280, 276, []( void *d, const void *s ){ *(w32_JoinPartyCallback_t *)d = *(const u64_JoinPartyCallback_t *)s; } }, + { 5302, 160, 16, 12, []( void *d, const void *s ){ *(w32_CreateBeaconCallback_t *)d = *(const u64_CreateBeaconCallback_t *)s; } }, +}; const struct callback_def callback_data[] = { { 152, 162, 24, 16, []( void *d, const void *s ){ *(w64_MicroTxnAuthorizationResponse_t_123 *)d = *(const u64_MicroTxnAuthorizationResponse_t_123 *)s; } }, @@ -21722,4 +21833,5 @@ const struct callback_def callback_data[] = { 5302, 162, 16, 12, []( void *d, const void *s ){ *(w64_CreateBeaconCallback_t *)d = *(const u64_CreateBeaconCallback_t *)s; } }, }; #endif +const unsigned int wow64_callback_data_size = ARRAY_SIZE(wow64_callback_data); const unsigned int callback_data_size = ARRAY_SIZE(callback_data);