start mapping amauthd_state
This commit is contained in:
parent
0fb6b0924e
commit
86e984b6d7
@ -8,7 +8,7 @@
|
||||
|
||||
#include "util/dprintf.h"
|
||||
static struct amcus_config config;
|
||||
|
||||
// 16 0 5 6 9
|
||||
void iauth_set_config(struct amcus_config *cfg)
|
||||
{
|
||||
memcpy(&config, cfg, sizeof(*cfg));
|
||||
@ -16,6 +16,7 @@ void iauth_set_config(struct amcus_config *cfg)
|
||||
|
||||
static ULONG REF_COUNT = 0;
|
||||
static bool is_init = true;
|
||||
static int amauthd_state = 9;
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_QueryInterface(IAuth FAR *This, REFIID riid, void **ppvObj)
|
||||
{
|
||||
@ -36,13 +37,13 @@ static HRESULT STDMETHODCALLTYPE IAuth_QueryInterface(IAuth FAR *This, REFIID ri
|
||||
|
||||
static ULONG STDMETHODCALLTYPE IAuth_AddRef(IAuth FAR *This)
|
||||
{
|
||||
// dprintf("IAuth: AddRef\n");
|
||||
dprintf("IAuth: AddRef\n");
|
||||
return ++REF_COUNT;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE IAuth_Release(IAuth FAR *This)
|
||||
{
|
||||
// dprintf("IAuth: Release\n");
|
||||
dprintf("IAuth: Release\n");
|
||||
return --REF_COUNT;
|
||||
}
|
||||
|
||||
@ -53,6 +54,7 @@ static HRESULT STDMETHODCALLTYPE IAuth_Initialize(IAuth FAR *This, int64_t p0)
|
||||
return 1;
|
||||
}
|
||||
is_init = true;
|
||||
amauthd_state = 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -63,6 +65,7 @@ static HRESULT STDMETHODCALLTYPE IAuth_Finalize(IAuth FAR *This)
|
||||
return 1;
|
||||
}
|
||||
is_init = false;
|
||||
amauthd_state = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -98,10 +101,7 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct a
|
||||
{
|
||||
// dprintf("IAuth: %s hit!\n", __func__);
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
// these work with taiko, pokken never hits this
|
||||
|
||||
char cacfg_ver[6];
|
||||
wcstombs_s(NULL, cacfg_ver, sizeof(cacfg_ver), config.cacfg_game_ver, sizeof(config.cacfg_game_ver));
|
||||
|
||||
@ -114,13 +114,10 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct a
|
||||
}
|
||||
|
||||
arr->Member0.Member0 = 15;
|
||||
arr->Member0.Member4 = 0;
|
||||
arr->Member0.Member8 = 2;
|
||||
arr->Member0.MemberC = 1;
|
||||
arr->Member0.Member10 = 0;
|
||||
|
||||
arr->Member18.Member0 = 9;
|
||||
arr->Member18.Member4 = 0;
|
||||
arr->Member18.Member8 = 2;
|
||||
arr->Member18.MemberC = 1;
|
||||
arr->Member18.Member10 = 27;
|
||||
@ -132,34 +129,20 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct a
|
||||
arr->Member18.cacfg_ver_decimal = ver_btm;
|
||||
arr->Member18.app_ver_whole = ver_top;
|
||||
arr->Member18.app_ver_decimal = ver_btm;
|
||||
arr->Member18.Member2C = 0;
|
||||
arr->Member18.Member2E = 0;
|
||||
arr->Member18.Member30 = 0;
|
||||
arr->Member18.Member34 = 0;
|
||||
arr->Member18.Member38 = 0;
|
||||
arr->Member18.Member40 = 0;
|
||||
arr->Member18.Member48 = 0;
|
||||
arr->Member18.Member50 = 0;
|
||||
arr->Member18.Member58 = 0;
|
||||
arr->Member18.Member60 = 1;
|
||||
arr->Member18.Member64 = 0;
|
||||
arr->Member18.Member68 = 0;
|
||||
arr->Member18.Member6C = 0;
|
||||
arr->Member18.Member70 = 0;
|
||||
arr->Member18.Member74 = 0;
|
||||
arr->Member18.Member78 = 0;
|
||||
arr->Member18.Member7C = 0;
|
||||
arr->Member18.Member80 = 0;
|
||||
arr->Member18.Member84 = 0;
|
||||
arr->Member18.Member88 = 0;
|
||||
|
||||
arr->MemberA8 = 1;
|
||||
arr->MemberB0 = 0;
|
||||
arr->MemberB8 = 1;
|
||||
arr->MemberBC = 3;
|
||||
arr->MemberC0 = 9;
|
||||
arr->clock_status = 1;
|
||||
arr->network_mode = 1;
|
||||
arr->cab_type = 3;
|
||||
arr->amauth_init_state = amauthd_state;
|
||||
arr->MemberC4 = 0;
|
||||
|
||||
if (amauthd_state == 5) {
|
||||
amauthd_state = 6;
|
||||
} else if (amauthd_state == 6) {
|
||||
amauthd_state = 9;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -363,7 +346,6 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func21(IAuth FAR *This)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// similar to 18 but different...
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Func22(IAuth FAR *This)
|
||||
{
|
||||
dprintf("IAuth: %s hit!\n", __func__);
|
||||
@ -371,7 +353,7 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func22(IAuth FAR *This)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// similar to 18 but different...
|
||||
// Called after 30, p0 usually 0
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Func23(IAuth FAR *This, int64_t p0)
|
||||
{
|
||||
dprintf("IAuth: %s hit! %I64d\n", __func__, p0);
|
||||
@ -429,7 +411,7 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func29(IAuth FAR *This)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// no clue
|
||||
// Called before 23, function unknown
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Func30(IAuth FAR *This)
|
||||
{
|
||||
dprintf("IAuth: %s hit!\n", __func__);
|
||||
|
@ -60,11 +60,11 @@ struct Struct_2 {
|
||||
struct amcus_updater_state {
|
||||
/* Offset: 0 */ struct Struct_1 Member0;
|
||||
/* Offset: 24 */ struct Struct_2 Member18;
|
||||
/* Offset: 168 */ int64_t MemberA8;
|
||||
/* Offset: 176 */ int64_t MemberB0;
|
||||
/* Offset: 184 */ /* ENUM32 */ uint32_t MemberB8;
|
||||
/* Offset: 188 */ /* ENUM32 */ uint32_t MemberBC;
|
||||
/* Offset: 192 */ /* ENUM32 */ uint32_t MemberC0;
|
||||
/* Offset: 168 */ int64_t clock_status;
|
||||
/* Offset: 176 */ int64_t name_resolution_timeout;
|
||||
/* Offset: 184 */ /* ENUM32 */ uint32_t network_mode;
|
||||
/* Offset: 188 */ /* ENUM32 */ uint32_t cab_type;
|
||||
/* Offset: 192 */ /* ENUM32 */ uint32_t amauth_init_state;
|
||||
/* Offset: 196 */ /* ENUM32 */ uint32_t MemberC4;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user