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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48c0a3
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x4c7084]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 4], 0
mov eax, dword [edi + 0x28]
cmp dword [eax - 0xc], 0
jne 0x40c70c
push 0x5c
push dword [edi + 0x18]
call fcn.00463cb1
add esp, 8
test eax, eax
je 0x40c6b0
sub eax, dword [edi + 0x18]
lea ecx, [edi + 0x18]
sar eax, 1
js 0x40c6b0
inc eax
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040ee10
mov byte [ebp - 4], 1
mov edx, eax
push str.ErrorLog
lea ecx, [ebp - 0x50]
call fcn.004089d0
mov byte [ebp - 4], 2
mov edx, str..log
cmp dword [edi], 0
mov ecx, str..logdat
cmove ecx, edx
mov edx, eax
push ecx
lea ecx, [ebp - 0x4c]
call fcn.004089d0
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [edi + 0x28]
push eax
call fcn.00409ab0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.00408c20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
call fcn.00408c20
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00408c20
push 1
lea eax, [ebp - 0x28]
mov byte [ebp - 0x28], 0
xorps xmm0, xmm0
mov word [ebp - 0x17], 0
push eax
movups xmmword [ebp - 0x27], xmm0
mov byte [ebp - 0x15], 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40c70c
push 0
push 0
push 1
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40c70c
mov eax, dword [edi + 0x28]
cmp dword [eax - 4], 1
jle 0x40c6fd
push dword [eax - 0xc]
lea ecx, [edi + 0x28]
call fcn.004098d0
lea eax, [ebp - 0x28]
push eax
push 4
push dword [edi + 0x28]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
push dword [edi + 0x28]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c72d
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test eax, 0x400
jne 0x40c7c5
push 0
push 0
push 4
push 0
push 3
push 0x40000000
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 2
push 0
mov esi, eax
push 0
push esi
mov dword [ebp - 0x48], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, 0xffffffff
je 0x40c7c5
cmp dword [edi], 0
je 0x40c775
lea ecx, [ebx + 8]
call fcn.00401750
push eax
call fcn.00401760
push eax
call fcn.0040c8c0
push ecx
lea edx, [edi + 0x30]
lea ecx, [ebp - 0x44]
call fcn.0040fd70
mov byte [ebp - 4], 4
lea ecx, [ebx + 8]
push ecx
mov edx, eax
lea ecx, [ebp - 0x2c]
call fcn.0040fe50
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x48]
push ecx
push eax
mov ecx, edi
call fcn.0040c4d0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00408790
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.00408790
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebx + 8]
call fcn.00408790
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044b43a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x18