Function at 0x402570
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x45b480]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push 0x5c
push esi
call fcn.0042d227
add esp, 8
test eax, eax
jne 0x402949
xor ebx, ebx
cmp byte [0x573938], bl
jne 0x40261f
push 0x400
push 0x573938
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push 0x573938
call fcn.0042d2e8
add esp, 8
cmp eax, ebx
je 0x4025cb
mov byte [eax + 1], bl
push 0x400
push 0x573d38
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
jbe 0x4025f5
cmp byte [eax + 0x573d37], 0x5c
je 0x4025f5
mov byte [eax + 0x573d38], 0x5c
mov byte [eax + 0x573d39], bl
push 0x400
push 0x574138
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, ebx
jbe 0x40261f
cmp byte [eax + 0x574137], 0x5c
je 0x40261f
mov byte [eax + 0x574138], 0x5c
mov byte [eax + 0x574139], bl
push 0x103
lea eax, [ebp - 0x10f]
push ebx
push eax
mov byte [ebp - 0x110], bl
call fcn.00434e30
add esp, 0xc
push 0x103
lea ecx, [ebp - 0x31f]
push ebx
push ecx
mov byte [ebp - 0x320], bl
call fcn.00434e30
add esp, 0xc
push 0x103
lea edx, [ebp - 0x217]
push ebx
push edx
mov byte [ebp - 0x218], bl
call fcn.00434e30
add esp, 0xc
push 0x103
lea eax, [ebp - 0x427]
push ebx
push eax
mov byte [ebp - 0x428], bl
call fcn.00434e30
add esp, 0xc
push 0x103
lea ecx, [ebp - 0x637]
push ebx
push ecx
mov byte [ebp - 0x638], bl
call fcn.00434e30
add esp, 0xc
push 0x103
lea edx, [ebp - 0x52f]
push ebx
push edx
mov byte [ebp - 0x530], bl
call fcn.00434e30
add esp, 0xc
push 0x573938
lea eax, [ebp - 0x110]
push 0x103
push eax
call fcn.0042cfea
add esp, 0xc
push 0x573d38
lea ecx, [ebp - 0x320]
push 0x103
push ecx
call fcn.0042cfea
add esp, 0xc
push 0x574138
lea edx, [ebp - 0x218]
push 0x103
push edx
call fcn.0042cfea
add esp, 0xc
push 0x573938
lea eax, [ebp - 0x428]
push 0x103
push eax
call fcn.0042cfea
add esp, 0xc
push 0x573d38
lea ecx, [ebp - 0x638]
push 0x103
push ecx
call fcn.0042cfea
add esp, 0xc
push 0x574138
lea edx, [ebp - 0x530]
push 0x103
push edx
call fcn.0042cfea
add esp, 0xc
push esi
push 0x103
lea eax, [ebp - 0x110]
push eax
call fcn.0042d049
add esp, 0xc
push esi
lea ecx, [ebp - 0x320]
push 0x103
push ecx
call fcn.0042d049
add esp, 0xc
push esi
lea edx, [ebp - 0x218]
push 0x103
push edx
call fcn.0042d049
add esp, 0xc
push str.SSOCommon.dll
lea eax, [ebp - 0x428]
push 0x103
push eax
call fcn.0042d049
add esp, 0xc
push str.SSOCommon.dll
lea ecx, [ebp - 0x638]
push 0x103
push ecx
call fcn.0042d049
add esp, 0xc
push str.SSOCommon.dll
lea edx, [ebp - 0x530]
push 0x103
push edx
call fcn.0042d049
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
call esi
test eax, eax
je 0x402832
lea ecx, [ebp - 0x110]
push ecx
call esi
test eax, eax
je 0x402832
lea eax, [ebp - 0x110]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402810
sub eax, edx
push 0x104
lea edx, [ebp - 0x840]
inc eax
push edx
push eax
lea eax, [ebp - 0x110]
jmp 0x4028df
lea ecx, [ebp - 0x638]
push ecx
call esi
test eax, eax
je 0x40289f
lea edx, [ebp - 0x320]
push edx
call esi
test eax, eax
je 0x40289f
lea eax, [ebp - 0x320]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402855
push 0x104
sub eax, edx
lea ecx, [ebp - 0x840]
push ecx
inc eax
push eax
lea edx, [ebp - 0x320]
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [0x5738c4]
cmp dword [eax + 0x18], ebx
je 0x402894
lea ecx, [ebp - 0x110]
push ecx
call sym.TQMWatcher.exe_GbCollectorSetDeleteDump
add esp, 4
push 1
lea edx, [ebp - 0x840]
push edx
jmp 0x40290b
lea eax, [ebp - 0x530]
push eax
call esi
test eax, eax
je 0x402915
lea ecx, [ebp - 0x218]
push ecx
call esi
test eax, eax
je 0x402915
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4028c2
sub eax, edx
push 0x104
lea edx, [ebp - 0x840]
inc eax
push edx
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [0x5738c4]
cmp dword [ecx + 0x18], ebx
je 0x402902
lea edx, [ebp - 0x110]
push edx
call sym.TQMWatcher.exe_GbCollectorSetDeleteDump
add esp, 4
push 1
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.ole32.dll_CoLoadLibrary]
cmp eax, ebx
jne 0x402952
mov ecx, dword [0x5738c4]
cmp dword [ecx + 0x18], ebx
je 0x40293d
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x320]
push eax
lea ecx, [ebp - 0x110]
push ecx
call sym.TQMWatcher.exe_GbCollectorSetDeleteDump
add esp, 0xc
call fcn.00401780
push 0xffffffffffffffff
call fcn.0042d582
push 1
push esi
call dword [sym.imp.ole32.dll_CoLoadLibrary]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042cb12
mov esp, ebp
pop ebp
ret