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

Disassembly:
push ebp
sub esp, 0x208
lea ebp, [esp - 4]
mov eax, dword [0x4212e0]
xor eax, ebp
mov dword [ebp + 0x208], eax
push 0xc
mov eax, 0x41b1a0
call fcn.00417062
mov edx, dword [ebp + 0x214]
mov ebx, ecx
mov edi, dword [ebx + 0x18]
push 0x101
mov ecx, edi
call fcn.00403255
test eax, eax
je 0x409c46
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
jmp 0x409c4a
and dword [ebp - 0x10], 0
mov ecx, edi
call fcn.00401000
mov edx, dword [ebp + 0x214]
movzx esi, ax
xor eax, eax
mov ah, dl
shl esi, 0x10
push 0x103
mov ecx, edi
movzx eax, ax
or esi, eax
movzx eax, byte [ebp - 0x10]
or esi, eax
call fcn.00403255
test eax, eax
je 0x409c84
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
jmp 0x409c88
and dword [ebp - 0x10], 0
mov edx, dword [ebp + 0x214]
push 0x102
mov ecx, edi
call fcn.00403255
test eax, eax
je 0x409ca3
mov eax, dword [eax + 4]
jmp 0x409ca5
xor eax, eax
movzx edi, ax
movzx eax, word [ebp - 0x10]
shl edi, 0x10
or edi, eax
lea eax, [ebx + 0x1c]
push eax
mov eax, esi
mov dword [ebp - 0x10], edi
call fcn.00404d7c
cmp eax, edi
mov dword [ebp - 0x14], eax
jbe 0x409e23
mov eax, dword [ebx + 0x60]
push 0x104
push eax
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push dword [ebp - 0x14]
lea edi, [ebx + 0x1c]
mov edx, esi
mov ecx, edi
call fcn.00403255
lea ecx, [eax + 8]
neg eax
sbb eax, eax
and eax, ecx
push eax
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x409d6a
mov eax, dword [0x422674]
mov ecx, 0x422674
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
lea eax, [ebp + 0x104]
push eax
push 0x97
lea ecx, [ebp - 0x10]
call fcn.0040a3c6
mov ebx, dword [ebx + 0xc]
mov eax, dword [ebx]
pop ecx
pop ecx
push dword [ebp - 0x10]
mov ecx, ebx
call dword [eax]
push dword [ebp - 0x14]
mov ecx, esi
mov ebx, edi
call fcn.0040a35d
lea eax, [ebp - 0x10]
call fcn.004031cf
jmp 0x409e23
lea eax, [ebp]
push eax
push dword [ebp + 0x214]
mov eax, ebx
call fcn.0040a0cb
push str..cab
lea eax, [ebp + 0x104]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x409dab
lea eax, [ebp]
push eax
lea eax, [ebp + 0x104]
push eax
push ebx
call fcn.0040a18f
jmp 0x409db9
lea ecx, [ebp]
lea esi, [ebp + 0x104]
call fcn.0040a268
test eax, eax
je 0x409e23
mov eax, dword [ebp - 0x14]
mov esi, dword [ebx + 0x18]
shr eax, 0x10
movzx edi, ax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x214]
push 0x102
mov ecx, esi
call fcn.0040532a
movzx edi, word [ebp - 0x14]
mov eax, dword [ebp + 0x214]
push 0x103
mov ecx, esi
mov dword [esi + 0x40], 1
call fcn.0040532a
mov dword [esi + 0x40], 1
mov esi, dword [ebx + 0x18]
call fcn.0040502d
mov eax, dword [ebp - 0x10]
shr eax, 0x10
cmp ax, word [ebp - 0x18]
je 0x409e23
mov esi, ebx
call fcn.00409f6e
push ebx
call fcn.00409e48
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.0040b0c5
add ebp, 0x20c
leave
ret 4