Function at 0x40c07a
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.0040d1fe
push dword [0x42949c]
call fcn.0040d221
pop ecx
test eax, eax
pop ecx
jne 0x40c813
push 4
mov ebp, 0x4295b0
pop edi
push dword [0x42949c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40c813
test al, 0x10
jne 0x40c325
call fcn.00408a6f
test eax, eax
jne 0x40c813
mov ecx, dword [0x429444]
cmp ecx, ebx
jle 0x40c0f6
mov eax, dword [0x418b58]
sub eax, ecx
inc eax
mov dword [0x418b6c], eax
jmp 0x40c111
push ebx
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [0x418b6c], eax
je 0x40c813
mov ecx, dword [0x429384]
cmp dword [0x4187c4], ebx
mov dword [0x43167c], ebx
mov dword [0x429460], ecx
jne 0x40c1f0
push ebx
push dword [0x429444]
push dword [0x429498]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
call fcn.0040d55c
mov esi, eax
push ebx
push edi
push esi
call fcn.004098bc
add esp, 0x10
cmp eax, edi
jne 0x40c354
push edi
push ebp
push esi
call fcn.0040e620
add esp, 0xc
test eax, eax
je 0x40c1d1
push edi
push 0x4295b8
push esi
call fcn.0040e620
add esp, 0xc
test eax, eax
je 0x40c32c
push edi
push 0x4293a0
push esi
call fcn.0040e620
add esp, 0xc
test eax, eax
je 0x40c333
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.00409788
add esp, 0x18
cmp eax, 0xffffffff
je 0x40c354
cmp dword [esp + 0x18], ebx
jne 0x40c344
push esi
call fcn.0040d5e8
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 0x40c1fb
mov eax, ecx
push dword [0x429444]
push eax
call fcn.00408ff1
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x40c21f
call fcn.0040c81e
mov esi, eax
cmp esi, 0xa
jle 0x40c2cb
cmp dword [0x429394], ebx
je 0x40c239
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp dword [esp + 0x24], ebx
jne 0x40c7f1
push 0x6e
pop eax
cmp esi, eax
je 0x40c816
cmp esi, 0xaa
jne 0x40c813
cmp dword [0x4187c4], ebx
je 0x40c37a
cmp dword [esp + 0x14], 3
je 0x40c816
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
push 0x6e
call fcn.0040b8c1
cmp byte [0x43164c], bl
pop ecx
pop ecx
jne 0x40c7ea
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.0040d1fe
push dword [0x42949c]
call fcn.0040d221
pop ecx
test eax, eax
pop ecx
jne 0x40c813
jmp 0x40c0b3
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 0x40c2f8
cmp ax, bx
jne 0x40c360
mov eax, dword [0x4293fc]
mov edi, dword [0x429470]
sub eax, edi
mov dword [esp + 0x24], ebx
mov dword [0x4187c8], eax
jns 0x40c384
cmp esi, ebx
jne 0x40c3b1
mov dword [esp + 0x24], 0x6e
jmp 0x40c3b1
push 0x4c
jmp 0x40c815
mov edi, 0x19a
jmp 0x40c336
push 0x32
pop edi
push esi
call fcn.0040d5e8
pop ecx
mov eax, edi
jmp 0x40c816
push esi
call fcn.0040d5e8
mov eax, dword [esp + 0x1c]
pop ecx
jmp 0x40c816
push esi
call fcn.0040d5e8
pop ecx
jmp 0x40c80f
cmp dword [0x429394], ebx
je 0x40c37a
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0x19a
jmp 0x40c816
cmp eax, ebx
jle 0x40c3b1
cmp dword [0x4295ec], ebx
jne 0x40c3a9
cmp dword [0x4295e8], ebx
je 0x40c3a9
mov dword [0x4295ec], eax
xor eax, eax
mov dword [0x4187c8], eax
jmp 0x40c318
mov dword [esp + 0x24], 0xa
cmp edi, ebx
jne 0x40c3ed
cmp dword [0x4295e8], ebx
jne 0x40c3ed
cmp dword [0x429394], ebx
je 0x40c3d7
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0xa
pop eax
cmp dword [esp + 0x24], eax
jle 0x40c816
mov eax, dword [esp + 0x24]
jmp 0x40c816
cmp esi, ebx
je 0x40c44c
cmp edx, ecx
je 0x40c44c
cmp dword [0x429394], ebx
je 0x40c415
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.0040970d
cmp eax, ebx
pop ecx
je 0x40c623
cmp byte [0x43164c], bl
jne 0x40c7ea
call fcn.00408a6f
cmp byte [0x43164c], bl
jne 0x40c7ea
mov eax, dword [0x4187c8]
cmp eax, ebx
jge 0x40c457
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 0x40c674
cmp eax, dword [0x43167c]
je 0x40c4d1
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.004098bc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c80f
cmp eax, ebx
je 0x40c80f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c4ed
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.00408b6f
pop ecx
test eax, eax
pop ecx
je 0x40c518
push 4
push 0x431688
push ebp
call fcn.0040e620
add esp, 0xc
test eax, eax
je 0x40c5df
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 0x40c674
cmp eax, dword [0x43167c]
je 0x40c591
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.004098bc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c80f
cmp eax, ebx
je 0x40c80f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c5ad
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.00408b6f
pop ecx
test eax, eax
pop ecx
je 0x40c7f5
push 4
push 0x431688
push ebp
call fcn.0040e620
add esp, 0xc
test eax, eax
jne 0x40c7f5
mov dword [esp + 0x24], 0x6e
cmp dword [0x4187c4], ebx
je 0x40c64a
mov eax, dword [0x418b68]
cmp dword [0x4295a8], eax
je 0x40c64a
cmp dword [0x429394], ebx
je 0x40c613
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.0040970d
cmp eax, ebx
pop ecx
jne 0x40c62d
mov eax, 0x1a4
jmp 0x40c816
cmp byte [0x43164c], bl
jne 0x40c7ea
call fcn.00408a6f
cmp byte [0x43164c], bl
jne 0x40c7ea
cmp dword [0x4293a8], ebx
jne 0x40c7ba
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 0x40c67b
push 3
jmp 0x40c815
cmp eax, dword [0x43167c]
je 0x40c6d3
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.004098bc
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x429388], eax
je 0x40c80f
cmp eax, ebx
je 0x40c80f
mov ecx, dword [0x429384]
add ecx, edi
sub eax, edi
mov dword [0x429460], ecx
mov dword [0x429388], eax
jmp 0x40c6ef
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 0x40c7a0
cmp dword [0x429390], ebx
mov dword [esp + 0x18], ebx
je 0x40c72d
cmp dword [0x431604], ebx
jne 0x40c72d
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.0040ca8c
add esp, 0x10
mov dword [esp + 0x10], eax
jmp 0x40c795
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
push 1
call fcn.0040ca8c
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.0040b8c1
push dword [esp + 0x30]
push dword [esp + 0x38]
push dword [esp + 0x34]
call fcn.00407cb1
push dword [esp + 0x40]
mov dword [esp + 0x38], eax
push dword [esp + 0x3c]
call fcn.004084fd
add esp, 0x2c
push dword [esp + 0x14]
call fcn.0040d5e8
jmp 0x40c7b9
movzx eax, word [0x4295e6]
push 0x431680
push 0x46
mov dword [0x431680], eax
call fcn.0040b8c1
pop ecx
pop ecx
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x10], esi
jle 0x40c7c8
mov esi, dword [esp + 0x10]
cmp dword [0x429394], ebx
je 0x40c7e2
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
cmp byte [0x43164c], bl
je 0x40c7f1
mov eax, 0xbe
jmp 0x40c816
mov eax, esi
jmp 0x40c816
cmp dword [0x429394], ebx
je 0x40c80f
push dword [0x429498]
mov dword [0x429394], ebx
call dword [sym.imp.KERNEL32.dll__lclose]
push 0x6e
jmp 0x40c815
push 0x64
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret