Function at 0x408a70
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x154
mov eax, dword [0x42452c]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push ebp
mov ebp, dword [esp + 0x160]
mov ecx, ebp
call fcn.00408460
movzx eax, word [ebp + 0x28]
xor ebx, ebx
cmp ax, 2
mov byte [esp + 0xa], bl
jb 0x408b38
test ax, ax
ja 0x408aba
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov eax, dword [ebp + 0x24]
mov al, byte [eax]
call fcn.00408480
test al, al
je 0x408b38
cmp word [ebp + 0x28], 1
ja 0x408adc
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov ecx, dword [ebp + 0x24]
cmp byte [ecx + 1], 0x3a
jne 0x408b38
cmp word [ebp + 0x28], 2
jne 0x408af7
mov ebx, dword [0x427b30]
jmp 0x408bbc
push 2
mov ecx, ebp
call fcn.004089f0
cmp byte [eax], 0x5c
jne 0x408b1f
mov ebx, 3
cmp word [ebp + 0x28], bx
jne 0x408bb7
mov ebx, dword [0x427b30]
jmp 0x408bbc
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.0041b1f8
add esp, 0x154
ret
movzx eax, word [ebp + 0x28]
cmp ax, 1
jb 0x408bbc
test ax, ax
ja 0x408b54
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov edx, dword [ebp + 0x24]
cmp byte [edx], 0x5c
jne 0x408bbc
movzx eax, word [ebp + 0x28]
cmp ax, 1
jne 0x408b6e
mov ebx, dword [0x427b30]
jmp 0x408bbc
ja 0x408b7d
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov eax, dword [ebp + 0x24]
cmp byte [eax + 1], 0x5c
jne 0x408bb4
push 2
push 0x5c
mov ecx, ebp
call fcn.00408250
cmp dword [0x427b30], eax
je 0x408b1f
add eax, 1
push eax
push 0x5c
mov ecx, ebp
call fcn.00408250
mov ebx, eax
cmp dword [0x427b30], ebx
je 0x408b1f
add ebx, 1
mov byte [esp + 0xa], 1
cmp dword [0x427b30], ebx
push esi
mov byte [esp + 0xf], 0
je 0x408c59
push 1
push 0
push 0x41f544
mov ecx, ebp
call fcn.00410040
mov ecx, dword [0x427b30]
cmp eax, ecx
jne 0x408c52
push 1
push 0
push 0x41e34c
mov ecx, ebp
call fcn.00410040
mov ecx, dword [0x427b30]
cmp eax, ecx
jne 0x408c52
mov ecx, dword [0x41fca8]
push ecx
push 0x5c
mov ecx, ebp
call fcn.00410000
mov esi, eax
cmp dword [0x427b30], esi
je 0x408c59
push esi
mov ecx, ebp
call fcn.004089f0
mov byte [eax], 0
mov eax, dword [ebp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x408c3a
test al, 0x10
jne 0x408c45
mov ebx, dword [0x427b30]
mov byte [esp + 0xf], 1
push esi
mov ecx, ebp
call fcn.004089f0
mov byte [eax], 0x5c
jmp 0x408c59
mov ebx, ecx
mov byte [esp + 0xf], 1
cmp dword [0x427b30], ebx
push edi
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], ebx
je 0x408e59
mov eax, dword [ebp + 0x24]
add eax, ebx
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_strchr]
add esp, 8
test eax, eax
je 0x408c92
sub eax, dword [ebp + 0x24]
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x408c9e
mov edx, dword [0x41fca8]
mov dword [esp + 0x14], edx
mov esi, edx
cmp dword [0x427b30], esi
je 0x408cc2
movzx eax, word [ebp + 0x28]
cmp esi, eax
jb 0x408cbb
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov ecx, dword [ebp + 0x24]
mov byte [esi + ecx], 0
movzx edx, word [ebp + 0x28]
cmp ebx, edx
jb 0x408cd7
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov eax, dword [ebp + 0x24]
add eax, ebx
mov edi, 0x41f540
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408e1e
cmp byte [esp + 0x12], dl
je 0x408cfd
cmp ebx, 2
jae 0x408d13
mov edi, 0x41f53c
mov esi, eax
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408e1e
cmp byte [esp + 0x12], 0
je 0x408d5f
mov esi, eax
mov edi, 0x41f53c
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x408d5f
lea ecx, [ebx - 2]
push ecx
push 0x5c
mov ecx, ebp
call fcn.00410000
cmp eax, dword [esp + 0x1c]
jb 0x408d46
cmp eax, ebx
jae 0x408d46
lea ebx, [eax + 1]
mov ecx, dword [0x427b30]
mov eax, dword [esp + 0x14]
cmp ecx, eax
jne 0x408e30
mov eax, ecx
jmp 0x408e35
lea eax, [esp + 0x20]
push eax
mov eax, dword [ebp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, dword [esp + 0x14]
cmp dword [0x427b30], esi
mov edi, eax
mov dword [esp + 0x18], edi
je 0x408d9c
movzx ecx, word [ebp + 0x28]
cmp esi, ecx
jb 0x408d95
push str.Firebird::string___pos_out_of_range
call fcn.00404d90
add esp, 4
mov edx, dword [ebp + 0x24]
mov byte [esi + edx], 0x5c
cmp edi, 0xffffffff
je 0x408e64
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [0x427b30], esi
jne 0x408db8
movzx esi, word [ebp + 0x28]
lea eax, [esp + 0x4c]
sub esi, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408dc1
push esi
sub eax, edx
push ebx
mov ecx, ebp
mov edi, eax
call fcn.0040feb0
movzx eax, word [ebp + 0x28]
cmp ebx, eax
push edi
jb 0x408def
lea ecx, [esp + 0x50]
push ecx
push edi
mov ecx, ebp
call fcn.00410650
jmp 0x408dfd
lea edx, [esp + 0x50]
push edx
push edi
push ebx
mov ecx, ebp
call fcn.00410690
push eax
call sub.MSVCR80.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, dword [0x427b30]
je 0x408e52
movzx ecx, word [ebp + 0x28]
lea ebx, [ebx + edi + 1]
cmp ebx, ecx
jmp 0x408e44
mov eax, dword [esp + 0x14]
mov ecx, dword [0x427b30]
cmp ecx, eax
jne 0x408e30
mov eax, ecx
jmp 0x408e35
sub eax, ebx
add eax, 1
push eax
push ebx
mov ecx, ebp
call fcn.0040feb0
movzx edx, word [ebp + 0x28]
cmp ebx, edx
jae 0x408e52
cmp dword [0x427b30], ebx
jne 0x408c72
cmp dword [esp + 0x18], 0xffffffff
jne 0x408e71
cmp byte [esp + 0x13], 0
je 0x408e71
xor al, al
jmp 0x408e73
cmp dword [0x427b30], esi
setne byte [esp + 0x13]
jmp 0x408e59
mov al, 1
mov ecx, dword [esp + 0x160]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041b1f8
add esp, 0x154
ret