first,plz forgive my poor English~
FrameScript_RegisterFunction = 0x140083820 ( NOT Rebase, [5.4.1 17538] Release x64)
x86 version,pretty easy and works fine for me!
PHP Code:
INT_PTR __cdecl FrameScript__RegisterFunction (const char* Name, INT_PTR(__cdecl* scriptFunction)(UINT_PTR))
x64 version:
PHP Code:
INT_PTR FrameScript__RegisterFunction (const char* Name)
it's so strange,it passes only one parameter(rcx) ???
here is the caller:
PHP Code:
sub_140750B60 proc near
arg_0= qword ptr 8
mov [rsp+arg_0], rbx
push rdi
sub rsp, 20h
lea rbx, off_1411E9620
mov edi, 4
mov rcx, [rbx]
call FrameScript_RegisterFunction
add rbx, 10h
dec rdi
...
i'v try something like that ,but don't work 
PHP Code:
struct FrameScript__RegisterFunction_Arg
{
const char* FunctionName;
INT_PTR funcPtr;
};
INT_PTR FrameScript__RegisterFunction (FrameScript__RegisterFunction_Argchar arg)
or try masm,also failed..
PHP Code:
.data
F_FrameScript_RegisterFunction dq 0140083820h
.code
PUBLIC ASM_FrameScript__RegisterFunction
ASM_FrameScript__RegisterFunction PROC
mov rbx,rdx
sub rsp, 20h
call F_FrameScript_RegisterFunction
add rsp, 20h
RET
ASM_FrameScript__RegisterFunction ENDP
End
then use it in c++
extern "C" INT_PTR ASM_FrameScript__RegisterFunction (const char* name, FrameScript__RegisterFunction_Arg arg);
can anyone give me some advice plz, thanks in advance!