Beispiel #1
0
  @Override
  public void execute() {
    long t1 = this.params.get(0);
    long t2 = this.params.get(1);

    char[] lpBuffer = new char[(int) t2];
    UINT uSize = new UINT(t2);
    UINT ret = Kernel32DLL.INSTANCE.GetSystemDirectory(lpBuffer, uSize);
    String curDir = new String(lpBuffer);
    curDir = curDir.substring(0, ret.intValue());

    memory.setText(this, t1, curDir, ret.intValue());
    System.out.println("System Directory:" + curDir);
    register.mov("eax", new LongValue(ret.longValue()));
  }
Beispiel #2
0
  @Override
  public void execute() {
    long t1 = this.params.get(0);
    long t2 = this.params.get(1);
    long t3 = this.params.get(2);
    long t4 = this.params.get(3);
    long t5 = this.params.get(4);
    long t6 = this.params.get(5);

    LCID Locale = new LCID(t1);
    DWORD dwMapFlags = new DWORD(t2);
    WString lpSrcStr = new WString(memory.getText(this, t3));
    int cchSrc = (int) t4;
    char[] lpDestStr = (t5 != 0L && t6 != 0L) ? new char[(int) t6] : null;
    int cchDest = (int) t6;
    int ret =
        Kernel32DLL.INSTANCE.LCMapString(Locale, dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest);

    register.mov("eax", new LongValue(ret));

    if (lpDestStr != null) {
      memory.setText(this, t5, new String(lpDestStr));
    }
  }