{"type": "func", "start": 8271092, "end": 8271324, "name": "DSO_set_filename", "pseudocode": "// \n// DSO_set_filename from 0x7e34f4 to 0x7e35dc (232 bytes)\n// \n// 2 xrefs:\n// > DSO_load @ 0x7e3654\n// > <???> @ 0x6101c\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 DSO_set_filename(int a1, int a2)\n{\n  bool v2; // zf\n  int v5; // r6\n\n  v2 = a2 == 0;\n  if ( a2 )\n    v2 = a1 == 0;\n  if ( v2 )\n  {\n    ERR_put_error(37, 129, 67, \"crypto/dso/dso_lib.c\", 244);\n    return 0;\n  }\n  else if ( *(_DWORD *)(a1 + 32) )\n  {\n    ERR_put_error(37, 129, 110, \"crypto/dso/dso_lib.c\", 248);\n    return 0;\n  }\n  else\n  {\n    v5 = CRYPTO_strdup(a2, \"crypto/dso/dso_lib.c\", 252);\n    if ( v5 )\n    {\n      CRYPTO_free(*(_DWORD *)(a1 + 28), \"crypto/dso/dso_lib.c\", 257);\n      *(_DWORD *)(a1 + 28) = v5;\n      return 1;\n    }\n    else\n    {\n      ERR_put_error(37, 129, 65, \"crypto/dso/dso_lib.c\", 254);\n      return 0;\n    }\n  }\n}", "assembly": "; \n; DSO_set_filename from 0x7e34f4 to 0x7e35dc (232 bytes)\n; \n; 2 xrefs:\n; > DSO_load @ 0x7e3654\n; > <???> @ 0x6101c\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, 0x7e34f4\nCMPNE           R0, #0                                                 ; +0x4, 0x7e34f8\nPUSH            {R4-R6,LR}                                             ; +0x8, 0x7e34fc\nMOVEQ           R4, #1                                                 ; +0xc, 0x7e3500\nSUB             SP, SP, #8                                             ; +0x10, 0x7e3504\nMOVNE           R4, #0                                                 ; +0x14, 0x7e3508\nBEQ             loc_7E354C                                             ; +0x18, 0x7e350c\nLDR             R3, [R0,#0x20]                                         ; +0x1c, 0x7e3510\nMOV             R5, R0                                                 ; +0x20, 0x7e3514\nCMP             R3, #0                                                 ; +0x24, 0x7e3518\nBEQ             loc_7E3578                                             ; +0x28, 0x7e351c\nMOV             R3, #0xF8                                              ; +0x2c, 0x7e3520\nSTR             R3, [SP,#8+var_8]                                      ; +0x30, 0x7e3524\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3540); \"crypto/dso/dso_lib.c\" ; +0x34, 0x7e3528\nMOV             R0, #0x25 ; '%'                                        ; +0x38, 0x7e352c\nMOV             R1, #0x81                                              ; +0x3c, 0x7e3530\nMOV             R2, #0x6E ; 'n'                                        ; +0x40, 0x7e3534\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x44, 0x7e3538\nBL              ERR_put_error                                          ; +0x48, 0x7e353c\nMOV             R0, R4                                                 ; +0x4c, 0x7e3540\nADD             SP, SP, #8                                             ; +0x50, 0x7e3544\nPOP             {R4-R6,PC}                                             ; +0x54, 0x7e3548\nMOV             R3, #0xF4                                              ; +0x58, 0x7e354c\nSTR             R3, [SP,#8+var_8]                                      ; +0x5c, 0x7e3550\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E356C); \"crypto/dso/dso_lib.c\" ; +0x60, 0x7e3554\nMOV             R0, #0x25 ; '%'                                        ; +0x64, 0x7e3558\nMOV             R1, #0x81                                              ; +0x68, 0x7e355c\nMOV             R2, #0x43 ; 'C'                                        ; +0x6c, 0x7e3560\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0x70, 0x7e3564\nBL              ERR_put_error                                          ; +0x74, 0x7e3568\nMOV             R0, #0                                                 ; +0x78, 0x7e356c\nADD             SP, SP, #8                                             ; +0x7c, 0x7e3570\nPOP             {R4-R6,PC}                                             ; +0x80, 0x7e3574\nLDR             R4, =(aCryptoDsoDsoLi - 0x7E3588); \"crypto/dso/dso_lib.c\" ; +0x84, 0x7e3578\nMOV             R0, R1                                                 ; +0x88, 0x7e357c\nADD             R4, PC, R4; \"crypto/dso/dso_lib.c\"                     ; +0x8c, 0x7e3580\nMOV             R1, R4                                                 ; +0x90, 0x7e3584\nMOV             R2, #0xFC                                              ; +0x94, 0x7e3588\nBL              CRYPTO_strdup                                          ; +0x98, 0x7e358c\nSUBS            R6, R0, #0                                             ; +0x9c, 0x7e3590\nBEQ             loc_7E35B8                                             ; +0xa0, 0x7e3594\nLDR             R0, [R5,#0x1C]                                         ; +0xa4, 0x7e3598\nMOV             R1, R4                                                 ; +0xa8, 0x7e359c\nLDR             R2, =0x101                                             ; +0xac, 0x7e35a0\nBL              CRYPTO_free                                            ; +0xb0, 0x7e35a4\nMOV             R0, #1                                                 ; +0xb4, 0x7e35a8\nSTR             R6, [R5,#0x1C]                                         ; +0xb8, 0x7e35ac\nADD             SP, SP, #8                                             ; +0xbc, 0x7e35b0\nPOP             {R4-R6,PC}                                             ; +0xc0, 0x7e35b4\nMOV             R2, #0xFE                                              ; +0xc4, 0x7e35b8\nSTR             R2, [SP,#8+var_8]                                      ; +0xc8, 0x7e35bc\nMOV             R0, #0x25 ; '%'                                        ; +0xcc, 0x7e35c0\nMOV             R3, R4                                                 ; +0xd0, 0x7e35c4\nMOV             R1, #0x81                                              ; +0xd4, 0x7e35c8\nMOV             R2, #0x41 ; 'A'                                        ; +0xd8, 0x7e35cc\nBL              ERR_put_error                                          ; +0xdc, 0x7e35d0\nMOV             R0, R6                                                 ; +0xe0, 0x7e35d4\nB               loc_7E3544                                             ; +0xe4, 0x7e35d8", "xrefs": ["DSO_load @ 0x7e3654", "<???> @ 0x6101c"], "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"}