{"type": "func", "start": 8272232, "end": 8272500, "name": "DSO_convert_filename", "pseudocode": "// \n// DSO_convert_filename from 0x7e3968 to 0x7e3a74 (268 bytes)\n// \n// 3 xrefs:\n// > sub_88219C @ 0x8821ac\n// > sub_8B3090 @ 0x8b367c\n// > <???> @ 0x6103c\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_convert_filename(_DWORD *a1, int a2)\n{\n  int v2; // r5\n  int v3; // r4\n  int result; // r0\n  int (__fastcall *v5)(_DWORD *, int); // r3\n\n  if ( a1 )\n  {\n    v2 = a2;\n    if ( a2 || (v2 = a1[7]) != 0 )\n    {\n      if ( (a1[3] & 1) != 0\n        || (v5 = (int (__fastcall *)(_DWORD *, int))a1[5]) == nullptr\n        && (v5 = *(int (__fastcall **)(_DWORD *, int))(*a1 + 20)) == nullptr\n        || (result = v5(a1, v2)) == 0 )\n      {\n        v3 = CRYPTO_strdup(v2, \"crypto/dso/dso_lib.c\", 300);\n        if ( !v3 )\n          ERR_put_error(37, 126, 65, \"crypto/dso/dso_lib.c\", 302);\n        return v3;\n      }\n    }\n    else\n    {\n      ERR_put_error(37, 126, 111, \"crypto/dso/dso_lib.c\", 290);\n      return 0;\n    }\n  }\n  else\n  {\n    ERR_put_error(37, 126, 67, \"crypto/dso/dso_lib.c\", 284);\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; DSO_convert_filename from 0x7e3968 to 0x7e3a74 (268 bytes)\n; \n; 3 xrefs:\n; > sub_88219C @ 0x8821ac\n; > sub_8B3090 @ 0x8b367c\n; > <???> @ 0x6103c\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            {R4-R6,LR}                                             ; +0x0, 0x7e3968\nSUBS            R4, R0, #0                                             ; +0x4, 0x7e396c\nSUB             SP, SP, #8                                             ; +0x8, 0x7e3970\nBEQ             loc_7E3A2C                                             ; +0xc, 0x7e3974\nCMP             R1, #0                                                 ; +0x10, 0x7e3978\nMOV             R5, R1                                                 ; +0x14, 0x7e397c\nBEQ             loc_7E39E4                                             ; +0x18, 0x7e3980\nLDR             R3, [R4,#0xC]                                          ; +0x1c, 0x7e3984\nTST             R3, #1                                                 ; +0x20, 0x7e3988\nBEQ             loc_7E39BC                                             ; +0x24, 0x7e398c\nLDR             R6, =(aCryptoDsoDsoLi - 0x7E39A0); \"crypto/dso/dso_lib.c\" ; +0x28, 0x7e3990\nMOV             R0, R5                                                 ; +0x2c, 0x7e3994\nADD             R6, PC, R6; \"crypto/dso/dso_lib.c\"                     ; +0x30, 0x7e3998\nMOV             R1, R6                                                 ; +0x34, 0x7e399c\nMOV             R2, #0x12C                                             ; +0x38, 0x7e39a0\nBL              CRYPTO_strdup                                          ; +0x3c, 0x7e39a4\nSUBS            R4, R0, #0                                             ; +0x40, 0x7e39a8\nBEQ             loc_7E3A54                                             ; +0x44, 0x7e39ac\nMOV             R0, R4                                                 ; +0x48, 0x7e39b0\nADD             SP, SP, #8                                             ; +0x4c, 0x7e39b4\nPOP             {R4-R6,PC}                                             ; +0x50, 0x7e39b8\nLDR             R3, [R4,#0x14]                                         ; +0x54, 0x7e39bc\nCMP             R3, #0                                                 ; +0x58, 0x7e39c0\nBEQ             loc_7E3A18                                             ; +0x5c, 0x7e39c4\nMOV             R0, R4                                                 ; +0x60, 0x7e39c8\nMOV             R1, R5                                                 ; +0x64, 0x7e39cc\nBLX             R3                                                     ; +0x68, 0x7e39d0\nCMP             R0, #0                                                 ; +0x6c, 0x7e39d4\nBEQ             loc_7E3990                                             ; +0x70, 0x7e39d8\nADD             SP, SP, #8                                             ; +0x74, 0x7e39dc\nPOP             {R4-R6,PC}                                             ; +0x78, 0x7e39e0\nLDR             R5, [R4,#0x1C]                                         ; +0x7c, 0x7e39e4\nCMP             R5, #0                                                 ; +0x80, 0x7e39e8\nBNE             loc_7E3984                                             ; +0x84, 0x7e39ec\nLDR             R3, =0x122                                             ; +0x88, 0x7e39f0\nSTR             R3, [SP,#8+var_8]                                      ; +0x8c, 0x7e39f4\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3A10); \"crypto/dso/dso_lib.c\" ; +0x90, 0x7e39f8\nMOV             R0, #0x25 ; '%'                                        ; +0x94, 0x7e39fc\nMOV             R1, #0x7E ; '~'                                        ; +0x98, 0x7e3a00\nMOV             R2, #0x6F ; 'o'                                        ; +0x9c, 0x7e3a04\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0xa0, 0x7e3a08\nBL              ERR_put_error                                          ; +0xa4, 0x7e3a0c\nMOV             R0, R5                                                 ; +0xa8, 0x7e3a10\nB               loc_7E39B4                                             ; +0xac, 0x7e3a14\nLDR             R3, [R4]                                               ; +0xb0, 0x7e3a18\nLDR             R3, [R3,#0x14]                                         ; +0xb4, 0x7e3a1c\nCMP             R3, #0                                                 ; +0xb8, 0x7e3a20\nBNE             loc_7E39C8                                             ; +0xbc, 0x7e3a24\nB               loc_7E3990                                             ; +0xc0, 0x7e3a28\nMOV             R3, #0x11C                                             ; +0xc4, 0x7e3a2c\nSTR             R3, [SP,#8+var_8]                                      ; +0xc8, 0x7e3a30\nLDR             R3, =(aCryptoDsoDsoLi - 0x7E3A4C); \"crypto/dso/dso_lib.c\" ; +0xcc, 0x7e3a34\nMOV             R0, #0x25 ; '%'                                        ; +0xd0, 0x7e3a38\nMOV             R1, #0x7E ; '~'                                        ; +0xd4, 0x7e3a3c\nMOV             R2, #0x43 ; 'C'                                        ; +0xd8, 0x7e3a40\nADD             R3, PC, R3; \"crypto/dso/dso_lib.c\"                     ; +0xdc, 0x7e3a44\nBL              ERR_put_error                                          ; +0xe0, 0x7e3a48\nMOV             R0, R4                                                 ; +0xe4, 0x7e3a4c\nB               loc_7E39B4                                             ; +0xe8, 0x7e3a50\nLDR             R2, =0x12E                                             ; +0xec, 0x7e3a54\nSTR             R2, [SP,#8+var_8]                                      ; +0xf0, 0x7e3a58\nMOV             R3, R6                                                 ; +0xf4, 0x7e3a5c\nMOV             R0, #0x25 ; '%'                                        ; +0xf8, 0x7e3a60\nMOV             R1, #0x7E ; '~'                                        ; +0xfc, 0x7e3a64\nMOV             R2, #0x41 ; 'A'                                        ; +0x100, 0x7e3a68\nBL              ERR_put_error                                          ; +0x104, 0x7e3a6c\nB               loc_7E39B0                                             ; +0x108, 0x7e3a70", "xrefs": ["sub_88219C @ 0x8821ac", "sub_8B3090 @ 0x8b367c", "<???> @ 0x6103c"], "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"}