I don't have time to do it but it should be fairly straight forward using

External_Function
Struct
AddressOf
Declare