Function at 0x41e1c6
Capabilities:
Check if file exists
Copy file
Get common file path
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
mov eax, dword [0x494b64]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 7
pop edi
xor eax, eax
mov dword [ebp - 0x4ac], edi
mov esi, str.C:_ProgramData_GOG.com_Galaxy_logs_
mov word [ebp - 0x4c0], ax
xor ebx, ebx
push esi
mov dword [ebp - 0x4b0], ebx
call fcn.0044efcc
pop ecx
push eax
push esi
lea ecx, [ebp - 0x4c0]
call fcn.0040a44f
xor eax, eax
mov dword [ebp - 0x434], edi
mov esi, 0x478978
mov dword [ebp - 0x438], ebx
push esi
mov word [ebp - 0x448], ax
call fcn.0044efcc
pop ecx
push eax
push esi
lea ecx, [ebp - 0x448]
call fcn.0040a44f
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x4c0]
push eax
lea eax, [ebp - 0x550]
push eax
call fcn.0040ecc4
add esp, 0xc
lea ecx, [ebp - 0x448]
xor edi, edi
inc edi
push ebx
push edi
call fcn.0042a3d6
sub esp, 0x18
lea eax, [ebp - 0x4c0]
mov ecx, esp
push eax
call fcn.00406dcb
call fcn.00413e02
add esp, 0x18
test al, al
jne 0x41e9f2
call fcn.00413f5a
mov dword [ebp - 0x624], eax
test eax, eax
je 0x41e9f2
lea eax, [ebp - 0x624]
mov dword [ebp - 0x5e4], ebx
mov dword [ebp - 0x618], eax
lea ecx, [ebp - 0x608]
lea eax, [ebp - 0x618]
push eax
call fcn.0040f6d9
cmp dword [ebp - 0x53c], 8
lea eax, [ebp - 0x550]
lea ecx, [ebp - 0x460]
cmovae eax, dword [ebp - 0x550]
push eax
call fcn.00406df3
push str.fileLogger
lea ecx, [ebp - 0x478]
call fcn.00406d51
push 3
push 0x500000
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x614]
push eax
call fcn.0041d01a
add esp, 0x14
lea ecx, [ebp - 0x478]
push ebx
push edi
call fcn.00409ecb
push ebx
push edi
lea ecx, [ebp - 0x460]
call fcn.0042a3d6
mov ecx, dword [ebp - 0x614]
push 2
add ecx, 0x38
pop eax
xchg dword [ecx], eax
mov ecx, dword [ebp - 0x614]
push str.Initializing_installer_bootstrapper.
push 2
call fcn.004035b3
push ecx
push ecx
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov eax, dword [ebp - 0x610]
mov edx, dword [ebp - 0x614]
test eax, eax
je 0x41e36d
lock inc dword [eax + 4]
push eax
push edx
call fcn.00417453
lea ecx, [ebp - 0x5b8]
call fcn.00406f47
push ecx
push ecx
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov eax, dword [ebp - 0x610]
mov edx, dword [ebp - 0x614]
test eax, eax
je 0x41e39c
lock inc dword [eax + 4]
push eax
push edx
call fcn.00417453
lea ecx, [ebp - 0x620]
call fcn.0041ebca
push 7
pop ecx
xor eax, eax
mov dword [ebp - 0x41c], ecx
push ebx
mov dword [ebp - 0x50c], ecx
mov esi, 0x473014
mov dword [ebp - 0x494], ecx
lea ecx, [ebp - 0x4a8]
push esi
mov dword [ebp - 0x420], ebx
mov word [ebp - 0x430], ax
mov dword [ebp - 0x510], ebx
mov word [ebp - 0x520], ax
mov dword [ebp - 0x498], ebx
mov word [ebp - 0x4a8], ax
call fcn.0040a44f
push ebx
xor eax, eax
mov dword [ebp - 0x4f4], 7
push esi
lea ecx, [ebp - 0x508]
mov dword [ebp - 0x4f8], ebx
mov word [ebp - 0x508], ax
call fcn.0040a44f
push str.0.0.0
lea ecx, [ebp - 0x598]
call fcn.00406d51
mov ecx, dword [ebp - 0x614]
push str.Has_token._Try_to_read_it
push 2
pop esi
push esi
call fcn.004036cb
lea eax, [ebp - 0x490]
mov dword [ebp - 0x47c], 0xf
push eax
mov dword [ebp - 0x480], ebx
mov byte [ebp - 0x490], bl
call fcn.00415a8b
pop ecx
cmp eax, edi
jne 0x41e492
mov ecx, dword [ebp - 0x614]
push str.Failed_at_reading_token.
push 4
call fcn.004036cb
push ebx
push 0x4726ba
lea ecx, [ebp - 0x490]
call fcn.0040a31a
lea eax, [ebp - 0x430]
push eax
call fcn.00414cb4
pop ecx
test al, al
je 0x41e4aa
call fcn.00414579
jmp 0x41e4bb
lea eax, [ebp - 0x430]
push eax
call fcn.004139c5
pop ecx
test al, al
je 0x41e4c2
mov esi, edi
jmp 0x41e6b9
lea eax, [ebp - 0x430]
mov dword [ebp - 0x5bc], ebx
mov dword [ebp - 0x618], eax
lea ecx, [ebp - 0x5e0]
lea eax, [ebp - 0x618]
push eax
call fcn.0040f6a1
lea eax, [ebp - 0x598]
push eax
sub esp, 0x18
lea eax, [ebp - 0x4a8]
mov ecx, esp
push eax
call fcn.00406dcb
sub esp, 0x18
lea eax, [ebp - 0x430]
mov ecx, esp
push eax
call fcn.00406dcb
call fcn.00414ea3
add esp, 0x34
test al, al
je 0x41e52c
mov ecx, dword [ebp - 0x614]
push str.Due_to_failure_in_getting_allowed_version_from_remote_config__setting_allowed_Galaxy_version_to_0.0.0.
push esi
call fcn.004035b3
push 0x478ab0
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x538]
push eax
call fcn.0040ed59
lea eax, [ebp - 0x538]
push eax
lea eax, [ebp - 0x490]
push eax
call fcn.004148e3
add esp, 0x14
test al, al
je 0x41e570
mov ecx, dword [ebp - 0x614]
push str.Failed_to_dump_token_to_payload_file._Continuing_with_installation.
push 4
call fcn.004036cb
lea eax, [ebp - 0x4f0]
mov dword [ebp - 0x4dc], 0xf
push eax
lea eax, [ebp - 0x490]
mov dword [ebp - 0x4e0], ebx
push eax
mov byte [ebp - 0x4f0], bl
call fcn.00414199
pop ecx
pop ecx
test al, al
je 0x41e5a6
push str.Failed_to_decode_base64_token._Continuing_with_installation.
jmp 0x41e5f8
push 0x478bd4
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x478]
push eax
call fcn.0040ed59
add esp, 0xc
lea ecx, [ebp - 0x538]
push eax
call fcn.00422eac
push ebx
push edi
lea ecx, [ebp - 0x478]
call fcn.0042a3d6
lea eax, [ebp - 0x538]
push eax
lea eax, [ebp - 0x4f0]
push eax
call fcn.004148e3
pop ecx
pop ecx
test al, al
je 0x41e605
push str.Failed_to_dump_decoded_token_to_payload_file._Continuing_with_installation.
mov ecx, dword [ebp - 0x614]
push 4
call fcn.004036cb
lea eax, [ebp - 0x5b8]
push eax
call fcn.00415f24
pop ecx
test al, al
jne 0x41e692
mov ecx, dword [ebp - 0x614]
push str.System_fulfills_Galaxy_requirements.
push esi
call fcn.004035b3
push 0xa
push 0x81
lea eax, [ebp - 0x644]
push eax
lea ecx, [ebp - 0x620]
call fcn.0041ee7c
test al, al
jne 0x41e68d
push 0xa
push 0x85
lea eax, [ebp - 0x634]
push eax
lea ecx, [ebp - 0x620]
call fcn.0041ee7c
test al, al
jne 0x41e68d
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x634]
push eax
lea eax, [ebp - 0x644]
push eax
call fcn.004154dc
add esp, 0x10
test al, al
je 0x41e73c
call fcn.00414579
mov esi, edi
push ebx
push edi
lea ecx, [ebp - 0x4f0]
call fcn.00409ecb
push ebx
push edi
lea ecx, [ebp - 0x538]
call fcn.0042a3d6
lea ecx, [ebp - 0x5e0]
call fcn.00407433
push ebx
push edi
lea ecx, [ebp - 0x490]
call fcn.00409ecb
push ebx
push edi
lea ecx, [ebp - 0x598]
call fcn.00409ecb
push ebx
push edi
lea ecx, [ebp - 0x508]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x4a8]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x520]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x430]
call fcn.0042a3d6
lea ecx, [ebp - 0x620]
call fcn.00412ec2
lea ecx, [ebp - 0x5b8]
call fcn.00407417
mov ecx, dword [ebp - 0x610]
test ecx, ecx
je 0x41e72c
call fcn.004085c6
lea ecx, [ebp - 0x608]
call fcn.00407433
jmp 0x41e9f4
lea eax, [ebp - 0x430]
push eax
push ecx
push ecx
lea eax, [ebp - 0x620]
mov ecx, esp
push eax
call fcn.00412502
call fcn.0041569a
add esp, 0xc
test al, al
jne 0x41e68d
push 0x478cb8
lea ecx, [ebp - 0x460]
call fcn.00406df3
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x478]
push eax
call fcn.0040ecc4
add esp, 0xc
lea ecx, [ebp - 0x460]
push ebx
push edi
call fcn.0042a3d6
sub esp, 0x18
lea eax, [ebp - 0x478]
mov ecx, esp
push eax
call fcn.00406dcb
lea ecx, [ebp - 0x620]
call fcn.0041ec07
test al, al
je 0x41e7c1
call fcn.00414579
jmp 0x41e92d
push str.gogGalaxy.auth
lea ecx, [ebp - 0x460]
call fcn.00406df3
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x448]
push eax
call fcn.0040ecec
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
cmp dword [ebp - 0x44c], 8
lea ecx, [ebp - 0x460]
mov dword [ebp - 0x60c], eax
cmovae ecx, dword [ebp - 0x460]
push ecx
lea ecx, [ebp - 0x418]
lea eax, [ecx + eax*2]
push eax
call fcn.004555d2
pop ecx
pop ecx
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41e8b4
cmp dword [ebp - 0x434], 8
lea eax, [ebp - 0x448]
push ebx
cmovae eax, dword [ebp - 0x448]
push eax
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
mov dword [ebp - 0x618], eax
lea ecx, [ebp - 0x580]
lea eax, [ebp - 0x418]
push eax
call fcn.00406df3
mov ecx, dword [ebp - 0x614]
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x60c]
push eax
push str.Token:_copy_result:_____source_path:_____target_path:___
push esi
call fcn.004108ce
push ebx
push edi
lea ecx, [ebp - 0x580]
call fcn.0042a3d6
jmp 0x41e8cc
mov ecx, dword [ebp - 0x614]
lea eax, [ebp - 0x418]
push eax
push str.Token:_token_doesnt_exist_at_path:___
push esi
call fcn.0040348b
push ebx
push edi
lea ecx, [ebp - 0x448]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x460]
call fcn.0042a3d6
sub esp, 0x18
lea eax, [ebp - 0x508]
mov ecx, esp
push eax
call fcn.00406dcb
sub esp, 0x18
lea eax, [ebp - 0x4a8]
mov ecx, esp
push eax
call fcn.00406dcb
lea eax, [ebp - 0x520]
push eax
call fcn.00414a26
add esp, 0x34
test al, al
je 0x41e93f
mov ecx, dword [ebp - 0x614]
push str.C_Installer_returned_nonzero_error_code.
push 3
call fcn.004035b3
push ebx
push edi
lea ecx, [ebp - 0x478]
call fcn.0042a3d6
jmp 0x41e692
push ebx
push edi
lea ecx, [ebp - 0x478]
call fcn.0042a3d6
push ebx
push ebx
lea ecx, [ebp - 0x4d8]
mov dword [ebp - 0x4c8], ebx
mov dword [ebp - 0x4c4], ebx
call fcn.0042a3d6
push ebx
push ebx
lea ecx, [ebp - 0x568]
mov dword [ebp - 0x558], ebx
mov dword [ebp - 0x554], ebx
call fcn.0042a3d6
lea eax, [ebp - 0x580]
push eax
lea ecx, [ebp - 0x5b8]
call fcn.00407d99
push eax
lea ecx, [ebp - 0x4d8]
call fcn.00422eac
push ebx
push edi
lea ecx, [ebp - 0x580]
call fcn.0042a3d6
mov ecx, dword [ebp - 0x614]
cmp dword [ebp - 0x4c8], ebx
jne 0x41e9c6
push str.Galaxy_does_not_exist._Shutting_down
push esi
call fcn.004036cb
mov esi, edi
jmp 0x41e9d3
push str.Looks_like_installation_of_GOG_Galaxy_2.0_succeeded.
push esi
call fcn.004036cb
mov esi, ebx
push ebx
push edi
lea ecx, [ebp - 0x568]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x4d8]
call fcn.0042a3d6
jmp 0x41e694
mov esi, edi
push ebx
push edi
lea ecx, [ebp - 0x550]
call fcn.0042a3d6
push ebx
push edi
lea ecx, [ebp - 0x4c0]
call fcn.0042a3d6
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00433773
mov esp, ebp
pop ebp
ret 0x10