Function at 0x40c8b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c5b49
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x50c380]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0xc]
lea ebx, [edi + 0xc]
mov ecx, dword [ebx + 4]
cmp eax, ecx
je 0x40c8fa
push ebx
push ecx
push eax
call fcn.00403600
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
mov eax, dword [0x50fdb4]
test eax, eax
jne 0x40c947
push 0x108
call fcn.0049ec5b
mov esi, eax
add esp, 4
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x40c939
push 0x108
push 0
push esi
call fcn.004a0950
add esp, 0xc
mov ecx, esi
call fcn.0040f4e0
jmp 0x40c93b
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x50fdb4], eax
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.0040fb50
cmp dword [eax + 0x14], 0xf
mov dword [ebp - 4], 1
jbe 0x40c961
mov eax, dword [eax]
push eax
mov ecx, edi
call fcn.0040cb20
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0xf
jbe 0x40c9a4
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40c99a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb0a
push ecx
push edx
call fcn.0049ec8b
add esp, 8
mov esi, dword [ebx]
cmp esi, dword [edi + 0x10]
je 0x40ca36
nop
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x40c9ba
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00401680
add esp, 8
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 7
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c9f0
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
mov ecx, edi
cmova eax, dword [ebp - 0x28]
push eax
call fcn.0040cf10
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x40ca2a
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ca20
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb0a
push ecx
push edx
call fcn.0049ec8b
add esp, 8
add esi, 0x18
cmp esi, dword [edi + 0x10]
jne 0x40c9b0
mov eax, dword [0x50fdb4]
test eax, eax
jne 0x40ca83
push 0x108
call fcn.0049ec5b
mov esi, eax
add esp, 4
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], 2
test esi, esi
je 0x40ca75
push 0x108
push 0
push esi
call fcn.004a0950
add esp, 0xc
mov ecx, esi
call fcn.0040f4e0
jmp 0x40ca77
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x50fdb4], eax
lea ecx, [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.0040fb50
cmp dword [eax + 0x14], 0xf
mov dword [ebp - 4], 3
jbe 0x40ca9d
mov eax, dword [eax]
push eax
mov ecx, edi
call fcn.0040cb20
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xf
jbe 0x40cad5
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40cacb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb0f
push ecx
push edx
call fcn.0049ec8b
add esp, 8
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
cmp eax, ecx
je 0x40caee
push ebx
push ecx
push eax
call fcn.00403600
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049ec00
mov esp, ebp
pop ebp
ret
call fcn.004a943a
call fcn.004a943a
int3