{"type": "func", "start": 296860, "end": 296918, "name": "sub_4879C", "pseudocode": "// \n// sub_4879C from 0x4879c to 0x487d6 (58 bytes)\n// \n// 0 xrefs:\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_4879C(_DWORD *a1, int a2, _DWORD *a3)\n{\n  int v3; // r3\n  int v4; // r4\n  int i; // r0\n\n  if ( !a2 )\n    return 31;\n  if ( a3 )\n    *a3 = 0;\n  v3 = a1[2];\n  if ( v3 )\n  {\n    v4 = a1[3];\n    for ( i = 0; i < v4; ++i )\n    {\n      if ( *(_DWORD *)(v3 + 4 * i) == a2 )\n      {\n        if ( a3 )\n          *a3 = i;\n        return 0;\n      }\n    }\n    return 9;\n  }\n  if ( a1[14] != a2 )\n    return 9;\n  return 0;\n}", "assembly": "; \n; sub_4879C from 0x4879c to 0x487d6 (58 bytes)\n; \n; 0 xrefs:\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,R5,R7,LR}                                          ; +0x0, 0x4879c\nADD             R7, SP, #8                                             ; +0x2, 0x4879e\nCBZ             R1, loc_487C0                                          ; +0x4, 0x487a0\nCBZ             R2, loc_487A8                                          ; +0x6, 0x487a2\nMOVS            R3, #0                                                 ; +0x8, 0x487a4\nSTR             R3, [R2]                                               ; +0xa, 0x487a6\nLDR             R3, [R0,#8]                                            ; +0xc, 0x487a8\nCBZ             R3, loc_487C4                                          ; +0xe, 0x487aa\nLDR             R4, [R0,#0xC]                                          ; +0x10, 0x487ac\nMOVS            R0, #0                                                 ; +0x12, 0x487ae\nCMP             R0, R4                                                 ; +0x14, 0x487b0\nBGE             loc_487CA                                              ; +0x16, 0x487b2\nLDR.W           R5, [R3,R0,LSL#2]                                      ; +0x18, 0x487b4\nCMP             R5, R1                                                 ; +0x1c, 0x487b8\nBEQ             loc_487CE                                              ; +0x1e, 0x487ba\nADDS            R0, #1                                                 ; +0x20, 0x487bc\nB               loc_487B0                                              ; +0x22, 0x487be\nMOVS            R0, #0x1F                                              ; +0x24, 0x487c0\nPOP             {R4,R5,R7,PC}                                          ; +0x26, 0x487c2\nLDR             R0, [R0,#0x38]                                         ; +0x28, 0x487c4\nCMP             R0, R1                                                 ; +0x2a, 0x487c6\nBEQ             loc_487D2                                              ; +0x2c, 0x487c8\nMOVS            R0, #9                                                 ; +0x2e, 0x487ca\nPOP             {R4,R5,R7,PC}                                          ; +0x30, 0x487cc\nCBZ             R2, loc_487D2                                          ; +0x32, 0x487ce\nSTR             R0, [R2]                                               ; +0x34, 0x487d0\nMOVS            R0, #0                                                 ; +0x36, 0x487d2\nPOP             {R4,R5,R7,PC}                                          ; +0x38, 0x487d4", "xrefs": [], "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"}