1
0
mirror of synced 2024-11-15 07:17:35 +01:00

APM3 emulator improvements

- Improved API emulation accuracy
- Now works on tested x86 titles
- Added Umihara Kawase Fresh! For AC
This commit is contained in:
Reaver 2021-08-27 00:22:50 +03:00
parent 1bb24c34d1
commit 2d33a8ba45
12 changed files with 482 additions and 332 deletions

View File

@ -1,7 +1,6 @@
#include <Utility/InitFunction.h>
#include <StdInc.h>
#include <thread>
#ifdef _M_AMD64
#include "Functions\Global.h"
#include "APM3.h"
#include "Aime.h"
@ -9,9 +8,16 @@
#include "Auth.h"
#include "Sequence.h"
static uint8_t g_APM3IOValues[256];
// TO MAXIMIZE COMPATBILITY IN FUTURE, FEEL FREE TO USE JUST __fastcall
#ifdef _M_IX86
#define CALLPLEB __stdcall
#else
#define CALLPLEB __fastcall
#endif
bool __fastcall ApmSystemSetting_getAdvertizeSound(bool *enable)
static uint8_t g_APM3IOValues[256];
#define _LOGAPM3 1
bool CALLPLEB ApmSystemSetting_getAdvertizeSound(bool *enable)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getAdvertizeSound");
@ -20,7 +26,7 @@ bool __fastcall ApmSystemSetting_getAdvertizeSound(bool *enable)
return ApmSystemSetting_getAdvertizeSoundReturnValue;
}
bool __fastcall ApmSystemSetting_getClosingTimes(__int64 *closingTimes)
bool CALLPLEB ApmSystemSetting_getClosingTimes(DWORD_PTR*closingTimes)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getClosingTimes");
@ -29,7 +35,7 @@ bool __fastcall ApmSystemSetting_getClosingTimes(__int64 *closingTimes)
return ApmSystemSetting_getClosingTimesReturnValue;
}
char __fastcall ApmSystemSetting_getEmoneySetting(__int64 a1)
char CALLPLEB ApmSystemSetting_getEmoneySetting(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getEmoneySetting");
@ -37,7 +43,7 @@ char __fastcall ApmSystemSetting_getEmoneySetting(__int64 a1)
return ApmSystemSetting_getEmoneySettingReturnValue;
}
bool __fastcall ApmSystemSetting_getFixedTitle(bool *enable)
bool CALLPLEB ApmSystemSetting_getFixedTitle(bool *enable)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getFixedTitle");
@ -46,7 +52,7 @@ bool __fastcall ApmSystemSetting_getFixedTitle(bool *enable)
return ApmSystemSetting_getFixedTitleReturnValue;
}
char __fastcall ApmSystemSetting_getGamePadSetting(WORD* a1)
char CALLPLEB ApmSystemSetting_getGamePadSetting(WORD* a1)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getGamePadSetting");
@ -60,7 +66,7 @@ struct MatchingGroup
char number[1];
};
bool __fastcall ApmSystemSetting_getMatchingGroup(MatchingGroup* matchingGroup)
bool CALLPLEB ApmSystemSetting_getMatchingGroup(MatchingGroup* matchingGroup)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getMatchingGroup");
@ -68,7 +74,7 @@ bool __fastcall ApmSystemSetting_getMatchingGroup(MatchingGroup* matchingGroup)
return ApmSystemSetting_getMatchingGroupReturnValue;
}
bool __fastcall ApmSystemSetting_getTimeToClosingTime(unsigned int* seconds)
bool CALLPLEB ApmSystemSetting_getTimeToClosingTime(unsigned int* seconds)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getTimeToClosingTime");
@ -77,7 +83,7 @@ bool __fastcall ApmSystemSetting_getTimeToClosingTime(unsigned int* seconds)
return ApmSystemSetting_getTimeToClosingTimeReturnValue;
}
char __fastcall ApmSystemSetting_getUiSetting(__int64 a1)
char CALLPLEB ApmSystemSetting_getUiSetting(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "ApmSystemSetting_getUiSetting");
@ -85,14 +91,14 @@ char __fastcall ApmSystemSetting_getUiSetting(__int64 a1)
return ApmSystemSetting_getUiSettingReturnValue;
}
void Core_execute()
void CALLPLEB Core_execute()
{
#ifdef _LOGAPM3
info(true, "Core_execute");
#endif
}
bool __fastcall Core_exitGame(bool isTest)
bool CALLPLEB Core_exitGame(bool isTest)
{
#ifdef _LOGAPM3
info(true, "Core_exitGame");
@ -100,7 +106,7 @@ bool __fastcall Core_exitGame(bool isTest)
return Core_exitGameReturnValue;
}
__int64 Core_hookException()
DWORD_PTR CALLPLEB Core_hookException()
{
#ifdef _LOGAPM3
info(true, "Core_hookException");
@ -108,7 +114,7 @@ __int64 Core_hookException()
return Core_hookExceptionReturnValue;
}
bool Core_isExitNeeded()
bool CALLPLEB Core_isExitNeeded()
{
#ifdef _LOGAPM3
info(true, "Core_isExitNeeded");
@ -116,14 +122,14 @@ bool Core_isExitNeeded()
return Core_isExitNeededReturnValue;
}
void Core_resetCount()
void CALLPLEB Core_resetCount()
{
#ifdef _LOGAPM3
info(true, "Core_resetCount");
#endif
}
__int64 Core_resetException()
DWORD_PTR CALLPLEB Core_resetException()
{
#ifdef _LOGAPM3
info(true, "Core_resetException");
@ -131,7 +137,7 @@ __int64 Core_resetException()
return Core_resetExceptionReturnValue;
}
__int64 Credit_getAddableCoin()
DWORD_PTR CALLPLEB Credit_getAddableCoin()
{
#ifdef _LOGAPM3
info(true, "Credit_getAddableCoin");
@ -139,7 +145,7 @@ __int64 Credit_getAddableCoin()
return Credit_getAddableCoinReturnValue;
}
__int64 Credit_getCoinMultipliers()
DWORD_PTR CALLPLEB Credit_getCoinMultipliers()
{
#ifdef _LOGAPM3
info(true, "Credit_getCoinMultipliers");
@ -147,7 +153,7 @@ __int64 Credit_getCoinMultipliers()
return Credit_getCoinMultipliersReturnValue;
}
__int64 Credit_getCoinToCredit()
DWORD_PTR CALLPLEB Credit_getCoinToCredit()
{
#ifdef _LOGAPM3
info(true, "Credit_getCoinToCredit");
@ -155,7 +161,7 @@ __int64 Credit_getCoinToCredit()
return Credit_getCoinToCreditReturnValue;
}
__int64 Credit_getCredit()
DWORD_PTR CALLPLEB Credit_getCredit()
{
#ifdef _LOGAPM3
info(true, "Credit_getCredit");
@ -163,7 +169,7 @@ __int64 Credit_getCredit()
return Credit_getCreditReturnValue;
}
__int64 Credit_getRemain()
DWORD_PTR CALLPLEB Credit_getRemain()
{
#ifdef _LOGAPM3
info(true, "Credit_getRemain");
@ -171,7 +177,7 @@ __int64 Credit_getRemain()
return Credit_getRemainReturnValue;
}
__int64 Credit_isFreePlay()
DWORD_PTR CALLPLEB Credit_isFreePlay()
{
#ifdef _LOGAPM3
info(true, "Credit_isFreePlay");
@ -179,7 +185,7 @@ __int64 Credit_isFreePlay()
return Credit_isFreePlayReturnValue;
}
__int64 __fastcall Credit_isGameCostEnough(__int64 a1)
DWORD_PTR CALLPLEB Credit_isGameCostEnough(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "Credit_isGameCostEnough");
@ -187,7 +193,7 @@ __int64 __fastcall Credit_isGameCostEnough(__int64 a1)
return Credit_isGameCostEnoughReturnValue; // 1
}
__int64 Credit_isZero()
DWORD_PTR Credit_isZero()
{
#ifdef _LOGAPM3
info(true, "Credit_isZero");
@ -195,7 +201,7 @@ __int64 Credit_isZero()
return Credit_isZeroReturnValue;
}
__int64 __fastcall Credit_payGameCost(__int64 a1)
DWORD_PTR CALLPLEB Credit_payGameCost(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "Credit_payGameCost");
@ -203,7 +209,7 @@ __int64 __fastcall Credit_payGameCost(__int64 a1)
return Credit_payGameCostReturnValue;
}
__int64 Credit_resetCoinInHook()
DWORD_PTR CALLPLEB Credit_resetCoinInHook()
{
#ifdef _LOGAPM3
info(true, "Credit_resetCoinInHook");
@ -212,7 +218,7 @@ __int64 Credit_resetCoinInHook()
return Credit_resetCoinInHookReturnValue;
}
__int64 Credit_setCoinInHook()
DWORD_PTR CALLPLEB Credit_setCoinInHook(int a1)
{
#ifdef _LOGAPM3
info(true, "Credit_setCoinInHook");
@ -232,14 +238,14 @@ wchar_t* Credit_toString()
return lol;
}
void Emoney_close()
void CALLPLEB Emoney_close()
{
#ifdef _LOGAPM3
info(true, "Emoney_close");
#endif
}
__int64 Emoney_isOpenMainWindow()
DWORD_PTR CALLPLEB Emoney_isOpenMainWindow()
{
#ifdef _LOGAPM3
info(true, "Emoney_isOpenMainWindow");
@ -247,7 +253,7 @@ __int64 Emoney_isOpenMainWindow()
return Emoney_isOpenMainWindowReturnValue;
}
char Emoney_launch()
char CALLPLEB Emoney_launch()
{
#ifdef _LOGAPM3
info(true, "Emoney_launch");
@ -255,21 +261,21 @@ char Emoney_launch()
return Emoney_launchReturnValue;
}
void __fastcall Emoney_setSoundHook(__int64 a1)
void CALLPLEB Emoney_setSoundHook(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "Emoney_setSoundHook");
#endif
}
void __fastcall Emoney_update(BYTE* a1)
void CALLPLEB Emoney_update(BYTE* a1)
{
#ifdef _LOGAPM3
info(true, "Emoney_update");
#endif
}
__int64 Error_isOccurred()
DWORD_PTR CALLPLEB Error_isOccurred()
{
#ifdef _LOGAPM3
info(true, "Error_isOccurred");
@ -277,7 +283,7 @@ __int64 Error_isOccurred()
return Error_isOccurredReturnValue;
}
__int64 Error_setDeviceLost()
DWORD_PTR CALLPLEB Error_setDeviceLost()
{
#ifdef _LOGAPM3
info(true, "Error_setDeviceLost");
@ -292,7 +298,7 @@ struct GamepadInfo
char name[260];
};
GamepadInfo* Input_getGamepadInfo()
GamepadInfo* CALLPLEB Input_getGamepadInfo()
{
#ifdef _LOGAPM3
info(true, "Input_getGamepadInfo");
@ -310,7 +316,7 @@ GamepadInfo* Input_getGamepadInfo()
return _gamePad;
}
char __fastcall Input_isFlipNow(unsigned int a1)
char CALLPLEB Input_isFlipNow(unsigned int a1)
{
#ifdef _LOGAPM3
info(true, "Input_isFlipNow");
@ -318,7 +324,7 @@ char __fastcall Input_isFlipNow(unsigned int a1)
return Input_isFlipNowReturnValue;
}
__int64 Input_isGamepadDetect()
DWORD_PTR CALLPLEB Input_isGamepadDetect()
{
#ifdef _LOGAPM3
info(true, "Input_isGamepadDetect");
@ -326,7 +332,7 @@ __int64 Input_isGamepadDetect()
return Input_isGamepadDetectReturnValue;
}
char __fastcall Input_isOffNow(unsigned int a1)
char CALLPLEB Input_isOffNow(unsigned int a1)
{
#ifdef _LOGAPM3
info(true, "Input_isOffNow");
@ -334,7 +340,7 @@ char __fastcall Input_isOffNow(unsigned int a1)
return Input_isOffNowReturnValue;
}
int __fastcall Input_isOn(unsigned int buttonId)
int CALLPLEB Input_isOn(unsigned int buttonId)
{
#ifdef _LOGAPM3
info(true, "Input_isOn id: %u", buttonId);
@ -342,7 +348,7 @@ int __fastcall Input_isOn(unsigned int buttonId)
return g_APM3IOValues[buttonId];
}
char __fastcall Input_isOnNow(unsigned int buttonId)
char CALLPLEB Input_isOnNow(unsigned int buttonId)
{
#ifdef _LOGAPM3
info(true, "Input_isOnNow id: %u", buttonId);
@ -350,7 +356,7 @@ char __fastcall Input_isOnNow(unsigned int buttonId)
return g_APM3IOValues[buttonId];
}
__int64 Input_isOpenPewviewWindow()
DWORD_PTR CALLPLEB Input_isOpenPewviewWindow()
{
#ifdef _LOGAPM3
info(true, "Input_isOpenPewviewWindow");
@ -358,7 +364,7 @@ __int64 Input_isOpenPewviewWindow()
return Input_isOpenPewviewWindowReturnValue;
}
char __fastcall Input_setGamepadConfig(__int64 a1)
char CALLPLEB Input_setGamepadConfig(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "Input_setGamepadConfig");
@ -366,7 +372,7 @@ char __fastcall Input_setGamepadConfig(__int64 a1)
return Input_setGamepadConfigReturnValue;
}
char* NetworkProperty_getAddressString()
char* CALLPLEB NetworkProperty_getAddressString()
{
#ifdef _DEBUG
info(true, "NetworkProperty_getAddressString");
@ -374,7 +380,7 @@ char* NetworkProperty_getAddressString()
return NetworkProperty_getAddressStringReturnValue;
}
__int64 NetworkProperty_getAddressValue()
DWORD_PTR CALLPLEB NetworkProperty_getAddressValue()
{
#ifdef _DEBUG
info(true, "NetworkProperty_getAddressValue");
@ -382,7 +388,7 @@ __int64 NetworkProperty_getAddressValue()
return NetworkProperty_getAddressValueReturnValue;
}
__int64 System_getAppRootPath()
DWORD_PTR CALLPLEB System_getAppRootPath()
{
#ifdef _LOGAPM3
info(true, "System_getAppRootPath");
@ -484,7 +490,7 @@ SystemRegionCode System_getRegionCode()
return SystemRegionCode::Japan;
}
__int64 System_getResolution()
DWORD_PTR System_getResolution()
{
#ifdef _LOGAPM3
info(true, "System_getResolution");
@ -492,7 +498,7 @@ __int64 System_getResolution()
return System_getResolutionReturnValue;
}
__int64 System_isDevelop()
DWORD_PTR System_isDevelop()
{
#ifdef _LOGAPM3
info(true, "System_isDevelop");
@ -500,7 +506,7 @@ __int64 System_isDevelop()
return System_isDevelopReturnValue;
}
char __fastcall apmGamepadConfig(__int64 a1)
char CALLPLEB apmGamepadConfig(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "apmGamepadConfig");
@ -508,7 +514,7 @@ char __fastcall apmGamepadConfig(__int64 a1)
return apmGamepadConfigReturnValue;
}
char __fastcall apmGamepadGetApmInput(DWORD* a1)
char CALLPLEB apmGamepadGetApmInput(DWORD* a1)
{
#ifdef _LOGAPM3
info(true, "apmGamepadGetApmInput");
@ -517,16 +523,16 @@ char __fastcall apmGamepadGetApmInput(DWORD* a1)
}
//__int128* apmGamepadGetConfig()
__int64* apmGamepadGetConfig()
DWORD_PTR* apmGamepadGetConfig()
{
#ifdef _LOGAPM3
info(true, "apmGamepadGetConfig");
#endif
static __int64 dumb = 0;
static DWORD_PTR dumb = 0;
return &dumb;
}
char __fastcall apmGamepadGetDeviceCaps(__int64 a1)
char CALLPLEB apmGamepadGetDeviceCaps(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "apmGamepadGetDeviceCaps");
@ -534,8 +540,8 @@ char __fastcall apmGamepadGetDeviceCaps(__int64 a1)
return apmGamepadGetDeviceCapsReturnValue;
}
//errno_t __fastcall apmGamepadGetInfo(__int64 a1)
__int64 __fastcall apmGamepadGetInfo(__int64 a1)
//errno_t CALLPLEB apmGamepadGetInfo(__int64 a1)
DWORD_PTR CALLPLEB apmGamepadGetInfo(DWORD_PTR a1)
{
#ifdef _LOGAPM3
info(true, "apmGamepadGetInfo");
@ -543,8 +549,8 @@ __int64 __fastcall apmGamepadGetInfo(__int64 a1)
return apmGamepadGetInfoReturnValue;
}
//char __fastcall apmGamepadGetRawInput(_QWORD* a1)
char __fastcall apmGamepadGetRawInput(__int64* a1)
//char CALLPLEB apmGamepadGetRawInput(_QWORD* a1)
char CALLPLEB apmGamepadGetRawInput(DWORD_PTR* a1)
{
#ifdef _LOGAPM3
info(true, "apmGamepadGetRawInput");
@ -552,7 +558,7 @@ char __fastcall apmGamepadGetRawInput(__int64* a1)
return apmGamepadGetRawInputReturnValue;
}
__int64 apmGamepadInitConfig()
DWORD_PTR CALLPLEB apmGamepadInitConfig()
{
#ifdef _LOGAPM3
info(true, "apmGamepadInitConfig");
@ -560,7 +566,7 @@ __int64 apmGamepadInitConfig()
return apmGamepadInitConfigReturnValue;
}
char apmGamepadIsDetected()
char CALLPLEB apmGamepadIsDetected()
{
#ifdef _LOGAPM3
info(true, "apmGamepadIsDetected");
@ -568,7 +574,7 @@ char apmGamepadIsDetected()
return apmGamepadIsDetectedReturnValue;
}
__int64 apmGamepadIsXInputDevice()
DWORD_PTR CALLPLEB apmGamepadIsXInputDevice()
{
#ifdef _LOGAPM3
info(true, "apmGamepadIsXInputDevice");
@ -576,7 +582,7 @@ __int64 apmGamepadIsXInputDevice()
return apmGamepadIsXInputDeviceReturnValue;
}
int apmGamepadUpdate()
int CALLPLEB apmGamepadUpdate()
{
#ifdef _LOGAPM3
info(true, "apmGamepadUpdate");
@ -594,112 +600,224 @@ static void HookAPM3()
Credit_isGameCostEnoughReturnValue = 1;
MH_Initialize();
MH_CreateHookApi(L"apm.dll", "Aime_acceptConfirm", Aime_acceptConfirm, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_cancel", Aime_cancel, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_getAccessCode", Aime_getAccessCode, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_getAimeId", Aime_getAimeId, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_getConfirm", Aime_getConfirm, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_getErrorCategory", Aime_getErrorCategory, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_hasConfirm", Aime_hasConfirm, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_hasError", Aime_hasError, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_hasResult", Aime_hasResult, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_isBusy", Aime_isBusy, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_isDBAlive", Aime_isDBAlive, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_isMobile", Aime_isMobile, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_isReaderDetected", Aime_isReaderDetected, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_sendLog", Aime_sendLog, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_setLedError", Aime_setLedError, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_setLedSuccess", Aime_setLedSuccess, NULL);
MH_CreateHookApi(L"apm.dll", "Aime_start", Aime_start, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAccounting_beginPlay", AllnetAccounting_beginPlay, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAccounting_endPlay", AllnetAccounting_endPlay, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getAbaasGsServerName", AllnetAuth_getAbaasGsServerName, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getAbaasLinkServerName", AllnetAuth_getAbaasLinkServerName, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getCountryCode", AllnetAuth_getCountryCode, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getLocationId", AllnetAuth_getLocationId, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getLocationName", AllnetAuth_getLocationName, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getLocationNickname", AllnetAuth_getLocationNickname, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getLocationNicknamePartCount", AllnetAuth_getLocationNicknamePartCount, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getRegionCode", AllnetAuth_getRegionCode, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getRegionName", AllnetAuth_getRegionName, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_getRegionNamePartCount", AllnetAuth_getRegionNamePartCount, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_isDevelop", AllnetAuth_isDevelop, NULL);
MH_CreateHookApi(L"apm.dll", "AllnetAuth_isGood", AllnetAuth_isGood, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getAdvertizeSound", ApmSystemSetting_getAdvertizeSound, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getClosingTimes", ApmSystemSetting_getClosingTimes, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getEmoneySetting", ApmSystemSetting_getEmoneySetting, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getFixedTitle", ApmSystemSetting_getFixedTitle, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getGamePadSetting", ApmSystemSetting_getGamePadSetting, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getMatchingGroup", ApmSystemSetting_getMatchingGroup, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getTimeToClosingTime", ApmSystemSetting_getTimeToClosingTime, NULL);
MH_CreateHookApi(L"apm.dll", "ApmSystemSetting_getUiSetting", ApmSystemSetting_getUiSetting, NULL);
MH_CreateHookApi(L"apm.dll", "Backup_getRecordStatus", Backup_getRecordStatus, NULL);
MH_CreateHookApi(L"apm.dll", "Backup_isSetupSucceeded", Backup_isSetupSucceeded, NULL);
MH_CreateHookApi(L"apm.dll", "Backup_saveRecord", Backup_saveRecord, NULL);
MH_CreateHookApi(L"apm.dll", "Backup_saveRecordByAddress", Backup_saveRecordByAddress, NULL);
MH_CreateHookApi(L"apm.dll", "Backup_setupRecords", Backup_setupRecords, NULL);
MH_CreateHookApi(L"apm.dll", "Core_execute", Core_execute, NULL);
MH_CreateHookApi(L"apm.dll", "Core_exitGame", Core_exitGame, NULL);
MH_CreateHookApi(L"apm.dll", "Core_hookException", Core_hookException, NULL);
MH_CreateHookApi(L"apm.dll", "Core_isExitNeeded", Core_isExitNeeded, NULL);
MH_CreateHookApi(L"apm.dll", "Core_resetCount", Core_resetCount, NULL);
MH_CreateHookApi(L"apm.dll", "Core_resetException", Core_resetException, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_getAddableCoin", Credit_getAddableCoin, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_getCoinMultipliers", Credit_getCoinMultipliers, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_getCoinToCredit", Credit_getCoinToCredit, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_getCredit", Credit_getCredit, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_getRemain", Credit_getRemain, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_isFreePlay", Credit_isFreePlay, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_isGameCostEnough", Credit_isGameCostEnough, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_isZero", Credit_isZero, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_payGameCost", Credit_payGameCost, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_resetCoinInHook", Credit_resetCoinInHook, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_setCoinInHook", Credit_setCoinInHook, NULL);
MH_CreateHookApi(L"apm.dll", "Credit_toString", Credit_toString, NULL);
MH_CreateHookApi(L"apm.dll", "Emoney_close", Emoney_close, NULL);
MH_CreateHookApi(L"apm.dll", "Emoney_isOpenMainWindow", Emoney_isOpenMainWindow, NULL);
MH_CreateHookApi(L"apm.dll", "Emoney_launch", Emoney_launch, NULL);
MH_CreateHookApi(L"apm.dll", "Emoney_setSoundHook", Emoney_setSoundHook, NULL);
MH_CreateHookApi(L"apm.dll", "Emoney_update", Emoney_update, NULL);
MH_CreateHookApi(L"apm.dll", "Error_isOccurred", Error_isOccurred, NULL);
MH_CreateHookApi(L"apm.dll", "Error_setDeviceLost", Error_setDeviceLost, NULL);
MH_CreateHookApi(L"apm.dll", "Input_getGamepadInfo", Input_getGamepadInfo, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isFlipNow", Input_isFlipNow, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isGamepadDetect", Input_isGamepadDetect, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isOffNow", Input_isOffNow, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isOn", Input_isOn, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isOnNow", Input_isOnNow, NULL);
MH_CreateHookApi(L"apm.dll", "Input_isOpenPewviewWindow", Input_isOpenPewviewWindow, NULL);
MH_CreateHookApi(L"apm.dll", "Input_setGamepadConfig", Input_setGamepadConfig, NULL);
MH_CreateHookApi(L"apm.dll", "NetworkProperty_getAddressString", NetworkProperty_getAddressString, NULL);
MH_CreateHookApi(L"apm.dll", "NetworkProperty_getAddressValue", NetworkProperty_getAddressValue, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_beginPlay", Sequence_beginPlay, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_clearBackup", Sequence_clearBackup, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_continuePlay", Sequence_continuePlay, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_endPlay", Sequence_endPlay, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_getBookkeeping", Sequence_getBookkeeping, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_getPlayingAimeId", Sequence_getPlayingAimeId, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_isAccountingPlaying", Sequence_isAccountingPlaying, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_isPlaying", Sequence_isPlaying, NULL);
MH_CreateHookApi(L"apm.dll", "Sequence_isTest", Sequence_isTest, NULL);
MH_CreateHookApi(L"apm.dll", "System_getAppRootPath", System_getAppRootPath, NULL);
MH_CreateHookApi(L"apm.dll", "System_getBoardId", System_getBoardId, NULL);
MH_CreateHookApi(L"apm.dll", "System_getGameId", System_getGameId, NULL);
MH_CreateHookApi(L"apm.dll", "System_getGameVersion", System_getGameVersion, NULL);
MH_CreateHookApi(L"apm.dll", "System_getKeychipId", System_getKeychipId, NULL);
MH_CreateHookApi(L"apm.dll", "System_getRegionCode", System_getRegionCode, NULL);
MH_CreateHookApi(L"apm.dll", "System_getResolution", System_getResolution, NULL);
MH_CreateHookApi(L"apm.dll", "System_isDevelop", System_isDevelop, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadConfig", apmGamepadConfig, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadGetApmInput", apmGamepadGetApmInput, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadGetConfig", apmGamepadGetConfig, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadGetDeviceCaps", apmGamepadGetDeviceCaps, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadGetInfo", apmGamepadGetInfo, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadGetRawInput", apmGamepadGetRawInput, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadInitConfig", apmGamepadInitConfig, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadIsDetected", apmGamepadIsDetected, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadIsXInputDevice", apmGamepadIsXInputDevice, NULL);
MH_CreateHookApi(L"apm.dll", "apmGamepadUpdate", apmGamepadUpdate, NULL);
#ifdef _M_AMD64
LPCWSTR dllName = L"apm.dll";
MH_CreateHookApi(dllName, "Aime_acceptConfirm", Aime_acceptConfirm, NULL);
MH_CreateHookApi(dllName, "Aime_cancel", Aime_cancel, NULL);
MH_CreateHookApi(dllName, "Aime_getAccessCode", Aime_getAccessCode, NULL);
MH_CreateHookApi(dllName, "Aime_getAimeId", Aime_getAimeId, NULL);
MH_CreateHookApi(dllName, "Aime_getConfirm", Aime_getConfirm, NULL);
MH_CreateHookApi(dllName, "Aime_getErrorCategory", Aime_getErrorCategory, NULL);
MH_CreateHookApi(dllName, "Aime_hasConfirm", Aime_hasConfirm, NULL);
MH_CreateHookApi(dllName, "Aime_hasError", Aime_hasError, NULL);
MH_CreateHookApi(dllName, "Aime_hasResult", Aime_hasResult, NULL);
MH_CreateHookApi(dllName, "Aime_isBusy", Aime_isBusy, NULL);
MH_CreateHookApi(dllName, "Aime_isDBAlive", Aime_isDBAlive, NULL);
MH_CreateHookApi(dllName, "Aime_isMobile", Aime_isMobile, NULL);
MH_CreateHookApi(dllName, "Aime_isReaderDetected", Aime_isReaderDetected, NULL);
MH_CreateHookApi(dllName, "Aime_sendLog", Aime_sendLog, NULL);
MH_CreateHookApi(dllName, "Aime_setLedError", Aime_setLedError, NULL);
MH_CreateHookApi(dllName, "Aime_setLedSuccess", Aime_setLedSuccess, NULL);
MH_CreateHookApi(dllName, "Aime_start", Aime_start, NULL);
MH_CreateHookApi(dllName, "AllnetAccounting_beginPlay", AllnetAccounting_beginPlay, NULL);
MH_CreateHookApi(dllName, "AllnetAccounting_endPlay", AllnetAccounting_endPlay, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getAbaasGsServerName", AllnetAuth_getAbaasGsServerName, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getAbaasLinkServerName", AllnetAuth_getAbaasLinkServerName, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getCountryCode", AllnetAuth_getCountryCode, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getLocationId", AllnetAuth_getLocationId, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getLocationName", AllnetAuth_getLocationName, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getLocationNickname", AllnetAuth_getLocationNickname, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getLocationNicknamePartCount", AllnetAuth_getLocationNicknamePartCount, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getRegionCode", AllnetAuth_getRegionCode, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getRegionName", AllnetAuth_getRegionName, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_getRegionNamePartCount", AllnetAuth_getRegionNamePartCount, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_isDevelop", AllnetAuth_isDevelop, NULL);
MH_CreateHookApi(dllName, "AllnetAuth_isGood", AllnetAuth_isGood, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getAdvertizeSound", ApmSystemSetting_getAdvertizeSound, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getClosingTimes", ApmSystemSetting_getClosingTimes, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getEmoneySetting", ApmSystemSetting_getEmoneySetting, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getFixedTitle", ApmSystemSetting_getFixedTitle, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getGamePadSetting", ApmSystemSetting_getGamePadSetting, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getMatchingGroup", ApmSystemSetting_getMatchingGroup, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getTimeToClosingTime", ApmSystemSetting_getTimeToClosingTime, NULL);
MH_CreateHookApi(dllName, "ApmSystemSetting_getUiSetting", ApmSystemSetting_getUiSetting, NULL);
MH_CreateHookApi(dllName, "Backup_getRecordStatus", Backup_getRecordStatus, NULL);
MH_CreateHookApi(dllName, "Backup_isSetupSucceeded", Backup_isSetupSucceeded, NULL);
MH_CreateHookApi(dllName, "Backup_saveRecord", Backup_saveRecord, NULL);
MH_CreateHookApi(dllName, "Backup_saveRecordByAddress", Backup_saveRecordByAddress, NULL);
MH_CreateHookApi(dllName, "Backup_setupRecords", Backup_setupRecords, NULL);
MH_CreateHookApi(dllName, "Core_execute", Core_execute, NULL);
MH_CreateHookApi(dllName, "Core_exitGame", Core_exitGame, NULL);
MH_CreateHookApi(dllName, "Core_hookException", Core_hookException, NULL);
MH_CreateHookApi(dllName, "Core_isExitNeeded", Core_isExitNeeded, NULL);
MH_CreateHookApi(dllName, "Core_resetCount", Core_resetCount, NULL);
MH_CreateHookApi(dllName, "Core_resetException", Core_resetException, NULL);
MH_CreateHookApi(dllName, "Credit_getAddableCoin", Credit_getAddableCoin, NULL);
MH_CreateHookApi(dllName, "Credit_getCoinMultipliers", Credit_getCoinMultipliers, NULL);
MH_CreateHookApi(dllName, "Credit_getCoinToCredit", Credit_getCoinToCredit, NULL);
MH_CreateHookApi(dllName, "Credit_getCredit", Credit_getCredit, NULL);
MH_CreateHookApi(dllName, "Credit_getRemain", Credit_getRemain, NULL);
MH_CreateHookApi(dllName, "Credit_isFreePlay", Credit_isFreePlay, NULL);
MH_CreateHookApi(dllName, "Credit_isGameCostEnough", Credit_isGameCostEnough, NULL);
MH_CreateHookApi(dllName, "Credit_isZero", Credit_isZero, NULL);
MH_CreateHookApi(dllName, "Credit_payGameCost", Credit_payGameCost, NULL);
MH_CreateHookApi(dllName, "Credit_resetCoinInHook", Credit_resetCoinInHook, NULL);
MH_CreateHookApi(dllName, "Credit_setCoinInHook", Credit_setCoinInHook, NULL);
MH_CreateHookApi(dllName, "Credit_toString", Credit_toString, NULL);
MH_CreateHookApi(dllName, "Emoney_close", Emoney_close, NULL);
MH_CreateHookApi(dllName, "Emoney_isOpenMainWindow", Emoney_isOpenMainWindow, NULL);
MH_CreateHookApi(dllName, "Emoney_launch", Emoney_launch, NULL);
MH_CreateHookApi(dllName, "Emoney_setSoundHook", Emoney_setSoundHook, NULL);
MH_CreateHookApi(dllName, "Emoney_update", Emoney_update, NULL);
MH_CreateHookApi(dllName, "Error_isOccurred", Error_isOccurred, NULL);
MH_CreateHookApi(dllName, "Error_setDeviceLost", Error_setDeviceLost, NULL);
MH_CreateHookApi(dllName, "Input_getGamepadInfo", Input_getGamepadInfo, NULL);
MH_CreateHookApi(dllName, "Input_isFlipNow", Input_isFlipNow, NULL);
MH_CreateHookApi(dllName, "Input_isGamepadDetect", Input_isGamepadDetect, NULL);
MH_CreateHookApi(dllName, "Input_isOffNow", Input_isOffNow, NULL);
MH_CreateHookApi(dllName, "Input_isOn", Input_isOn, NULL);
MH_CreateHookApi(dllName, "Input_isOnNow", Input_isOnNow, NULL);
MH_CreateHookApi(dllName, "Input_isOpenPewviewWindow", Input_isOpenPewviewWindow, NULL);
MH_CreateHookApi(dllName, "Input_setGamepadConfig", Input_setGamepadConfig, NULL);
MH_CreateHookApi(dllName, "NetworkProperty_getAddressString", NetworkProperty_getAddressString, NULL);
MH_CreateHookApi(dllName, "NetworkProperty_getAddressValue", NetworkProperty_getAddressValue, NULL);
MH_CreateHookApi(dllName, "Sequence_beginPlay", Sequence_beginPlay, NULL);
MH_CreateHookApi(dllName, "Sequence_clearBackup", Sequence_clearBackup, NULL);
MH_CreateHookApi(dllName, "Sequence_continuePlay", Sequence_continuePlay, NULL);
MH_CreateHookApi(dllName, "Sequence_endPlay", Sequence_endPlay, NULL);
MH_CreateHookApi(dllName, "Sequence_getBookkeeping", Sequence_getBookkeeping, NULL);
MH_CreateHookApi(dllName, "Sequence_getPlayingAimeId", Sequence_getPlayingAimeId, NULL);
MH_CreateHookApi(dllName, "Sequence_isAccountingPlaying", Sequence_isAccountingPlaying, NULL);
MH_CreateHookApi(dllName, "Sequence_isPlaying", Sequence_isPlaying, NULL);
MH_CreateHookApi(dllName, "Sequence_isTest", Sequence_isTest, NULL);
MH_CreateHookApi(dllName, "System_getAppRootPath", System_getAppRootPath, NULL);
MH_CreateHookApi(dllName, "System_getBoardId", System_getBoardId, NULL);
MH_CreateHookApi(dllName, "System_getGameId", System_getGameId, NULL);
MH_CreateHookApi(dllName, "System_getGameVersion", System_getGameVersion, NULL);
MH_CreateHookApi(dllName, "System_getKeychipId", System_getKeychipId, NULL);
MH_CreateHookApi(dllName, "System_getRegionCode", System_getRegionCode, NULL);
MH_CreateHookApi(dllName, "System_getResolution", System_getResolution, NULL);
MH_CreateHookApi(dllName, "System_isDevelop", System_isDevelop, NULL);
MH_CreateHookApi(dllName, "apmGamepadConfig", apmGamepadConfig, NULL);
MH_CreateHookApi(dllName, "apmGamepadGetApmInput", apmGamepadGetApmInput, NULL);
MH_CreateHookApi(dllName, "apmGamepadGetConfig", apmGamepadGetConfig, NULL);
MH_CreateHookApi(dllName, "apmGamepadGetDeviceCaps", apmGamepadGetDeviceCaps, NULL);
MH_CreateHookApi(dllName, "apmGamepadGetInfo", apmGamepadGetInfo, NULL);
MH_CreateHookApi(dllName, "apmGamepadGetRawInput", apmGamepadGetRawInput, NULL);
MH_CreateHookApi(dllName, "apmGamepadInitConfig", apmGamepadInitConfig, NULL);
MH_CreateHookApi(dllName, "apmGamepadIsDetected", apmGamepadIsDetected, NULL);
MH_CreateHookApi(dllName, "apmGamepadIsXInputDevice", apmGamepadIsXInputDevice, NULL);
MH_CreateHookApi(dllName, "apmGamepadUpdate", apmGamepadUpdate, NULL);
#else
LPCWSTR dllName = L"apm_x86.dll";
MH_CreateHookApi(dllName, "_Aime_acceptConfirm@0", Aime_acceptConfirm, NULL);
MH_CreateHookApi(dllName, "_Aime_cancel@0", Aime_cancel, NULL);
MH_CreateHookApi(dllName, "_Aime_getAccessCode@4", Aime_getAccessCode, NULL);
MH_CreateHookApi(dllName, "_Aime_getAimeId@4", Aime_getAimeId, NULL);
MH_CreateHookApi(dllName, "_Aime_getConfirm@0", Aime_getConfirm, NULL);
MH_CreateHookApi(dllName, "_Aime_getErrorCategory@0", Aime_getErrorCategory, NULL);
MH_CreateHookApi(dllName, "_Aime_hasConfirm@0", Aime_hasConfirm, NULL);
MH_CreateHookApi(dllName, "_Aime_hasError@0", Aime_hasError, NULL);
MH_CreateHookApi(dllName, "_Aime_hasResult@0", Aime_hasResult, NULL);
MH_CreateHookApi(dllName, "_Aime_isBusy@0", Aime_isBusy, NULL);
MH_CreateHookApi(dllName, "_Aime_isDBAlive@0", Aime_isDBAlive, NULL);
MH_CreateHookApi(dllName, "_Aime_isMobile@0", Aime_isMobile, NULL);
MH_CreateHookApi(dllName, "_Aime_isReaderDetected@0", Aime_isReaderDetected, NULL);
MH_CreateHookApi(dllName, "_Aime_sendLog@12", Aime_sendLog, NULL);
MH_CreateHookApi(dllName, "_Aime_setLedError@0", Aime_setLedError, NULL);
MH_CreateHookApi(dllName, "_Aime_setLedSuccess@0", Aime_setLedSuccess, NULL);
MH_CreateHookApi(dllName, "_Aime_start@0", Aime_start, NULL);
MH_CreateHookApi(dllName, "_AllnetAccounting_beginPlay@4", AllnetAccounting_beginPlay, NULL);
MH_CreateHookApi(dllName, "_AllnetAccounting_endPlay@12", AllnetAccounting_endPlay, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getAbaasGsServerName@0", AllnetAuth_getAbaasGsServerName, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getAbaasLinkServerName@0", AllnetAuth_getAbaasLinkServerName, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getCountryCode@0", AllnetAuth_getCountryCode, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getLocationId@0", AllnetAuth_getLocationId, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getLocationName@0", AllnetAuth_getLocationName, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getLocationNickname@4", AllnetAuth_getLocationNickname, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getLocationNicknamePartCount@0", AllnetAuth_getLocationNicknamePartCount, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getRegionCode@0", AllnetAuth_getRegionCode, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getRegionName@4", AllnetAuth_getRegionName, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_getRegionNamePartCount@0", AllnetAuth_getRegionNamePartCount, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_isDevelop@0", AllnetAuth_isDevelop, NULL);
MH_CreateHookApi(dllName, "_AllnetAuth_isGood@0", AllnetAuth_isGood, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getAdvertizeSound@4", ApmSystemSetting_getAdvertizeSound, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getClosingTimes@4", ApmSystemSetting_getClosingTimes, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getEmoneySetting@4", ApmSystemSetting_getEmoneySetting, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getFixedTitle@4", ApmSystemSetting_getFixedTitle, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getGamePadSetting@4", ApmSystemSetting_getGamePadSetting, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getMatchingGroup@4", ApmSystemSetting_getMatchingGroup, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getTimeToClosingTime@4", ApmSystemSetting_getTimeToClosingTime, NULL);
MH_CreateHookApi(dllName, "_ApmSystemSetting_getUiSetting@4", ApmSystemSetting_getUiSetting, NULL);
MH_CreateHookApi(dllName, "_Backup_getRecordStatus@4", Backup_getRecordStatus, NULL);
MH_CreateHookApi(dllName, "_Backup_isSetupSucceeded@0", Backup_isSetupSucceeded, NULL);
MH_CreateHookApi(dllName, "_Backup_saveRecord@4", Backup_saveRecord, NULL);
MH_CreateHookApi(dllName, "_Backup_saveRecordByAddress@4", Backup_saveRecordByAddress, NULL);
MH_CreateHookApi(dllName, "_Backup_setupRecords@8", Backup_setupRecords, NULL);
MH_CreateHookApi(dllName, "_Core_execute@0", Core_execute, NULL);
MH_CreateHookApi(dllName, "_Core_exitGame@4", Core_exitGame, NULL);
MH_CreateHookApi(dllName, "_Core_hookException@0", Core_hookException, NULL);
MH_CreateHookApi(dllName, "_Core_isExitNeeded@0", Core_isExitNeeded, NULL);
MH_CreateHookApi(dllName, "_Core_resetCount@0", Core_resetCount, NULL);
MH_CreateHookApi(dllName, "_Core_resetException@0", Core_resetException, NULL);
MH_CreateHookApi(dllName, "_Credit_getAddableCoin@0", Credit_getAddableCoin, NULL);
MH_CreateHookApi(dllName, "_Credit_getCoinMultipliers@0", Credit_getCoinMultipliers, NULL);
MH_CreateHookApi(dllName, "_Credit_getCoinToCredit@0", Credit_getCoinToCredit, NULL);
MH_CreateHookApi(dllName, "_Credit_getCredit@0", Credit_getCredit, NULL);
MH_CreateHookApi(dllName, "_Credit_getRemain@0", Credit_getRemain, NULL);
MH_CreateHookApi(dllName, "_Credit_isFreePlay@0", Credit_isFreePlay, NULL);
MH_CreateHookApi(dllName, "_Credit_isGameCostEnough@4", Credit_isGameCostEnough, NULL);
MH_CreateHookApi(dllName, "_Credit_isZero@0", Credit_isZero, NULL);
MH_CreateHookApi(dllName, "_Credit_payGameCost@4", Credit_payGameCost, NULL);
MH_CreateHookApi(dllName, "_Credit_resetCoinInHook@0", Credit_resetCoinInHook, NULL);
MH_CreateHookApi(dllName, "_Credit_setCoinInHook@4", Credit_setCoinInHook, NULL);
MH_CreateHookApi(dllName, "_Credit_toString@0", Credit_toString, NULL);
MH_CreateHookApi(dllName, "_Emoney_close@0", Emoney_close, NULL);
MH_CreateHookApi(dllName, "_Emoney_isOpenMainWindow@0", Emoney_isOpenMainWindow, NULL);
MH_CreateHookApi(dllName, "_Emoney_launch@0", Emoney_launch, NULL);
MH_CreateHookApi(dllName, "_Emoney_setSoundHook@4", Emoney_setSoundHook, NULL);
MH_CreateHookApi(dllName, "_Emoney_update@4", Emoney_update, NULL);
MH_CreateHookApi(dllName, "_Error_isOccurred@0", Error_isOccurred, NULL);
MH_CreateHookApi(dllName, "_Error_setDeviceLost@0", Error_setDeviceLost, NULL);
MH_CreateHookApi(dllName, "_Input_getGamepadInfo@0", Input_getGamepadInfo, NULL);
MH_CreateHookApi(dllName, "_Input_isFlipNow@4", Input_isFlipNow, NULL);
MH_CreateHookApi(dllName, "_Input_isGamepadDetect@0", Input_isGamepadDetect, NULL);
MH_CreateHookApi(dllName, "_Input_isOffNow@4", Input_isOffNow, NULL);
MH_CreateHookApi(dllName, "_Input_isOn@4", Input_isOn, NULL);
MH_CreateHookApi(dllName, "_Input_isOnNow@4", Input_isOnNow, NULL);
MH_CreateHookApi(dllName, "_Input_isOpenPewviewWindow@0", Input_isOpenPewviewWindow, NULL);
MH_CreateHookApi(dllName, "_Input_setGamepadConfig@4", Input_setGamepadConfig, NULL);
MH_CreateHookApi(dllName, "_NetworkProperty_getAddressString@0", NetworkProperty_getAddressString, NULL);
MH_CreateHookApi(dllName, "_NetworkProperty_getAddressValue@0", NetworkProperty_getAddressValue, NULL);
MH_CreateHookApi(dllName, "_Sequence_beginPlay@20", Sequence_beginPlay, NULL);
MH_CreateHookApi(dllName, "_Sequence_clearBackup@0", Sequence_clearBackup, NULL);
MH_CreateHookApi(dllName, "_Sequence_continuePlay@28", Sequence_continuePlay, NULL);
MH_CreateHookApi(dllName, "_Sequence_endPlay@16", Sequence_endPlay, NULL);
MH_CreateHookApi(dllName, "_Sequence_getBookkeeping@0", Sequence_getBookkeeping, NULL);
MH_CreateHookApi(dllName, "_Sequence_getPlayingAimeId@0", Sequence_getPlayingAimeId, NULL);
MH_CreateHookApi(dllName, "_Sequence_isAccountingPlaying@0", Sequence_isAccountingPlaying, NULL);
MH_CreateHookApi(dllName, "_Sequence_isPlaying@0", Sequence_isPlaying, NULL);
MH_CreateHookApi(dllName, "_Sequence_isTest@0", Sequence_isTest, NULL);
MH_CreateHookApi(dllName, "_System_getAppRootPath@0", System_getAppRootPath, NULL);
MH_CreateHookApi(dllName, "_System_getBoardId@0", System_getBoardId, NULL);
MH_CreateHookApi(dllName, "_System_getGameId@0", System_getGameId, NULL);
MH_CreateHookApi(dllName, "_System_getGameVersion@0", System_getGameVersion, NULL);
MH_CreateHookApi(dllName, "_System_getKeychipId@0", System_getKeychipId, NULL);
MH_CreateHookApi(dllName, "_System_getRegionCode@0", System_getRegionCode, NULL);
MH_CreateHookApi(dllName, "_System_getResolution@0", System_getResolution, NULL);
MH_CreateHookApi(dllName, "_System_isDevelop@0", System_isDevelop, NULL);
MH_CreateHookApi(dllName, "_apmGamepadConfig@20", apmGamepadConfig, NULL);
MH_CreateHookApi(dllName, "_apmGamepadGetApmInput@4", apmGamepadGetApmInput, NULL);
MH_CreateHookApi(dllName, "_apmGamepadGetConfig@0", apmGamepadGetConfig, NULL);
MH_CreateHookApi(dllName, "_apmGamepadGetDeviceCaps@4", apmGamepadGetDeviceCaps, NULL);
MH_CreateHookApi(dllName, "_apmGamepadGetInfo@4", apmGamepadGetInfo, NULL);
MH_CreateHookApi(dllName, "_apmGamepadGetRawInput@4", apmGamepadGetRawInput, NULL);
MH_CreateHookApi(dllName, "_apmGamepadInitConfig@0", apmGamepadInitConfig, NULL);
MH_CreateHookApi(dllName, "_apmGamepadIsDetected@0", apmGamepadIsDetected, NULL);
MH_CreateHookApi(dllName, "_apmGamepadIsXInputDevice@0", apmGamepadIsXInputDevice, NULL);
MH_CreateHookApi(dllName, "_apmGamepadUpdate@0", apmGamepadUpdate, NULL);
#endif
MH_EnableHook(MH_ALL_HOOKS);
memset(g_APM3IOValues, 0, 256);
@ -722,15 +840,6 @@ static void HookAPM3()
}, nullptr, 0, nullptr);
}
static InitFunction initFuncTapping([]()
{
HookAPM3();
wcscpy(APM3GameId, L"SDFJ");
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
}, GameID::TappingSkillTest);
void __fastcall printPengo(const char* format, ...)
{
__try
@ -753,6 +862,18 @@ void __fastcall printPengo(const char* format, ...)
}
}
#ifdef _M_AMD64
static InitFunction initFuncTapping([]()
{
HookAPM3();
wcscpy(APM3GameId, L"SDFJ");
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
}, GameID::TappingSkillTest);
static InitFunction initFunc([]()
{
HookAPM3();
@ -874,4 +995,29 @@ static InitFunction initDoa6TestFunc([]()
__int64 mainModuleBase = (__int64)GetModuleHandle(0);
}, GameID::Doa6Test);
#else
static InitFunction initFuncUmifresh02([]()
{
auto d = LoadLibraryA("apm_x86.dll");
if (d == nullptr)
{
MessageBoxA(0, "Cannot load apm_x86.dll!", "Error", 0);
ExitProcess(0);
}
HookAPM3();
wcscpy(APM3GameId, L"SDGU");
DWORD_PTR mainModuleBase = (DWORD_PTR)GetModuleHandle(0);
// Windowed
if (ToBool(config["General"]["Windowed"]))
{
injector::WriteMemory<BYTE>(mainModuleBase + 0x1D8FC4, 0xEB, true);
}
injector::WriteMemory<BYTE>(mainModuleBase + 0x1806BF, 0xEB, true); // Skip some credit check idfk
}, GameID::Umifresh);
#endif

View File

@ -1,6 +1,4 @@
#ifdef _M_AMD64
static __int64 System_getResolutionReturnValue = 0;
static DWORD_PTR System_getResolutionReturnValue = 0;
static bool ApmSystemSetting_getAdvertizeSoundReturnValue = false;
@ -20,63 +18,63 @@ static char ApmSystemSetting_getUiSettingReturnValue = 0;
static bool Core_exitGameReturnValue = 0;
static __int64 Core_hookExceptionReturnValue = 0;
static DWORD_PTR Core_hookExceptionReturnValue = 0;
static bool Core_isExitNeededReturnValue = false;
static __int64 Core_resetExceptionReturnValue = 0;
static DWORD_PTR Core_resetExceptionReturnValue = 0;
static __int64 Credit_getAddableCoinReturnValue = 0;
static DWORD_PTR Credit_getAddableCoinReturnValue = 0;
static __int64 Credit_getCoinMultipliersReturnValue = 0;
static DWORD_PTR Credit_getCoinMultipliersReturnValue = 0;
static __int64 Credit_getCoinToCreditReturnValue = 0;
static DWORD_PTR Credit_getCoinToCreditReturnValue = 0;
static __int64 Credit_getCreditReturnValue = 0;
static DWORD_PTR Credit_getCreditReturnValue = 0;
static __int64 Credit_getRemainReturnValue = 0;
static DWORD_PTR Credit_getRemainReturnValue = 0;
static __int64 Credit_isFreePlayReturnValue = 1;
static DWORD_PTR Credit_isFreePlayReturnValue = 1;
static __int64 Credit_isGameCostEnoughReturnValue = 0;
static DWORD_PTR Credit_isGameCostEnoughReturnValue = 0;
static __int64 Credit_isZeroReturnValue = 0;
static DWORD_PTR Credit_isZeroReturnValue = 0;
static __int64 Credit_payGameCostReturnValue = 0;
static DWORD_PTR Credit_payGameCostReturnValue = 0;
static __int64 Credit_resetCoinInHookReturnValue = 0;
static DWORD_PTR Credit_resetCoinInHookReturnValue = 0;
static __int64 Credit_setCoinInHookReturnValue = 0;
static DWORD_PTR Credit_setCoinInHookReturnValue = 0;
static __int64 Emoney_isOpenMainWindowReturnValue = 0;
static DWORD_PTR Emoney_isOpenMainWindowReturnValue = 0;
static char Emoney_launchReturnValue = 0;
static __int64 Error_isOccurredReturnValue = 0;
static DWORD_PTR Error_isOccurredReturnValue = 0;
static __int64 Error_setDeviceLostReturnValue = 0;
static DWORD_PTR Error_setDeviceLostReturnValue = 0;
static char Input_isFlipNowReturnValue = 0;
static __int64 Input_isGamepadDetectReturnValue = 0;
static DWORD_PTR Input_isGamepadDetectReturnValue = 0;
static char Input_isOffNowReturnValue = 0;
static char Input_isOnNowReturnValue = 0;
static __int64 Input_isOpenPewviewWindowReturnValue = 0;
static DWORD_PTR Input_isOpenPewviewWindowReturnValue = 0;
static char Input_setGamepadConfigReturnValue = 0;
static char *NetworkProperty_getAddressStringReturnValue = "192.168.0.1";
static __int64 NetworkProperty_getAddressValueReturnValue = 0;
static DWORD_PTR NetworkProperty_getAddressValueReturnValue = 0;
static __int64 System_getAppRootPathReturnValue = 0;
static DWORD_PTR System_getAppRootPathReturnValue = 0;
static __int64 System_getRegionCodeReturnValue = 0;
static DWORD_PTR System_getRegionCodeReturnValue = 0;
static __int64 System_isDevelopReturnValue = 0;
static DWORD_PTR System_isDevelopReturnValue = 0;
static char apmGamepadConfigReturnValue = 0;
@ -84,15 +82,14 @@ static char apmGamepadGetApmInputReturnValue = 0;
static char apmGamepadGetDeviceCapsReturnValue = 0;
static __int64 apmGamepadGetInfoReturnValue = 0;
static DWORD_PTR apmGamepadGetInfoReturnValue = 0;
static char apmGamepadGetRawInputReturnValue = 0;
static __int64 apmGamepadInitConfigReturnValue = 0;
static DWORD_PTR apmGamepadInitConfigReturnValue = 0;
static char apmGamepadIsDetectedReturnValue = 0;
static __int64 apmGamepadIsXInputDeviceReturnValue = 0;
static DWORD_PTR apmGamepadIsXInputDeviceReturnValue = 0;
static int apmGamepadUpdateReturnValue = 0;
#endif

View File

@ -1,11 +1,10 @@
#include <Utility/InitFunction.h>
#include <StdInc.h>
#include <thread>
#ifdef _M_AMD64
#include "Functions\Global.h"
#include "Aime.h"
bool Aime_acceptConfirm()
#define _LOGAPM3AIME 1
bool CALLPLEB Aime_acceptConfirm()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_acceptConfirm");
@ -13,7 +12,7 @@ bool Aime_acceptConfirm()
return 0;
}
bool Aime_cancel()
bool CALLPLEB Aime_cancel()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_cancel");
@ -22,7 +21,7 @@ bool Aime_cancel()
return 0;
}
bool __fastcall Aime_getAccessCode(AccessCode *accessCode)
bool CALLPLEB Aime_getAccessCode(AccessCode *accessCode)
{
#ifdef _LOGAPM3AIME
info(true, "Aime_getAccessCode");
@ -30,7 +29,7 @@ bool __fastcall Aime_getAccessCode(AccessCode *accessCode)
return 0;
}
bool __fastcall Aime_getAimeId(unsigned int* uid)
bool CALLPLEB Aime_getAimeId(unsigned int* uid)
{
#ifdef _LOGAPM3AIME
info(true, "Aime_getAimeId");
@ -39,7 +38,7 @@ bool __fastcall Aime_getAimeId(unsigned int* uid)
}
AIME_CONFIRM Aime_getConfirm()
AIME_CONFIRM CALLPLEB Aime_getConfirm()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_getConfirm");
@ -48,7 +47,7 @@ AIME_CONFIRM Aime_getConfirm()
}
AIME_ERROR_CATEGORY Aime_getErrorCategory()
AIME_ERROR_CATEGORY CALLPLEB Aime_getErrorCategory()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_getErrorCategory");
@ -56,7 +55,7 @@ AIME_ERROR_CATEGORY Aime_getErrorCategory()
return AIME_ERROR_CATEGORY::NONE;
}
bool Aime_hasConfirm()
bool CALLPLEB Aime_hasConfirm()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_hasConfirm");
@ -64,7 +63,7 @@ bool Aime_hasConfirm()
return false;
}
bool Aime_hasError()
bool CALLPLEB Aime_hasError()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_hasError");
@ -72,7 +71,7 @@ bool Aime_hasError()
return false;
}
bool Aime_hasResult()
bool CALLPLEB Aime_hasResult()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_hasResult");
@ -80,7 +79,7 @@ bool Aime_hasResult()
return false;
}
bool Aime_isBusy()
bool CALLPLEB Aime_isBusy()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_isBusy");
@ -88,7 +87,7 @@ bool Aime_isBusy()
return false;
}
bool Aime_isDBAlive()
bool CALLPLEB Aime_isDBAlive()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_isDBAlive");
@ -96,7 +95,7 @@ bool Aime_isDBAlive()
return true;
}
bool Aime_isMobile()
bool CALLPLEB Aime_isMobile()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_isMobile");
@ -104,7 +103,7 @@ bool Aime_isMobile()
return false;
}
bool Aime_isReaderDetected()
bool CALLPLEB Aime_isReaderDetected()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_isReaderDetected");
@ -112,7 +111,7 @@ bool Aime_isReaderDetected()
return true;
}
bool __fastcall Aime_sendLog(unsigned int uid, AIME_LOG_STATUS status, unsigned __int64 count)
bool CALLPLEB Aime_sendLog(unsigned int uid, AIME_LOG_STATUS status, DWORD_PTR count)
{
#ifdef _LOGAPM3AIME
info(true, "Aime_sendLog");
@ -120,7 +119,7 @@ bool __fastcall Aime_sendLog(unsigned int uid, AIME_LOG_STATUS status, unsigned
return true;
}
bool Aime_setLedError()
bool CALLPLEB Aime_setLedError()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_setLedError");
@ -128,7 +127,7 @@ bool Aime_setLedError()
return true;
}
bool Aime_setLedSuccess()
bool CALLPLEB Aime_setLedSuccess()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_setLedSuccess");
@ -136,11 +135,10 @@ bool Aime_setLedSuccess()
return true;
}
bool Aime_start()
bool CALLPLEB Aime_start()
{
#ifdef _LOGAPM3AIME
info(true, "Aime_start");
#endif
return true;
}
#endif
}

View File

@ -1,6 +1,11 @@
#ifdef _M_AMD64
bool Aime_acceptConfirm();
bool Aime_cancel();
#pragma once
#ifdef _M_IX86
#define CALLPLEB __stdcall
#else
#define CALLPLEB __fastcall
#endif
bool CALLPLEB Aime_acceptConfirm();
bool CALLPLEB Aime_cancel();
struct AccessCode
{
const int DigitCount = 20;
@ -10,8 +15,8 @@ struct AccessCode
char valueStr[41];
};
bool __fastcall Aime_getAccessCode(AccessCode* accessCode);
bool __fastcall Aime_getAimeId(unsigned int* uid);
bool CALLPLEB Aime_getAccessCode(AccessCode* accessCode);
bool CALLPLEB Aime_getAimeId(unsigned int* uid);
enum class AIME_CONFIRM
{
NoneDB,
@ -19,7 +24,7 @@ enum class AIME_CONFIRM
AimeDB,
};
AIME_CONFIRM Aime_getConfirm();
AIME_CONFIRM CALLPLEB Aime_getConfirm();
enum class AIME_ERROR_CATEGORY
{
@ -30,21 +35,21 @@ enum class AIME_ERROR_CATEGORY
UNKNOWN,
};
AIME_ERROR_CATEGORY Aime_getErrorCategory();
AIME_ERROR_CATEGORY CALLPLEB Aime_getErrorCategory();
bool Aime_hasConfirm();
bool CALLPLEB Aime_hasConfirm();
bool Aime_hasError();
bool CALLPLEB Aime_hasError();
bool Aime_hasResult();
bool CALLPLEB Aime_hasResult();
bool Aime_isBusy();
bool CALLPLEB Aime_isBusy();
bool Aime_isDBAlive();
bool CALLPLEB Aime_isDBAlive();
bool Aime_isMobile();
bool CALLPLEB Aime_isMobile();
bool Aime_isReaderDetected();
bool CALLPLEB Aime_isReaderDetected();
enum class AIME_LOG_STATUS
{
@ -53,12 +58,10 @@ enum class AIME_LOG_STATUS
END,
};
bool __fastcall Aime_sendLog(unsigned int uid, AIME_LOG_STATUS status, unsigned __int64 count);
bool CALLPLEB Aime_sendLog(unsigned int uid, AIME_LOG_STATUS status, DWORD_PTR count);
bool Aime_setLedError();
bool CALLPLEB Aime_setLedError();
bool Aime_setLedSuccess();
bool CALLPLEB Aime_setLedSuccess();
bool Aime_start();
#endif
bool CALLPLEB Aime_start();

View File

@ -1,7 +1,6 @@
#include <Utility/InitFunction.h>
#include <StdInc.h>
#include <thread>
#ifdef _M_AMD64
#include "Functions\Global.h"
#include "Auth.h"
@ -12,8 +11,8 @@ wchar_t LocationName[64];
wchar_t LinkServerName[64];
wchar_t ServerName[64];
__int64 __fastcall AllnetAccounting_beginPlay(unsigned int a1)
#define _LOGAPM3AUTH 1
DWORD_PTR CALLPLEB AllnetAccounting_beginPlay(unsigned int a1)
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAccounting_beginPlay");
@ -21,7 +20,7 @@ __int64 __fastcall AllnetAccounting_beginPlay(unsigned int a1)
return AllnetAccounting_beginPlayReturnValue;
}
__int64 __fastcall AllnetAccounting_endPlay(int a1, int a2, int a3)
DWORD_PTR CALLPLEB AllnetAccounting_endPlay(int a1, int a2, int a3)
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAccounting_endPlay");
@ -29,7 +28,7 @@ __int64 __fastcall AllnetAccounting_endPlay(int a1, int a2, int a3)
return AllnetAccounting_endPlayReturnValue;
}
wchar_t* AllnetAuth_getAbaasGsServerName()
wchar_t* CALLPLEB AllnetAuth_getAbaasGsServerName()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getAbaasGsServerName");
@ -37,7 +36,7 @@ wchar_t* AllnetAuth_getAbaasGsServerName()
return ServerName;
}
wchar_t* AllnetAuth_getAbaasLinkServerName()
wchar_t* CALLPLEB AllnetAuth_getAbaasLinkServerName()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getAbaasLinkServerName");
@ -47,7 +46,7 @@ wchar_t* AllnetAuth_getAbaasLinkServerName()
char countryCode[4] = "JPN";
char *AllnetAuth_getCountryCode()
char * CALLPLEB AllnetAuth_getCountryCode()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getCountryCode");
@ -55,7 +54,7 @@ char *AllnetAuth_getCountryCode()
return countryCode;
}
unsigned int AllnetAuth_getLocationId()
unsigned int CALLPLEB AllnetAuth_getLocationId()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getLocationId");
@ -63,7 +62,7 @@ unsigned int AllnetAuth_getLocationId()
return AllnetAuth_getLocationIdReturnValue;
}
wchar_t* AllnetAuth_getLocationName()
wchar_t* CALLPLEB AllnetAuth_getLocationName()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getLocationName");
@ -71,7 +70,7 @@ wchar_t* AllnetAuth_getLocationName()
return LocationName;
}
wchar_t* __fastcall AllnetAuth_getLocationNickname(int index)
wchar_t* CALLPLEB AllnetAuth_getLocationNickname(int index)
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getLocationNickname");
@ -79,7 +78,7 @@ wchar_t* __fastcall AllnetAuth_getLocationNickname(int index)
return LocationNickName;
}
int AllnetAuth_getLocationNicknamePartCount()
int CALLPLEB AllnetAuth_getLocationNicknamePartCount()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getLocationNicknamePartCount");
@ -87,7 +86,7 @@ int AllnetAuth_getLocationNicknamePartCount()
return AllnetAuth_getLocationNicknamePartCountReturnValue;
}
int AllnetAuth_getRegionCode()
int CALLPLEB AllnetAuth_getRegionCode()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getRegionCode");
@ -95,7 +94,7 @@ int AllnetAuth_getRegionCode()
return AllnetAuth_getRegionCodeReturnValue;
}
wchar_t* __fastcall AllnetAuth_getRegionName(int index)
wchar_t* CALLPLEB AllnetAuth_getRegionName(int index)
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getRegionName");
@ -103,7 +102,7 @@ wchar_t* __fastcall AllnetAuth_getRegionName(int index)
return RegionName;
}
int AllnetAuth_getRegionNamePartCount()
int CALLPLEB AllnetAuth_getRegionNamePartCount()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_getRegionNamePartCount");
@ -111,7 +110,7 @@ int AllnetAuth_getRegionNamePartCount()
return AllnetAuth_getRegionNamePartCountReturnValue;
}
bool AllnetAuth_isDevelop()
bool CALLPLEB AllnetAuth_isDevelop()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_isDevelop");
@ -119,11 +118,10 @@ bool AllnetAuth_isDevelop()
return AllnetAuth_isDevelopReturnValue;
}
bool AllnetAuth_isGood()
bool CALLPLEB AllnetAuth_isGood()
{
#ifdef _LOGAPM3AUTH
info(true, "AllnetAuth_isGood");
#endif
return true;
}
#endif
}

View File

@ -1,4 +1,10 @@
#ifdef _M_AMD64
#pragma once
#ifdef _M_IX86
#define CALLPLEB __stdcall
#else
#define CALLPLEB __fastcall
#endif
extern wchar_t APM3GameId[10];
extern wchar_t RegionName[64];
extern wchar_t LocationNickName[64];
@ -6,17 +12,17 @@ extern wchar_t LocationName[64];
extern wchar_t LinkServerName[64];
extern wchar_t ServerName[64];
static __int64 AllnetAccounting_beginPlayReturnValue = 0;
static DWORD_PTR AllnetAccounting_beginPlayReturnValue = 0;
static __int64 AllnetAccounting_endPlayReturnValue = 0;
static DWORD_PTR AllnetAccounting_endPlayReturnValue = 0;
static __int64 AllnetAuth_getCountryCodeReturnValue = 0;
static DWORD_PTR AllnetAuth_getCountryCodeReturnValue = 0;
static __int64 AllnetAuth_getLocationIdReturnValue = 0;
static DWORD_PTR AllnetAuth_getLocationIdReturnValue = 0;
static int AllnetAuth_getLocationNicknamePartCountReturnValue = 0;
static __int64 AllnetAuth_getRegionCodeReturnValue = 0;
static DWORD_PTR AllnetAuth_getRegionCodeReturnValue = 0;
static int AllnetAuth_getRegionNamePartCountReturnValue = 0;
@ -24,20 +30,17 @@ static bool AllnetAuth_isDevelopReturnValue = false;
static bool AllnetAuth_isGoodReturnValue = false;
bool AllnetAuth_isGood();
bool AllnetAuth_isDevelop();
int AllnetAuth_getRegionNamePartCount();
wchar_t* __fastcall AllnetAuth_getRegionName(int index);
int AllnetAuth_getRegionCode();
int AllnetAuth_getLocationNicknamePartCount();
wchar_t* __fastcall AllnetAuth_getLocationNickname(int index);
wchar_t* AllnetAuth_getLocationName();
unsigned int AllnetAuth_getLocationId();
char *AllnetAuth_getCountryCode();
wchar_t* AllnetAuth_getAbaasLinkServerName();
wchar_t* AllnetAuth_getAbaasGsServerName();
__int64 __fastcall AllnetAccounting_endPlay(int a1, int a2, int a3);
__int64 __fastcall AllnetAccounting_beginPlay(unsigned int a1);
#endif
bool CALLPLEB AllnetAuth_isGood();
bool CALLPLEB AllnetAuth_isDevelop();
int CALLPLEB AllnetAuth_getRegionNamePartCount();
wchar_t* CALLPLEB AllnetAuth_getRegionName(int index);
int CALLPLEB AllnetAuth_getRegionCode();
int CALLPLEB AllnetAuth_getLocationNicknamePartCount();
wchar_t* CALLPLEB AllnetAuth_getLocationNickname(int index);
wchar_t* CALLPLEB AllnetAuth_getLocationName();
unsigned int CALLPLEB AllnetAuth_getLocationId();
char * CALLPLEB AllnetAuth_getCountryCode();
wchar_t* CALLPLEB AllnetAuth_getAbaasLinkServerName();
wchar_t* CALLPLEB AllnetAuth_getAbaasGsServerName();
DWORD_PTR CALLPLEB AllnetAccounting_endPlay(int a1, int a2, int a3);
DWORD_PTR CALLPLEB AllnetAccounting_beginPlay(unsigned int a1);

View File

@ -1,16 +1,15 @@
#include <Utility/InitFunction.h>
#include <StdInc.h>
#include <thread>
#ifdef _M_AMD64
#include "Functions\Global.h"
#include "Backup.h"
#define _LOGAPM3BACKUP 1
char* BackupSaveFileName = "save";
char fileBuffer[256];
BackupRecord* internal_Records;
unsigned int internal_recordCount;
BackupRecordStatus __fastcall Backup_getRecordStatus(__int64 recordIndex)
BackupRecordStatus CALLPLEB Backup_getRecordStatus(DWORD_PTR recordIndex)
{
#ifdef _LOGAPM3BACKUP
info(true, "Backup_getRecordStatus %llx", recordIndex);
@ -18,7 +17,7 @@ BackupRecordStatus __fastcall Backup_getRecordStatus(__int64 recordIndex)
return BackupRecordStatus::BackupRecordStatus_Valid;
}
bool Backup_isSetupSucceeded()
bool CALLPLEB Backup_isSetupSucceeded()
{
#ifdef _LOGAPM3BACKUP
info(true, "Backup_isSetupSucceeded");
@ -26,7 +25,7 @@ bool Backup_isSetupSucceeded()
return Backup_isSetupSucceededReturnValue;
}
bool __fastcall Backup_saveRecord(unsigned long recordIndex)
bool CALLPLEB Backup_saveRecord(unsigned long recordIndex)
{
#ifdef _LOGAPM3BACKUP
info(true, "Backup_saveRecord recordIndex: %llx", recordIndex);
@ -42,7 +41,7 @@ bool __fastcall Backup_saveRecord(unsigned long recordIndex)
return Backup_saveRecordReturnValue;
}
__int64 __fastcall Backup_saveRecordByAddress(__int64 recordAddress)
DWORD_PTR CALLPLEB Backup_saveRecordByAddress(DWORD_PTR recordAddress)
{
#ifdef _LOGAPM3BACKUP
info(true, "Backup_saveRecordByAddress %llx", recordAddress);
@ -54,7 +53,7 @@ __int64 __fastcall Backup_saveRecordByAddress(__int64 recordAddress)
//__int64 __fastcall Backup_setupRecords(__int128* a1, unsigned int a2)
bool __fastcall Backup_setupRecords(BackupRecord* records, unsigned int recordCount)
bool CALLPLEB Backup_setupRecords(BackupRecord* records, unsigned int recordCount)
{
for (int i = 0; i < recordCount; i++)
{
@ -85,5 +84,4 @@ bool __fastcall Backup_setupRecords(BackupRecord* records, unsigned int recordCo
}
}
return true;
}
#endif
}

View File

@ -1,5 +1,9 @@
#ifdef _M_AMD64
#pragma once
#ifdef _M_IX86
#define CALLPLEB __stdcall
#else
#define CALLPLEB __fastcall
#endif
extern char* BackupSaveFileName;
extern char fileBuffer[256];
@ -22,16 +26,14 @@ enum class BackupRecordStatus
static bool Backup_isSetupSucceededReturnValue = true;
static __int64 Backup_saveRecordReturnValue = 0;
static DWORD_PTR Backup_saveRecordReturnValue = 0;
static __int64 Backup_saveRecordByAddressReturnValue = 0;
static DWORD_PTR Backup_saveRecordByAddressReturnValue = 0;
static __int64 Backup_setupRecordsReturnValue = 0;
static DWORD_PTR Backup_setupRecordsReturnValue = 0;
BackupRecordStatus __fastcall Backup_getRecordStatus(__int64 recordIndex);
bool Backup_isSetupSucceeded();
bool __fastcall Backup_saveRecord(unsigned long recordIndex);
__int64 __fastcall Backup_saveRecordByAddress(__int64 recordAddress);
bool __fastcall Backup_setupRecords(BackupRecord* records, unsigned int recordCount);
#endif
BackupRecordStatus CALLPLEB Backup_getRecordStatus(DWORD_PTR recordIndex);
bool CALLPLEB Backup_isSetupSucceeded();
bool CALLPLEB Backup_saveRecord(unsigned long recordIndex);
DWORD_PTR CALLPLEB Backup_saveRecordByAddress(DWORD_PTR recordAddress);
bool CALLPLEB Backup_setupRecords(BackupRecord* records, unsigned int recordCount);

View File

@ -1,11 +1,10 @@
#include <Utility/InitFunction.h>
#include <StdInc.h>
#include <thread>
#ifdef _M_AMD64
#include "Functions\Global.h"
#include "Sequence.h"
bool __fastcall Sequence_beginPlay(SequenceAccountingBegin beginPlay, unsigned int uid, SEQUENCE_PLAY_ERROR_ID* errorID, unsigned long count)
#define _LOGAPM3SEQUENCE 1
bool CALLPLEB Sequence_beginPlay(SequenceAccountingBegin beginPlay, unsigned int uid, SEQUENCE_PLAY_ERROR_ID* errorID, unsigned long count)
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_beginPlay");
@ -13,7 +12,7 @@ bool __fastcall Sequence_beginPlay(SequenceAccountingBegin beginPlay, unsigned i
return Sequence_beginPlayReturnValue;
}
bool Sequence_clearBackup()
bool CALLPLEB Sequence_clearBackup()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_clearBackup");
@ -21,7 +20,7 @@ bool Sequence_clearBackup()
return Sequence_clearBackupReturnValue;
}
bool __fastcall Sequence_continuePlay(SequenceAccountingBegin beginPlay, SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorId, unsigned long count)
bool CALLPLEB Sequence_continuePlay(SequenceAccountingBegin beginPlay, SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorId, unsigned long count)
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_continuePlay");
@ -29,7 +28,7 @@ bool __fastcall Sequence_continuePlay(SequenceAccountingBegin beginPlay, Sequenc
return Sequence_continuePlayReturnValue;
}
bool __fastcall Sequence_endPlay(SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorID)
bool CALLPLEB Sequence_endPlay(SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorID)
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_endPlay");
@ -37,7 +36,7 @@ bool __fastcall Sequence_endPlay(SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ER
return Sequence_endPlayReturnValue;
}
SequenceBookkeeping* Sequence_getBookkeeping()
SequenceBookkeeping* CALLPLEB Sequence_getBookkeeping()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_getBookkeeping");
@ -51,7 +50,7 @@ SequenceBookkeeping* Sequence_getBookkeeping()
return _sequenceBookkeeping;
}
unsigned int Sequence_getPlayingAimeId()
unsigned int CALLPLEB Sequence_getPlayingAimeId()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_getPlayingAimeId");
@ -59,7 +58,7 @@ unsigned int Sequence_getPlayingAimeId()
return Sequence_getPlayingAimeIdReturnValue;
}
bool Sequence_isAccountingPlaying()
bool CALLPLEB Sequence_isAccountingPlaying()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_isAccountingPlaying");
@ -67,7 +66,7 @@ bool Sequence_isAccountingPlaying()
return Sequence_isAccountingPlayingReturnValue;
}
bool Sequence_isPlaying()
bool CALLPLEB Sequence_isPlaying()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_isPlaying");
@ -75,11 +74,10 @@ bool Sequence_isPlaying()
return Sequence_isPlayingReturnValue;
}
bool Sequence_isTest()
bool CALLPLEB Sequence_isTest()
{
#ifdef _LOGAPM3SEQUENCE
info(true, "Sequence_isTest");
#endif
return Sequence_isTestReturnValue;
}
#endif
}

View File

@ -1,4 +1,9 @@
#ifdef _M_AMD64
#pragma once
#ifdef _M_IX86
#define CALLPLEB __stdcall
#else
#define CALLPLEB __fastcall
#endif
struct SequenceAccountingBegin
{
bool AccountingBeginValid;
@ -59,14 +64,12 @@ static bool Sequence_isPlayingReturnValue = false;
static bool Sequence_isTestReturnValue = 0;
bool Sequence_isTest();
bool Sequence_isPlaying();
bool Sequence_isAccountingPlaying();
unsigned int Sequence_getPlayingAimeId();
SequenceBookkeeping* Sequence_getBookkeeping();
bool __fastcall Sequence_endPlay(SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorID);
bool __fastcall Sequence_continuePlay(SequenceAccountingBegin beginPlay, SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorId, unsigned long count);
bool Sequence_clearBackup();
bool __fastcall Sequence_beginPlay(SequenceAccountingBegin beginPlay, unsigned int uid, SEQUENCE_PLAY_ERROR_ID* errorID, unsigned long count);
#endif
bool CALLPLEB Sequence_isTest();
bool CALLPLEB Sequence_isPlaying();
bool CALLPLEB Sequence_isAccountingPlaying();
unsigned int CALLPLEB Sequence_getPlayingAimeId();
SequenceBookkeeping* CALLPLEB Sequence_getBookkeeping();
bool CALLPLEB Sequence_endPlay(SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorID);
bool CALLPLEB Sequence_continuePlay(SequenceAccountingBegin beginPlay, SequenceAccountingEnd endPlay, SEQUENCE_PLAY_ERROR_ID* errorId, unsigned long count);
bool CALLPLEB Sequence_clearBackup();
bool CALLPLEB Sequence_beginPlay(SequenceAccountingBegin beginPlay, unsigned int uid, SEQUENCE_PLAY_ERROR_ID* errorID, unsigned long count);

View File

@ -613,6 +613,9 @@ void GameDetect::DetectCurrentGame()
NesicaKey = NesicaKey::BlazBlueCentralFiction;
isNesica = true;
break;
case 0x79fa2f58: // Umihara KawaseFresh!ForAC
SetGameId(GameID::Umifresh, "Umihara KawaseFresh! For AC");
break;
#endif
#ifdef _AMD64_
case 0xf322d053:

View File

@ -113,5 +113,6 @@ enum class GameID
Doa6FM14,
Doa6Test,
WMMT5DXPlus,
GGS
GGS,
Umifresh
};