Function at 0x402947
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2634
call fcn.00406340
mov eax, dword [0x407014]
xor eax, esp
mov dword [esp + 0x2630], eax
push ebx
push esi
mov esi, ecx
lea eax, [esp + 0x201c]
push edi
push dword [esi + 0xc]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov ebx, dword [sym.imp.USER32.dll_CharUpperW]
lea eax, [esp + 0x202c]
add esp, 0xc
push eax
call ebx
xor edi, edi
cmp dword [esi + 8], edi
jne 0x4029b3
lea eax, [esp + 0x2020]
xor edx, edx
push eax
mov ecx, esi
call fcn.00402406
test al, al
jne 0x402ba4
push edi
lea eax, [esp + 0x2024]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
add esp, 0xc
mov edi, eax
push edi
call ebx
cmp dword [esi + 8], 0
jne 0x4029ec
push edi
xor edx, edx
mov ecx, esi
call fcn.00402406
test al, al
je 0x4029ec
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x402ba4
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x402a2e
push ecx
lea edx, [esp + 0x2434]
call fcn.004020a4
test eax, eax
mov ecx, esi
lea eax, [esp + 0x2020]
push eax
je 0x402a1f
lea edx, [esp + 0x2434]
jmp 0x402a21
xor edx, edx
call fcn.00402406
test al, al
jne 0x402ba4
mov eax, dword [esi + 8]
test eax, eax
je 0x402a3e
xor edi, edi
mov dword [esp + 0x20], eax
inc edi
jmp 0x402a7d
lea eax, [esp + 0xc]
push eax
push 0x1000
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.PSAPI.DLL_EnumProcesses]
test eax, eax
jne 0x402a6e
push dword [esi + 0xc]
push 0x2bb
push 0x4014f8
push 0x408
call fcn.00405fc5
mov edi, dword [esp + 0xc]
shr edi, 2
test edi, edi
je 0x402b8d
and dword [esp + 0x18], 0
lea eax, [esp + 0x20]
mov dword [esp + 0x10], eax
push dword [eax]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x402b71
lea eax, [esp + 0xc]
push eax
push 0x1000
lea eax, [esp + 0x1028]
push eax
push ebx
call dword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x402b6a
mov ecx, dword [esp + 0xc]
xor eax, eax
shr ecx, 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x402b6a
push 0x104
lea ecx, [esp + 0x222c]
push ecx
push dword [esp + eax*4 + 0x1028]
push ebx
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
lea eax, [esp + 0x2228]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
lea eax, [esp + 0x2020]
push eax
lea eax, [esp + 0x222c]
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x402b57
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2430]
push ecx
mov ecx, dword [eax]
call fcn.004020a4
test eax, eax
mov ecx, esi
lea eax, [esp + 0x2228]
push eax
je 0x402b4c
lea edx, [esp + 0x2434]
jmp 0x402b4e
xor edx, edx
call fcn.00402406
test al, al
jne 0x402bb9
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x1c]
jb 0x402add
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
inc ecx
add eax, 4
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
cmp ecx, edi
jb 0x402a8a
push dword [esi + 0xc]
push 0x2fd
push 0x4014f8
push 0x408
call fcn.00405fc5
mov ecx, dword [esp + 0x263c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403865
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402ba4