Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Resonance of fate PC.

Featured Replies

  • Author
  • Localization

aluigi, posted Fri Oct 19, 2018 9:22 am (39711)


I doubt that code will work "as-is".

This script implements that (edited) function:
Code:
set MEMORY_FILE10 string "
typedef unsigned char   _WORD;
typedef unsigned int    _DWORD;
typedef unsigned int    size_t;
#define __int64 int
#define __int8  char

char sub_140390630(char *Src, char *Dst, size_t Size, size_t a4)
{
  //size_t v4; // rdi
  char *v5; // rbx
  char *v6; // rsi
  char *v7; // rbp
  //int v9; // ecx
  //char *v10; // rdx
  char *v11; // rsi
  int v12; // er10
  signed int v13; // er11
  unsigned int v14; // edx
  unsigned int v15; // er8
  __int64 v16; // rcx
  int v17; // eax
  int v18; // er8
  int v19; // er9
  char *v20; // rdi
  unsigned int v21; // edx
  __int64 i; // rcx
  signed int v23; // eax
  char *v24; // rdi
  __int64 v25; // rdx
  __int64 j; // rcx
  char *v27; // rdi
  __int64 k; // rcx
  char *v29; // rbp
  int v30; // er10
  signed int v31; // er11
  unsigned int v32; // ecx
  unsigned int v33; // er8
  __int64 v34; // rcx
  int v35; // eax
  int v36; // er8
  int v37; // er9
  char *v38; // rdi
  unsigned int v39; // edx
  __int64 l; // rcx
  signed int v41; // eax
  char *v42; // rdi
  __int64 v43; // rdx
  __int64 m; // rcx
  char *v45; // rdi
  __int64 n; // rcx
  //int v47; // [rsp 0h] [rbp-28h]

  //v4 = Size;
  v5 = (char *)Dst;
  v6 = (char *)Src;
  if ( Size == a4 )
  {
    if ( Dst >= Src || (char *)Dst Size <= Src )
      for(i = 0; i < a4; i ) Dst[i] = Src[i];      //memcpy(Dst, Src, a4);
    else
      for(i = a4-1; i >= 0; i--) Dst[i] = Src[i];   //memmove(Dst, Src, a4);
    return 1;
  }
  if ( Dst < Src )
  {
    v7 = (char *)Dst a4;
    if ( (char *)Dst a4 > Src )
    {
      if ( /*(signed __int64)*/a4 > 0x10000 )
        return 0;
/*
      if ( dword_141780DE0 > *(_DWORD *)(*(_QWORD *)(__readgsqword(0x58u) 8i64 * (unsigned int)TlsIndex) 4i64) )
      {
        sub_1409D19B8(&dword_141780DE0);
        if ( dword_141780DE0 == -1 )
        {
          sub_1402D9C20(&unk_141780D60);
          sub_1409D0FA4(sub_140A144B0);
          sub_1409D1958(&dword_141780DE0);
        }
      }
      v9 = 0;
      while ( _InterlockedCompareExchange(&dword_141780D98, 0, -1) != -1 )
      {
        if ( v9 >= 512 )
        {
          _InterlockedIncrement(&dword_141780D9C);
          while ( _InterlockedCompareExchange(&dword_141780D98, 0, -1) != -1 )
          {
            if ( (unsigned __int8)sub_140337340(&unk_141780DD8) )
            {
              sub_140337370(&unk_141780DD8);
            }
            else
            {
              _InterlockedDecrement(&dword_141780D9C);
              Sleep_0(1u);
            }
            _InterlockedIncrement(&dword_141780D9C);
          }
          _InterlockedDecrement(&dword_141780D9C);
          break;
        }
      }
      _InterlockedOr(&v47, 0);
*/
      //v10 = v6;
      v11 = Src;
      //v11 = (char *)&unk_141770D60;
      //memcpy(&unk_141770D60, v10, v4);
      v12 = 0;
      v13 = 1;
      if ( v5 >= v7 )
      {
LABEL_56:
/*
        _InterlockedOr(&v47, 0);
        dword_141780D98 = -1;
        _InterlockedOr(&v47, 0);
        if ( dword_141780D9C > 20 )
        {
          _InterlockedDecrement(&dword_141780D9C);
          if ( (unsigned __int8)sub_140337340(&unk_141780DD8) )
            sub_140337350(&unk_141780DD8);
        }
*/
        return 1;
      }
      while ( 1 )
      {
        if ( --v13 )
        {
          v12 >>= 1;
        }
        else
        {
          v12 = (unsigned __int8)*v11;
          v13 = 8;
          v11;
        }
        if ( !(v12 & 1) )
          break;
        *v5 = *v11 ;
LABEL_55:
        if ( v5 >= v7 )
          goto LABEL_56;
      }
      v14 = (unsigned int)(unsigned __int8)v11[1] >> 4;
      v15 = (unsigned __int8)*v11 | ((v11[1] & 0xF) << 8);
      if ( v14 < 0xF )
      {
        if ( v14 != -3 )
        {
          v16 = v14 3;
          do
          {
            *v5 = v5[-v15];
            v5;
            --v16;
          }
          while ( v16 );
        }
LABEL_54:
        v11 = 2;
        goto LABEL_55;
      }
      if ( v15 >= 0x100 )
      {
        //v11[1];
        v17 = (unsigned __int8)*v11;
        v18 = (v15 >> 8) 3;
      }
      else
      {
        v17 = (unsigned __int8)(v11 )[2];
        v18 = v15 19;
      }
      v19 = v17 | (v17 << 8);
      if ( (unsigned __int8)v5 & 1 )
      {
        *v5 = v17;
        if ( v18 & 1 )
        {
          if ( (unsigned int)v18 > 1 )
          {
            v20 = v5;
            v21 = ((unsigned int)(v18 - 2) >> 1) 1;
            for ( i = v21; i; --i )
            {
              *(_WORD *)v20 = v19;
              v20 = 2;
            }
            v5 = 2 * v21;
          }
          goto LABEL_54;
        }
        v23 = 1;
        if ( v18 - 1 <= 1 )
        {
LABEL_52:
          if ( v23 < v18 )
            *v5 = v19;
          goto LABEL_54;
        }
        v24 = v5;
        v25 = ((unsigned int)(v18 - 3) >> 1) 1;
        for ( j = (unsigned int)v25; j; --j )
        {
          *(_WORD *)v24 = v19;
          v24 = 2;
        }
        v23 = 2 * v25 1;
      }
      else
      {
        v23 = 0;
        if ( v18 - 1 <= 0 )
          goto LABEL_52;
        v27 = v5;
        v25 = ((unsigned int)(v18 - 2) >> 1) 1;
        for ( k = (unsigned int)v25; k; --k )
        {
          *(_WORD *)v27 = v19;
          v27 = 2;
        }
        v23 = 2 * v25;
      }
      v5 = 2 * v25;
      goto LABEL_52;
    }
  }
  v29 = (char *)Dst a4;
  v30 = 0;
  v31 = 1;
  if ( Dst < (char *)Dst a4 )
  {
    while ( 1 )
    {
      if ( --v31 )
      {
        v30 >>= 1;
      }
      else
      {
        v30 = (unsigned __int8)*v6;
        v31 = 8;
        v6;
      }
      if ( !(v30 & 1) )
        break;
      *v5 = *v6 ;
LABEL_93:
      if ( v5 >= v29 )
        return 1;
    }
    v32 = (unsigned int)(unsigned __int8)v6[1] >> 4;
    v33 = (unsigned __int8)*v6 | ((v6[1] & 0xF) << 8);
    if ( v32 < 0xF )
    {
      v34 = v32 3;
      if ( (_DWORD)v34 )
      {
        do
        {
          *v5 = v5[-v33];
          v5;
          --v34;
        }
        while ( v34 );
      }
LABEL_92:
      v6 = 2;
      goto LABEL_93;
    }
    if ( v33 >= 0x100 )
    {
      //v6[1];
      v35 = (unsigned __int8)*v6;
      v36 = (v33 >> 8) 3;
    }
    else
    {
      v35 = (unsigned __int8)(v6 )[2];
      v36 = v33 19;
    }
    v37 = v35 | (v35 << 8);
    if ( (unsigned __int8)v5 & 1 )
    {
      *v5 = v35;
      if ( v36 & 1 )
      {
        if ( (unsigned int)v36 > 1 )
        {
          v38 = v5;
          v39 = ((unsigned int)(v36 - 2) >> 1) 1;
          for ( l = v39; l; --l )
          {
            *(_WORD *)v38 = v37;
            v38 = 2;
          }
          v5 = 2 * v39;
        }
        goto LABEL_92;
      }
      v41 = 1;
      if ( v36 - 1 <= 1 )
      {
LABEL_90:
        if ( v41 < v36 )
          *v5 = v37;
        goto LABEL_92;
      }
      v42 = v5;
      v43 = ((unsigned int)(v36 - 3) >> 1) 1;
      for ( m = (unsigned int)v43; m; --m )
      {
        *(_WORD *)v42 = v37;
        v42 = 2;
      }
      v41 = 2 * v43 1;
    }
    else
    {
      v41 = 0;
      if ( v36 - 1 <= 0 )
        goto LABEL_90;
      v45 = v5;
      v43 = ((unsigned int)(v36 - 2) >> 1) 1;
      for ( n = (unsigned int)v43; n; --n )
      {
        *(_WORD *)v45 = v37;
        v45 = 2;
      }
      v41 = 2 * v43;
    }
    v5 = 2 * v43;
    goto LABEL_90;
  }
  return 1;
}
"

math OFFSET = ???
math ZSIZE  = ???
math SIZE   = ???
comtype calldll "MEMORY_FILE10 sub_140390630 tcc RET #INPUT# #OUTPUT# #INPUT_SIZE# #OUTPUT_SIZE#"
clog "dump.dat" OFFSET ZSIZE SIZE
You have to set the OFFSET, ZSIZE and SIZE variables.
  • Author
  • Localization

ili, posted Thu Nov 15, 2018 2:10 pm (40393)


thank's we have found Adx file in .usm
any idea how read sound
  • Author
  • Localization

arsijin, posted Mon Jan 27, 2020 2:15 pm (53539)


hi everyone! what should i put here
math OFFSET = ???
math ZSIZE = ???
math SIZE = ???
what number or how to write them? i have 70gb .bin file
thx
  • Author
  • Localization

aluigi, posted Mon Mar 23, 2020 7:57 pm (55005)


@arsijin
That's a work-in-progress script.
There is no tool or solution available as far as I know.
  • Author
  • Localization

arsijin, posted Wed Apr 08, 2020 5:40 am (55619)


aluigi wrote:
@arsijin
That's a work-in-progress script.
There is no tool or solution available as far as I know.

Thx for reply, will be counting on you.
  • Author
  • Localization

aluigi, posted Wed Apr 08, 2020 7:43 am (55627)


I don't think there is anyone working on this game.
  • Author
  • Localization

arsijin, posted Thu May 07, 2020 2:15 pm (56592)


libaibaba wrote:
arsijin wrote:
Siberian GRemlin wrote:
Maybe, tool for Star Ocean can help. https://github.com/RikuKH3/so4pc_pack/releases

thx, but no luck (

https://github.com/kode54/vgmstream/ If it doesn't work, it's encrypted

thx, will it help me extract video files from .bin file, cuz i tried this tool, but its not working? who can help me to extract video files (maybe they are usm type)?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.