Function at 0x40e490
Capabilities:
Check if file exists
Enumerate process modules

Disassembly:
mov eax, 0x1420
call fcn.0047c8c0
mov eax, dword [esp + 0x1424]
push ebx
push esi
xor ebx, ebx
push eax
push ebx
push 0x410
mov dword [esp + 0x20], ebx
call dword [0x48912c]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x10], esi
je 0x40e700
mov cx, word [0x4a3de8]
push ebp
push edi
mov word [esp + 0x28], cx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x2a]
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
lea eax, [esp + 0x434]
push 0x1000
push eax
push esi
call fcn.0047cdc6
test eax, eax
je 0x40e6e4
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebx
cmp eax, ebx
jbe 0x40e6e4
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov ebx, dword [0x489358]
lea ecx, [esp + 0x430]
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x28]
push 0x104
push edx
mov ecx, dword [eax]
push ecx
push esi
call fcn.0047cdc0
test eax, eax
je 0x40e688
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e688
lea eax, [esp + 0x28]
push eax
call ebp
mov ecx, dword [0x498080]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], ecx
je 0x40e638
mov edx, esi
shr edx, 0x10
jne 0x40e606
and esi, 0xffff
lea eax, [esp + 0x230]
mov edi, esi
push 0x100
push eax
push edi
call fcn.00403c00
mov ecx, 0x100
sub ecx, eax
cmp ecx, 1
jle 0x40e5ba
lea edx, [esp + 0x230]
lea ecx, [esp + 0x10]
push edx
call fcn.00402e80
jmp 0x40e638
push 0x1ff
lea ecx, [esp + 0x14]
mov esi, 0x200
call fcn.004036e0
test eax, eax
je 0x40e5f9
push esi
push eax
push edi
call fcn.00403c00
mov ecx, esi
sub ecx, eax
cmp ecx, 1
jg 0x40e5f9
add esi, 0x100
lea ecx, [esp + 0x10]
lea edx, [esi - 1]
push edx
call fcn.004036e0
test eax, eax
jne 0x40e5d1
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.004037a0
jmp 0x40e638
push esi
call dword [0x4891e0]
mov edi, eax
test edi, edi
je 0x40e638
push edi
lea ecx, [esp + 0x14]
call fcn.004038a0
test eax, eax
je 0x40e638
mov edx, dword [esp + 0x10]
lea eax, [edi + edi]
push eax
lea ecx, [edi + edi + 2]
push esi
push ecx
push edx
call fcn.00402de0
add esp, 0x10
mov esi, 0x489828
mov eax, dword [esi]
push eax
mov eax, dword [esp + 0x14]
push eax
call ebx
add esp, 8
test eax, eax
je 0x40e6ad
add esi, 4
cmp esi, 0x48983c
jb 0x40e63d
mov eax, dword [esp + 0x10]
mov edx, dword [0x498084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e688
add eax, 0xfffffff4
push eax
call dword [0x4891e4]
test eax, eax
jg 0x40e688
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0047ab00
add esp, 4
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edx
jae 0x40e6e4
mov esi, dword [esp + 0x18]
jmp 0x40e528
mov eax, dword [esp + 0x10]
mov edx, dword [0x498084]
mov dword [esp + 0x1c], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e6e4
add eax, 0xfffffff4
push eax
call dword [0x4891e4]
test eax, eax
jg 0x40e6e4
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0047ab00
add esp, 4
mov eax, dword [esp + 0x18]
push eax
call dword [0x48910c]
mov eax, dword [esp + 0x1c]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x1420
ret 4
pop esi
mov eax, 1
pop ebx
add esp, 0x1420
ret 4