Function at 0x40cd10
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x4b93f8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea ecx, [ebp - 0x250]
mov byte [ebp - 0x220], 0
call fcn.00408110
push ecx
mov esi, esp
lea eax, [ebp - 0x20c]
push 0x208
push 0
push eax
call fcn.0044c180
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
call fcn.00403710
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x254]
call fcn.0041cfd0
push ecx
mov ecx, esp
push str.pcmaster.exe
call fcn.00403710
mov edi, dword [ebp - 0x21c]
push ecx
mov esi, esp
lea eax, [edi - 0x10]
push eax
call fcn.00403380
add eax, 0x10
lea ecx, [ebp - 0x254]
add esp, 4
mov dword [esi], eax
lea eax, [ebp - 0x210]
push eax
call fcn.0042b620
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, dword [ebp - 0x210]
or ebx, 0xffffffff
mov esi, eax
add edx, 0xfffffff0
mov ecx, ebx
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40cde8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x40cdf8
mov byte [ebp - 0x220], 1
jmp 0x40d277
lea ecx, [ebp - 0x238]
call fcn.00408110
push str.SoftwareRuanMeiPCMaster
lea ecx, [ebp - 0x218]
call fcn.00403710
push str.IsWow64Process
push str.kernel32
mov dword [ebp - 0x210], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40ce4a
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 0x210], 0
je 0x40ce65
push 0x25
push str.SoftwareWow6432NodeRuanMeiPCMaster
lea ecx, [ebp - 0x218]
call fcn.00402620
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
push eax
call fcn.00403380
add esp, 4
mov dword [ebp - 0x230], reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x210], eax
push 0
push ecx
mov esi, esp
push eax
call fcn.00403380
add esp, 4
lea ecx, [ebp - 0x238]
add eax, 0x10
mov dword [esi], eax
call fcn.00430ea0
mov esi, eax
mov ecx, ebx
mov eax, dword [ebp - 0x210]
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40cec1
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
test esi, esi
je 0x40d01c
push ecx
mov ecx, esp
push 0x4a1628
call fcn.00403710
push ecx
mov ecx, esp
push str.Install_Dir
call fcn.00403710
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x238]
call fcn.0042c9f0
push eax
lea ecx, [ebp - 0x21c]
call fcn.00409a20
mov edx, dword [ebp - 0x210]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cf1e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x21c]
cmp dword [edi - 0xc], 0
je 0x40d01c
push ecx
mov ecx, esp
push 0x4a1628
call fcn.00403710
push ecx
mov ecx, esp
push str.ExeName
call fcn.00403710
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x238]
call fcn.0042c9f0
mov esi, dword [ebp - 0x210]
cmp dword [esi - 0xc], 0
jne 0x40cf71
lea ecx, [ebp - 0x21c]
call fcn.00402130
push 0x4a4054
push 1
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0042e970
push eax
call fcn.00409f70
mov edx, dword [ebp - 0x210]
add esp, 8
mov byte [ebp - 0x211], al
add edx, 0xfffffff0
mov ecx, ebx
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40cfbc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x211]
test al, al
je 0x40cfd0
push 0x4a4054
lea ecx, [ebp - 0x21c]
call fcn.0040a2c0
push dword [esi - 0xc]
lea ecx, [ebp - 0x21c]
push esi
call fcn.00403910
mov edi, dword [ebp - 0x21c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 0x220]
test eax, eax
mov eax, 1
movzx ecx, cl
cmovne ecx, eax
add esi, 0xfffffff0
mov dword [ebp - 0x220], ecx
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40d01c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x1b
push str.Software_ruanmeiTweakCube3
lea ecx, [ebp - 0x218]
call fcn.00402620
push str.IsWow64Process
push str.kernel32
mov dword [ebp - 0x210], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40d065
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 0x210], 0
je 0x40d080
push 0x27
push str.SoftwareWow6432Node_ruanmeiTweakCube3
lea ecx, [ebp - 0x218]
call fcn.00402620
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x21c], eax
call fcn.00403380
add esp, 4
mov dword [ebp - 0x230], reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x210], eax
push 0
push ecx
mov esi, esp
push eax
call fcn.00403380
add esp, 4
lea ecx, [ebp - 0x238]
add eax, 0x10
mov dword [esi], eax
call fcn.00430ea0
mov esi, eax
mov ecx, ebx
mov eax, dword [ebp - 0x210]
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40d0e2
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
test esi, esi
je 0x40d1d2
push ecx
mov ecx, esp
push 0x4a1628
call fcn.00403710
push ecx
mov ecx, esp
push str.Install_Dir
call fcn.00403710
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x238]
call fcn.0042c9f0
mov esi, dword [ebp - 0x218]
cmp dword [esi - 0xc], 0
je 0x40d1bb
push 0x4a4054
push 1
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x218]
call fcn.0042e970
push eax
call fcn.00409f70
mov edx, dword [ebp - 0x210]
add esp, 8
mov byte [ebp - 0x211], al
add edx, 0xfffffff0
mov ecx, ebx
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40d171
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x211]
test al, al
je 0x40d185
push 0x4a4054
lea ecx, [ebp - 0x218]
call fcn.0040a2c0
push str.TweakCube3.exe
lea ecx, [ebp - 0x218]
call fcn.0040a2c0
mov esi, dword [ebp - 0x218]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, dword [ebp - 0x220]
test eax, eax
movzx ecx, dl
mov eax, 1
cmovne ecx, eax
mov byte [ebp - 0x220], cl
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40d1d2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push str.mytimesetup
push dword [0x4c10a4]
call fcn.0046b1da
add esp, 8
test eax, eax
je 0x40d22e
push str.mytimesetup_silent
push dword [0x4c10a4]
call fcn.0046b1da
add esp, 8
test eax, eax
je 0x40d22e
push str.magictraysetup
push dword [0x4c10a4]
call fcn.0046b1da
add esp, 8
test eax, eax
je 0x40d22e
push str.magictraysetup_silent
push dword [0x4c10a4]
call fcn.0046b1da
add esp, 8
test eax, eax
jne 0x40d235
mov byte [ebp - 0x220], 1
mov edx, dword [ebp - 0x21c]
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d24f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x228]
call fcn.00402130
mov edx, dword [ebp - 0x228]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d277
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40d28e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x240]
call fcn.00402130
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40d2b4
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x220]
xor ecx, ebp
pop edi
pop esi
mov al, dl
pop ebx
call fcn.004495f3
mov esp, ebp
pop ebp
ret