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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov dword [ebp - 8], 0
mov dword [ebp - 0x118], 0xffffffff
call fcn.004103f9
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x18]
push eax
mov cx, word [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004102c4
add esp, 0xc
push 0x4366fc
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c057
mov ax, word [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004109a1
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40c01a
jmp 0x40c2fe
push 0x80
push 0x4366fc
call fcn.0040c730
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40c057
push 0x4366fc
call fcn.0040fb96
push eax
push 0x80
push 0x23
call fcn.00410c1b
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x40c2fe
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040b0f7
add esp, 4
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x11c]
push ecx
call fcn.0040d44c
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40c084
jmp 0x40c2fe
mov edx, dword [ebp + 0x10]
mov byte [edx + 0x48], 1
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 0x11c]
mov byte [eax + 0x49], cl
mov edx, dword [ebp + 0x10]
mov al, byte [ebp - 4]
mov byte [edx + 0x4a], al
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0040b299
add esp, 4
push 0x180
push 0x20
push 0x8302
push 0x4366fc
call fcn.00413d00
add esp, 0x10
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0xffffffff
jne 0x40c0ee
push fcn.0040fb96
push 0x4366fc
push 0x24
call fcn.00410c1b
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x40c2fe
push 0xac
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call fcn.00414d4d
add esp, 0xc
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xac
je 0x40c140
mov ecx, dword [ebp - 0x114]
push ecx
push 0xac
push 0x4366fc
call fcn.0040fb96
push eax
push 0x25
call fcn.00410c1b
add esp, 0x14
mov dword [ebp - 8], eax
jmp 0x40c284
mov edx, dword [ebp + 0x10]
movsx eax, word [edx + 2]
and eax, 1
test eax, eax
jne 0x40c27d
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x14]
cmp edx, 2
jl 0x40c27d
movsx eax, byte [0x436800]
test eax, eax
je 0x40c27d
push 0x4366fc
call fcn.0040d4ab
add esp, 4
cmp eax, 2
je 0x40c27d
push 0x436800
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c1d4
push 0x80
push 0x436800
call fcn.0040c730
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40c1d4
push 0x436800
call fcn.0040fb96
push eax
push 0x80
push 0x26
call fcn.00410c1b
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x40c284
push 0x180
push 0x20
push 0x8302
push 0x436800
call fcn.00413d00
add esp, 0x10
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0xffffffff
jne 0x40c216
call fcn.0040fb96
push eax
push 0x436800
push 0x27
call fcn.00410c1b
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x40c284
push 0x436800
lea ecx, [ebp - 0x110]
push ecx
call fcn.004101f8
add esp, 8
push 0x104
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x118]
push eax
call fcn.00414d4d
add esp, 0xc
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0x104
je 0x40c27d
mov ecx, dword [ebp - 0x114]
push ecx
push 0x104
push 0x436800
call fcn.0040fb96
push eax
push 0x28
call fcn.00410c1b
add esp, 0x14
mov dword [ebp - 8], eax
jmp 0x40c284
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 0
je 0x40c2fe
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call fcn.00413941
add esp, 4
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0xffffffff
movsx edx, byte [0x4366fc]
test edx, edx
je 0x40c2cf
push 0x4366fc
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c2cf
mov eax, dword [0x42f7d8]
push eax
push 0x4366fc
call fcn.0040c730
add esp, 8
movsx ecx, byte [0x436800]
test ecx, ecx
je 0x40c2fe
push 0x436800
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c2fe
mov edx, dword [0x42f7dc]
push edx
push 0x436800
call fcn.0040c730
add esp, 8
cmp dword [ebp - 0x118], 0xffffffff
je 0x40c316
mov eax, dword [ebp - 0x118]
push eax
call fcn.00413941
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00410406
add esp, 4
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret