Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
ShinjukuSoumei
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed May 24, 2024
1 parent a4256dd commit 1173e2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
29 changes: 24 additions & 5 deletions LunaHook/engine64/5pb.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#include"5pb.h"
#include"mages/mages.h"

namespace{
//https://vndb.org/v46553
//新宿葬命
bool _strncat(){
HookParam hp;
hp.address=(uintptr_t)GetProcAddress(GetModuleHandleA("ucrtbase.dll"),"strncat");
hp.type=USING_STRING|CODEC_UTF8|NO_CONTEXT;
hp.text_fun=[](hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* split, size_t* len){
*data=stack->ARG2;
*len=stack->ARG3;
*split=stack->ARG1;
};
hp.filter_fun=[](void* data, size_t* len, HookParam* hp){
auto s=std::string((char*)data,*len);
strReplace(s,"%N","\n");
//sub_140096E80
//%I %B %C %R( %Z %%
return write_string_overwrite(data,len,s);
};
return NewHook(hp,"strncat");
}
}
bool _5pb::attach_function() {
//CHAOS;HEAD_NOAH
bool b3=hookmages::MAGES();
return b3;
}


return b3||_strncat();
}
2 changes: 1 addition & 1 deletion libs/libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
set(SupportWinXP "true")
endif()
#https://github.com/Chuyu-Team/VC-LTL5
include("${CMAKE_CURRENT_LIST_DIR}/VC-LTL helper for cmake.cmake")
#include("${CMAKE_CURRENT_LIST_DIR}/VC-LTL helper for cmake.cmake")

0 comments on commit 1173e2c

Please sign in to comment.