{"type": "func", "start": 8130836, "end": 8131080, "name": "ASN1_TIME_to_generalizedtime", "pseudocode": "// \n// ASN1_TIME_to_generalizedtime from 0x7c1114 to 0x7c1208 (244 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x5e46c\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_to_generalizedtime(int a1, int *a2)\n{\n  int v4; // r4\n  int v5; // r7\n  int v6; // r6\n  int v8; // r0\n\n  if ( !ASN1_TIME_check(a1) )\n    return 0;\n  if ( a2 )\n  {\n    v4 = *a2;\n    if ( !*a2 )\n    {\n      v8 = ASN1_GENERALIZEDTIME_new();\n      v4 = v8;\n      if ( !v8 )\n        return 0;\n      *a2 = v8;\n    }\n  }\n  else\n  {\n    v4 = ASN1_GENERALIZEDTIME_new();\n    if ( !v4 )\n      return 0;\n  }\n  if ( *(_DWORD *)(a1 + 4) == 24 )\n  {\n    if ( ASN1_STRING_set(v4, *(void **)(a1 + 8)) )\n      return v4;\n  }\n  else if ( ASN1_STRING_set(v4, nullptr) )\n  {\n    v5 = *(_DWORD *)(v4 + 8);\n    v6 = *(_DWORD *)a1 + 3;\n    if ( **(unsigned __int8 **)(a1 + 8) > 0x34u )\n      OPENSSL_strlcpy(v5, \"19\", *(_DWORD *)a1 + 3);\n    else\n      OPENSSL_strlcpy(v5, \"20\", *(_DWORD *)a1 + 3);\n    OPENSSL_strlcat(v5, *(_DWORD *)(a1 + 8), v6);\n    return v4;\n  }\n  return 0;\n}", "assembly": "; \n; ASN1_TIME_to_generalizedtime from 0x7c1114 to 0x7c1208 (244 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x5e46c\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            {R3-R7,LR}                                             ; +0x0, 0x7c1114\nMOV             R6, R1                                                 ; +0x4, 0x7c1118\nMOV             R5, R0                                                 ; +0x8, 0x7c111c\nBL              ASN1_TIME_check                                        ; +0xc, 0x7c1120\nCMP             R0, #0                                                 ; +0x10, 0x7c1124\nBEQ             loc_7C11DC                                             ; +0x14, 0x7c1128\nCMP             R6, #0                                                 ; +0x18, 0x7c112c\nBEQ             loc_7C11F8                                             ; +0x1c, 0x7c1130\nLDR             R4, [R6]                                               ; +0x20, 0x7c1134\nCMP             R4, #0                                                 ; +0x24, 0x7c1138\nBEQ             loc_7C11E4                                             ; +0x28, 0x7c113c\nLDR             R3, [R5,#4]                                            ; +0x2c, 0x7c1140\nCMP             R3, #0x18                                              ; +0x30, 0x7c1144\nBEQ             loc_7C11C4                                             ; +0x34, 0x7c1148\nLDR             R2, [R5]                                               ; +0x38, 0x7c114c\nMOV             R0, R4; int                                            ; +0x3c, 0x7c1150\nADD             R2, R2, #2                                             ; +0x40, 0x7c1154\nMOV             R1, #0; void *                                         ; +0x44, 0x7c1158\nBL              ASN1_STRING_set                                        ; +0x48, 0x7c115c\nCMP             R0, #0                                                 ; +0x4c, 0x7c1160\nBEQ             loc_7C11DC                                             ; +0x50, 0x7c1164\nLDR             R3, [R5,#8]                                            ; +0x54, 0x7c1168\nLDR             R6, [R5]                                               ; +0x58, 0x7c116c\nLDRB            R3, [R3]                                               ; +0x5c, 0x7c1170\nLDR             R7, [R4,#8]                                            ; +0x60, 0x7c1174\nCMP             R3, #0x34 ; '4'                                        ; +0x64, 0x7c1178\nADD             R6, R6, #3                                             ; +0x68, 0x7c117c\nMOV             R0, R7                                                 ; +0x6c, 0x7c1180\nBHI             loc_7C11B0                                             ; +0x70, 0x7c1184\nLDR             R1, =(a20_1 - 0x7C1198); \"20\"                          ; +0x74, 0x7c1188\nMOV             R2, R6                                                 ; +0x78, 0x7c118c\nADD             R1, PC, R1; \"20\"                                       ; +0x7c, 0x7c1190\nBL              OPENSSL_strlcpy                                        ; +0x80, 0x7c1194\nMOV             R0, R7                                                 ; +0x84, 0x7c1198\nLDR             R1, [R5,#8]                                            ; +0x88, 0x7c119c\nMOV             R2, R6                                                 ; +0x8c, 0x7c11a0\nBL              OPENSSL_strlcat                                        ; +0x90, 0x7c11a4\nMOV             R0, R4                                                 ; +0x94, 0x7c11a8\nPOP             {R3-R7,PC}                                             ; +0x98, 0x7c11ac\nLDR             R1, =(a19_0 - 0x7C11C0); \"19\"                          ; +0x9c, 0x7c11b0\nMOV             R2, R6                                                 ; +0xa0, 0x7c11b4\nADD             R1, PC, R1; \"19\"                                       ; +0xa4, 0x7c11b8\nBL              OPENSSL_strlcpy                                        ; +0xa8, 0x7c11bc\nB               loc_7C1198                                             ; +0xac, 0x7c11c0\nMOV             R0, R4; int                                            ; +0xb0, 0x7c11c4\nLDR             R1, [R5,#8]; void *                                    ; +0xb4, 0x7c11c8\nLDR             R2, [R5]                                               ; +0xb8, 0x7c11cc\nBL              ASN1_STRING_set                                        ; +0xbc, 0x7c11d0\nCMP             R0, #0                                                 ; +0xc0, 0x7c11d4\nBNE             loc_7C11A8                                             ; +0xc4, 0x7c11d8\nMOV             R0, #0                                                 ; +0xc8, 0x7c11dc\nPOP             {R3-R7,PC}                                             ; +0xcc, 0x7c11e0\nBL              ASN1_GENERALIZEDTIME_new                               ; +0xd0, 0x7c11e4\nSUBS            R4, R0, #0                                             ; +0xd4, 0x7c11e8\nSTRNE           R4, [R6]                                               ; +0xd8, 0x7c11ec\nBNE             loc_7C1140                                             ; +0xdc, 0x7c11f0\nB               loc_7C11DC                                             ; +0xe0, 0x7c11f4\nBL              ASN1_GENERALIZEDTIME_new                               ; +0xe4, 0x7c11f8\nSUBS            R4, R0, #0                                             ; +0xe8, 0x7c11fc\nBNE             loc_7C1140                                             ; +0xec, 0x7c1200\nB               loc_7C11DC                                             ; +0xf0, 0x7c1204", "xrefs": ["<???> @ 0x5e46c"], "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"}