{"type": "func", "start": 313936, "end": 313992, "name": "sub_4CA50", "pseudocode": "// \n// sub_4CA50 from 0x4ca50 to 0x4ca88 (56 bytes)\n// \n// 3 xrefs:\n// > sub_79454 @ 0x79af2\n// > sub_BE9F4 @ 0xbea80\n// > sub_BEEE8 @ 0xbef76\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:40:41 +0000\n// \n\nint __fastcall sub_4CA50(int *a1, int a2, int a3)\n{\n  int v3; // r2\n\n  if ( a2 < 0 || !a3 || *a1 <= a2 )\n    return 31;\n  *(_DWORD *)(a1[4] + 4 * a2) = a3;\n  v3 = a1[4];\n  *(_DWORD *)(*(_DWORD *)(v3 + 4 * a2) + 8) = a1;\n  return (*(int (__fastcall **)(_DWORD, int, int, int))(**(_DWORD **)(v3 + 4 * a2) + 12))(\n           *(_DWORD *)(v3 + 4 * a2),\n           a2,\n           a1[2],\n           a1[3]);\n}", "assembly": "; \n; sub_4CA50 from 0x4ca50 to 0x4ca88 (56 bytes)\n; \n; 3 xrefs:\n; > sub_79454 @ 0x79af2\n; > sub_BE9F4 @ 0xbea80\n; > sub_BEEE8 @ 0xbef76\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:40:41 +0000\n; \nPUSH            {R4,R6,R7,LR}                                          ; +0x0, 0x4ca50\nADD             R7, SP, #8                                             ; +0x2, 0x4ca52\nCMP             R1, #0                                                 ; +0x4, 0x4ca54\nBMI             loc_4CA84                                              ; +0x6, 0x4ca56\nCBZ             R2, loc_4CA84                                          ; +0x8, 0x4ca58\nLDR             R3, [R0]                                               ; +0xa, 0x4ca5a\nCMP             R3, R1                                                 ; +0xc, 0x4ca5c\nBLE             loc_4CA84                                              ; +0xe, 0x4ca5e\nLDR             R3, [R0,#0x10]                                         ; +0x10, 0x4ca60\nSTR.W           R2, [R3,R1,LSL#2]                                      ; +0x12, 0x4ca62\nLDR             R2, [R0,#0x10]                                         ; +0x16, 0x4ca66\nLDR.W           R3, [R2,R1,LSL#2]                                      ; +0x18, 0x4ca68\nSTR             R0, [R3,#8]                                            ; +0x1c, 0x4ca6c\nLDR.W           R4, [R2,R1,LSL#2]                                      ; +0x1e, 0x4ca6e\nLDR             R2, [R4]                                               ; +0x22, 0x4ca72\nLDR.W           R12, [R2,#0xC]                                         ; +0x24, 0x4ca74\nLDRD.W          R2, R3, [R0,#8]                                        ; +0x28, 0x4ca78\nMOV             R0, R4                                                 ; +0x2c, 0x4ca7c\nPOP.W           {R4,R6,R7,LR}                                          ; +0x2e, 0x4ca7e\nBX              R12                                                    ; +0x32, 0x4ca82\nMOVS            R0, #0x1F                                              ; +0x34, 0x4ca84\nPOP             {R4,R6,R7,PC}                                          ; +0x36, 0x4ca86", "xrefs": ["sub_79454 @ 0x79af2", "sub_BE9F4 @ 0xbea80", "sub_BEEE8 @ 0xbef76"], "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"}