Pointer_stringify is returning garbled text

I have have the following lib.jslib file

mergeInto(LibraryManager.library, {
  IsGuestUser: function (objectName, objectMethodName) {
    gamesmart.user.isGuest(function (result) {
      console.log(Pointer_stringify(objectName), Pointer_stringify(objectMethodName), result);
      gameSmartGameInstance.SendMessage(Pointer_stringify(objectName), Pointer_stringify(objectMethodName), result);
    });
  }
});

Which gets called from here:

namespace GameSmart {
  public class User : API {
    [DllImport("__Internal")]
    public static extern void IsGuestUser(string objectName, string objectMethodName);
  
    public static void IsGuest(string objectName, string objectMethodName) {
      IsGuestUser(objectName, objectMethodName);
    }
  }
}

And is initiated like so:

public class Test : MonoBehaviour {
  void Start() {
    GameSmart.User.IsGuest("GameSmart", "OnIsGuest");
  }
}

As seen above I pass GameSmart and OnIsGuest to the JavaScript, and when it gets to the JavaScript I call Pointer_stringify() on both of the values.

When converted and logged, I get the following output: 0Zހ and ﳀ� I should have gotten GameSmart and OnIsGuest back but I didn’t what is causing this to happen?

Hare you tried to stringify before gamesmart.user.isGuest?

    mergeInto(LibraryManager.library, {
      IsGuestUser: function (objectName, objectMethodName) {
        var jsObjectName = Pointer_stringify(objectName);
        var jsObjectMethodName = Pointer_stringify(objectMethodName);
        gamesmart.user.isGuest(function (result) {
          console.log(jsObjectName, jsObjectMethodName, result);
          gameSmartGameInstance.SendMessage(jsObjectName, jsObjectMethodName, result);
        });
      }
    });

That fixes it! Why do I have to call Pointer_stringify outside of the function?

So, I have started optimizing my function, and added a params string[ ] args property to the end of the value like this:

[DllImport("__Internal")]
public static extern void Execute(string action, string objectName, string objectMethodName, params string[] args);
Execute: function (action, objectName, objectMethodName) {
    var args = [];
    // Convert "arguments" to an array
    for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]) }
    // Remove the first 3 items: "action", "objectName", "objectMethodName"
    // This will leave us with the methods arguments from params string[] args
    args.splice(0, 3);
    for (var i = 0; i < args.length; i++) {
      args[i] = Pointer_stringify(args[i]);
    }
    switch (jsAction) {
        case 'StoreCategoryItems':
            gamesmart.store.categoryItems({ category: args[0] }, function (result) {
                gameSmartGameInstance.SendMessage(jsObjectName, jsObjectMethodName, JSON.stringify(result));
            })
            break;
    }
}

Is there a way for me to get those arguments passed in? because once converted, they also are garbled the same way as in the original post.