//
// OPENSSL_DIR_end from 0x103e5a0 to 0x103e614 (116 bytes)
//
// 2 xrefs:
// > SSL_add_dir_cert_subjects_to_stack @ 0xfb960c
// > ??> @ 0xa77d0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:16:28 +0000
//
__int64 __fastcall OPENSSL_DIR_end(void **a1)
{
DIR **v2; // x0
int v3; // w20
unsigned int v4; // w1
_DWORD *v5; // x0
if ( !a1 )
goto LABEL_5;
v2 = (DIR **)*a1;
if ( !v2 )
goto LABEL_5;
v3 = closedir(*v2);
free(*a1);
if ( v3 != -1 )
{
v4 = 1;
if ( !v3 )
return v4;
LABEL_5:
v5 = (_DWORD *)__errno();
v4 = 0;
*v5 = 22;
return v4;
}
return 0;
}