{"type": "func", "start": 8791212, "end": 8791376, "name": "ASN1_INTEGER_set_uint64", "pseudocode": "// \n// ASN1_INTEGER_set_uint64 from 0x8624ac to 0x862550 (164 bytes)\n// \n// 4 xrefs:\n// > PKCS5_pbe2_set_scrypt @ 0x8c75fc\n// > PKCS5_pbe2_set_scrypt @ 0x8c7610\n// > PKCS5_pbe2_set_scrypt @ 0x8c7624\n// > <???> @ 0x698bc\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\nconst char *__fastcall ASN1_INTEGER_set_uint64(signed int *a1, unsigned __int64 a2)\n{\n  int v3; // r12\n  unsigned __int64 v4; // r4\n  int v5; // r6\n  char *v7; // r12\n  char v8[8]; // [sp+0h] [bp-8h] BYREF\n\n  if ( a2 > 0xFF )\n    v3 = 0;\n  a1[1] = 2;\n  if ( a2 <= 0xFF )\n  {\n    v5 = 1;\n    v8[0] = a2;\n    return ASN1_STRING_set(a1, v8, v5);\n  }\n  v4 = a2;\n  while ( 1 )\n  {\n    v4 >>= 8;\n    v5 = v3 + 1;\n    if ( !v4 )\n      break;\n    ++v3;\n  }\n  v7 = &v8[v3];\n  do\n  {\n    *v7-- = a2;\n    a2 >>= 8;\n  }\n  while ( v7 >= v8 );\n  if ( v5 )\n    return ASN1_STRING_set(a1, v8, v5);\n  return nullptr;\n}", "assembly": "; \n; ASN1_INTEGER_set_uint64 from 0x8624ac to 0x862550 (164 bytes)\n; \n; 4 xrefs:\n; > PKCS5_pbe2_set_scrypt @ 0x8c75fc\n; > PKCS5_pbe2_set_scrypt @ 0x8c7610\n; > PKCS5_pbe2_set_scrypt @ 0x8c7624\n; > <???> @ 0x698bc\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             R3, #0                                                 ; +0x0, 0x8624ac\nCMPEQ           R2, #0xFF                                              ; +0x4, 0x8624b0\nMOV             R1, #2                                                 ; +0x8, 0x8624b4\nPUSH            {R4-R6,LR}                                             ; +0xc, 0x8624b8\nMOVHI           R12, #0                                                ; +0x10, 0x8624bc\nSUB             SP, SP, #8                                             ; +0x14, 0x8624c0\nSTR             R1, [R0,#4]                                            ; +0x18, 0x8624c4\nMOVHI           R4, R2                                                 ; +0x1c, 0x8624c8\nMOVHI           R5, R3                                                 ; +0x20, 0x8624cc\nBHI             loc_8624F4                                             ; +0x24, 0x8624d0\nADD             R1, SP, #8+var_s0                                      ; +0x28, 0x8624d4\nMOV             R6, #1                                                 ; +0x2c, 0x8624d8\nSTRB            R2, [R1,#-8]!; void *                                  ; +0x30, 0x8624dc\nMOV             R2, R6                                                 ; +0x34, 0x8624e0\nBL              ASN1_STRING_set                                        ; +0x38, 0x8624e4\nADD             SP, SP, #8                                             ; +0x3c, 0x8624e8\nPOP             {R4-R6,PC}                                             ; +0x40, 0x8624ec\nMOV             R12, R6                                                ; +0x44, 0x8624f0\nMOV             R1, R4,LSR#8                                           ; +0x48, 0x8624f4\nORR             R1, R1, R5,LSL#24                                      ; +0x4c, 0x8624f8\nMOV             LR, R5,LSR#8                                           ; +0x50, 0x8624fc\nMOV             R4, R1                                                 ; +0x54, 0x862500\nMOV             R5, LR                                                 ; +0x58, 0x862504\nORRS            R1, R4, R5                                             ; +0x5c, 0x862508\nADD             R6, R12, #1                                            ; +0x60, 0x86250c\nBNE             loc_8624F0                                             ; +0x64, 0x862510\nMOV             R1, SP                                                 ; +0x68, 0x862514\nADD             R12, SP, R12                                           ; +0x6c, 0x862518\nMOV             LR, R2,LSR#8                                           ; +0x70, 0x86251c\nSTRB            R2, [R12],#-1                                          ; +0x74, 0x862520\nORR             LR, LR, R3,LSL#24                                      ; +0x78, 0x862524\nMOV             R4, R3,LSR#8                                           ; +0x7c, 0x862528\nCMP             R12, R1                                                ; +0x80, 0x86252c\nMOV             R2, LR                                                 ; +0x84, 0x862530\nMOV             R3, R4                                                 ; +0x88, 0x862534\nBCS             loc_86251C                                             ; +0x8c, 0x862538\nCMP             R6, #0                                                 ; +0x90, 0x86253c\nMOVEQ           R0, R6                                                 ; +0x94, 0x862540\nBNE             loc_8624E0                                             ; +0x98, 0x862544\nADD             SP, SP, #8                                             ; +0x9c, 0x862548\nPOP             {R4-R6,PC}                                             ; +0xa0, 0x86254c", "xrefs": ["PKCS5_pbe2_set_scrypt @ 0x8c75fc", "PKCS5_pbe2_set_scrypt @ 0x8c7610", "PKCS5_pbe2_set_scrypt @ 0x8c7624", "<???> @ 0x698bc"], "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"}