Function at 0x406c60
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
sub esp, 0xc44
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 4]
test eax, eax
jne 0x406c82
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xc44
ret 8
mov al, byte [esp + 0xc5c]
mov esi, dword [esp + 0xc58]
test al, al
jne 0x406cb6
push 0x415eec
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
cmp eax, esi
jne 0x406cb6
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xc44
ret 8
push 0x3a
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 8
test eax, eax
lea eax, [esp + 0x150]
push esi
push eax
setne byte [esp + 0x1b]
call ebx
lea ecx, [esp + 0x150]
push ecx
mov ecx, ebp
call fcn.004072d0
mov dl, byte [0x417114]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [esp + 0xc5c]
test al, al
je 0x406d4d
lea eax, [esp + 0x254]
lea ecx, [esp + 0x354]
push eax
push ecx
push 0
push 0
push esi
call dword [sym.imp.MSVCRT.dll__splitpath]
lea edx, [esp + 0x268]
lea eax, [esp + 0x368]
push edx
push eax
push 0
lea ecx, [esp + 0x6c]
push 0
push ecx
call dword [sym.imp.MSVCRT.dll__makepath]
add esp, 0x28
jmp 0x406db0
mov al, byte [esp + 0x13]
test al, al
je 0x406d8a
lea edi, [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push esi
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x406d7e
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xc44
ret 8
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
push eax
jmp 0x406da9
push 0x415ee8
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
cmp eax, esi
jne 0x406da8
lea eax, [esi + 2]
lea ecx, [esp + 0x4c]
push eax
push ecx
jmp 0x406dae
push esi
lea edx, [esp + 0x50]
push edx
call ebx
xor ebx, ebx
push esi
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x18]
push 1
lea ecx, [esp + 0x154]
push eax
push ecx
call fcn.004027b0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x26]
mov ecx, dword [esp + 0x2a]
and edx, 0xffff
add esp, 0xc
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x20]
and eax, 0xffff
dec eax
and ecx, 0xffff
push ebx
and edx, 0xffff
push 1
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x2a]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x2c]
push 3
mov dword [esp + 0x3c], edx
push ebx
push ebx
lea edx, [esp + 0x164]
and eax, 0xffff
and ecx, 0xffff
push SysReAllocStringLen
push edx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406e5f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xc44
ret 8
mov edx, dword [ebp + 4]
push 0xffffffffffffffff
push 8
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x40]
push ebx
lea ecx, [esp + 0x68]
push eax
push ecx
push edx
call fcn.00408fc0
mov esi, eax
cmp esi, ebx
jne 0x406ed9
mov eax, dword [ebp + 0x110]
mov dword [esp + 0x14], ebx
inc eax
mov dword [ebp + 0x110], eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x45c]
push 0x800
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406ed3
mov eax, dword [esp + 0x14]
add ebx, eax
test eax, eax
je 0x406ed3
push eax
mov eax, dword [ebp + 4]
lea edx, [esp + 0x458]
push edx
push eax
call fcn.004085e0
mov esi, eax
test esi, esi
je 0x406e92
add dword [ebp + 0x118], ebx
mov ecx, dword [ebp + 4]
push ecx
call fcn.00408920
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebp
sete al
pop ebx
add esp, 0xc44
ret 8