i tried to gather all procs running on my system.Code:format pe console section '.code' code readable executable push 184000 ;1000 procs call [malloc] mov ebx, eax push 0 push 184000 push ebx push 5; SystemProcessInformation call [NtQuerySystemInformation] xor edi,edi lop: push dword [ebx+68+edi] push f call [printf] add esp, 8 inc edi cmp edi,1000 jnz lop pop edx retn section '.data' data readable writeable f db '%i',13,10,0 section '.idata' import data readable dd 0,0,0,RVA msvcrt_name,RVA msvcrt_table dd 0,0,0,RVA ntdll_name,RVA ntdll_table dd 5 dup 0 msvcrt_table: printf dd RVA _printf malloc dd RVA _malloc dd 0 ntdll_table: NtQuerySystemInformation dd RVA _NtQuerySystemInformation dd 0 msvcrt_name db 'msvcrt.dll',0 ntdll_name db 'ntdll.dll',0 _printf db 0,0,'printf',0 _malloc db 0,0,'malloc',0 _NtQuerySystemInformation db 0,0,'NtQuerySystemInformation',0
It-semi-worked, buy not at all.
I dont understand why it output that. all my procs are at the end, and if i loop it less times, i have only crap and 0.
What im doing wrong, how to use this?