I think the instruction you're looking for is LODSD
which means "load DWORD from string". You don't get to pick the registers though: The pointer is in ESI
and the destination register is EAX
.
After the byte, word, or doubleword is transferred from the memory location into the AL, AX, or EAX register, the (E)SI register is incremented or decremented automati- cally according to the setting of the DF flag in the EFLAGS register. (If the DF flag is 0, the (E)SI register is incremented; if the DF flag is 1, the ESI register is decre- mented.) The (E)SI register is incremented or decremented by 1 for byte operations, by 2 for word operations, or by 4 for doubleword operations.
Sorry, I've got Intex syntax ingrained in my head right now. Assuming flat 32-bit protected mode:
mov esi, _source_data_ ; ESI points to source data
cld ; Clear the direction flag
; (ESI will increment)
lodsd ; Essentially mov eax, [ds:esi]
; add esi, 4