{"type": "func", "start": 550984, "end": 551046, "name": "sub_86848", "pseudocode": "// \n// sub_86848 from 0x86848 to 0x86886 (62 bytes)\n// \n// 3 xrefs:\n// > sub_874A4 @ 0x876c6\n// > sub_874A4 @ 0x8779e\n// > sub_874A4 @ 0x877d0\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_86848(int a1)\n{\n  int v1; // r1\n  int v2; // r2\n  int v3; // r3\n  int v4; // r0\n\n  v1 = *(_DWORD *)(a1 + 4);\n  v2 = *(_DWORD *)(a1 + 224);\n  v3 = *(_DWORD *)(v1 + 40);\n  if ( v3 < v2 )\n  {\n    v4 = v3 + 4 * *(unsigned __int8 *)(a1 + 228);\n    if ( v4 > v2 )\n      v4 = v2;\nLABEL_8:\n    *(_DWORD *)(v1 + 40) = v4;\n    goto LABEL_9;\n  }\n  if ( v3 > v2 )\n  {\n    v4 = v3 - 4 * *(unsigned __int8 *)(a1 + 228);\n    if ( v4 < v2 )\n      v4 = v2;\n    goto LABEL_8;\n  }\nLABEL_9:\n  *(_BYTE *)(v1 + 36) |= 1u;\n  return 0;\n}", "assembly": "; \n; sub_86848 from 0x86848 to 0x86886 (62 bytes)\n; \n; 3 xrefs:\n; > sub_874A4 @ 0x876c6\n; > sub_874A4 @ 0x8779e\n; > sub_874A4 @ 0x877d0\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\nLDR             R1, [R0,#4]                                            ; +0x0, 0x86848\nLDR.W           R2, [R0,#0xE0]                                         ; +0x2, 0x8684a\nLDR             R3, [R1,#0x28]                                         ; +0x6, 0x8684e\nCMP             R3, R2                                                 ; +0x8, 0x86850\nBGE             loc_86864                                              ; +0xa, 0x86852\nLDRB.W          R0, [R0,#0xE4]                                         ; +0xc, 0x86854\nADD.W           R0, R3, R0,LSL#2                                       ; +0x10, 0x86858\nCMP             R0, R2                                                 ; +0x14, 0x8685c\nIT GT                                                                  ; +0x16, 0x8685e\nMOVGT           R0, R2                                                 ; +0x18, 0x86860\nB               loc_86874                                              ; +0x1a, 0x86862\nBLE             loc_86876                                              ; +0x1c, 0x86864\nLDRB.W          R0, [R0,#0xE4]                                         ; +0x1e, 0x86866\nSUB.W           R0, R3, R0,LSL#2                                       ; +0x22, 0x8686a\nCMP             R0, R2                                                 ; +0x26, 0x8686e\nIT LT                                                                  ; +0x28, 0x86870\nMOVLT           R0, R2                                                 ; +0x2a, 0x86872\nSTR             R0, [R1,#0x28]                                         ; +0x2c, 0x86874\nLDRB.W          R0, [R1,#0x24]                                         ; +0x2e, 0x86876\nORR.W           R0, R0, #1                                             ; +0x32, 0x8687a\nSTRB.W          R0, [R1,#0x24]                                         ; +0x36, 0x8687e\nMOVS            R0, #0                                                 ; +0x3a, 0x86882\nBX              LR                                                     ; +0x3c, 0x86884", "xrefs": ["sub_874A4 @ 0x876c6", "sub_874A4 @ 0x8779e", "sub_874A4 @ 0x877d0"], "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"}