{"type": "func", "start": 8131224, "end": 8131508, "name": "ASN1_TIME_diff", "pseudocode": "// \n// ASN1_TIME_diff from 0x7c1298 to 0x7c13b4 (284 bytes)\n// \n// 2 xrefs:\n// > sub_843150 @ 0x843824\n// > <???> @ 0x5e4dc\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 ASN1_TIME_diff(int a1, int a2, int a3, int a4)\n{\n  int v7; // r12\n  int v9; // r0\n  int v10; // r3\n  int v11; // r0\n  time_t v12; // [sp+4h] [bp-5Ch] BYREF\n  _BYTE v13[44]; // [sp+8h] [bp-58h] BYREF\n  time_t timer[11]; // [sp+34h] [bp-2Ch] BYREF\n\n  if ( a3 )\n  {\n    v7 = *(_DWORD *)(a3 + 4);\n    if ( v7 == 23 )\n    {\n      v9 = asn1_utctime_to_tm(v13, a3);\n    }\n    else\n    {\n      if ( v7 != 24 )\n        return 0;\n      v9 = asn1_generalizedtime_to_tm(v13, a3);\n    }\n  }\n  else\n  {\n    time(timer);\n    v9 = OPENSSL_gmtime(timer, v13) != 0;\n  }\n  if ( !v9 )\n    return 0;\n  if ( a4 )\n  {\n    v10 = *(_DWORD *)(a4 + 4);\n    if ( v10 == 23 )\n    {\n      v11 = asn1_utctime_to_tm(timer, a4);\n    }\n    else\n    {\n      if ( v10 != 24 )\n        return 0;\n      v11 = asn1_generalizedtime_to_tm(timer, a4);\n    }\n  }\n  else\n  {\n    time(&v12);\n    v11 = OPENSSL_gmtime(&v12, timer) != 0;\n  }\n  if ( !v11 )\n    return 0;\n  return OPENSSL_gmtime_diff(a1, a2, v13, timer);\n}", "assembly": "; \n; ASN1_TIME_diff from 0x7c1298 to 0x7c13b4 (284 bytes)\n; \n; 2 xrefs:\n; > sub_843150 @ 0x843824\n; > <???> @ 0x5e4dc\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\nCMP             R2, #0                                                 ; +0x0, 0x7c1298\nPUSH            {R4-R8,LR}                                             ; +0x4, 0x7c129c\nMOV             R6, R0                                                 ; +0x8, 0x7c12a0\nSUB             SP, SP, #0x60                                          ; +0xc, 0x7c12a4\nMOV             R5, R1                                                 ; +0x10, 0x7c12a8\nMOV             R4, R3                                                 ; +0x14, 0x7c12ac\nBEQ             loc_7C1350                                             ; +0x18, 0x7c12b0\nLDR             R12, [R2,#4]                                           ; +0x1c, 0x7c12b4\nCMP             R12, #0x17                                             ; +0x20, 0x7c12b8\nBEQ             loc_7C133C                                             ; +0x24, 0x7c12bc\nCMP             R12, #0x18                                             ; +0x28, 0x7c12c0\nBEQ             loc_7C12D4                                             ; +0x2c, 0x7c12c4\nMOV             R0, #0                                                 ; +0x30, 0x7c12c8\nADD             SP, SP, #0x60 ; '`'                                    ; +0x34, 0x7c12cc\nPOP             {R4-R8,PC}                                             ; +0x38, 0x7c12d0\nADD             R7, SP, #0x60+var_58                                   ; +0x3c, 0x7c12d4\nMOV             R1, R2                                                 ; +0x40, 0x7c12d8\nMOV             R0, R7                                                 ; +0x44, 0x7c12dc\nBL              asn1_generalizedtime_to_tm                             ; +0x48, 0x7c12e0\nCMP             R0, #0                                                 ; +0x4c, 0x7c12e4\nBEQ             loc_7C12C8                                             ; +0x50, 0x7c12e8\nCMP             R4, #0                                                 ; +0x54, 0x7c12ec\nBEQ             loc_7C138C                                             ; +0x58, 0x7c12f0\nLDR             R3, [R4,#4]                                            ; +0x5c, 0x7c12f4\nCMP             R3, #0x17                                              ; +0x60, 0x7c12f8\nBEQ             loc_7C1378                                             ; +0x64, 0x7c12fc\nCMP             R3, #0x18                                              ; +0x68, 0x7c1300\nBNE             loc_7C12C8                                             ; +0x6c, 0x7c1304\nADD             R8, SP, #0x60+timer                                    ; +0x70, 0x7c1308\nMOV             R1, R4                                                 ; +0x74, 0x7c130c\nMOV             R0, R8                                                 ; +0x78, 0x7c1310\nBL              asn1_generalizedtime_to_tm                             ; +0x7c, 0x7c1314\nCMP             R0, #0                                                 ; +0x80, 0x7c1318\nBEQ             loc_7C12C8                                             ; +0x84, 0x7c131c\nMOV             R0, R6                                                 ; +0x88, 0x7c1320\nMOV             R1, R5                                                 ; +0x8c, 0x7c1324\nMOV             R2, R7                                                 ; +0x90, 0x7c1328\nMOV             R3, R8                                                 ; +0x94, 0x7c132c\nBL              OPENSSL_gmtime_diff                                    ; +0x98, 0x7c1330\nADD             SP, SP, #0x60 ; '`'                                    ; +0x9c, 0x7c1334\nPOP             {R4-R8,PC}                                             ; +0xa0, 0x7c1338\nADD             R7, SP, #0x60+var_58                                   ; +0xa4, 0x7c133c\nMOV             R1, R2                                                 ; +0xa8, 0x7c1340\nMOV             R0, R7                                                 ; +0xac, 0x7c1344\nBL              asn1_utctime_to_tm                                     ; +0xb0, 0x7c1348\nB               loc_7C12E4                                             ; +0xb4, 0x7c134c\nADD             R8, SP, #0x60+timer                                    ; +0xb8, 0x7c1350\nMOV             R0, R8; timer                                          ; +0xbc, 0x7c1354\nADD             R7, SP, #0x60+var_58                                   ; +0xc0, 0x7c1358\nBL              time                                                   ; +0xc4, 0x7c135c\nMOV             R0, R8                                                 ; +0xc8, 0x7c1360\nMOV             R1, R7                                                 ; +0xcc, 0x7c1364\nBL              OPENSSL_gmtime                                         ; +0xd0, 0x7c1368\nMOVS            R0, R0                                                 ; +0xd4, 0x7c136c\nMOVNE           R0, #1                                                 ; +0xd8, 0x7c1370\nB               loc_7C12E4                                             ; +0xdc, 0x7c1374\nADD             R8, SP, #0x60+timer                                    ; +0xe0, 0x7c1378\nMOV             R1, R4                                                 ; +0xe4, 0x7c137c\nMOV             R0, R8                                                 ; +0xe8, 0x7c1380\nBL              asn1_utctime_to_tm                                     ; +0xec, 0x7c1384\nB               loc_7C1318                                             ; +0xf0, 0x7c1388\nADD             R4, SP, #0x60+var_5C                                   ; +0xf4, 0x7c138c\nMOV             R0, R4; timer                                          ; +0xf8, 0x7c1390\nADD             R8, SP, #0x60+timer                                    ; +0xfc, 0x7c1394\nBL              time                                                   ; +0x100, 0x7c1398\nMOV             R0, R4                                                 ; +0x104, 0x7c139c\nMOV             R1, R8                                                 ; +0x108, 0x7c13a0\nBL              OPENSSL_gmtime                                         ; +0x10c, 0x7c13a4\nMOVS            R0, R0                                                 ; +0x110, 0x7c13a8\nMOVNE           R0, #1                                                 ; +0x114, 0x7c13ac\nB               loc_7C1318                                             ; +0x118, 0x7c13b0", "xrefs": ["sub_843150 @ 0x843824", "<???> @ 0x5e4dc"], "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"}