{"type": "func", "start": 439020, "end": 439148, "name": "sub_6B2EC", "pseudocode": "// \n// sub_6B2EC from 0x6b2ec to 0x6b36c (128 bytes)\n// \n// 1 xrefs:\n// > sub_522EC @ 0x52534\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_6B2EC(int a1, int *a2, _DWORD *a3)\n{\n  int v3; // r6\n  int result; // r0\n  int v8; // r3\n  int v9; // r0\n  int v10; // r1\n  int v11; // r2\n  int v12; // r2\n  int v13; // r4\n  int v14; // r0\n  int v15; // r2\n  int v16; // r1\n\n  v3 = a1 + 1188;\n  result = sub_6ADD0((__int64 *)(a1 + 1188), 0, a3);\n  if ( result )\n  {\n    if ( result != 45 )\n      return result;\n    goto LABEL_5;\n  }\n  if ( *(_BYTE *)(a1 + 624) )\n  {\nLABEL_5:\n    result = 0;\n    *a2 = 0;\n    return result;\n  }\n  v9 = a3[1];\n  v10 = -1;\n  do\n    v11 = v9 + v10++;\n  while ( (v11 + 1) << 30 );\n  v12 = a3[3];\n  do\n  {\n    v13 = v10;\n    v10 += 4;\n    if ( v10 > v12 )\n      break;\n    v8 = *(_DWORD *)(v9 + v13) + 1;\n  }\n  while ( *(_DWORD *)(v9 + v13) == -1 );\n  result = sub_6AF3E(v3, v13, v12, v8);\n  if ( !result )\n  {\n    v14 = a3[3];\n    if ( v14 <= v13 )\n    {\n      v16 = a3[2];\n      v15 = a3[4];\n    }\n    else\n    {\n      v15 = v14 - v13;\n      v16 = a3[1] + v13;\n    }\n    result = 0;\n    if ( v15 <= 0 )\n      v16 = 0;\n    *a2 = v16;\n  }\n  return result;\n}", "assembly": "; \n; sub_6B2EC from 0x6b2ec to 0x6b36c (128 bytes)\n; \n; 1 xrefs:\n; > sub_522EC @ 0x52534\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, 0x6b2ec\nADD             R7, SP, #0xC                                           ; +0x2, 0x6b2ee\nPUSH.W          {R8}                                                   ; +0x4, 0x6b2f0\nADDW            R6, R0, #0x4A4                                         ; +0x8, 0x6b2f4\nMOV             R8, R1                                                 ; +0xc, 0x6b2f8\nMOV             R4, R0                                                 ; +0xe, 0x6b2fa\nMOVS            R1, #0                                                 ; +0x10, 0x6b2fc\nMOV             R0, R6                                                 ; +0x12, 0x6b2fe\nMOV             R5, R2                                                 ; +0x14, 0x6b300\nBL              sub_6ADD0                                              ; +0x16, 0x6b302\nCBZ             R0, loc_6B30E                                          ; +0x1a, 0x6b306\nCMP             R0, #0x2D ; '-'                                        ; +0x1c, 0x6b308\nBEQ             loc_6B314                                              ; +0x1e, 0x6b30a\nB               loc_6B31A                                              ; +0x20, 0x6b30c\nLDRB.W          R0, [R4,#0x270]                                        ; +0x22, 0x6b30e\nCBZ             R0, loc_6B320                                          ; +0x26, 0x6b312\nMOVS            R0, #0                                                 ; +0x28, 0x6b314\nSTR.W           R0, [R8]                                               ; +0x2a, 0x6b316\nPOP.W           {R8}                                                   ; +0x2e, 0x6b31a\nPOP             {R4-R7,PC}                                             ; +0x32, 0x6b31e\nLDR             R0, [R5,#4]                                            ; +0x34, 0x6b320\nMOV.W           R1, #0xFFFFFFFF                                        ; +0x36, 0x6b322\nADDS            R2, R0, R1                                             ; +0x3a, 0x6b326\nADDS            R1, #1                                                 ; +0x3c, 0x6b328\nADDS            R2, #1                                                 ; +0x3e, 0x6b32a\nLSLS            R2, R2, #0x1E                                          ; +0x40, 0x6b32c\nBNE             loc_6B326                                              ; +0x42, 0x6b32e\nLDR             R2, [R5,#0xC]                                          ; +0x44, 0x6b330\nMOV             R4, R1                                                 ; +0x46, 0x6b332\nADDS            R1, #4                                                 ; +0x48, 0x6b334\nCMP             R1, R2                                                 ; +0x4a, 0x6b336\nBGT             loc_6B340                                              ; +0x4c, 0x6b338\nLDR             R3, [R0,R4]                                            ; +0x4e, 0x6b33a\nADDS            R3, #1                                                 ; +0x50, 0x6b33c\nBEQ             loc_6B332                                              ; +0x52, 0x6b33e\nMOV             R0, R6                                                 ; +0x54, 0x6b340\nMOV             R1, R4                                                 ; +0x56, 0x6b342\nBL              sub_6AF3E                                              ; +0x58, 0x6b344\nCMP             R0, #0                                                 ; +0x5c, 0x6b348\nBNE             loc_6B31A                                              ; +0x5e, 0x6b34a\nLDR             R0, [R5,#0xC]                                          ; +0x60, 0x6b34c\nCMP             R0, R4                                                 ; +0x62, 0x6b34e\nBLE             loc_6B35A                                              ; +0x64, 0x6b350\nSUBS            R2, R0, R4                                             ; +0x66, 0x6b352\nLDR             R0, [R5,#4]                                            ; +0x68, 0x6b354\nADDS            R1, R0, R4                                             ; +0x6a, 0x6b356\nB               loc_6B35E                                              ; +0x6c, 0x6b358\nLDR             R1, [R5,#8]                                            ; +0x6e, 0x6b35a\nLDR             R2, [R5,#0x10]                                         ; +0x70, 0x6b35c\nMOVS            R0, #0                                                 ; +0x72, 0x6b35e\nCMP             R2, #0                                                 ; +0x74, 0x6b360\nIT LE                                                                  ; +0x76, 0x6b362\nMOVLE           R1, R0                                                 ; +0x78, 0x6b364\nSTR.W           R1, [R8]                                               ; +0x7a, 0x6b366\nB               loc_6B31A                                              ; +0x7e, 0x6b36a", "xrefs": ["sub_522EC @ 0x52534"], "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"}