{"type": "func", "start": 559938, "end": 560052, "name": "sub_88B42", "pseudocode": "// \n// sub_88B42 from 0x88b42 to 0x88bb4 (114 bytes)\n// \n// 1 xrefs:\n// > sub_8651C @ 0x8651c\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_88B42(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_86568(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_88B42 from 0x88b42 to 0x88bb4 (114 bytes)\n; \n; 1 xrefs:\n; > sub_8651C @ 0x8651c\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, 0x88b42\nADD             R7, SP, #0xC                                           ; +0x2, 0x88b44\nPUSH.W          {R11}                                                  ; +0x4, 0x88b46\nMOV             R5, R2                                                 ; +0x8, 0x88b4a\nMOV             R4, R0                                                 ; +0xa, 0x88b4c\nCMP             R3, #2                                                 ; +0xc, 0x88b4e\nBEQ             loc_88B6C                                              ; +0xe, 0x88b50\nCMP.W           R3, #0x100                                             ; +0x10, 0x88b52\nBNE             loc_88B82                                              ; +0x14, 0x88b56\nMOV             R0, R4                                                 ; +0x16, 0x88b58\nMOVS            R1, #0                                                 ; +0x18, 0x88b5a\nMOVS            R6, #0                                                 ; +0x1a, 0x88b5c\nBL              sub_4F22C                                              ; +0x1c, 0x88b5e\nSTR.W           R5, [R4,#0x998]                                        ; +0x20, 0x88b62\nSTR.W           R5, [R4,#0x988]                                        ; +0x24, 0x88b66\nB               loc_88BAC                                              ; +0x28, 0x88b6a\nLDR.W           R0, [R4,#0x5EC]                                        ; +0x2a, 0x88b6c\nCMP             R0, R5                                                 ; +0x2e, 0x88b70\nBEQ             loc_88BAA                                              ; +0x30, 0x88b72\nBLS             loc_88B86                                              ; +0x32, 0x88b74\nMOV             R0, R4                                                 ; +0x34, 0x88b76\nMOVS            R1, #0                                                 ; +0x36, 0x88b78\nBL              sub_4F22C                                              ; +0x38, 0x88b7a\nMOVS            R6, #1                                                 ; +0x3c, 0x88b7e\nB               loc_88B92                                              ; +0x3e, 0x88b80\nMOVS            R6, #0x13                                              ; +0x40, 0x88b82\nB               loc_88BAC                                              ; +0x42, 0x88b84\nMOVS            R6, #0                                                 ; +0x44, 0x88b86\nB               loc_88B92                                              ; +0x46, 0x88b88\nMOV             R0, R4                                                 ; +0x48, 0x88b8a\nMOVS            R1, #1                                                 ; +0x4a, 0x88b8c\nBL              sub_86568                                              ; +0x4c, 0x88b8e\nLDR.W           R0, [R4,#0x5EC]                                        ; +0x50, 0x88b92\nCMP             R0, R5                                                 ; +0x54, 0x88b96\nBCC             loc_88B8A                                              ; +0x56, 0x88b98\nCBZ             R6, loc_88BAA                                          ; +0x58, 0x88b9a\nMOV             R0, R4                                                 ; +0x5a, 0x88b9c\nLDRH.W          R5, [R4,#0x974]                                        ; +0x5c, 0x88b9e\nBL              sub_4F378                                              ; +0x60, 0x88ba2\nSTRH.W          R5, [R4,#0x974]                                        ; +0x64, 0x88ba6\nMOVS            R6, #0                                                 ; +0x68, 0x88baa\nMOV             R0, R6                                                 ; +0x6a, 0x88bac\nPOP.W           {R11}                                                  ; +0x6c, 0x88bae\nPOP             {R4-R7,PC}                                             ; +0x70, 0x88bb2", "xrefs": ["sub_8651C @ 0x8651c"], "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"}