{"type": "func", "start": 10973356, "end": 10973520, "name": "ASN1_INTEGER_set_uint64", "pseudocode": "// \n// ASN1_INTEGER_set_uint64 from 0xa770ac to 0xa77150 (164 bytes)\n// \n// 4 xrefs:\n// > PKCS5_pbe2_set_scrypt @ 0xadc5fc\n// > PKCS5_pbe2_set_scrypt @ 0xadc610\n// > PKCS5_pbe2_set_scrypt @ 0xadc624\n// > <???> @ 0x8333c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:08:44 +0000\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 0xa770ac to 0xa77150 (164 bytes)\n; \n; 4 xrefs:\n; > PKCS5_pbe2_set_scrypt @ 0xadc5fc\n; > PKCS5_pbe2_set_scrypt @ 0xadc610\n; > PKCS5_pbe2_set_scrypt @ 0xadc624\n; > <???> @ 0x8333c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:08:44 +0000\n; \nCMP             R3, #0                                                 ; +0x0, 0xa770ac\nCMPEQ           R2, #0xFF                                              ; +0x4, 0xa770b0\nMOV             R1, #2                                                 ; +0x8, 0xa770b4\nPUSH            {R4-R6,LR}                                             ; +0xc, 0xa770b8\nMOVHI           R12, #0                                                ; +0x10, 0xa770bc\nSUB             SP, SP, #8                                             ; +0x14, 0xa770c0\nSTR             R1, [R0,#4]                                            ; +0x18, 0xa770c4\nMOVHI           R4, R2                                                 ; +0x1c, 0xa770c8\nMOVHI           R5, R3                                                 ; +0x20, 0xa770cc\nBHI             loc_A770F4                                             ; +0x24, 0xa770d0\nADD             R1, SP, #8+var_s0                                      ; +0x28, 0xa770d4\nMOV             R6, #1                                                 ; +0x2c, 0xa770d8\nSTRB            R2, [R1,#-8]!; void *                                  ; +0x30, 0xa770dc\nMOV             R2, R6                                                 ; +0x34, 0xa770e0\nBL              ASN1_STRING_set                                        ; +0x38, 0xa770e4\nADD             SP, SP, #8                                             ; +0x3c, 0xa770e8\nPOP             {R4-R6,PC}                                             ; +0x40, 0xa770ec\nMOV             R12, R6                                                ; +0x44, 0xa770f0\nMOV             R1, R4,LSR#8                                           ; +0x48, 0xa770f4\nORR             R1, R1, R5,LSL#24                                      ; +0x4c, 0xa770f8\nMOV             LR, R5,LSR#8                                           ; +0x50, 0xa770fc\nMOV             R4, R1                                                 ; +0x54, 0xa77100\nMOV             R5, LR                                                 ; +0x58, 0xa77104\nORRS            R1, R4, R5                                             ; +0x5c, 0xa77108\nADD             R6, R12, #1                                            ; +0x60, 0xa7710c\nBNE             loc_A770F0                                             ; +0x64, 0xa77110\nMOV             R1, SP                                                 ; +0x68, 0xa77114\nADD             R12, SP, R12                                           ; +0x6c, 0xa77118\nMOV             LR, R2,LSR#8                                           ; +0x70, 0xa7711c\nSTRB            R2, [R12],#-1                                          ; +0x74, 0xa77120\nORR             LR, LR, R3,LSL#24                                      ; +0x78, 0xa77124\nMOV             R4, R3,LSR#8                                           ; +0x7c, 0xa77128\nCMP             R12, R1                                                ; +0x80, 0xa7712c\nMOV             R2, LR                                                 ; +0x84, 0xa77130\nMOV             R3, R4                                                 ; +0x88, 0xa77134\nBCS             loc_A7711C                                             ; +0x8c, 0xa77138\nCMP             R6, #0                                                 ; +0x90, 0xa7713c\nMOVEQ           R0, R6                                                 ; +0x94, 0xa77140\nBNE             loc_A770E0                                             ; +0x98, 0xa77144\nADD             SP, SP, #8                                             ; +0x9c, 0xa77148\nPOP             {R4-R6,PC}                                             ; +0xa0, 0xa7714c", "xrefs": ["PKCS5_pbe2_set_scrypt @ 0xadc5fc", "PKCS5_pbe2_set_scrypt @ 0xadc610", "PKCS5_pbe2_set_scrypt @ 0xadc624", "<???> @ 0x8333c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}