Function at 0x431350
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1034
call fcn.004c47b0
mov eax, dword [0x56b114]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x61c]
push 0x208
push 0
push eax
mov dword [ebp - 0x102c], ecx
mov dword [ebp - 0x1034], ebx
call fcn.004c5d00
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.004c5d00
push str.R2Client.exe
push ebx
lea eax, [ebp - 0x61c]
push 0x51703c
push eax
call fcn.0040f7d0
push str.Uninstall.exe
push ebx
lea eax, [ebp - 0x824]
push 0x51703c
push eax
call fcn.0040f7d0
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x61c]
add esp, 0x38
mov dword [ebp - 0x1030], ebx
push eax
call ebx
cmp eax, 0xffffffff
je 0x431679
test al, 0x10
jne 0x431679
lea eax, [ebp - 0x824]
push eax
call ebx
cmp eax, 0xffffffff
je 0x431679
test al, 0x10
jne 0x431679
push esi
push edi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004c5d00
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004c5d00
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea eax, [ebp - 0x1028]
add esp, 0x18
mov dword [ebp - 0x1028], 0
push eax
push 0x19
push 0
call ebx
mov esi, dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov edi, dword [sym.imp.ole32.dll_CoTaskMemFree]
test eax, eax
jne 0x43147d
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x1028]
call esi
push dword [ebp - 0x1028]
call edi
mov ecx, dword [ebp - 0x102c]
lea eax, [ebp - 0x61c]
push 0
push eax
push 1
push str.R2_Games_Hub
push 0
push 0
push str.R2_Games_Hub.lnk
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push eax
call sym.R2ClientInstall.exe_private:_int___thiscall_CShellFolder::CreateFileShortcut_wchar_t___wchar_t_const___wchar_t___wchar_t_const___unsigned_short_int__wchar_t___int__wchar_t___wchar_t__
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004c5d00
add esp, 0xc
lea eax, [ebp - 0x1028]
push eax
push 2
push 0
call ebx
test eax, eax
jne 0x4314ed
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x1028]
call esi
push dword [ebp - 0x1028]
call edi
push str.R2Games_
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push 0x51703c
push eax
call fcn.0040f7d0
push 0x800
lea eax, [ebp - 0x1024]
push 0
push eax
call fcn.004c5d00
mov ax, word [ebp - 0x20c]
lea edi, [ebp - 0x1024]
add esp, 0x1c
test ax, ax
je 0x4315f5
lea edx, [ebp - 0x20c]
movzx ecx, ax
nop
cmp cx, 0x2f
je 0x43154f
movzx eax, cx
cmp cx, 0x5c
jne 0x431554
mov eax, 0x5c
add edx, 2
mov word [edi], ax
lea esi, [edi + 2]
mov edi, esi
movzx eax, word [edx]
mov ecx, eax
test ax, ax
jne 0x431540
mov edi, dword [ebp - 0x1030]
xor eax, eax
mov word [esi], ax
mov ebx, esi
movzx eax, word [esi - 2]
sub esi, 2
mov edx, eax
test ax, ax
je 0x43159f
mov ecx, eax
movzx edx, cx
cmp cx, 0x5c
je 0x43159f
movzx eax, word [esi - 2]
sub esi, 2
mov ecx, eax
mov edx, eax
test ax, ax
jne 0x431586
test dx, dx
je 0x4315f5
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1024]
push eax
call edi
cmp eax, 0xffffffff
je 0x431576
test al, 0x10
je 0x431576
mov eax, 0x5c
mov word [esi], ax
add esi, 2
cmp esi, ebx
jae 0x4315f5
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp word [esi], 0
jne 0x4315ee
push 0
lea eax, [ebp - 0x1024]
push eax
call edi
cmp eax, 1
jne 0x4315f5
mov eax, 0x5c
mov word [esi], ax
add esi, 2
cmp esi, ebx
jb 0x4315d0
mov esi, dword [ebp - 0x1034]
lea eax, [ebp - 0x20c]
mov ebx, dword [ebp - 0x102c]
mov ecx, ebx
push 0
push 0
push 1
push str.R2_Games_Hub
push 0
push esi
push str.R2_Games_Hub.lnk
push eax
lea eax, [ebp - 0x61c]
push eax
call sym.R2ClientInstall.exe_private:_int___thiscall_CShellFolder::CreateFileShortcut_wchar_t___wchar_t_const___wchar_t___wchar_t_const___unsigned_short_int__wchar_t___int__wchar_t___wchar_t__
push 0
push 0
push 1
push str.Uninstall
push 0
push esi
push 0
lea eax, [ebp - 0x20c]
mov ecx, ebx
push eax
lea eax, [ebp - 0x824]
push eax
call sym.R2ClientInstall.exe_private:_int___thiscall_CShellFolder::CreateFileShortcut_wchar_t___wchar_t_const___wchar_t___wchar_t_const___unsigned_short_int__wchar_t___int__wchar_t___wchar_t__
lea eax, [ebp - 0x20c]
mov ecx, ebx
push eax
push reloc.OLEAUT32.dll_VariantClear
call sym.R2ClientInstall.exe_private:_void___thiscall_CShellFolder::NotifyShell_long_int__wchar_t__
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c360c
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.004c360c
mov esp, ebp
pop ebp
ret 4