{"type": "func", "start": 313256, "end": 313468, "name": "sub_4C7A8", "pseudocode": "// \n// sub_4C7A8 from 0x4c7a8 to 0x4c87c (212 bytes)\n// \n// 0 xrefs:\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_4C7A8(float *a1, int a2, int a3, int a4)\n{\n  _DWORD *v5; // r0\n  int v7; // r9\n  int result; // r0\n  float v9; // r3\n  float v10; // r6\n  float v13[4]; // [sp+8h] [bp-28h] BYREF\n\n  v5 = *((_DWORD **)a1 + 83);\n  if ( !v5 || !*((_DWORD *)a1 + 4) )\n    return 30;\n  v7 = v5[7];\n  result = (*(int (__fastcall **)(_DWORD *, int))(*v5 + 100))(v5, a2);\n  if ( result )\n    return result;\n  if ( (a2 & 8) != 0 && (v7 & 8) == 0 )\n  {\n    result = (*(int (__fastcall **)(float *, _DWORD, _DWORD, _DWORD, int, int))(*(_DWORD *)a1 + 16))(\n               a1,\n               *((_DWORD *)a1 + 6),\n               0,\n               *(_DWORD *)(*(_DWORD *)a1 + 16),\n               a3,\n               a4);\n    if ( result )\n      return result;\n    (*(void (__fastcall **)(float *, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)a1 + 100))(\n      a1,\n      *((_DWORD *)a1 + 9),\n      *((__int16 *)a1 + 17),\n      *((__int16 *)a1 + 16),\n      0,\n      0);\n    goto LABEL_14;\n  }\n  if ( ((a2 & 0x10) == 0 || (v7 & 0x10) != 0) && ((v7 ^ a2) & 0x4F00000) == 0\n    || (v9 = a1[20],\n        v10 = a1[21],\n        v13[0] = a1[19],\n        v13[1] = v9,\n        v13[2] = v10,\n        a1[19] = a1[19] + 1.0,\n        (result = (*(int (__fastcall **)(float *, float *, _DWORD *, _DWORD, int, int))(*(_DWORD *)a1 + 160))(\n                    a1,\n                    v13,\n                    (_DWORD *)a1 + 22,\n                    *(_DWORD *)(*(_DWORD *)a1 + 160),\n                    a3,\n                    a4)) == 0) )\n  {\nLABEL_14:\n    if ( (a2 & 0x40000000) != (v7 & 0x40000000) )\n    {\n      if ( (a2 & 0x40000000) != 0 )\n        (*(void (__fastcall **)(float *, _DWORD, _DWORD, int))(*(_DWORD *)a1 + 204))(\n          a1,\n          *((_DWORD *)a1 + 39),\n          *((_DWORD *)a1 + 40),\n          1);\n      else\n        *((_DWORD *)a1 + 10) |= 4u;\n    }\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_4C7A8 from 0x4c7a8 to 0x4c87c (212 bytes)\n; \n; 0 xrefs:\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-R7,LR}                                             ; +0x0, 0x4c7a8\nADD             R7, SP, #0xC                                           ; +0x2, 0x4c7aa\nPUSH.W          {R2-R9,R11}                                            ; +0x4, 0x4c7ac\nMOV             R4, R0                                                 ; +0x8, 0x4c7b0\nLDR.W           R0, [R0,#0x14C]                                        ; +0xa, 0x4c7b2\nCBZ             R0, loc_4C802                                          ; +0xe, 0x4c7b6\nMOV             R5, R1                                                 ; +0x10, 0x4c7b8\nLDR             R1, [R4,#0x10]                                         ; +0x12, 0x4c7ba\nCBZ             R1, loc_4C802                                          ; +0x14, 0x4c7bc\nLDR             R1, [R0]                                               ; +0x16, 0x4c7be\nLDR.W           R9, [R0,#0x1C]                                         ; +0x18, 0x4c7c0\nLDR             R2, [R1,#0x64]                                         ; +0x1c, 0x4c7c4\nMOV             R1, R5                                                 ; +0x1e, 0x4c7c6\nBLX             R2                                                     ; +0x20, 0x4c7c8\nCBNZ            R0, loc_4C804                                          ; +0x22, 0x4c7ca\nLSLS            R0, R5, #0x1C                                          ; +0x24, 0x4c7cc\nBPL             loc_4C80C                                              ; +0x26, 0x4c7ce\nANDS.W          R0, R9, #8                                             ; +0x28, 0x4c7d0\nBNE             loc_4C80C                                              ; +0x2c, 0x4c7d4\nLDR             R0, [R4]                                               ; +0x2e, 0x4c7d6\nMOVS            R2, #0                                                 ; +0x30, 0x4c7d8\nLDR             R1, [R4,#0x18]                                         ; +0x32, 0x4c7da\nMOV.W           R8, #0                                                 ; +0x34, 0x4c7dc\nLDR             R3, [R0,#0x10]                                         ; +0x38, 0x4c7e0\nMOV             R0, R4                                                 ; +0x3a, 0x4c7e2\nBLX             R3                                                     ; +0x3c, 0x4c7e4\nCBNZ            R0, loc_4C804                                          ; +0x3e, 0x4c7e6\nLDR             R0, [R4]                                               ; +0x40, 0x4c7e8\nLDRSH.W         R3, [R4,#0x20]                                         ; +0x42, 0x4c7ea\nLDRSH.W         R2, [R4,#0x22]                                         ; +0x46, 0x4c7ee\nLDR.W           R12, [R0,#0x64]                                        ; +0x4a, 0x4c7f2\nMOV             R0, R4                                                 ; +0x4e, 0x4c7f6\nLDR             R1, [R4,#0x24]                                         ; +0x50, 0x4c7f8\nSTRD.W          R8, R8, [SP,#0x18+var_18]                              ; +0x52, 0x4c7fa\nBLX             R12                                                    ; +0x56, 0x4c7fe\nB               loc_4C850                                              ; +0x58, 0x4c800\nMOVS            R0, #0x1E                                              ; +0x5a, 0x4c802\nADD             SP, SP, #0x18                                          ; +0x5c, 0x4c804\nPOP.W           {R8,R9,R11}                                            ; +0x5e, 0x4c806\nPOP             {R4-R7,PC}                                             ; +0x62, 0x4c80a\nLSLS            R0, R5, #0x1B                                          ; +0x64, 0x4c80c\nBPL             loc_4C816                                              ; +0x66, 0x4c80e\nANDS.W          R0, R9, #0x10                                          ; +0x68, 0x4c810\nBEQ             loc_4C820                                              ; +0x6c, 0x4c814\nEOR.W           R0, R9, R5                                             ; +0x6e, 0x4c816\nTST.W           R0, #0x4F00000                                         ; +0x72, 0x4c81a\nBEQ             loc_4C850                                              ; +0x76, 0x4c81e\nADD.W           R12, R4, #0x4C ; 'L'                                   ; +0x78, 0x4c820\nVMOV.F32        S2, #1.0                                               ; +0x7c, 0x4c824\nADD             R1, SP, #0x18+var_10                                   ; +0x80, 0x4c828\nLDM.W           R12, {R0,R3,R6}                                        ; +0x82, 0x4c82a\nMOV             R2, R1                                                 ; +0x86, 0x4c82e\nSTM             R2!, {R0,R3,R6}                                        ; +0x88, 0x4c830\nMOV             R2, R4                                                 ; +0x8a, 0x4c832\nVLDR            S0, [R4,#0x4C]                                         ; +0x8c, 0x4c834\nVADD.F32        S0, S0, S2                                             ; +0x90, 0x4c838\nVSTR            S0, [R4,#0x4C]                                         ; +0x94, 0x4c83c\nLDR.W           R0, [R2],#0x58                                         ; +0x98, 0x4c840\nLDR.W           R3, [R0,#0xA0]                                         ; +0x9c, 0x4c844\nMOV             R0, R4                                                 ; +0xa0, 0x4c848\nBLX             R3                                                     ; +0xa2, 0x4c84a\nCMP             R0, #0                                                 ; +0xa4, 0x4c84c\nBNE             loc_4C804                                              ; +0xa6, 0x4c84e\nAND.W           R0, R5, #0x40000000                                    ; +0xa8, 0x4c850\nAND.W           R1, R9, #0x40000000                                    ; +0xac, 0x4c854\nCMP             R0, R1                                                 ; +0xb0, 0x4c858\nBEQ             loc_4C878                                              ; +0xb2, 0x4c85a\nCBNZ            R0, loc_4C868                                          ; +0xb4, 0x4c85c\nLDR             R0, [R4,#0x28]                                         ; +0xb6, 0x4c85e\nORR.W           R0, R0, #4                                             ; +0xb8, 0x4c860\nSTR             R0, [R4,#0x28]                                         ; +0xbc, 0x4c864\nB               loc_4C878                                              ; +0xbe, 0x4c866\nLDR             R0, [R4]                                               ; +0xc0, 0x4c868\nMOVS            R3, #1                                                 ; +0xc2, 0x4c86a\nLDRD.W          R1, R2, [R4,#0x9C]                                     ; +0xc4, 0x4c86c\nLDR.W           R5, [R0,#0xCC]                                         ; +0xc8, 0x4c870\nMOV             R0, R4                                                 ; +0xcc, 0x4c874\nBLX             R5                                                     ; +0xce, 0x4c876\nMOVS            R0, #0                                                 ; +0xd0, 0x4c878\nB               loc_4C804                                              ; +0xd2, 0x4c87a", "xrefs": [], "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"}