{"type": "func", "start": 8793440, "end": 8793620, "name": "ASN1_ENUMERATED_to_BN", "pseudocode": "// \n// ASN1_ENUMERATED_to_BN from 0x862d60 to 0x862e14 (180 bytes)\n// \n// 2 xrefs:\n// > i2s_ASN1_ENUMERATED @ 0x85cf44\n// > <???> @ 0x697bc\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_ENUMERATED_to_BN(int a1, int *a2)\n{\n  int *result; // r0\n  int *v4; // r5\n\n  if ( (*(_DWORD *)(a1 + 4) & 0xFFFFFEFF) == 0xA )\n  {\n    result = BN_bin2bn(*(_BYTE **)(a1 + 8), *(_DWORD *)a1, a2);\n    v4 = result;\n    if ( result )\n    {\n      if ( (*(_DWORD *)(a1 + 4) & 0x100) != 0 )\n      {\n        BN_set_negative((_BOOL4)result, 1);\n        return v4;\n      }\n    }\n    else\n    {\n      ERR_put_error(13, 228, 105, (int)\"crypto/asn1/a_int.c\", 526);\n      return nullptr;\n    }\n  }\n  else\n  {\n    ERR_put_error(13, 228, 225, (int)\"crypto/asn1/a_int.c\", 520);\n    return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; ASN1_ENUMERATED_to_BN from 0x862d60 to 0x862e14 (180 bytes)\n; \n; 2 xrefs:\n; > i2s_ASN1_ENUMERATED @ 0x85cf44\n; > <???> @ 0x697bc\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\nLDR             R3, [R0,#4]                                            ; +0x0, 0x862d60\nPUSH            {R4,R5,LR}                                             ; +0x4, 0x862d64\nBIC             R3, R3, #0x100                                         ; +0x8, 0x862d68\nCMP             R3, #0xA                                               ; +0xc, 0x862d6c\nSUB             SP, SP, #0xC                                           ; +0x10, 0x862d70\nMOV             R4, R0                                                 ; +0x14, 0x862d74\nBNE             loc_862DC0                                             ; +0x18, 0x862d78\nMOV             R2, R1                                                 ; +0x1c, 0x862d7c\nLDR             R0, [R0,#8]                                            ; +0x20, 0x862d80\nLDR             R1, [R4]                                               ; +0x24, 0x862d84\nBL              BN_bin2bn                                              ; +0x28, 0x862d88\nSUBS            R5, R0, #0                                             ; +0x2c, 0x862d8c\nBEQ             loc_862DEC                                             ; +0x30, 0x862d90\nLDR             R3, [R4,#4]                                            ; +0x34, 0x862d94\nTST             R3, #0x100                                             ; +0x38, 0x862d98\nMOVEQ           R0, R5                                                 ; +0x3c, 0x862d9c\nBNE             loc_862DAC                                             ; +0x40, 0x862da0\nADD             SP, SP, #0xC                                           ; +0x44, 0x862da4\nPOP             {R4,R5,PC}                                             ; +0x48, 0x862da8\nMOV             R1, #1                                                 ; +0x4c, 0x862dac\nBL              BN_set_negative                                        ; +0x50, 0x862db0\nMOV             R0, R5                                                 ; +0x54, 0x862db4\nADD             SP, SP, #0xC                                           ; +0x58, 0x862db8\nPOP             {R4,R5,PC}                                             ; +0x5c, 0x862dbc\nMOV             R3, #0x208                                             ; +0x60, 0x862dc0\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x64, 0x862dc4\nLDR             R3, =(aCryptoAsn1AInt - 0x862DE0); \"crypto/asn1/a_int.c\" ; +0x68, 0x862dc8\nMOV             R0, #0xD                                               ; +0x6c, 0x862dcc\nMOV             R1, #0xE4                                              ; +0x70, 0x862dd0\nMOV             R2, #0xE1                                              ; +0x74, 0x862dd4\nADD             R3, PC, R3; \"crypto/asn1/a_int.c\"                      ; +0x78, 0x862dd8\nBL              ERR_put_error                                          ; +0x7c, 0x862ddc\nMOV             R0, #0                                                 ; +0x80, 0x862de0\nADD             SP, SP, #0xC                                           ; +0x84, 0x862de4\nPOP             {R4,R5,PC}                                             ; +0x88, 0x862de8\nLDR             R3, =0x20E                                             ; +0x8c, 0x862dec\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x90, 0x862df0\nLDR             R3, =(aCryptoAsn1AInt - 0x862E0C); \"crypto/asn1/a_int.c\" ; +0x94, 0x862df4\nMOV             R0, #0xD                                               ; +0x98, 0x862df8\nMOV             R1, #0xE4                                              ; +0x9c, 0x862dfc\nMOV             R2, #0x69 ; 'i'                                        ; +0xa0, 0x862e00\nADD             R3, PC, R3; \"crypto/asn1/a_int.c\"                      ; +0xa4, 0x862e04\nBL              ERR_put_error                                          ; +0xa8, 0x862e08\nMOV             R0, R5                                                 ; +0xac, 0x862e0c\nB               loc_862DA4                                             ; +0xb0, 0x862e10", "xrefs": ["i2s_ASN1_ENUMERATED @ 0x85cf44", "<???> @ 0x697bc"], "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"}