Function at 0x40c2c6
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push dword [0x42c4dc]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
call fcn.0040d44a
push dword [0x42c4dc]
call fcn.0040d46d
pop ecx
test eax, eax
pop ecx
jne 0x40ca5f
push 4
mov ebp, 0x42c5f0
pop edi
push dword [0x42c4dc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40ca5f
test al, 0x10
jne 0x40c571
call fcn.00408cbb
test eax, eax
jne 0x40ca5f
mov ecx, dword [0x42c484]
cmp ecx, ebx
jle 0x40c342
mov eax, dword [0x41bba0]
sub eax, ecx
inc eax
mov dword [0x41bbb4], eax
jmp 0x40c35d
push ebx
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [0x41bbb4], eax
je 0x40ca5f
mov ecx, dword [0x42c3c4]
cmp dword [0x41b804], ebx
mov dword [0x4346bc], ebx
mov dword [0x42c4a0], ecx
jne 0x40c43c
push ebx
push dword [0x42c484]
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
call fcn.0040d7b0
mov esi, eax
push ebx
push edi
push esi
call fcn.00409b08
add esp, 0x10
cmp eax, edi
jne 0x40c5a0
push edi
push ebp
push esi
call fcn.0040e9c0
add esp, 0xc
test eax, eax
je 0x40c41d
push edi
push 0x42c5f8
push esi
call fcn.0040e9c0
add esp, 0xc
test eax, eax
je 0x40c578
push edi
push 0x42c3e0
push esi
call fcn.0040e9c0
add esp, 0xc
test eax, eax
je 0x40c57f
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push dword [0x41bba0]
push dword [0x42c484]
push edi
push ebp
push 0x42c4d8
call fcn.004099d4
add esp, 0x18
cmp eax, 0xffffffff
je 0x40c5a0
cmp dword [esp + 0x18], ebx
jne 0x40c590
push esi
call fcn.0040d8ea
pop ecx
push ebx
push dword [0x42c484]
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll__llseek]
mov eax, dword [0x41bbb4]
mov ecx, 0x101d0
cmp eax, ecx
jl 0x40c447
mov eax, ecx
push dword [0x42c484]
push eax
call fcn.0040923d
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x40c46b
call fcn.0040ca6a
mov esi, eax
cmp esi, 0xa
jle 0x40c517
cmp dword [0x42c3d4], ebx
je 0x40c485
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp dword [esp + 0x24], ebx
jne 0x40ca3d
push 0x6e
pop eax
cmp esi, eax
je 0x40ca62
cmp esi, 0xaa
jne 0x40ca5f
cmp dword [0x41b804], ebx
je 0x40c5c6
cmp dword [esp + 0x14], 3
je 0x40ca62
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
push 0x6e
call fcn.0040bb0d
cmp byte [0x43468c], bl
pop ecx
pop ecx
jne 0x40ca36
push dword [0x42c4dc]
inc dword [esp + 0x18]
mov eax, 0x3e80
mov dword [esp + 0x14], ebx
mov dword [0x42c5e8], eax
mov dword [0x41bbb0], eax
call fcn.0040d44a
push dword [0x42c4dc]
call fcn.0040d46d
pop ecx
test eax, eax
pop ecx
jne 0x40ca5f
jmp 0x40c2ff
mov ax, word [0x42c620]
mov esi, dword [0x41b804]
movzx ecx, word [0x42c622]
movzx edx, ax
inc edx
inc ecx
cmp esi, ebx
mov dword [0x42c5e8], edx
mov dword [0x41bbb0], ecx
jne 0x40c544
cmp ax, bx
jne 0x40c5ac
mov eax, dword [0x42c43c]
mov edi, dword [0x42c4b0]
sub eax, edi
mov dword [esp + 0x24], ebx
mov dword [0x41b808], eax
jns 0x40c5d0
cmp esi, ebx
jne 0x40c5fd
mov dword [esp + 0x24], 0x6e
jmp 0x40c5fd
push 0x4c
jmp 0x40ca61
mov edi, 0x19a
jmp 0x40c582
push 0x32
pop edi
push esi
call fcn.0040d8ea
pop ecx
mov eax, edi
jmp 0x40ca62
push esi
call fcn.0040d8ea
mov eax, dword [esp + 0x1c]
pop ecx
jmp 0x40ca62
push esi
call fcn.0040d8ea
pop ecx
jmp 0x40ca5b
cmp dword [0x42c3d4], ebx
je 0x40c5c6
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0x19a
jmp 0x40ca62
cmp eax, ebx
jle 0x40c5fd
cmp dword [0x42c62c], ebx
jne 0x40c5f5
cmp dword [0x42c628], ebx
je 0x40c5f5
mov dword [0x42c62c], eax
xor eax, eax
mov dword [0x41b808], eax
jmp 0x40c564
mov dword [esp + 0x24], 0xa
cmp edi, ebx
jne 0x40c639
cmp dword [0x42c628], ebx
jne 0x40c639
cmp dword [0x42c3d4], ebx
je 0x40c623
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0xa
pop eax
cmp dword [esp + 0x24], eax
jle 0x40ca62
mov eax, dword [esp + 0x24]
jmp 0x40ca62
cmp esi, ebx
je 0x40c698
cmp edx, ecx
je 0x40c698
cmp dword [0x42c3d4], ebx
je 0x40c661
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov ecx, dword [0x41bbb0]
push ecx
mov dword [0x42c5e8], ecx
call fcn.00409959
cmp eax, ebx
pop ecx
je 0x40c86f
cmp byte [0x43468c], bl
jne 0x40ca36
call fcn.00408cbb
cmp byte [0x43468c], bl
jne 0x40ca36
mov eax, dword [0x41b808]
cmp eax, ebx
jge 0x40c6a3
xor eax, eax
mov dword [0x41b808], eax
mov ecx, dword [0x42c62c]
mov esi, 0x2000
add ecx, eax
mov edi, esi
mov eax, ecx
cdq
idiv edi
mov eax, ecx
mov edi, edx
sub eax, edi
cmp ecx, ebx
jl 0x40c8c0
cmp eax, dword [0x4346bc]
je 0x40c71d
push ebx
push eax
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x42c3c4]
mov dword [0x4346bc], eax
call fcn.00409b08
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x42c3c8], eax
je 0x40ca5b
cmp eax, ebx
je 0x40ca5b
mov ecx, dword [0x42c3c4]
add ecx, edi
sub eax, edi
mov dword [0x42c4a0], ecx
mov dword [0x42c3c8], eax
jmp 0x40c739
mov ecx, dword [0x42c4a0]
mov eax, dword [0x42c3c4]
sub ecx, eax
sub ecx, edi
add dword [0x42c3c8], ecx
add eax, edi
mov dword [0x42c4a0], eax
mov ebp, 0x42c3f8
push 4
push ebp
call fcn.00408dbb
pop ecx
test eax, eax
pop ecx
je 0x40c764
push 4
push 0x4346c8
push ebp
call fcn.0040e9c0
add esp, 0xc
test eax, eax
je 0x40c82b
mov ecx, dword [0x42c62c]
mov edi, esi
mov eax, ecx
mov dword [0x41b808], ebx
cdq
idiv edi
mov eax, ecx
mov edi, edx
sub eax, edi
cmp ecx, ebx
jl 0x40c8c0
cmp eax, dword [0x4346bc]
je 0x40c7dd
push ebx
push eax
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x42c3c4]
mov dword [0x4346bc], eax
call fcn.00409b08
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x42c3c8], eax
je 0x40ca5b
cmp eax, ebx
je 0x40ca5b
mov ecx, dword [0x42c3c4]
add ecx, edi
sub eax, edi
mov dword [0x42c4a0], ecx
mov dword [0x42c3c8], eax
jmp 0x40c7f9
mov ecx, dword [0x42c4a0]
mov eax, dword [0x42c3c4]
sub ecx, eax
sub ecx, edi
add dword [0x42c3c8], ecx
add eax, edi
mov dword [0x42c4a0], eax
push 4
push ebp
call fcn.00408dbb
pop ecx
test eax, eax
pop ecx
je 0x40ca41
push 4
push 0x4346c8
push ebp
call fcn.0040e9c0
add esp, 0xc
test eax, eax
jne 0x40ca41
mov dword [esp + 0x24], 0x6e
cmp dword [0x41b804], ebx
je 0x40c896
mov eax, dword [0x41bbb0]
cmp dword [0x42c5e8], eax
je 0x40c896
cmp dword [0x42c3d4], ebx
je 0x40c85f
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x41bbb0]
push eax
mov dword [0x42c5e8], eax
call fcn.00409959
cmp eax, ebx
pop ecx
jne 0x40c879
mov eax, 0x1a4
jmp 0x40ca62
cmp byte [0x43468c], bl
jne 0x40ca36
call fcn.00408cbb
cmp byte [0x43468c], bl
jne 0x40ca36
cmp dword [0x42c3e8], ebx
jne 0x40ca06
mov eax, dword [0x41b808]
mov ecx, dword [0x42c62c]
add ecx, eax
mov edi, esi
mov eax, ecx
cdq
idiv edi
mov eax, ecx
mov edi, edx
sub eax, edi
cmp ecx, ebx
jge 0x40c8c7
push 3
jmp 0x40ca61
cmp eax, dword [0x4346bc]
je 0x40c91f
push ebx
push eax
push dword [0x42c4d8]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x42c3c4]
mov dword [0x4346bc], eax
call fcn.00409b08
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x42c3c8], eax
je 0x40ca5b
cmp eax, ebx
je 0x40ca5b
mov ecx, dword [0x42c3c4]
add ecx, edi
sub eax, edi
mov dword [0x42c4a0], ecx
mov dword [0x42c3c8], eax
jmp 0x40c93b
mov ecx, dword [0x42c4a0]
mov eax, dword [0x42c3c4]
sub ecx, eax
sub ecx, edi
add dword [0x42c3c8], ecx
add eax, edi
mov dword [0x42c4a0], eax
cmp byte [0x42c3cc], bl
jne 0x40c9ec
cmp dword [0x42c3d0], ebx
mov dword [esp + 0x18], ebx
je 0x40c979
cmp dword [0x434644], ebx
jne 0x40c979
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.0040ccd8
add esp, 0x10
mov dword [esp + 0x10], eax
jmp 0x40c9e1
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push 1
call fcn.0040ccd8
push 0x42c4c0
push 0x96
mov dword [0x42c4c8], ebx
mov byte [0x42c4d0], bl
mov dword [0x42c4cc], ebx
mov byte [0x42c4d1], bl
mov dword [0x42c4d4], ebx
call fcn.0040bb0d
push dword [esp + 0x30]
push dword [esp + 0x38]
push dword [esp + 0x34]
call fcn.00407efd
push dword [esp + 0x40]
mov dword [esp + 0x38], eax
push dword [esp + 0x3c]
call fcn.00408749
add esp, 0x2c
push dword [esp + 0x14]
call fcn.0040d8ea
jmp 0x40ca05
movzx eax, word [0x42c626]
push 0x4346c0
push 0x46
mov dword [0x4346c0], eax
call fcn.0040bb0d
pop ecx
pop ecx
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x10], esi
jle 0x40ca14
mov esi, dword [esp + 0x10]
cmp dword [0x42c3d4], ebx
je 0x40ca2e
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp byte [0x43468c], bl
je 0x40ca3d
mov eax, 0xbe
jmp 0x40ca62
mov eax, esi
jmp 0x40ca62
cmp dword [0x42c3d4], ebx
je 0x40ca5b
push dword [0x42c4d8]
mov dword [0x42c3d4], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0x6e
jmp 0x40ca61
push 0x64
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret