Function at 0x4020a6
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x4d6148
call fcn.004ce9f0
sub esp, 0x48
push ebx
push esi
push edi
push dword [ebp + 0x18]
mov edi, ecx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00401eff
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
add esp, 0x14
push eax
call fcn.00401d6a
pop ecx
mov edi, dword [ebp + 0x1c]
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00422ab0
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00405c8d
or dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
lea eax, [ebp - 0x54]
mov dword [ebp - 4], 1
call fcn.004266d1
cmp eax, ebx
je 0x40214a
lea esi, [ebp - 0x54]
call fcn.004267dd
cmp eax, ebx
jne 0x402135
call fcn.00426835
cmp eax, ebx
je 0x40214a
mov eax, dword [ebp + 0x1c]
push dword [eax]
lea ecx, [ebp - 0x54]
call fcn.004264e0
lea esi, [ebp - 0x54]
call fcn.004264bd
push 0x4e5344
lea eax, [ebp - 0x14]
push eax
call fcn.00422646
mov byte [ebp - 4], 2
mov eax, dword [0x5096c0]
mov ecx, 0x5096c0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0x1c]
lea eax, [ebp - 0x28]
push str.install_resinstallconfig.ini
push eax
mov byte [ebp - 4], 3
call fcn.0042280f
pop ecx
pop ecx
lea edi, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.00422ab0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00405c8d
cmp dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x1c]
jne 0x4022ca
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4022ca
push 0x4df730
lea eax, [ebp - 0x28]
push eax
call fcn.00422646
push ecx
lea edi, [ebx - 0x10]
mov byte [ebp - 4], 5
mov eax, edi
mov dword [ebp - 0x30], esp
mov esi, esp
call fcn.00422b5e
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x28]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2c], esp
mov esi, esp
call fcn.00422b5e
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.00401caf
pop ecx
pop ecx
push str.cfgurl
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 7
call fcn.00422646
push ecx
mov byte [ebp - 4], 8
mov eax, edi
mov dword [ebp - 0x30], esp
mov esi, esp
call fcn.00422b5e
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x20]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x34], esp
mov esi, esp
call fcn.00422b5e
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 8
call fcn.00401caf
pop ecx
pop ecx
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 0xa
call fcn.00422ab0
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
call fcn.00405c8d
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp - 0x24]
push 1
push dword [ebp + 0x10]
add eax, 0xfffffff0
push edi
push dword [ebp + 0xc]
push dword [ebp + 0x18]
push ecx
mov dword [ebp - 0x34], esp
mov esi, esp
call fcn.00422b5e
add eax, 0x10
mov dword [esi], eax
call fcn.0045efe9
mov eax, dword [ebp - 0x20]
add esp, 0x18
add eax, 0xfffffff0
call fcn.00405c8d
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00405c8d
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00405c8d
jmp 0x4022cd
mov edi, dword [ebp + 0x14]
xor esi, esi
cmp dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
jne 0x402319
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
call fcn.0045ee53
mov edx, dword [ebp - 0x28]
add esp, 0x10
test edx, edx
jle 0x402319
mov ecx, dword [ebp - 0x24]
test ecx, ecx
jle 0x402319
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
mov dword [eax], edx
mov edx, dword [edi]
mov dword [ebp - 0x20], edx
mov dword [edi], ecx
jmp 0x40231c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [0x50bcd0], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [0x50bcd4], eax
mov eax, dword [edi]
mov dword [0x50bcd8], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [0x50bcdc], eax
mov eax, dword [ebp - 0x20]
mov dword [0x50bce4], eax
lea eax, [ebp - 0x14]
mov edi, 0x50bd0c
mov dword [0x50bce0], esi
call fcn.00422ab0
lea eax, [ebx - 0x10]
call fcn.00405c8d
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405c8d
lea esi, [ebp - 0x54]
call fcn.004264bd
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret