When I approach a passage, I try to picture each word. If it is a noun, I try to picture the thing and when it is a verb I try picture the action, often engage my body to actually go through the motions. I figure that if I can't picture it then I probably don't understand it.
When I first tried to picture this, what came to my mind was something like this:
This action performed on poor Peter would have been the death of him!
Then I realized that this is probably anachronistic thinking. What this probably referred to was "winnowing":
In this practice, the husks are separated from the grains of wheat and are driven away by the wind. When Jesus appeared, he already had his winnowing fork in his hand, as he was a-fixin' to do some winnowing:
[Mat 3:12 NKJV] (12) "His winnowing fan [is] in His hand, and He will thoroughly clean out His threshing floor, and gather His wheat into the barn; but He will burn up the chaff with unquenchable fire."
If I am correct about this, then the Satan was well intentioned, or pretended to be, acting on God's behalf, as he was wont to do in the few times he appears in the Tanach. The wheat being relieved of the chaff would be a good thing.
[2Co 12:7 NET] (7) even because of the extraordinary character of the revelations. Therefore, so that I would not become arrogant, a thorn in the flesh was given to me, a messenger of Satan to trouble me - so that I would not become arrogant.
Also, the Satan seems to be charged with distinguishing the wheat from the chaff. There seems the possibility that God had the Satan in the garden to test Adam and Eve's loyalty as we also see in the case of Job. The Satan asks Jesus, "IF you are the son of God..." and poses tests that would show Jesus to be wheat or to be chaff:
[Mat 4:1 NET] (1) Then Jesus was led by the Spirit into the wilderness to be tempted [or "tested"] by the devil.
There may also be a sense in which the Satan's testing has the effect of separating the faithful's life from an indulgent lifestyle:
[1Pe 4:1 NKJV] (1) Therefore, since Christ suffered for us in the flesh, arm yourselves also with the same mind, for he who has suffered in the flesh has ceased from sin,
It is also important to note that David being moved to count his army is ascribed both to God and to the Satan.
Whether the Satan (adversary) is a demonic figure or a human adversary is usually ambiguous, and is not explicit. Most take this to relate to the incident where Peter comes into danger from the Jews and Romans in the courtyard, and attribute it to the behind the scenes work of "that serpent of old". Perhaps that behind the scenes idea is not the point at all.
In 1 Peter 5:8 is "your adversary, the devil" a reference to persecuting Jews in cahoots with Rome?