{"type": "func", "start": 334704, "end": 334768, "name": "sub_51B70", "pseudocode": "// \n// sub_51B70 from 0x51b70 to 0x51bb0 (64 bytes)\n// \n// 3 xrefs:\n// > sub_536F8 @ 0x53744\n// > sub_58910 @ 0x5893e\n// > sub_58BB0 @ 0x58bfc\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_51B70(int a1, int a2, _DWORD *a3)\n{\n  _DWORD *v3; // r0\n  int v4; // r12\n  _DWORD *v5; // r5\n  int v6; // r6\n\n  if ( a3 )\n  {\n    v3 = (_DWORD *)(a1 + 300);\n    v4 = 0;\n    v5 = v3;\n    while ( 1 )\n    {\n      v5 = (_DWORD *)*v5;\n      if ( v5 == v3 )\n        break;\n      v6 = v5[2];\n      if ( *(_DWORD *)(v6 + 16) != 1010 )\n      {\n        if ( v4 == a2 )\n        {\n          *a3 = *(_DWORD *)(v6 + 12);\n          return 0;\n        }\n        ++v4;\n      }\n    }\n  }\n  return 31;\n}", "assembly": "; \n; sub_51B70 from 0x51b70 to 0x51bb0 (64 bytes)\n; \n; 3 xrefs:\n; > sub_536F8 @ 0x53744\n; > sub_58910 @ 0x5893e\n; > sub_58BB0 @ 0x58bfc\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, 0x51b70\nADD             R7, SP, #0xC                                           ; +0x2, 0x51b72\nPUSH.W          {R11}                                                  ; +0x4, 0x51b74\nCBZ             R2, loc_51BA0                                          ; +0x8, 0x51b78\nADD.W           R0, R0, #0x12C                                         ; +0xa, 0x51b7a\nMOV.W           R12, #0                                                ; +0xe, 0x51b7e\nMOVW            R4, #0x3F2                                             ; +0x12, 0x51b82\nMOV             R5, R0                                                 ; +0x16, 0x51b86\nLDR             R5, [R5]                                               ; +0x18, 0x51b88\nCMP             R5, R0                                                 ; +0x1a, 0x51b8a\nBEQ             loc_51BA0                                              ; +0x1c, 0x51b8c\nLDR             R6, [R5,#8]                                            ; +0x1e, 0x51b8e\nLDR             R3, [R6,#0x10]                                         ; +0x20, 0x51b90\nCMP             R3, R4                                                 ; +0x22, 0x51b92\nBEQ             loc_51B88                                              ; +0x24, 0x51b94\nCMP             R12, R1                                                ; +0x26, 0x51b96\nBEQ             loc_51BA8                                              ; +0x28, 0x51b98\nADD.W           R12, R12, #1                                           ; +0x2a, 0x51b9a\nB               loc_51B88                                              ; +0x2e, 0x51b9e\nMOVS            R0, #0x1F                                              ; +0x30, 0x51ba0\nPOP.W           {R11}                                                  ; +0x32, 0x51ba2\nPOP             {R4-R7,PC}                                             ; +0x36, 0x51ba6\nLDR             R0, [R6,#0xC]                                          ; +0x38, 0x51ba8\nSTR             R0, [R2]                                               ; +0x3a, 0x51baa\nMOVS            R0, #0                                                 ; +0x3c, 0x51bac\nB               loc_51BA2                                              ; +0x3e, 0x51bae", "xrefs": ["sub_536F8 @ 0x53744", "sub_58910 @ 0x5893e", "sub_58BB0 @ 0x58bfc"], "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"}