{"type": "func", "start": 797156, "end": 797258, "name": "sub_C29E4", "pseudocode": "// \n// sub_C29E4 from 0xc29e4 to 0xc2a4a (102 bytes)\n// \n// 1 xrefs:\n// > sub_C211A @ 0xc2120\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_C29E4(\n        int a1,\n        int a2,\n        unsigned int a3,\n        unsigned int a4,\n        _DWORD *a5,\n        _DWORD *a6,\n        unsigned int *a7,\n        int *a8)\n{\n  unsigned int v8; // r6\n  int v9; // r0\n\n  v8 = *(_DWORD *)(a1 + 1256);\n  if ( v8 < a4 )\n    a4 = *(_DWORD *)(a1 + 1256);\n  if ( v8 <= a3 )\n  {\n    *a6 = 0;\n    *a5 = 0;\n    *a8 = 0;\n    *a7 = 0;\n    return 31;\n  }\n  else\n  {\n    *a5 = *(_DWORD *)(a1 + 1260) + a3;\n    if ( a4 + a3 <= v8 )\n    {\n      v9 = 0;\n      *a7 = a4;\n      *a6 = 0;\n    }\n    else\n    {\n      *a7 = v8 - a3;\n      *a6 = *(_DWORD *)(a1 + 1260);\n      v9 = a4 + a3 - *(_DWORD *)(a1 + 1256);\n    }\n    *a8 = v9;\n    return 0;\n  }\n}", "assembly": "; \n; sub_C29E4 from 0xc29e4 to 0xc2a4a (102 bytes)\n; \n; 1 xrefs:\n; > sub_C211A @ 0xc2120\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, 0xc29e4\nADD             R7, SP, #0xC                                           ; +0x2, 0xc29e6\nPUSH.W          {R11}                                                  ; +0x4, 0xc29e8\nLDR.W           R6, [R0,#0x4E8]                                        ; +0x8, 0xc29ec\nLDRD.W          R5, R12, [R7,#-0x10+arg_8]                             ; +0xc, 0xc29f0\nLDRD.W          R1, LR, [R7,#-0x10+arg_0]                              ; +0x10, 0xc29f4\nCMP             R6, R3                                                 ; +0x14, 0xc29f8\nIT CC                                                                  ; +0x16, 0xc29fa\nMOVCC           R3, R6                                                 ; +0x18, 0xc29fc\nCMP             R6, R2                                                 ; +0x1a, 0xc29fe\nBLS             loc_C2A24                                              ; +0x1c, 0xc2a00\nLDR.W           R4, [R0,#0x4EC]                                        ; +0x1e, 0xc2a02\nADD             R4, R2                                                 ; +0x22, 0xc2a06\nSTR             R4, [R1]                                               ; +0x24, 0xc2a08\nADDS            R1, R3, R2                                             ; +0x26, 0xc2a0a\nCMP             R1, R6                                                 ; +0x28, 0xc2a0c\nBLS             loc_C2A36                                              ; +0x2a, 0xc2a0e\nSUBS            R2, R6, R2                                             ; +0x2c, 0xc2a10\nSTR             R2, [R5]                                               ; +0x2e, 0xc2a12\nLDR.W           R2, [R0,#0x4EC]                                        ; +0x30, 0xc2a14\nSTR.W           R2, [LR]                                               ; +0x34, 0xc2a18\nLDR.W           R0, [R0,#0x4E8]                                        ; +0x38, 0xc2a1c\nSUBS            R0, R1, R0                                             ; +0x3c, 0xc2a20\nB               loc_C2A3E                                              ; +0x3e, 0xc2a22\nMOVS            R0, #0                                                 ; +0x40, 0xc2a24\nSTR.W           R0, [LR]                                               ; +0x42, 0xc2a26\nSTR             R0, [R1]                                               ; +0x46, 0xc2a2a\nSTR.W           R0, [R12]                                              ; +0x48, 0xc2a2c\nSTR             R0, [R5]                                               ; +0x4c, 0xc2a30\nMOVS            R0, #0x1F                                              ; +0x4e, 0xc2a32\nB               loc_C2A44                                              ; +0x50, 0xc2a34\nMOVS            R0, #0                                                 ; +0x52, 0xc2a36\nSTR             R3, [R5]                                               ; +0x54, 0xc2a38\nSTR.W           R0, [LR]                                               ; +0x56, 0xc2a3a\nSTR.W           R0, [R12]                                              ; +0x5a, 0xc2a3e\nMOVS            R0, #0                                                 ; +0x5e, 0xc2a42\nPOP.W           {R11}                                                  ; +0x60, 0xc2a44\nPOP             {R4-R7,PC}                                             ; +0x64, 0xc2a48", "xrefs": ["sub_C211A @ 0xc2120"], "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"}