Function at 0x1000cf70
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a7a10
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x100db774]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000cfdc
push eax
push 0x80
push 2
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x1000cfd5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
test esi, esi
je 0x1000d2a8
cmp dword [ebp + 0xc], 0
je 0x1000d2a8
cmp dword [ebp + 0x10], 0
je 0x1000d2a8
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x1000d2a8
lea ecx, [ebp - 0x10]
call fcn.10002e90
cmp dword [ebp + 0x18], 0
mov dword [ebp - 4], 0
je 0x1000d290
push 0x100cc3a4
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push dword [ebp + 0xc]
push esi
push eax
call fcn.1000cbe0
add esp, 0x14
mov ecx, dword [eax]
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], bl
lea edx, [ecx - 0x10]
lea edi, [esi - 0x10]
cmp edx, edi
je 0x1000d090
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x1000d081
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x1000d081
push edx
call fcn.10002800
add esp, 4
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x1000d079
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
lea esi, [ebx + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x1000d090
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.10002a80
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.10002bb0
lea eax, [esi - 0x10]
push eax
call fcn.10002800
add eax, 0x10
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [esi - 0xc], 0
mov byte [ebp - 4], 3
je 0x1000d13f
push 1
push 0x100aee50
lea ecx, [ebp - 0x14]
call fcn.1000c610
lea eax, [ebp - 0x24]
push eax
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
push eax
call fcn.10002770
call fcn.10017700
mov esi, dword [ebp - 0x24]
add esp, 8
mov ebx, dword [ebp - 0x20]
mov edi, esi
cmp edi, ebx
je 0x1000d13f
mov eax, dword [edi]
mov ecx, dword [ebp + 0x14]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1000d12b
test dx, dx
je 0x1000d127
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1000d12b
add eax, 4
add ecx, 4
test dx, dx
jne 0x1000d105
xor eax, eax
jmp 0x1000d130
sbb eax, eax
or eax, 1
test eax, eax
je 0x1000d1c7
add edi, 4
cmp edi, ebx
jne 0x1000d100
push dword [ebp + 0x14]
lea ecx, [ebp - 0x14]
call fcn.1000c5d0
push dword [ebp + 8]
push dword [ebp - 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, dword [ebp - 0x24]
mov ebx, eax
mov byte [ebp - 4], 2
test esi, esi
je 0x1000d286
mov edi, dword [ebp - 0x20]
cmp esi, edi
je 0x1000d198
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000d18e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x1000d174
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x1000d267
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1000d2bc
jmp 0x1000d267
cmp edi, ebx
je 0x1000d13f
mov byte [ebp - 4], 2
test esi, esi
je 0x1000d240
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000d1f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, ebx
jne 0x1000d1d7
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
sub ecx, edx
and ecx, 0xfffffffc
mov eax, edx
cmp ecx, 0x1000
jb 0x1000d221
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1000d2c1
push ecx
push edx
call fcn.100693ae
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x14]
call fcn.10002bb0
lea ecx, [ebp - 0x10]
call fcn.10002bb0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
push esi
call fcn.100693ae
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x14]
call fcn.10002bb0
jmp 0x1000d2a0
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ebx, eax
lea ecx, [ebp - 0x10]
call fcn.10002bb0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.1007869e
call fcn.1007869e
int3