{"type": "func", "start": 505424, "end": 505538, "name": "sub_7B650", "pseudocode": "// \n// sub_7B650 from 0x7b650 to 0x7b6c2 (114 bytes)\n// \n// 1 xrefs:\n// > sub_79FF0 @ 0x79ff0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:41:14 +0000\n// \n\nint __fastcall sub_7B650(int a1, int a2, unsigned int a3, int a4)\n{\n  int v6; // r6\n  unsigned int v7; // r0\n  int v8; // r6\n  __int16 v9; // r5\n\n  if ( a4 == 2 )\n  {\n    v7 = *(_DWORD *)(a1 + 1516);\n    if ( v7 != a3 )\n    {\n      if ( v7 > a3 )\n      {\n        sub_4F22C(a1, 0);\n        v8 = 1;\n      }\n      else\n      {\n        v8 = 0;\n      }\n      while ( *(_DWORD *)(a1 + 1516) < a3 )\n        sub_7A02E(a1, 1);\n      if ( v8 )\n      {\n        v9 = *(_WORD *)(a1 + 2420);\n        sub_4F378(a1);\n        *(_WORD *)(a1 + 2420) = v9;\n      }\n    }\n    return 0;\n  }\n  else if ( a4 == 256 )\n  {\n    v6 = 0;\n    sub_4F22C(a1, 0);\n    *(_DWORD *)(a1 + 2456) = a3;\n    *(_DWORD *)(a1 + 2440) = a3;\n  }\n  else\n  {\n    return 19;\n  }\n  return v6;\n}", "assembly": "; \n; sub_7B650 from 0x7b650 to 0x7b6c2 (114 bytes)\n; \n; 1 xrefs:\n; > sub_79FF0 @ 0x79ff0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:41:14 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x7b650\nADD             R7, SP, #0xC                                           ; +0x2, 0x7b652\nPUSH.W          {R11}                                                  ; +0x4, 0x7b654\nMOV             R5, R2                                                 ; +0x8, 0x7b658\nMOV             R4, R0                                                 ; +0xa, 0x7b65a\nCMP             R3, #2                                                 ; +0xc, 0x7b65c\nBEQ             loc_7B67A                                              ; +0xe, 0x7b65e\nCMP.W           R3, #0x100                                             ; +0x10, 0x7b660\nBNE             loc_7B690                                              ; +0x14, 0x7b664\nMOV             R0, R4                                                 ; +0x16, 0x7b666\nMOVS            R1, #0                                                 ; +0x18, 0x7b668\nMOVS            R6, #0                                                 ; +0x1a, 0x7b66a\nBL              sub_4F22C                                              ; +0x1c, 0x7b66c\nSTR.W           R5, [R4,#0x998]                                        ; +0x20, 0x7b670\nSTR.W           R5, [R4,#0x988]                                        ; +0x24, 0x7b674\nB               loc_7B6BA                                              ; +0x28, 0x7b678\nLDR.W           R0, [R4,#0x5EC]                                        ; +0x2a, 0x7b67a\nCMP             R0, R5                                                 ; +0x2e, 0x7b67e\nBEQ             loc_7B6B8                                              ; +0x30, 0x7b680\nBLS             loc_7B694                                              ; +0x32, 0x7b682\nMOV             R0, R4                                                 ; +0x34, 0x7b684\nMOVS            R1, #0                                                 ; +0x36, 0x7b686\nBL              sub_4F22C                                              ; +0x38, 0x7b688\nMOVS            R6, #1                                                 ; +0x3c, 0x7b68c\nB               loc_7B6A0                                              ; +0x3e, 0x7b68e\nMOVS            R6, #0x13                                              ; +0x40, 0x7b690\nB               loc_7B6BA                                              ; +0x42, 0x7b692\nMOVS            R6, #0                                                 ; +0x44, 0x7b694\nB               loc_7B6A0                                              ; +0x46, 0x7b696\nMOV             R0, R4                                                 ; +0x48, 0x7b698\nMOVS            R1, #1                                                 ; +0x4a, 0x7b69a\nBL              sub_7A02E                                              ; +0x4c, 0x7b69c\nLDR.W           R0, [R4,#0x5EC]                                        ; +0x50, 0x7b6a0\nCMP             R0, R5                                                 ; +0x54, 0x7b6a4\nBCC             loc_7B698                                              ; +0x56, 0x7b6a6\nCBZ             R6, loc_7B6B8                                          ; +0x58, 0x7b6a8\nMOV             R0, R4                                                 ; +0x5a, 0x7b6aa\nLDRH.W          R5, [R4,#0x974]                                        ; +0x5c, 0x7b6ac\nBL              sub_4F378                                              ; +0x60, 0x7b6b0\nSTRH.W          R5, [R4,#0x974]                                        ; +0x64, 0x7b6b4\nMOVS            R6, #0                                                 ; +0x68, 0x7b6b8\nMOV             R0, R6                                                 ; +0x6a, 0x7b6ba\nPOP.W           {R11}                                                  ; +0x6c, 0x7b6bc\nPOP             {R4-R7,PC}                                             ; +0x70, 0x7b6c0", "xrefs": ["sub_79FF0 @ 0x79ff0"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}