Function at 0x408501
Capabilities:
Check if file exists

Disassembly:
push 0x490
mov eax, 0x46e973
call fcn.00434a2f
mov esi, ecx
push str.Checking_galaxy_existence.
lea edi, [esi + 0x18]
mov ecx, dword [edi]
push 2
call fcn.0040361d
push 0x104
lea eax, [ebp - 0x420]
xor ebx, ebx
push eax
push ebx
push str.client
push str.SoftwareWOW6432NODEGOG.comGalaxyClientpaths
push 0x80000002
mov ecx, esi
call fcn.004081aa
mov ecx, esi
push 0x104
test al, al
jne 0x4085df
lea eax, [ebp - 0x420]
push eax
push ebx
push str.client
push str.SoftwareGOG.comGalaxyClientpaths
push 0x80000002
call fcn.004081aa
mov ecx, dword [edi]
push str.SoftwareGOG.comGalaxyClientpaths
push str.SoftwareWOW6432NODEGOG.comGalaxyClientpaths
test al, al
jne 0x408594
push str.Galaxy_does_not_exist._Failed_to_get_registry_info_at____and___.
push 2
call fcn.00403587
jmp 0x4087c7
push str.Failed_to_get_registry_info_at_____but_found_info_at___._Assuming_that_system_is_32_bit.
push 2
call fcn.00403587
push 0x104
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
push ebx
push str.clientExecutable
push str.SoftwareGOG.comGalaxyClient
push 0x80000002
call fcn.004081aa
test al, al
jne 0x408617
mov ecx, dword [edi]
push str.SoftwareGOG.comGalaxyClient
push str.Galaxy_does_not_exist._Failed_to_get_registry_info_at_.
push 2
call fcn.00410e8f
jmp 0x4087c7
lea eax, [ebp - 0x218]
push eax
push ebx
push str.clientExecutable
push str.SoftwareWOW6432NodeGOG.comGalaxyClient
push 0x80000002
call fcn.004081aa
test al, al
jne 0x408617
mov ecx, dword [edi]
push str.SoftwareWOW6432NodeGOG.comGalaxyClient
push str.Galaxy_does_not_exist._Failed_to_get_registry_info_at_.
push 2
call fcn.00410e8f
jmp 0x4087c7
xor eax, eax
mov dword [ebp - 0x454], 7
mov dword [ebp - 0x458], ebx
mov word [ebp - 0x468], ax
cmp word [ebp - 0x218], ax
je 0x408646
lea eax, [ebp - 0x218]
push eax
call fcn.004501cb
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x468]
call fcn.0040acad
mov dword [ebp - 0x440], ebx
xor eax, eax
mov dword [ebp - 4], ebx
mov ebx, 0x473e7c
push ebx
mov dword [ebp - 0x43c], 7
mov word [ebp - 0x450], ax
call fcn.004501cb
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x450]
call fcn.0040acad
xor eax, eax
mov byte [ebp - 4], 1
xor ebx, ebx
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], ebx
mov word [ebp - 0x438], ax
cmp word [ebp - 0x420], ax
je 0x4086c3
lea eax, [ebp - 0x420]
push eax
call fcn.004501cb
pop ecx
push eax
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x438]
call fcn.0040acad
lea eax, [ebp - 0x450]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x498]
push eax
call fcn.004026c6
lea ecx, [ebp - 0x468]
mov byte [ebp - 4], 3
push ecx
push eax
lea eax, [ebp - 0x480]
push eax
call fcn.004026c6
add esp, 0x18
mov ecx, esi
push eax
call fcn.0042b985
push ebx
push 1
lea ecx, [ebp - 0x480]
call fcn.0040a71d
push ebx
push 1
lea ecx, [ebp - 0x498]
call fcn.0040a71d
push ebx
push 1
lea ecx, [ebp - 0x438]
call fcn.0040a71d
push ebx
push 1
lea ecx, [ebp - 0x450]
call fcn.0040a71d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x468]
push ebx
push 1
call fcn.0040a71d
cmp dword [esi + 0x10], ebx
jbe 0x4087a4
cmp dword [esi + 0x14], 8
jb 0x408770
mov eax, dword [esi]
jmp 0x408772
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4087a4
cmp dword [esi + 0x14], 8
jb 0x408785
mov esi, dword [esi]
lea ecx, [ebp - 0x49c]
mov dword [ebp - 0x49c], esi
push ecx
mov ecx, dword [edi]
push 0x473e80
push 2
call fcn.0040378a
mov al, 1
jmp 0x4087c9
cmp dword [esi + 0x14], 8
jb 0x4087ac
mov esi, dword [esi]
mov ecx, dword [edi]
lea eax, [ebp - 0x49c]
push eax
push str.Galaxy_does_not_exist___GalaxyClient.exe_not_found_despite_registry_information_at___.
push 2
mov dword [ebp - 0x49c], esi
call fcn.0040378a
xor al, al
call fcn.004349d9
ret