{"type": "func", "start": 790536, "end": 790620, "name": "sub_C1008", "pseudocode": "// \n// sub_C1008 from 0xc1008 to 0xc105c (84 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_C1008(int a1, __int64 *a2, int a3, int a4)\n{\n  int v4; // r5\n  __int64 v6; // kr00_8\n  int v8; // r0\n  int v9; // [sp+4h] [bp-14h] BYREF\n\n  v4 = a4;\n  v6 = *a2;\n  (*((void (__fastcall **)(__int64 *, int, int))a2 + 1))(a2, a3, a4);\n  if ( *(_DWORD *)(v6 + 20) >= (unsigned int)v4 )\n  {\n    sub_BFFC4(&v9);\n    v8 = v9;\n    __dmb(0xBu);\n    *(_DWORD *)(v6 + 12) = v8;\n    __dmb(0xBu);\n    return 0;\n  }\n  else\n  {\n    if ( dword_1262C4 > v4 )\n      v4 = dword_1262C4;\n    dword_1262C4 = v4;\n    (*((void (__fastcall **)(__int64 *))a2 + 6))(a2);\n    return 1;\n  }\n}", "assembly": "; \n; sub_C1008 from 0xc1008 to 0xc105c (84 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-R7,LR}                                             ; +0x0, 0xc1008\nADD             R7, SP, #0xC                                           ; +0x2, 0xc100a\nPUSH.W          {R11}                                                  ; +0x4, 0xc100c\nSUB             SP, SP, #8                                             ; +0x8, 0xc1010\nMOV             R5, R3                                                 ; +0xa, 0xc1012\nMOV             R4, R1                                                 ; +0xc, 0xc1014\nLDRD.W          R6, R3, [R1]                                           ; +0xe, 0xc1016\nMOV             R0, R1                                                 ; +0x12, 0xc101a\nMOV             R1, R2                                                 ; +0x14, 0xc101c\nMOV             R2, R5                                                 ; +0x16, 0xc101e\nBLX             R3                                                     ; +0x18, 0xc1020\nLDR             R0, [R6,#0x14]                                         ; +0x1a, 0xc1022\nCMP             R0, R5                                                 ; +0x1c, 0xc1024\nBCS             loc_C1040                                              ; +0x1e, 0xc1026\nLDR             R0, =(dword_126258 - 0xC102E)                          ; +0x20, 0xc1028\nADD             R0, PC; dword_126258                                   ; +0x22, 0xc102a\nLDR             R1, [R0,#(dword_1262C4 - 0x126258)]                    ; +0x24, 0xc102c\nCMP             R1, R5                                                 ; +0x26, 0xc102e\nIT GT                                                                  ; +0x28, 0xc1030\nMOVGT           R5, R1                                                 ; +0x2a, 0xc1032\nSTR             R5, [R0,#(dword_1262C4 - 0x126258)]                    ; +0x2c, 0xc1034\nMOV             R0, R4                                                 ; +0x2e, 0xc1036\nLDR             R1, [R4,#0x18]                                         ; +0x30, 0xc1038\nBLX             R1                                                     ; +0x32, 0xc103a\nMOVS            R0, #1                                                 ; +0x34, 0xc103c\nB               loc_C1054                                              ; +0x36, 0xc103e\nADD             R0, SP, #8+var_4                                       ; +0x38, 0xc1040\nBL              sub_BFFC4                                              ; +0x3a, 0xc1042\nLDR             R0, [SP,#8+var_4]                                      ; +0x3e, 0xc1046\nDMB.W           ISH                                                    ; +0x40, 0xc1048\nSTR             R0, [R6,#0xC]                                          ; +0x44, 0xc104c\nMOVS            R0, #0                                                 ; +0x46, 0xc104e\nDMB.W           ISH                                                    ; +0x48, 0xc1050\nADD             SP, SP, #8                                             ; +0x4c, 0xc1054\nPOP.W           {R11}                                                  ; +0x4e, 0xc1056\nPOP             {R4-R7,PC}                                             ; +0x52, 0xc105a", "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"}