Function at 0x40d460
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x44932d
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x45e680]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45e680]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov eax, dword [esp + 0xa8]
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebx
add esi, 4
mov dword [esp + 0xa0], 1
cmp esi, ebx
je 0x40d4c9
lea eax, [esi + 4]
jmp 0x40d4cb
xor eax, eax
xor ecx, ecx
push 0xffffffffffffffff
mov word [esp + 0x34], cx
mov edi, 7
push ebx
lea ecx, [esp + 0x34]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
call fcn.00405120
lea edx, [esp + 0x28]
mov ebp, vtable.CStlStringW.0
mov dword [esp + 0x28], ebp
cmp edx, esi
je 0x40d503
mov eax, dword [esi + 0x20]
mov dword [esp + 0x48], eax
push 4
mov eax, str.log
lea ecx, [esp + 0x30]
mov byte [esp + 0xa4], 2
call fcn.0040dda0
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x40d52a
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d55b
lea ecx, [esp + 0x28]
cmp ecx, esi
je 0x40d55b
cmp esi, ebx
je 0x40d546
lea eax, [esi + 4]
jmp 0x40d548
xor eax, eax
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x34]
call fcn.00405120
mov edx, dword [esi + 0x20]
mov dword [esp + 0x48], edx
xor eax, eax
mov word [esp + 0x78], ax
mov eax, 0x400
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x70], ebp
mov dword [esp + 0x90], eax
xor ecx, ecx
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], cx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x6c], eax
sub esp, 0x24
mov esi, esp
mov dword [esp + 0x48], esp
lea ecx, [esi + 4]
mov byte [esp + 0xc4], 4
push 0xffffffffffffffff
xor edx, edx
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], ebx
push ebx
lea eax, [esp + 0xdc]
lea ebp, [esp + 0x78]
lea edi, [esp + 0x9c]
mov word [ecx + 4], dx
call fcn.00405120
lea eax, [esp + 0xd0]
mov dword [esi], vtable.CStlStringW.0
cmp esi, eax
je 0x40d5f0
mov ecx, dword [esp + 0xf0]
mov dword [esi + 0x20], ecx
mov edx, ebp
mov ecx, edi
call fcn.0040d170
mov esi, dword [esp + 0x1c]
lea ebp, [esi + 4]
push 0xffffffffffffffff
xor edx, edx
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
push ebx
lea eax, [esp + 0x34]
mov ecx, ebp
mov word [ebp + 4], dx
call fcn.00405120
lea eax, [esp + 0x28]
mov dword [esi], vtable.CStlStringW.0
cmp esi, eax
je 0x40d633
mov ecx, dword [esp + 0x48]
mov dword [esi + 0x20], ecx
push 1
mov eax, 0x450f80
mov ecx, ebp
mov dword [esp + 0x24], 1
call fcn.0040dda0
mov eax, dword [esp + 0x18]
lea edx, [eax + 0x28]
test edx, edx
je 0x40d659
add eax, 0x2c
jmp 0x40d65b
xor eax, eax
push ebx
push eax
or eax, 0xffffffff
mov esi, ebp
call fcn.0040dce0
push ebx
lea eax, [esp + 0x78]
push eax
or eax, 0xffffffff
call fcn.0040dce0
lea ecx, [esp + 0xd0]
push ecx
mov esi, str._Y_m_d
lea edi, [esp + 0x1c]
call fcn.0040dea0
mov byte [esp + 0xa0], 5
mov eax, dword [eax]
mov ecx, eax
lea esi, [ecx + 2]
lea ebx, [ebx]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40d6a0
sub ecx, esi
sar ecx, 1
push ecx
mov ecx, ebp
call fcn.0040dda0
mov byte [esp + 0xa0], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d6df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 1
mov eax, 0x452ef0
mov ecx, ebp
call fcn.0040dda0
push ebx
lea ecx, [esp + 0x54]
push ecx
or eax, 0xffffffff
mov esi, ebp
call fcn.0040dce0
mov esi, 8
mov edi, vtable.CStlStringW.0
mov dword [esp + 0x4c], edi
mov dword [esp + 0x6c], ebx
cmp dword [esp + 0x68], esi
jb 0x40d722
mov edx, dword [esp + 0x54]
push edx
call fcn.00413858
add esp, 4
xor eax, eax
mov ebp, 7
mov dword [esp + 0x68], ebp
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], ax
mov dword [esp + 0x70], edi
mov dword [esp + 0x90], ebx
cmp dword [esp + 0x8c], esi
jb 0x40d757
mov ecx, dword [esp + 0x78]
push ecx
call fcn.00413858
add esp, 4
xor edx, edx
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], dx
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], ebx
cmp dword [esp + 0x44], esi
jb 0x40d787
mov eax, dword [esp + 0x30]
push eax
call fcn.00413858
add esp, 4
xor ecx, ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], ebx
mov word [esp + 0x30], cx
mov dword [esp + 0xac], edi
mov dword [esp + 0xcc], ebx
cmp dword [esp + 0xc8], esi
jb 0x40d7bd
mov edx, dword [esp + 0xb4]
push edx
call fcn.00413858
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0042f892
add esp, 0x90
ret 0x30