Function at 0x40c08a
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 [0x42949c]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
call fcn.0040d20e
push dword [0x42949c]
call fcn.0040d231
pop ecx
test eax, eax
pop ecx
jne 0x40c823
push 4
mov ebp, 0x4295b0
pop edi
push dword [0x42949c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c823
test al, 0x10
jne 0x40c335
call fcn.00408a7f
test eax, eax
jne 0x40c823
mov ecx, dword [0x429444]
cmp ecx, ebx
jle 0x40c106
mov eax, dword [0x418b58]
sub eax, ecx
inc eax
mov dword [0x418b6c], eax
jmp 0x40c121
push ebx
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [0x418b6c], eax
je 0x40c823
mov ecx, dword [0x429384]
cmp dword [0x4187c4], ebx
mov dword [0x43167c], ebx
mov dword [0x429460], ecx
jne 0x40c200
push ebx
push dword [0x429444]
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
call fcn.0040d56c
mov esi, eax
push ebx
push edi
push esi
call fcn.004098cc
add esp, 0x10
cmp eax, edi
jne 0x40c364
push edi
push ebp
push esi
call fcn.0040e630
add esp, 0xc
test eax, eax
je 0x40c1e1
push edi
push 0x4295b8
push esi
call fcn.0040e630
add esp, 0xc
test eax, eax
je 0x40c33c
push edi
push 0x4293a0
push esi
call fcn.0040e630
add esp, 0xc
test eax, eax
je 0x40c343
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push dword [0x418b58]
push dword [0x429444]
push edi
push ebp
push 0x429498
call fcn.00409798
add esp, 0x18
cmp eax, 0xffffffff
je 0x40c364
cmp dword [esp + 0x18], ebx
jne 0x40c354
push esi
call fcn.0040d5f8
pop ecx
push ebx
push dword [0x429444]
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
mov eax, dword [0x418b6c]
mov ecx, 0x101d0
cmp eax, ecx
jl 0x40c20b
mov eax, ecx
push dword [0x429444]
push eax
call fcn.00409001
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x40c22f
call fcn.0040c82e
mov esi, eax
cmp esi, 0xa
jle 0x40c2db
cmp dword [0x429394], ebx
je 0x40c249
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp dword [esp + 0x24], ebx
jne 0x40c801
push 0x6e
pop eax
cmp esi, eax
je 0x40c826
cmp esi, 0xaa
jne 0x40c823
cmp dword [0x4187c4], ebx
je 0x40c38a
cmp dword [esp + 0x14], 3
je 0x40c826
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
push 0x6e
call fcn.0040b8d1
cmp byte [0x43164c], bl
pop ecx
pop ecx
jne 0x40c7fa
push dword [0x42949c]
inc dword [esp + 0x18]
mov eax, 0x3e80
mov dword [esp + 0x14], ebx
mov dword [0x4295a8], eax
mov dword [0x418b68], eax
call fcn.0040d20e
push dword [0x42949c]
call fcn.0040d231
pop ecx
test eax, eax
pop ecx
jne 0x40c823
jmp 0x40c0c3
mov ax, word [0x4295e0]
mov esi, dword [0x4187c4]
movzx ecx, word [0x4295e2]
movzx edx, ax
inc edx
inc ecx
cmp esi, ebx
mov dword [0x4295a8], edx
mov dword [0x418b68], ecx
jne 0x40c308
cmp ax, bx
jne 0x40c370
mov eax, dword [0x4293fc]
mov edi, dword [0x429470]
sub eax, edi
mov dword [esp + 0x24], ebx
mov dword [0x4187c8], eax
jns 0x40c394
cmp esi, ebx
jne 0x40c3c1
mov dword [esp + 0x24], 0x6e
jmp 0x40c3c1
push 0x4c
jmp 0x40c825
mov edi, 0x19a
jmp 0x40c346
push 0x32
pop edi
push esi
call fcn.0040d5f8
pop ecx
mov eax, edi
jmp 0x40c826
push esi
call fcn.0040d5f8
mov eax, dword [esp + 0x1c]
pop ecx
jmp 0x40c826
push esi
call fcn.0040d5f8
pop ecx
jmp 0x40c81f
cmp dword [0x429394], ebx
je 0x40c38a
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0x19a
jmp 0x40c826
cmp eax, ebx
jle 0x40c3c1
cmp dword [0x4295ec], ebx
jne 0x40c3b9
cmp dword [0x4295e8], ebx
je 0x40c3b9
mov dword [0x4295ec], eax
xor eax, eax
mov dword [0x4187c8], eax
jmp 0x40c328
mov dword [esp + 0x24], 0xa
cmp edi, ebx
jne 0x40c3fd
cmp dword [0x4295e8], ebx
jne 0x40c3fd
cmp dword [0x429394], ebx
je 0x40c3e7
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0xa
pop eax
cmp dword [esp + 0x24], eax
jle 0x40c826
mov eax, dword [esp + 0x24]
jmp 0x40c826
cmp esi, ebx
je 0x40c45c
cmp edx, ecx
je 0x40c45c
cmp dword [0x429394], ebx
je 0x40c425
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov ecx, dword [0x418b68]
push ecx
mov dword [0x4295a8], ecx
call fcn.0040971d
cmp eax, ebx
pop ecx
je 0x40c633
cmp byte [0x43164c], bl
jne 0x40c7fa
call fcn.00408a7f
cmp byte [0x43164c], bl
jne 0x40c7fa
mov eax, dword [0x4187c8]
cmp eax, ebx
jge 0x40c467
xor eax, eax
mov dword [0x4187c8], eax
mov ecx, dword [0x4295ec]
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 0x40c684
cmp eax, dword [0x43167c]
je 0x40c4e1
push ebx
push eax
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x429384]
mov dword [0x43167c], eax
call fcn.004098cc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c81f
cmp eax, ebx
je 0x40c81f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c4fd
mov ecx, dword [0x429460]
mov eax, dword [0x429384]
sub ecx, eax
sub ecx, edi
add dword [0x429388], ecx
add eax, edi
mov dword [0x429460], eax
mov ebp, 0x4293b8
push 4
push ebp
call fcn.00408b7f
pop ecx
test eax, eax
pop ecx
je 0x40c528
push 4
push 0x431688
push ebp
call fcn.0040e630
add esp, 0xc
test eax, eax
je 0x40c5ef
mov ecx, dword [0x4295ec]
mov edi, esi
mov eax, ecx
mov dword [0x4187c8], ebx
cdq
idiv edi
mov eax, ecx
mov edi, edx
sub eax, edi
cmp ecx, ebx
jl 0x40c684
cmp eax, dword [0x43167c]
je 0x40c5a1
push ebx
push eax
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x429384]
mov dword [0x43167c], eax
call fcn.004098cc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c81f
cmp eax, ebx
je 0x40c81f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c5bd
mov ecx, dword [0x429460]
mov eax, dword [0x429384]
sub ecx, eax
sub ecx, edi
add dword [0x429388], ecx
add eax, edi
mov dword [0x429460], eax
push 4
push ebp
call fcn.00408b7f
pop ecx
test eax, eax
pop ecx
je 0x40c805
push 4
push 0x431688
push ebp
call fcn.0040e630
add esp, 0xc
test eax, eax
jne 0x40c805
mov dword [esp + 0x24], 0x6e
cmp dword [0x4187c4], ebx
je 0x40c65a
mov eax, dword [0x418b68]
cmp dword [0x4295a8], eax
je 0x40c65a
cmp dword [0x429394], ebx
je 0x40c623
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x418b68]
push eax
mov dword [0x4295a8], eax
call fcn.0040971d
cmp eax, ebx
pop ecx
jne 0x40c63d
mov eax, 0x1a4
jmp 0x40c826
cmp byte [0x43164c], bl
jne 0x40c7fa
call fcn.00408a7f
cmp byte [0x43164c], bl
jne 0x40c7fa
cmp dword [0x4293a8], ebx
jne 0x40c7ca
mov eax, dword [0x4187c8]
mov ecx, dword [0x4295ec]
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 0x40c68b
push 3
jmp 0x40c825
cmp eax, dword [0x43167c]
je 0x40c6e3
push ebx
push eax
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
push ebx
push esi
push dword [0x429384]
mov dword [0x43167c], eax
call fcn.004098cc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c81f
cmp eax, ebx
je 0x40c81f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c6ff
mov ecx, dword [0x429460]
mov eax, dword [0x429384]
sub ecx, eax
sub ecx, edi
add dword [0x429388], ecx
add eax, edi
mov dword [0x429460], eax
cmp byte [0x42938c], bl
jne 0x40c7b0
cmp dword [0x429390], ebx
mov dword [esp + 0x18], ebx
je 0x40c73d
cmp dword [0x431604], ebx
jne 0x40c73d
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.0040ca9c
add esp, 0x10
mov dword [esp + 0x10], eax
jmp 0x40c7a5
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push 1
call fcn.0040ca9c
push 0x429480
push 0x96
mov dword [0x429488], ebx
mov byte [0x429490], bl
mov dword [0x42948c], ebx
mov byte [0x429491], bl
mov dword [0x429494], ebx
call fcn.0040b8d1
push dword [esp + 0x30]
push dword [esp + 0x38]
push dword [esp + 0x34]
call fcn.00407cc1
push dword [esp + 0x40]
mov dword [esp + 0x38], eax
push dword [esp + 0x3c]
call fcn.0040850d
add esp, 0x2c
push dword [esp + 0x14]
call fcn.0040d5f8
jmp 0x40c7c9
movzx eax, word [0x4295e6]
push 0x431680
push 0x46
mov dword [0x431680], eax
call fcn.0040b8d1
pop ecx
pop ecx
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x10], esi
jle 0x40c7d8
mov esi, dword [esp + 0x10]
cmp dword [0x429394], ebx
je 0x40c7f2
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp byte [0x43164c], bl
je 0x40c801
mov eax, 0xbe
jmp 0x40c826
mov eax, esi
jmp 0x40c826
cmp dword [0x429394], ebx
je 0x40c81f
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0x6e
jmp 0x40c825
push 0x64
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret