IAuth: add GetMuchaAuthResponse values
This commit is contained in:
parent
59732daf89
commit
0fb6b0924e
@ -15,6 +15,7 @@ void iauth_set_config(struct amcus_config *cfg)
|
||||
}
|
||||
|
||||
static ULONG REF_COUNT = 0;
|
||||
static bool is_init = true;
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_QueryInterface(IAuth FAR *This, REFIID riid, void **ppvObj)
|
||||
{
|
||||
@ -48,14 +49,20 @@ static ULONG STDMETHODCALLTYPE IAuth_Release(IAuth FAR *This)
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Initialize(IAuth FAR *This, int64_t p0)
|
||||
{
|
||||
dprintf("IAuth: %s hit! p0 %I64d\n", __func__, p0);
|
||||
|
||||
if (is_init) {
|
||||
return 1;
|
||||
}
|
||||
is_init = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Finalize(IAuth FAR *This)
|
||||
{
|
||||
dprintf("IAuth: %s hit!\n", __func__);
|
||||
|
||||
if (!is_init) {
|
||||
return 1;
|
||||
}
|
||||
is_init = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -90,7 +97,10 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func8(IAuth FAR *This)
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct amcus_updater_state *arr)
|
||||
{
|
||||
// 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));
|
||||
@ -103,7 +113,6 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct a
|
||||
ver_btm %= (ver_top * 100);
|
||||
}
|
||||
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
arr->Member0.Member0 = 15;
|
||||
arr->Member0.Member4 = 0;
|
||||
arr->Member0.Member8 = 2;
|
||||
@ -160,6 +169,9 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetCabinetConfig(IAuth FAR *This, struct
|
||||
// dprintf("IAuth: %s hit!\n", __func__);
|
||||
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
char am_serial[12];
|
||||
char dongle_serial[13];
|
||||
|
||||
@ -188,6 +200,9 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetVersionInfo(IAuth FAR *This, struct am
|
||||
//dprintf("IAuth: %s hit!\n", __func__);
|
||||
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
|
||||
char game_id[5];
|
||||
char am_ver[6];
|
||||
@ -231,6 +246,10 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetAuthServerResp(IAuth FAR *This, struct
|
||||
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
|
||||
char uri[257];
|
||||
char host[257];
|
||||
|
||||
@ -276,10 +295,42 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func17(IAuth FAR *This)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// Another struct
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_GetMuchaAuthResponse(IAuth FAR *This, struct mucha_boardauth_resp *arr)
|
||||
{
|
||||
// dprintf("IAuth: %s hit!\n", __func__);
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
|
||||
strcpy_s(arr->shop_name, sizeof(arr->shop_name), "Test Shop!");
|
||||
strcpy_s(arr->shop_name_en, sizeof(arr->shop_name_en), "Test Shop!");
|
||||
strcpy_s(arr->shop_nickname, sizeof(arr->shop_nickname), "Test Shop");
|
||||
strcpy_s(arr->shop_nickname_en, sizeof(arr->shop_nickname_en), "Test Shop");
|
||||
strcpy_s(arr->place_id, sizeof(arr->place_id), "JPN123");
|
||||
strcpy_s(arr->country_cd, sizeof(arr->country_cd), "JPN");
|
||||
|
||||
strcpy_s(arr->area0, sizeof(arr->area0), "008");
|
||||
strcpy_s(arr->area0_en, sizeof(arr->area0_en), "008");
|
||||
strcpy_s(arr->area1, sizeof(arr->area1), "009");
|
||||
strcpy_s(arr->area1_en, sizeof(arr->area1_en), "009");
|
||||
strcpy_s(arr->area2, sizeof(arr->area2), "010");
|
||||
strcpy_s(arr->area2_en, sizeof(arr->area2_en), "010");
|
||||
strcpy_s(arr->area3, sizeof(arr->area3), "011");
|
||||
strcpy_s(arr->area3_en, sizeof(arr->area3_en), "011");
|
||||
|
||||
strcpy_s(arr->prefecture_id, sizeof(arr->prefecture_id), "1");
|
||||
strcpy_s(arr->expiration_date, sizeof(arr->expiration_date), "null");
|
||||
strcpy_s(arr->consume_token, sizeof(arr->consume_token), "0");
|
||||
strcpy_s(arr->force_boot, sizeof(arr->force_boot), "0");
|
||||
strcpy_s(arr->use_token, sizeof(arr->use_token), "0");
|
||||
strcpy_s(arr->dongle_flag, sizeof(arr->dongle_flag), "1");
|
||||
|
||||
strcpy_s(arr->url_charge, sizeof(arr->url_charge), "https://localhost/charge/");
|
||||
strcpy_s(arr->url_file, sizeof(arr->url_file), "https://localhost/file/");
|
||||
strcpy_s(arr->url_url1, sizeof(arr->url_url1), "https://localhost/url1/");
|
||||
strcpy_s(arr->url_url2, sizeof(arr->url_url2), "https://localhost/url2/");
|
||||
strcpy_s(arr->url_url3, sizeof(arr->url_url3), "https://localhost/url3/");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@ -289,8 +340,10 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func19(IAuth FAR *This, struct amcus_arr1
|
||||
{
|
||||
// dprintf("IAuth: %s hit!\n", __func__);
|
||||
memset(arr, 0, sizeof(*arr));
|
||||
|
||||
arr->Member0 = 0; // if this isn't 1 taiko thinks it isn't auth'd
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
arr->Member0 = 1; // if this isn't 1 taiko thinks it isn't auth'd
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -322,8 +375,10 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func22(IAuth FAR *This)
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Func23(IAuth FAR *This, int64_t p0)
|
||||
{
|
||||
dprintf("IAuth: %s hit! %I64d\n", __func__, p0);
|
||||
|
||||
return E_ACCESSDENIED;
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// more dtmode stuff
|
||||
@ -378,7 +433,9 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func29(IAuth FAR *This)
|
||||
static HRESULT STDMETHODCALLTYPE IAuth_Func30(IAuth FAR *This)
|
||||
{
|
||||
dprintf("IAuth: %s hit!\n", __func__);
|
||||
|
||||
if (!is_init) {
|
||||
return E_ACCESSDENIED;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,7 @@ struct mucha_boardauth_resp {
|
||||
/* Offset: 512 */ char url_url1[256];
|
||||
/* Offset: 768 */ char url_url2[256];
|
||||
/* Offset: 1024 */ char url_url3[256];
|
||||
|
||||
/* Offset: 1280 */ char place_id[16];
|
||||
/* Offset: 1296 */ char country_cd[16];
|
||||
/* Offset: 1312 */ char shop_name[256];
|
||||
@ -119,6 +120,7 @@ struct mucha_boardauth_resp {
|
||||
/* Offset: 2208 */ char area_full1[256];
|
||||
/* Offset: 2464 */ char area_full2[256];
|
||||
/* Offset: 2720 */ char area_full3[256];
|
||||
|
||||
/* Offset: 2976 */ char shop_name_en[64];
|
||||
/* Offset: 3040 */ char shop_nickname_en[32];
|
||||
/* Offset: 3072 */ char area0_en[32];
|
||||
@ -129,6 +131,7 @@ struct mucha_boardauth_resp {
|
||||
/* Offset: 3328 */ char area_full1_en[128];
|
||||
/* Offset: 3456 */ char area_full2_en[128];
|
||||
/* Offset: 3584 */ char area_full3_en[128];
|
||||
|
||||
/* Offset: 3712 */ char prefecture_id[16];
|
||||
/* Offset: 3728 */ char expiration_date[16];
|
||||
/* Offset: 3744 */ char use_token[16];
|
||||
|
Loading…
Reference in New Issue
Block a user