{"type": "func", "start": 442224, "end": 442336, "name": "sub_6BF70", "pseudocode": "// \n// sub_6BF70 from 0x6bf70 to 0x6bfe0 (112 bytes)\n// \n// 1 xrefs:\n// > sub_6BCC4 @ 0x6bcf0\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_6BF70(_DWORD *a1, int a2)\n{\n  int v4; // r6\n  int v5; // r0\n  int v6; // r4\n  void (__fastcall *v7)(int, int, _DWORD); // r3\n  int v8; // r5\n  int v10; // [sp+0h] [bp-18h] BYREF\n  char v11; // [sp+4h] [bp-14h]\n\n  v10 = a1[7];\n  j_FMOD_OS_CriticalSection_Enter(v10);\n  v4 = a2 + 12;\n  v11 = 1;\n  v5 = sub_6C43C(a1 + 19, a2 + 12);\n  if ( !v5 )\n    goto LABEL_6;\n  v6 = v5;\n  j_FMOD_OS_File_Close(*(_DWORD *)(v5 + 8));\n  *(_DWORD *)(v6 + 8) = 0;\n  v7 = (void (__fastcall *)(int, int, _DWORD))a1[27];\n  if ( v7 )\n    v7(v6 + 16, 1, a1[28]);\n  v8 = sub_6C506(a1 + 19, v4);\n  if ( !v8 )\n  {\n    v8 = sub_6BC10(v6);\n    if ( !v8 )\nLABEL_6:\n      v8 = 0;\n  }\n  sub_44984((int)&v10);\n  return v8;\n}", "assembly": "; \n; sub_6BF70 from 0x6bf70 to 0x6bfe0 (112 bytes)\n; \n; 1 xrefs:\n; > sub_6BCC4 @ 0x6bcf0\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-R7,LR}                                             ; +0x0, 0x6bf70\nADD             R7, SP, #0xC                                           ; +0x2, 0x6bf72\nPUSH.W          {R8}                                                   ; +0x4, 0x6bf74\nSUB             SP, SP, #8                                             ; +0x8, 0x6bf78\nMOV             R5, R0                                                 ; +0xa, 0x6bf7a\nLDR             R0, [R0,#0x1C]                                         ; +0xc, 0x6bf7c\nMOV             R4, R1                                                 ; +0xe, 0x6bf7e\nSTR             R0, [SP,#8+var_8]                                      ; +0x10, 0x6bf80\nBLX             j_FMOD_OS_CriticalSection_Enter                        ; +0x12, 0x6bf82\nADD.W           R6, R4, #0xC                                           ; +0x16, 0x6bf86\nADD.W           R8, R5, #0x4C ; 'L'                                    ; +0x1a, 0x6bf8a\nMOVS            R0, #1                                                 ; +0x1e, 0x6bf8e\nSTRB.W          R0, [SP,#8+var_4]                                      ; +0x20, 0x6bf90\nMOV             R0, R8                                                 ; +0x24, 0x6bf94\nMOV             R1, R6                                                 ; +0x26, 0x6bf96\nBL              sub_6C43C                                              ; +0x28, 0x6bf98\nCBZ             R0, loc_6BFCE                                          ; +0x2c, 0x6bf9c\nMOV             R4, R0                                                 ; +0x2e, 0x6bf9e\nLDR             R0, [R0,#8]                                            ; +0x30, 0x6bfa0\nBLX             j_FMOD_OS_File_Close                                   ; +0x32, 0x6bfa2\nMOVS            R0, #0                                                 ; +0x36, 0x6bfa6\nSTR             R0, [R4,#8]                                            ; +0x38, 0x6bfa8\nLDR             R3, [R5,#0x6C]                                         ; +0x3a, 0x6bfaa\nCBZ             R3, loc_6BFB8                                          ; +0x3c, 0x6bfac\nLDR             R2, [R5,#0x70]                                         ; +0x3e, 0x6bfae\nADD.W           R0, R4, #0x10                                          ; +0x40, 0x6bfb0\nMOVS            R1, #1                                                 ; +0x44, 0x6bfb4\nBLX             R3                                                     ; +0x46, 0x6bfb6\nMOV             R0, R8                                                 ; +0x48, 0x6bfb8\nMOV             R1, R6                                                 ; +0x4a, 0x6bfba\nBL              sub_6C506                                              ; +0x4c, 0x6bfbc\nMOV             R5, R0                                                 ; +0x50, 0x6bfc0\nCBNZ            R0, loc_6BFD0                                          ; +0x52, 0x6bfc2\nMOV             R0, R4                                                 ; +0x54, 0x6bfc4\nBL              sub_6BC10                                              ; +0x56, 0x6bfc6\nMOV             R5, R0                                                 ; +0x5a, 0x6bfca\nCBNZ            R0, loc_6BFD0                                          ; +0x5c, 0x6bfcc\nMOVS            R5, #0                                                 ; +0x5e, 0x6bfce\nMOV             R0, SP                                                 ; +0x60, 0x6bfd0\nBL              sub_44984                                              ; +0x62, 0x6bfd2\nMOV             R0, R5                                                 ; +0x66, 0x6bfd6\nADD             SP, SP, #8                                             ; +0x68, 0x6bfd8\nPOP.W           {R8}                                                   ; +0x6a, 0x6bfda\nPOP             {R4-R7,PC}                                             ; +0x6e, 0x6bfde", "xrefs": ["sub_6BCC4 @ 0x6bcf0"], "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"}