{"type": "func", "start": 784004, "end": 784076, "name": "sub_BF684", "pseudocode": "// \n// sub_BF684 from 0xbf684 to 0xbf6cc (72 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall sub_BF684(_QWORD *a1)\n{\n  __int64 v1; // kr00_8\n  int result; // r0\n  int v3; // r0\n  int i; // r1\n  int v5; // r2\n\n  v1 = *a1;\n  result = (*((int (__fastcall **)(_QWORD *, _DWORD, _DWORD))a1 + 1))(\n             a1,\n             *(_DWORD *)(*(_DWORD *)a1 + 24),\n             *(_DWORD *)(*(_DWORD *)a1 + 8));\n  if ( !result )\n  {\n    if ( *(_DWORD *)(v1 + 16) == 1 )\n    {\n      v3 = *(_DWORD *)(v1 + 24);\n      for ( i = 0; ; ++i )\n      {\n        v5 = *(_DWORD *)(v1 + 12);\n        if ( i >= v5 )\n          break;\n        *(_BYTE *)(v3 + i) ^= 0x80u;\n      }\n    }\n    else\n    {\n      v5 = *(_DWORD *)(v1 + 12);\n    }\n    result = j_FMOD_OS_File_Write(*(_DWORD *)(v1 + 28), *(_DWORD *)(v1 + 24), v5, 0);\n    if ( !result )\n    {\n      *(_DWORD *)(v1 + 20) += *(_DWORD *)(v1 + 12);\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_BF684 from 0xbf684 to 0xbf6cc (72 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R4,R6,R7,LR}                                          ; +0x0, 0xbf684\nADD             R7, SP, #8                                             ; +0x2, 0xbf686\nLDRD.W          R4, R3, [R0]                                           ; +0x4, 0xbf688\nLDR             R2, [R4,#8]                                            ; +0x8, 0xbf68c\nLDR             R1, [R4,#0x18]                                         ; +0xa, 0xbf68e\nBLX             R3                                                     ; +0xc, 0xbf690\nCBNZ            R0, locret_BF6BE                                       ; +0xe, 0xbf692\nLDR             R0, [R4,#0x10]                                         ; +0x10, 0xbf694\nCMP             R0, #1                                                 ; +0x12, 0xbf696\nBNE             loc_BF6B0                                              ; +0x14, 0xbf698\nLDR             R0, [R4,#0x18]                                         ; +0x16, 0xbf69a\nMOVS            R1, #0                                                 ; +0x18, 0xbf69c\nLDR             R2, [R4,#0xC]                                          ; +0x1a, 0xbf69e\nCMP             R1, R2                                                 ; +0x1c, 0xbf6a0\nBGE             loc_BF6B2                                              ; +0x1e, 0xbf6a2\nLDRB            R2, [R0,R1]                                            ; +0x20, 0xbf6a4\nEOR.W           R2, R2, #0x80                                          ; +0x22, 0xbf6a6\nSTRB            R2, [R0,R1]                                            ; +0x26, 0xbf6aa\nADDS            R1, #1                                                 ; +0x28, 0xbf6ac\nB               loc_BF69E                                              ; +0x2a, 0xbf6ae\nLDR             R2, [R4,#0xC]                                          ; +0x2c, 0xbf6b0\nLDRD.W          R1, R0, [R4,#0x18]                                     ; +0x2e, 0xbf6b2\nMOVS            R3, #0                                                 ; +0x32, 0xbf6b6\nBLX             j_FMOD_OS_File_Write                                   ; +0x34, 0xbf6b8\nCBZ             R0, loc_BF6C0                                          ; +0x38, 0xbf6bc\nPOP             {R4,R6,R7,PC}                                          ; +0x3a, 0xbf6be\nLDR             R0, [R4,#0xC]                                          ; +0x3c, 0xbf6c0\nLDR             R1, [R4,#0x14]                                         ; +0x3e, 0xbf6c2\nADD             R0, R1                                                 ; +0x40, 0xbf6c4\nSTR             R0, [R4,#0x14]                                         ; +0x42, 0xbf6c6\nMOVS            R0, #0                                                 ; +0x44, 0xbf6c8\nPOP             {R4,R6,R7,PC}                                          ; +0x46, 0xbf6ca", "xrefs": [], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}