{"type": "func", "start": 8486692, "end": 8486824, "name": "CRYPTO_ocb128_copy_ctx", "pseudocode": "// \n// CRYPTO_ocb128_copy_ctx from 0x817f24 to 0x817fa8 (132 bytes)\n// \n// 2 xrefs:\n// > sub_7FDA8C @ 0x7fdb78\n// > <???> @ 0x62cdc\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\nvoid *__fastcall CRYPTO_ocb128_copy_ctx(_DWORD *a1, int a2, int a3, int a4)\n{\n  int v8; // r3\n  void *result; // r0\n\n  memcpy(a1, (const void *)a2, 0xA8u);\n  v8 = *(_DWORD *)(a2 + 64);\n  if ( a3 )\n    a1[2] = a3;\n  if ( a4 )\n    a1[3] = a4;\n  if ( !v8 )\n    return &dword_0 + 1;\n  result = CRYPTO_malloc((void *)(16 * *(_DWORD *)(a2 + 24)), (int)\"crypto/modes/ocb128.c\", 213);\n  a1[16] = result;\n  if ( result )\n  {\n    memcpy(result, *(const void **)(a2 + 64), 16 * (*(_DWORD *)(a2 + 20) + 1));\n    return &dword_0 + 1;\n  }\n  return result;\n}", "assembly": "; \n; CRYPTO_ocb128_copy_ctx from 0x817f24 to 0x817fa8 (132 bytes)\n; \n; 2 xrefs:\n; > sub_7FDA8C @ 0x7fdb78\n; > <???> @ 0x62cdc\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, 0x817f24\nMOV             R7, R2                                                 ; +0x4, 0x817f28\nMOV             R4, R1                                                 ; +0x8, 0x817f2c\nMOV             R2, #0xA8; size_t                                      ; +0xc, 0x817f30\nMOV             R6, R3                                                 ; +0x10, 0x817f34\nMOV             R5, R0                                                 ; +0x14, 0x817f38\nBL              memcpy                                                 ; +0x18, 0x817f3c\nCMP             R7, #0                                                 ; +0x1c, 0x817f40\nLDR             R3, [R4,#0x40]                                         ; +0x20, 0x817f44\nSTRNE           R7, [R5,#8]                                            ; +0x24, 0x817f48\nCMP             R6, #0                                                 ; +0x28, 0x817f4c\nSTRNE           R6, [R5,#0xC]                                          ; +0x2c, 0x817f50\nCMP             R3, #0                                                 ; +0x30, 0x817f54\nBEQ             loc_817F9C                                             ; +0x34, 0x817f58\nLDR             R0, [R4,#0x18]                                         ; +0x38, 0x817f5c\nLDR             R1, =(aCryptoModesOcb - 0x817F70); \"crypto/modes/ocb128.c\" ; +0x3c, 0x817f60\nMOV             R0, R0,LSL#4                                           ; +0x40, 0x817f64\nADD             R1, PC, R1; \"crypto/modes/ocb128.c\"                    ; +0x44, 0x817f68\nMOV             R2, #0xD5                                              ; +0x48, 0x817f6c\nBL              CRYPTO_malloc                                          ; +0x4c, 0x817f70\nCMP             R0, #0                                                 ; +0x50, 0x817f74\nSTR             R0, [R5,#0x40]                                         ; +0x54, 0x817f78\nBEQ             locret_817FA4                                          ; +0x58, 0x817f7c\nLDR             R2, [R4,#0x14]                                         ; +0x5c, 0x817f80\nLDR             R1, [R4,#0x40]; void *                                 ; +0x60, 0x817f84\nADD             R2, R2, #1                                             ; +0x64, 0x817f88\nMOV             R2, R2,LSL#4; size_t                                   ; +0x68, 0x817f8c\nBL              memcpy                                                 ; +0x6c, 0x817f90\nMOV             R0, #1                                                 ; +0x70, 0x817f94\nPOP             {R3-R7,PC}                                             ; +0x74, 0x817f98\nMOV             R0, #1                                                 ; +0x78, 0x817f9c\nPOP             {R3-R7,PC}                                             ; +0x7c, 0x817fa0\nPOP             {R3-R7,PC}                                             ; +0x80, 0x817fa4", "xrefs": ["sub_7FDA8C @ 0x7fdb78", "<???> @ 0x62cdc"], "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"}