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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6378e0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x6eed24]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40c8b9
mov eax, 0x649aa0
push eax
call fcn.0040ad10
test eax, eax
je 0x40cacb
mov eax, dword [ebx + 0x48]
test eax, eax
jne 0x40c8d3
mov eax, 0x649aa0
push eax
mov ecx, ebx
call fcn.0040ad10
test eax, eax
je 0x40cacb
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40c8ef
mov eax, 0x649aa0
push dword [ebx + 0x40]
mov esi, dword [ebp + 0x10]
mov ecx, esi
push eax
call fcn.00403940
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.00403940
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0
push eax
mov ecx, ebx
call fcn.0040aa60
push 0xffffffffffffffff
push 0x64d1fc
mov ecx, esi
call fcn.004031a0
mov edi, dword [ebp - 0x1c]
mov eax, 0x649aa0
test edi, edi
je 0x40c94d
mov eax, edi
push dword [ebp - 0x18]
mov ecx, esi
push eax
call fcn.004031a0
mov eax, dword [esi]
test eax, eax
jne 0x40c963
mov eax, 0x649aa0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ca03
mov eax, dword [esi + 4]
mov ecx, esi
push 0xffffffffffffffff
push 0x64d6cc
mov dword [ebp + 0x10], eax
call fcn.004031a0
xor edi, edi
lea esp, [esp]
mov ecx, dword [esi]
test ecx, ecx
jne 0x40c99b
mov ecx, 0x649aa0
mov eax, 0xcccccccd
mul edi
shr edx, 3
movzx ebx, dx
mov edx, dword [ebp + 0x10]
lea eax, [ebx + 0x30]
mov word [ecx + edx*2], ax
mov edx, dword [esi]
test edx, edx
jne 0x40c9bd
mov edx, 0x649aa0
lea eax, [ebx + ebx*4]
mov ecx, edi
mov ebx, dword [ebp + 0x10]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edx + ebx*2 + 2], cx
mov eax, dword [esi]
test eax, eax
jne 0x40c9dc
mov eax, 0x649aa0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
inc edi
cmp edi, 0x64
jae 0x40c9f0
cmp eax, 0xffffffff
jne 0x40c990
jmp 0x40c9fd
cmp eax, 0xffffffff
je 0x40c9fd
push ebx
mov ecx, esi
call fcn.00409ed0
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
mov ecx, 0x6f50d0
call fcn.0043d420
push 0xffffffffffffffff
push dword [ebp + 0xc]
lea ecx, [ebp - 0x28]
call fcn.004031a0
mov eax, dword [esi]
test eax, eax
jne 0x40ca42
mov eax, 0x649aa0
push eax
mov ecx, ebx
call fcn.0040ad10
test eax, eax
jne 0x40ca55
mov esi, 0x8200000e
jmp 0x40ca78
mov ecx, dword [esi]
test ecx, ecx
jne 0x40ca60
mov ecx, 0x649aa0
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40ca6c
mov eax, 0x649aa0
push ecx
push eax
call fcn.0040c440
add esp, 8
mov esi, eax
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x40ca8c
push ecx
call fcn.00446420
add esp, 4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 3
test edi, edi
je 0x40cab5
push edi
call fcn.00446420
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x8200000e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc