Function at 0x402870
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408a76
mov eax, dword fs:[0]
push eax
mov eax, 0x1160
call fcn.00408830
mov eax, dword [0x40d004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x113c], esi
lea eax, [ebp - 0x1118]
mov dword [0x40d4e8], 0
push eax
push 0x1000
lea eax, [ebp - 0x1114]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_K32EnumProcessModules]
test eax, eax
je 0x402c24
xor ebx, ebx
test dword [ebp - 0x1118], 0xfffffffc
jbe 0x402b27
nop dword [eax + eax]
push 0x104
lea ecx, [ebp - 0x114]
lea eax, [ebp - 0x1114]
lea eax, [eax + ebx*4]
push ecx
push dword [eax]
mov dword [ebp - 0x1134], eax
push esi
call dword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExA]
test eax, eax
je 0x402b15
mov byte [ebp - 0x1138], 0
lea edx, [ebp - 0x114]
push dword [ebp - 0x1138]
lea ecx, [ebp - 0x1154]
call fcn.00403f50
add esp, 4
lea eax, [ebp - 0x116c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x1154]
call fcn.00402780
push ecx
lea ecx, [ebp - 0x1130]
mov byte [ebp - 4], 1
push ecx
mov ecx, eax
call fcn.00403780
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1158]
cmp ecx, 8
jb 0x4029ad
mov edx, dword [ebp - 0x116c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4029a3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b5f
push ecx
push edx
call fcn.00407a0b
add esp, 8
xor eax, eax
mov dword [ebp - 0x115c], 0
mov dword [ebp - 0x1158], 7
mov word [ebp - 0x116c], ax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x1140]
cmp ecx, 8
jb 0x402a0e
mov edx, dword [ebp - 0x1154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a04
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b5f
push ecx
push edx
call fcn.00407a0b
add esp, 8
mov edi, dword [ebp - 0x1130]
xor eax, eax
cmp dword [0x40d500], 0x10
mov edx, 0x40d4ec
mov esi, dword [ebp - 0x1120]
cmovae edx, dword [0x40d4ec]
cmp dword [ebp - 0x111c], 0x10
mov word [ebp - 0x1154], ax
lea eax, [ebp - 0x1130]
cmovae eax, edi
mov dword [ebp - 0x1144], 0
mov dword [ebp - 0x1140], 7
cmp esi, dword [0x40d4fc]
jne 0x402abb
sub esi, 4
jb 0x402a78
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x402a7d
add eax, 4
add edx, 4
sub esi, 4
jae 0x402a67
cmp esi, 0xfffffffc
je 0x402ab1
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x402aaa
cmp esi, 0xfffffffd
je 0x402ab1
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x402aaa
cmp esi, 0xfffffffe
je 0x402ab1
mov cl, byte [eax + 2]
cmp cl, byte [edx + 2]
jne 0x402aaa
cmp esi, 0xffffffff
je 0x402ab1
mov al, byte [eax + 3]
cmp al, byte [edx + 3]
je 0x402ab1
sbb eax, eax
or eax, 1
jmp 0x402ab3
xor eax, eax
test eax, eax
je 0x402b65
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x111c]
cmp eax, 0x10
jb 0x402af4
lea ecx, [eax + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x402aea
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b5f
push ecx
push edi
call fcn.00407a0b
add esp, 8
mov esi, dword [ebp - 0x113c]
mov dword [ebp - 0x1120], 0
mov dword [ebp - 0x111c], 0xf
mov byte [ebp - 0x1130], 0
mov eax, dword [ebp - 0x1118]
inc ebx
shr eax, 2
cmp ebx, eax
jb 0x4028f0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Module_not_found:
call fcn.004019f0
cmp dword [0x40d500], 0x10
mov edx, 0x40d4ec
push dword [0x40d4fc]
cmovae edx, dword [0x40d4ec]
mov ecx, eax
call fcn.00403f90
add esp, 4
jmp 0x402c45
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov eax, dword [ebp - 0x1134]
mov edx, str.Module_base_address_for
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov eax, dword [eax]
mov dword [0x40d4e8], eax
call fcn.004019f0
cmp dword [0x40d500], 0x10
mov edx, 0x40d4ec
push dword [0x40d4fc]
cmovae edx, dword [0x40d4ec]
mov ecx, eax
call fcn.00403f90
add esp, 4
mov edx, 0x4094e8
mov ecx, eax
call fcn.004019f0
push 0x402630
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base_____cdecl___class_std::ios_base___]
push dword [0x40d4e8]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push 0x402610
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base_____cdecl___class_std::ios_base___]
push 0x401c10
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [ebp - 0x111c]
cmp ecx, 0x10
jb 0x402c20
mov edx, dword [ebp - 0x1130]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402c16
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402b5f
push ecx
push edx
call fcn.00407a0b
add esp, 8
mov al, 1
jmp 0x402c54
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_enumerate_process_modules._Error:
call fcn.004019f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
push 0x401c10
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004079cd
mov esp, ebp
pop ebp
ret