{"type": "func", "start": 8744376, "end": 8744532, "name": "GENERAL_NAME_cmp", "pseudocode": "// \n// GENERAL_NAME_cmp from 0x856db8 to 0x856e54 (156 bytes)\n// \n// 2 xrefs:\n// > sub_843150 @ 0x843640\n// > <???> @ 0x6755c\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 GENERAL_NAME_cmp(int a1, int a2)\n{\n  bool v2; // zf\n  int result; // r0\n\n  v2 = a2 == 0;\n  if ( a2 )\n    v2 = a1 == 0;\n  if ( v2 || *(_DWORD *)a1 != *(_DWORD *)a2 )\n    return -1;\n  switch ( *(_DWORD *)a1 )\n  {\n    case 0:\n      result = OTHERNAME_cmp(*(int **)(a1 + 4), *(int **)(a2 + 4));\n      break;\n    case 1:\n    case 2:\n    case 6:\n      result = ASN1_STRING_cmp(*(_DWORD *)(a1 + 4), *(_DWORD *)(a2 + 4));\n      break;\n    case 3:\n    case 5:\n      result = ASN1_TYPE_cmp(*(_DWORD *)(a1 + 4), *(_DWORD *)(a2 + 4));\n      break;\n    case 4:\n      result = X509_NAME_cmp(*(_DWORD *)(a1 + 4), *(_DWORD *)(a2 + 4));\n      break;\n    case 7:\n      result = ASN1_OCTET_STRING_cmp(*(_DWORD *)(a1 + 4), *(_DWORD *)(a2 + 4));\n      break;\n    case 8:\n      result = OBJ_cmp(*(_DWORD *)(a1 + 4), *(_DWORD *)(a2 + 4));\n      break;\n    default:\n      return -1;\n  }\n  return result;\n}", "assembly": "; \n; GENERAL_NAME_cmp from 0x856db8 to 0x856e54 (156 bytes)\n; \n; 2 xrefs:\n; > sub_843150 @ 0x843640\n; > <???> @ 0x6755c\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             R1, #0                                                 ; +0x0, 0x856db8\nCMPNE           R0, #0                                                 ; +0x4, 0x856dbc\nBEQ             def_856DD8; jumptable 00856DD8 default case            ; +0x8, 0x856dc0\nLDR             R3, [R0]                                               ; +0xc, 0x856dc4\nLDR             R2, [R1]                                               ; +0x10, 0x856dc8\nCMP             R3, R2                                                 ; +0x14, 0x856dcc\nBNE             def_856DD8; jumptable 00856DD8 default case            ; +0x18, 0x856dd0\nCMP             R3, #8; switch 9 cases                                 ; +0x1c, 0x856dd4\nADDLS           PC, PC, R3,LSL#2; switch jump                          ; +0x20, 0x856dd8\nB               def_856DD8; jumptable 00856DD8 default case            ; +0x24, 0x856ddc\nB               loc_856E18; jumptable 00856DD8 case 0                  ; +0x28, 0x856de0\nB               loc_856E24; jumptable 00856DD8 cases 1,2,6             ; +0x2c, 0x856de4\nB               loc_856E24; jumptable 00856DD8 cases 1,2,6             ; +0x30, 0x856de8\nB               loc_856E30; jumptable 00856DD8 cases 3,5               ; +0x34, 0x856dec\nB               loc_856E3C; jumptable 00856DD8 case 4                  ; +0x38, 0x856df0\nB               loc_856E30; jumptable 00856DD8 cases 3,5               ; +0x3c, 0x856df4\nB               loc_856E24; jumptable 00856DD8 cases 1,2,6             ; +0x40, 0x856df8\nB               loc_856E48; jumptable 00856DD8 case 7                  ; +0x44, 0x856dfc\nB               loc_856E0C; jumptable 00856DD8 case 8                  ; +0x48, 0x856e00\nMOV             R0, #0xFFFFFFFF; jumptable 00856DD8 default case       ; +0x4c, 0x856e04\nBX              LR                                                     ; +0x50, 0x856e08\nLDR             R0, [R0,#4]; jumptable 00856DD8 case 8                 ; +0x54, 0x856e0c\nLDR             R1, [R1,#4]                                            ; +0x58, 0x856e10\nB               OBJ_cmp                                                ; +0x5c, 0x856e14\nLDR             R0, [R0,#4]; jumptable 00856DD8 case 0                 ; +0x60, 0x856e18\nLDR             R1, [R1,#4]                                            ; +0x64, 0x856e1c\nB               OTHERNAME_cmp                                          ; +0x68, 0x856e20\nLDR             R0, [R0,#4]; jumptable 00856DD8 cases 1,2,6            ; +0x6c, 0x856e24\nLDR             R1, [R1,#4]                                            ; +0x70, 0x856e28\nB               ASN1_STRING_cmp                                        ; +0x74, 0x856e2c\nLDR             R0, [R0,#4]; jumptable 00856DD8 cases 3,5              ; +0x78, 0x856e30\nLDR             R1, [R1,#4]                                            ; +0x7c, 0x856e34\nB               ASN1_TYPE_cmp                                          ; +0x80, 0x856e38\nLDR             R0, [R0,#4]; jumptable 00856DD8 case 4                 ; +0x84, 0x856e3c\nLDR             R1, [R1,#4]                                            ; +0x88, 0x856e40\nB               X509_NAME_cmp                                          ; +0x8c, 0x856e44\nLDR             R0, [R0,#4]; jumptable 00856DD8 case 7                 ; +0x90, 0x856e48\nLDR             R1, [R1,#4]                                            ; +0x94, 0x856e4c\nB               ASN1_OCTET_STRING_cmp                                  ; +0x98, 0x856e50", "xrefs": ["sub_843150 @ 0x843640", "<???> @ 0x6755c"], "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"}