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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43357d
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x443080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2c], ecx
mov eax, dword [ecx + 0x28]
lea edi, [ecx + 0x28]
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
jne 0x4126af
lea esi, [ecx + 0x18]
push 0x5c
push dword [esi]
mov dword [ebp - 0x30], esi
call fcn.00415b44
add esp, 8
test eax, eax
je 0x41265d
sub eax, dword [esi]
sar eax, 1
js 0x41265d
mov ecx, dword [ebp - 0x2c]
mov edx, str..log
mov esi, str..logdat
cmp dword [ecx], 0
mov ecx, dword [ebp - 0x30]
cmove esi, edx
inc eax
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00411750
push str.ErrorLog
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 1
push eax
call fcn.0040ae80
push esi
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 2
push eax
call fcn.0040ae80
add esp, 0x18
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040ae10
mov edx, dword [ebp - 0x30]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412627
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x38]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412641
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34]
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x41265d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x24], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4126af
push 0
push 0
push 1
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4126af
mov eax, dword [edi]
cmp dword [eax - 4], 1
jle 0x4126a1
push dword [eax - 0xc]
mov ecx, edi
call fcn.0040cc40
lea eax, [ebp - 0x24]
push eax
push 4
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4126ce
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test eax, 0x400
jne 0x412848
push 0
push 0
push 4
push 0
push 3
push 0x40000000
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 2
push 0
mov esi, eax
push 0
push esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, 0xffffffff
je 0x412848
mov esi, dword [ebp - 0x2c]
cmp dword [esi], 0
je 0x41271e
cmp dword [ebp + 0x1c], 0xf
lea eax, [ebp + 8]
push dword [ebp + 0x18]
cmova eax, dword [ebp + 8]
mov ecx, esi
push eax
call fcn.00411a00
mov ecx, dword [esi + 0x40]
lea edi, [esi + 0x30]
mov eax, 0x7fffffff
mov dword [ebp - 0x34], ecx
sub eax, ecx
cmp eax, 1
jb 0x412895
cmp dword [edi + 0x14], 0xf
jbe 0x41273f
mov edi, dword [edi]
lea edx, [ecx + 1]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x38], eax
movups xmmword [ebp - 0x28], xmm0
cmp edx, 0xf
jbe 0x4127ae
mov eax, edx
or eax, 0xf
cmp eax, 0x7fffffff
jbe 0x41277f
mov eax, 0x7fffffff
jmp 0x412789
mov ecx, 0x16
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00409db0
mov ecx, dword [ebp - 0x2c]
add esp, 8
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x28], eax
push ecx
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x2c]
push edi
push eax
mov dword [ebp - 0x14], edx
call fcn.004162f0
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov ecx, dword [ebp - 0x38]
mov word [ecx + eax], 0x20
cmp dword [ebp + 0x1c], 0xf
lea eax, [ebp + 8]
push dword [ebp + 0x18]
cmova eax, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push eax
mov byte [ebp - 4], 4
call fcn.00404f10
mov dword [ebp - 0x44], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x40], 0
mov ecx, esi
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x54], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x44], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00412f60
lea ecx, [ebp - 0x54]
call fcn.00404860
lea ecx, [ebp - 0x28]
call fcn.00404860
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x412878
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41286e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41289a
push ecx
push edx
call fcn.00414794
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00414ae1
mov esp, ebp
pop ebp
ret 0x18
call fcn.00401230
call fcn.0041829f
int3