Function at 0x407940
Capabilities:
Enumerate process modules

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41559e
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x270
mov eax, dword [0x41f00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x250], 1
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
push dword [eax]
mov dword [ebp - 0x250], 1
push 8
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x407a8c
push 0x220
lea eax, [ebp - 0x244]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x248], 0x224
lea eax, [ebp - 0x248]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Module32First]
test eax, eax
je 0x407a85
nop word [eax + eax]
mov esi, dword [ebp - 0x1c]
cmp esi, dword [ebp - 0x18]
je 0x407a5c
xorps xmm0, xmm0
lea ecx, [ebp - 0x228]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
lea edx, [ecx + 1]
mov dword [esi + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407a35
sub ecx, edx
lea eax, [ebp - 0x228]
push ecx
push eax
mov ecx, esi
call fcn.0040b1c0
mov eax, dword [ebp - 0x230]
mov dword [esi + 0x18], eax
add dword [ebp - 0x1c], 0x1c
jmp 0x407a73
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x228]
push eax
push esi
lea ecx, [ebp - 0x20]
call fcn.00412ee0
lea eax, [ebp - 0x248]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Module32Next]
test eax, eax
jne 0x407a10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov dword [ebp - 0x250], esi
mov dword [ebp - 4], 1
mov edx, str.e_36m
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.0040ace0
mov edx, str.____
mov ecx, eax
call fcn.0040ace0
mov edx, str.e_0m
mov ecx, eax
call fcn.0040ace0
mov edx, str.ASI_SF
mov ecx, eax
call fcn.0040ace0
push 0x40af00
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 edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], eax
cmp edi, eax
je 0x407c5b
nop word [eax + eax]
push edi
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 2
call fcn.00409e40
mov ecx, dword [ebp - 0x278]
lea edx, [ebp - 0x278]
or esi, 2
mov dword [ebp - 0x254], ecx
cmp dword [ebp - 0x264], 0x10
mov dword [ebp - 0x250], esi
lea esi, [ebp - 0x278]
setae al
cmovae edx, ecx
test al, al
mov eax, dword [ebp - 0x268]
je 0x407b4e
mov esi, ecx
add eax, ecx
jmp 0x407b56
add eax, esi
lea esi, [ebp - 0x278]
mov dword [ebp - 0x258], eax
cmp esi, eax
je 0x407b9b
sub edx, esi
mov dword [ebp - 0x254], edx
mov edi, edx
nop word [eax + eax]
movsx eax, byte [esi]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov byte [esi + edi], al
add esp, 4
inc esi
cmp esi, dword [ebp - 0x258]
jne 0x407b70
mov ecx, dword [ebp - 0x278]
mov edi, dword [ebp - 0x25c]
mov dword [ebp - 0x254], ecx
mov esi, dword [ebp - 0x264]
lea eax, [ebp - 0x278]
cmp esi, 0x10
push ecx
cmovae eax, ecx
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x280], eax
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x27c], eax
call fcn.0040a6c0
and dword [ebp - 0x250], 0xfffffffd
mov byte [ebp - 0x249], al
mov byte [ebp - 4], 1
cmp esi, 0x10
jb 0x407c16
mov ecx, dword [ebp - 0x254]
inc esi
mov eax, ecx
cmp esi, 0x1000
jb 0x407c06
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407cd2
push esi
push ecx
call fcn.00413c77
mov al, byte [ebp - 0x249]
add esp, 8
test al, al
jne 0x407c3f
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x407c24
mov eax, dword [edi]
push dword [edi + 0x18]
push eax
push str.e_0m
push str.e_36m
push str._s_____s__s__u__n
call fcn.00401060
add esp, 0x14
add edi, 0x1c
mov dword [ebp - 0x25c], edi
cmp edi, dword [ebp - 0x260]
je 0x407c5b
mov esi, dword [ebp - 0x250]
jmp 0x407b00
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x417e50
call fcn.0040ace0
push 0x40af00
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_____]
call dword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x407ce2
mov edx, dword [ebp - 0x1c]
push ecx
call fcn.0040b360
mov ecx, dword [ebp - 0x18]
mov eax, 0x92492493
mov esi, dword [ebp - 0x20]
add esp, 4
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, esi
shl ecx, 2
cmp ecx, 0x1000
jb 0x407cd8
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x407cd8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.00413c77
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00413819
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret