kone
소미소프트
소미소프트

마법소녀 실피나 암호화된 js 파일 분석 (문제없음)

정보
39,874 views · 8 points

내용이 암호화되서 의심스럽기 짝이 없는 파일 두개가 있는데 제작자가 암호화해둔것으로 보임

ImageComposer.js

별 내용 없음. 이미지 조합해서 디스플레이하는 로직이 다임

연습삼아 암호화해본것으로 보임

CompositeLimit.js

배틀로그 등 게임에 필요한 로직을 인질로 잡고 있음 (없으면 게임이 불가능)

4초마다 디버거 막음

콘솔 아웃풋 막음

해당 파일 자체의 변조 막음 (다른 파일의 변조를 막지는 않음 - 겜 번역해도 아무 상관 없음)

DRM이나 스파이웨어 아님

분석

## Confirmed disruptive behavior

1. Explicit debugger recursion. antiDebug is the original _0x25a1b6. Its inner function constructs Function("debugger") through an ordinary function's .constructor and invokes it. Both sides of its numeric condition execute the debugger. It then recurses with an incremented counter and catches the eventual error. This can produce repeated pauses whenever debugging is active and consumes work even without debugger pauses.

2. Startup and repeated invocation. A startup guard inspects the inner function's source and normally starts it immediately. Another closure schedules setInterval(antiDebug, 4000).

3. Infinite-loop trap. Passing a string to the inner function invokes dynamically constructed while (true) {}. The startup integrity check deliberately passes the string "0" if its source-pattern tests fail. This path can block the game thread indefinitely.

4. Global console suppression. The plugin replaces console.log, warn, info, error, exception, table, and trace with silent functions. It also binds each replacement's toString to the prior method's toString, making casual inspection less revealing. This suppresses diagnostics from other code using those same console methods.

5. Source-text traps. A one-use guard applies the nested-quantifier expression (((.+)+)+)+$ to function source. Such checks are sensitive to source formatting and can be computationally expensive. The original string-decoder bootstrap also checks function source: one failure path grows an array while repeatedly extending the loop bound, so that loop does not terminate normally. These decoder checks are omitted from the readable runtime because the entire decoder was replaced by literals.

The dynamically constructed code I found resolves to these purposes: obtain the global object with return this, run debugger, or enter while (true) {}. There is no hidden URL or shell command in those constructed bodies.

## Actual plugin behavior

| Area | Recovered behavior |

| --- | --- |

| Plugin identity | Reads PluginManager.parameters("CompositeLimit"); the returned parameters are unused. |

| Global API | Defines window.TickerManager with methods to show notifications, hide notifications, clear all saved log entries, and clear the oldest entry. |

| Engine changes | Wraps Game_System.initialize, wraps Scene_Map.createDisplayObjects, wraps Window_BattleLog.initialize, and replaces Window_BattleLog.drawLineText. |

| State | Initializes $gameSystem.limits to an empty array. The log container's show method stores converted text and trims that array to 15 entries. The file delegates any eventual save-file persistence to the engine. |

| Containers | Creates a transient notification container and a separate log container in the current scene. Restores existing saved entries on map display creation. |

| Item lifetime | Animates in for 30 update frames, displays for 200 frames, then animates out for 30 frames. Log-mode items skip automatic display expiry. Ended items are removed and the others move into position. |

| Capacity | More than 15 visible items causes the oldest visible item to start hiding. It can remain in the children array until its hiding animation finishes. |

| Text | Expands RPG Maker variable, actor-name, party-member-name, and currency escapes. Optionally prepends + to positive variable values. Renders icons from IconSet. |

| Resources | Requests ImageManager.loadPicture("small_black") and ImageManager.loadSystem("IconSet"). These are engine-managed asset loads, not arbitrary external endpoints embedded in this file. |

| Battle log | Hides the normal battle-log window, strips <CENTER> and <SIMPLE> markers, optionally inserts the action icon, and sends the text to the ticker. |

| Map-specific animation | Enables horizontal sliding in battle or on map IDs 17, 168, 169, 186, 166, 171, 170, 173, 111. These original constants were retained as evidence.

기타 exe, dll 등 모두 공인된 nwjs 파일과 일치

다른 js 파일들 암호화되어있거나 네트워크 통신 등 수상한 로직 없음

아스트라 한방이면 전부 완벽하게 복호화되고 알몸으로 털리는데 왜 이런 장난짓 해놓는지 정말 의문임

암호화, 난독화, 컴파일링 등은 요즘 시대에 아무 의미가 없고 의심만 사게 되는 행위라고 생각함

시간낭비했으니 이제 게임하러감…

8
4 comments
걍 대충 인터넷에서 아무거나 주워다가 쓰는거 아님?
그런가? 배틀로그같은거 전부 묶여있던데
All
Title
Body