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

Disassembly:
mov eax, 0x141c
call fcn.00454ff0
mov eax, dword [esp + 0x1420]
push esi
push edi
xor edi, edi
push eax
push edi
push 0x410
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
mov dword [esp + 0xc], esi
je 0x406fdd
mov cx, word [0x47a15c]
xor eax, eax
mov word [esp + 0x1c], cx
mov ecx, 0x81
lea edi, [esp + 0x1e]
push ebx
rep stosd dword es:[edi], eax
lea edx, [esp + 0x18]
push ebp
stosw word es:[edi], ax
push edx
lea eax, [esp + 0x430]
push 0x1000
push eax
push esi
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x406fc3
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
test eax, eax
jbe 0x406fc3
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ebx, [esp + 0x42c]
mov edx, dword [ebx]
lea ecx, [esp + 0x24]
push 0x104
push ecx
push edx
push esi
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
je 0x406f6f
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406f6f
lea ecx, [esp + 0x24]
push ecx
call ebp
mov edx, dword [0x46f42c]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], edx
je 0x406f1c
shr eax, 0x10
jne 0x406eea
and esi, 0xffff
lea ecx, [esp + 0x22c]
mov edi, esi
push 0x100
push ecx
push edi
call fcn.00408450
mov edx, 0x100
sub edx, eax
cmp edx, 1
jle 0x406e9e
lea eax, [esp + 0x22c]
lea ecx, [esp + 0x10]
push eax
call fcn.00407430
jmp 0x406f1c
push 0x1ff
lea ecx, [esp + 0x14]
mov esi, 0x200
call fcn.00407e80
test eax, eax
je 0x406edd
push esi
push eax
push edi
call fcn.00408450
mov ecx, esi
sub ecx, eax
cmp ecx, 1
jg 0x406edd
add esi, 0x100
lea ecx, [esp + 0x10]
lea edx, [esi - 1]
push edx
call fcn.00407e80
test eax, eax
jne 0x406eb5
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.00407f40
jmp 0x406f1c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x406f1c
push edi
lea ecx, [esp + 0x14]
call fcn.00408040
test eax, eax
je 0x406f1c
mov edx, dword [esp + 0x10]
lea eax, [edi + edi]
push eax
lea ecx, [edi + edi + 2]
push esi
push ecx
push edx
call fcn.00407060
add esp, 0x10
mov esi, 0x4666b8
mov eax, dword [esi]
push eax
mov eax, dword [esp + 0x14]
push eax
call fcn.004554ed
add esp, 8
test eax, eax
je 0x406f8c
add esi, 4
cmp esi, 0x4666cc
jb 0x406f21
mov eax, dword [esp + 0x10]
mov edx, dword [0x46f430]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x406f6f
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x406f6f
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
inc eax
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x20], eax
jae 0x406fc3
mov esi, dword [esp + 0x14]
jmp 0x406e12
mov eax, dword [esp + 0x10]
mov edx, dword [0x46f430]
mov dword [esp + 0x18], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x406fc3
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x406fc3
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x141c
ret
mov eax, edi
pop edi
pop esi
add esp, 0x141c
ret