// // sub_A20008 from 0xa20008 to 0xa2016c (356 bytes) // // 1 xrefs: // > @ 0xc7962c // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:07:55 +0000 // int __fastcall sub_A20008(int a1, int a2, int a3, void *a4) { _DWORD *v6; // r5 bool v7; // zf int v8; // r0 int result; // r0 int v10; // r0 int v11; // r0 bool v12; // zf int v13; // r0 int v14; // r0 v6 = *(_DWORD **)(a1 + 20); switch ( a2 ) { case 4099: if ( !a4 ) goto LABEL_7; *v6 = a4; result = 1; break; case 4100: v12 = a3 == 0; if ( a3 ) v12 = a4 == nullptr; if ( v12 ) goto LABEL_23; if ( a3 < 0 ) goto LABEL_7; v13 = v6[1]; if ( v13 ) CRYPTO_clear_free(v13, v6[2], "crypto/kdf/hkdf.c", 88); v14 = CRYPTO_memdup(a4, a3, "crypto/kdf/hkdf.c", 90); v6[1] = v14; if ( !v14 ) goto LABEL_7; v6[2] = a3; result = 1; break; case 4101: if ( a3 < 0 ) goto LABEL_7; v10 = v6[3]; if ( v10 ) CRYPTO_clear_free(v10, v6[4], "crypto/kdf/hkdf.c", 102); v11 = CRYPTO_memdup(a4, a3, "crypto/kdf/hkdf.c", 104); v6[3] = v11; if ( !v11 ) goto LABEL_7; v6[4] = a3; result = 1; break; case 4102: v7 = a3 == 0; if ( a3 ) v7 = a4 == nullptr; if ( v7 ) { LABEL_23: result = 1; } else if ( a3 >= 0 && (v8 = v6[261], a3 <= 1024 - v8) ) { memcpy((char *)v6 + v8 + 20, a4, a3); v6[261] += a3; result = 1; } else { LABEL_7: result = 0; } break; default: result = -2; break; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source