Function at 0x40f670
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cae90
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x505070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
and dword [ebp - 0x4c], 0xfffffe00
mov dword [ebp - 0x48], 0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x54]
mov ecx, dword [ebp + 8]
call fcn.00478500
or esi, 0xffffffff
test eax, eax
jne 0x40f6d4
push eax
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov edi, 0x80004005
jmp 0x40fb78
call fcn.00405a90
mov ecx, eax
test ecx, ecx
jne 0x40f6e9
push 0x80004005
call fcn.00405cb0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
push ecx
push str.errno
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00476bf0
lea edx, [ebp - 0x1c]
mov ecx, eax
call fcn.00478b60
mov ebx, dword [ebp - 0x1c]
mov ecx, 0x4e502c
mov eax, ebx
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f746
test dx, dx
je 0x40f742
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f746
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f720
xor eax, eax
jmp 0x40f74b
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x40f766
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov edi, 0x80004005
jmp 0x40fb5d
call fcn.00405a90
mov ecx, eax
test ecx, ecx
jne 0x40f77b
push 0x80004005
call fcn.00405cb0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push ecx
push str.message
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.00476bf0
lea edx, [ebp - 0x18]
mov ecx, eax
call fcn.00478b60
mov edx, str.Success
lea ecx, [ebp - 0x18]
call fcn.0040f190
test al, al
je 0x40f7c5
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov edi, 0x80004005
jmp 0x40fb3f
call fcn.00405a90
mov ecx, eax
test ecx, ecx
jne 0x40f7da
push 0x80004005
call fcn.00405cb0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
push ecx
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x54]
push str.data
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
call fcn.00476bf0
push eax
lea ecx, [ebp - 0x64]
call fcn.00476440
mov byte [ebp - 4], 6
cmp byte [ebp - 0x5c], 0
je 0x40f882
push ecx
push str.check_assoc
lea ecx, [ebp - 0x64]
call fcn.00476bf0
lea edx, [ebp - 0x14]
mov ecx, eax
call fcn.00478a00
push ecx
push str.recovery_mini
lea ecx, [ebp - 0x64]
call fcn.00476bf0
lea edx, [ebp - 0x2c]
mov ecx, eax
call fcn.00478a00
push ecx
push str.assoc_list
lea ecx, [ebp - 0x64]
call fcn.00476bf0
lea edx, [ebp - 0x10]
mov ecx, eax
call fcn.00478b60
push ecx
push str.check_env
lea ecx, [ebp - 0x64]
call fcn.00476bf0
lea edx, [ebp - 0x30]
mov ecx, eax
call fcn.00478a00
mov edi, dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x34]
call fcn.00471e50
add esp, 4
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x34]
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x28], eax
call fcn.00472030
test eax, eax
jne 0x40fa87
cmp dword [ebp - 0x14], eax
jne 0x40f8bf
call fcn.0040fbc0
test eax, eax
jne 0x40f8bf
cmp dword [ebp - 0x28], eax
jne 0x40fa87
xor eax, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 8
cmp dword [edi - 0xc], eax
jle 0x40f909
push 0x4e5298
lea ecx, [ebp - 0x14]
call fcn.00405360
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 9
push eax
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x10]
call fcn.004793a0
add esp, 4
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x14]
call fcn.004057f0
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x44]
sar eax, 2
mov dword [ebp - 0x24], eax
push ecx
test eax, eax
je 0x40fa39
lea ecx, [ebp - 0x28]
call fcn.00471e50
add esp, 4
mov byte [ebp - 4], 0xa
push dword [ebp - 0x28]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405360
mov byte [ebp - 4], 0xb
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x24], eax
jbe 0x40f9fb
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + eax*4]
sub ecx, 0x10
call fcn.00405420
lea esi, [eax + 0x10]
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 0xc
test esi, esi
je 0x40f6df
push esi
push dword [ebp - 0x14]
call fcn.004a812c
add esp, 8
test eax, eax
je 0x40f9b4
mov byte [ebp - 4], 0xb
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40f9a3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0x24]
jb 0x40f957
or esi, 0xffffffff
jmp 0x40f9fb
push ecx
mov ecx, esp
push 0x4e470c
call fcn.00405360
call fcn.00471970
push 0x4e470c
push 0x4dfe70
push str.revise_assoc
call fcn.00472b70
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0xb
or esi, 0xffffffff
add esp, 0x10
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f9fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
mov eax, esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fa19
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov eax, esi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fa61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40fa61
mov ecx, esp
push 0x4e470c
call fcn.00405360
call fcn.00471970
push 0x4e470c
push 0x4dfe70
push str.revise_assoc
call fcn.00472b70
add esp, 0x10
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40fa87
push dword [ebp - 0x40]
push eax
call fcn.004047c0
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
sub ecx, eax
sar ecx, 2
push ecx
push eax
call fcn.00404800
cmp dword [ebp - 0x2c], 0
je 0x40fad1
lea ecx, [ebp - 0x14]
call fcn.0046da20
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40fab7
push dword [ebp - 0x14]
push 0
push 0x4e529c
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov edx, dword [ebp - 0x14]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fad1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x30], 0
je 0x40faf4
call fcn.00472520
push eax
push str.data_d
push 0x4dfe70
push str.device_env
call fcn.00472b70
add esp, 0x10
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov byte [ebp - 4], 6
mov eax, esi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb1a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x64]
call fcn.00476590
mov byte [ebp - 4], 4
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40fb3d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
xor edi, edi
mov byte [ebp - 4], 3
mov eax, esi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb5d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x40fb78
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x54]
call fcn.00476590
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x40fb9f
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4