Function at 0x4051fb
Capabilities:
Get common file path

Disassembly:
push 0x348
mov eax, 0x5b2ec7
call fcn.0056cecb
mov eax, dword [ebp + 8]
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x224]
push eax
xor edi, edi
push edi
push edi
push 0x1c
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp eax, edi
jne 0x40530c
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 0x278]
call fcn.00409096
push str.Ubisoft_Game_Launcher_settings.yml
mov eax, esi
push eax
mov dword [ebp - 4], edi
call fcn.004090e2
mov eax, esi
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.0047bf6e
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 4], 1
call fcn.0047c0c1
mov bl, al
pop ecx
neg bl
push 1
lea esi, [ebp - 0x240]
sbb bl, bl
mov byte [ebp - 4], 0
call fcn.0040b028
inc bl
je 0x405314
lea eax, [ebp - 0x354]
push eax
call fcn.00409ac6
mov esi, eax
push str.Uplay_config_wasnt_found__assuming_that_UPlay_is_not_installed.
push esi
mov byte [ebp - 4], 2
call fcn.0040fa1f
pop ecx
pop ecx
lea eax, [ebp - 0x25c]
push eax
mov eax, esi
call fcn.00409b30
push 3
pop ecx
mov byte [ebp - 4], cl
cmp dword [ebp - 0x248], 8
mov eax, dword [ebp - 0x25c]
jae 0x4052d8
lea eax, [ebp - 0x25c]
push eax
call fcn.0047c666
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x25c]
call fcn.0040b028
lea eax, [ebp - 0x354]
mov byte [ebp - 4], 0
call fcn.004021a3
push 1
xor edi, edi
lea esi, [ebp - 0x278]
call fcn.0040b028
call fcn.0056cf27
ret 4
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x2b0]
push eax
mov byte [ebp - 4], 4
call fcn.0047c15a
push 1
lea ecx, [ebp - 0x2b0]
mov byte [ebp - 4], 5
call fcn.0047c1fe
test al, al
jne 0x405369
push str.Cannot_open_UPlay_config_file
lea esi, [ebp - 0x240]
call fcn.00409096
mov byte [ebp - 4], 6
push 0x3ba
mov ecx, str.srcApplicationDetector.cpp
lea eax, [ebp - 0x240]
call fcn.00401f44
lea ecx, [ebp - 0x2b0]
call fcn.0047c34e
xor esi, esi
mov dword [ebp - 0x290], esi
mov dword [ebp - 0x28c], esi
mov dword [ebp - 0x288], esi
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0x2b0]
mov byte [ebp - 4], 7
call fcn.0047a4ef
test al, al
jne 0x4053bd
push str.Cannot_read_UPlay_config_file.
lea esi, [ebp - 0x240]
call fcn.00409096
mov byte [ebp - 4], 8
push 0x3c5
jmp 0x405359
mov dword [ebp - 0x2a4], esi
mov dword [ebp - 0x2a0], esi
mov dword [ebp - 0x29c], esi
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x28c]
sub eax, dword [ebp - 0x290]
push eax
push dword [ebp - 0x290]
lea eax, [ebp - 0x240]
push eax
call fcn.00477812
add esp, 0xc
push 1
push 0xa
lea ebx, [ebp - 0x2a4]
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.00478886
pop ecx
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x240]
mov byte [ebp - 4], 9
call fcn.0040b028
and dword [ebp - 0x27c], edi
mov eax, dword [ebp - 0x2a0]
mov ecx, dword [ebp - 0x2a4]
sub eax, ecx
push 0x1c
cdq
pop esi
idiv esi
cmp dword [ebp - 0x27c], eax
jae 0x40566d
mov esi, dword [ebp - 0x27c]
imul esi, esi, 0x1c
add esi, ecx
push 0x17
push str.game_installation_path:
xor eax, eax
mov ecx, esi
call fcn.0040af00
cmp eax, 0xffffffff
je 0x4055b7
push esi
lea esi, [ebp - 0x25c]
call fcn.0040905d
push 1
lea eax, [ebp - 0x280]
push eax
mov byte [ebp - 4], 0xb
xor eax, eax
mov ecx, esi
mov dword [ebp - 0x280], 0x22
call fcn.0040af00
cmp eax, 0xffffffff
je 0x4055a4
push 0xffffffffffffffff
inc eax
push eax
mov eax, esi
push eax
lea esi, [ebp - 0x240]
call fcn.00409192
mov ebx, eax
lea eax, [ebp - 0x25c]
mov byte [ebp - 4], 0xc
call fcn.0040ab21
xor ebx, ebx
inc ebx
push ebx
xor edi, edi
mov byte [ebp - 4], 0xb
call fcn.0040b028
push ebx
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x280], 0x22
call fcn.0040af9e
cmp eax, 0xffffffff
jne 0x4054f8
push ebx
jmp 0x4055a6
lea ecx, [ebp - 0x25c]
call fcn.0040916d
lea eax, [ebp - 0x25c]
call fcn.00476b08
lea eax, [ebp - 0x354]
push eax
call fcn.00409ac6
mov esi, eax
push str.Discovered_UPlay_game_library:
push esi
mov byte [ebp - 4], 0xd
call fcn.0040fa1f
pop ecx
pop ecx
push esi
lea ecx, [ebp - 0x25c]
call fcn.0040fbd3
pop ecx
lea eax, [ebp - 0x240]
push eax
mov eax, esi
call fcn.00409b30
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x405561
lea eax, [ebp - 0x240]
push eax
push 3
pop ecx
call fcn.0047c666
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x240]
call fcn.0040b028
lea eax, [ebp - 0x354]
mov byte [ebp - 4], 0xb
call fcn.004021a3
mov ecx, dword [ebp - 0x294]
lea edx, [ebp - 0x25c]
mov byte [ebp - 4], 0xf
call fcn.00403e3d
mov dword [ebp - 4], 0xb
push 1
xor edi, edi
lea esi, [ebp - 0x25c]
mov byte [ebp - 4], 9
call fcn.0040b028
inc dword [ebp - 0x27c]
jmp 0x405425
lea esi, [ebp - 0x2a4]
call fcn.0040b1e1
cmp dword [ebp - 0x290], 0
je 0x40568d
push dword [ebp - 0x290]
call fcn.0055e74f
pop ecx
lea ecx, [ebp - 0x2b0]
mov byte [ebp - 4], 4
call fcn.0047c1b1
jmp 0x4052fd