Function at 0x415909
Capabilities:
Check if file exists
Copy file
Create directory
Download url
Read file on windows
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46ff05
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x100b4
call fcn.00434ed0
mov eax, dword [0x496b64]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0x100b0], eax
xor ebx, ebx
lea ecx, [ebp - 0x10044]
mov edi, str.fileLogger
inc ebx
push edi
mov dword [ebp - 4], ebx
call fcn.0040701e
lea eax, [ebp - 0x10044]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x100a8]
push eax
call fcn.0041b7f7
pop ecx
pop ecx
push 0
push ebx
lea ecx, [ebp - 0x10044]
mov byte [ebp - 4], 4
call fcn.0040a6f3
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
xor esi, esi
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x415a2a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp + 0x1c], 8
lea ecx, [ebp - 0x10074]
mov dword [ebp - 0x100b0], eax
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push edi
mov dword [ebp - 0x100a0], eax
call fcn.0040701e
lea eax, [ebp - 0x10074]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x100bc]
push eax
call fcn.0041b7f7
pop ecx
pop ecx
lea ecx, [ebp - 0x100b0]
mov byte [ebp - 4], 6
push ecx
lea ecx, [ebp - 0x100a0]
push ecx
mov ecx, dword [eax]
push str.Creating_directory____failed._Error_code_.
push 4
call fcn.00411616
mov ecx, dword [ebp - 0x100b8]
test ecx, ecx
je 0x415a18
call fcn.00408d35
push esi
push ebx
lea ecx, [ebp - 0x10074]
call fcn.0040a6f3
jmp 0x415eb2
xor eax, eax
mov dword [ebp - 0x10048], 7
mov edi, str.remoteconfig.json
mov dword [ebp - 0x1004c], esi
push edi
mov word [ebp - 0x1005c], ax
call fcn.004501bb
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1005c]
call fcn.0040acd8
push 0x4796ac
lea eax, [ebp + 8]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x1002c]
push eax
call fcn.0040f75e
add esp, 0xc
cmp dword [ebp - 0x10048], 8
lea eax, [ebp - 0x1005c]
mov byte [ebp - 4], 8
cmovae eax, dword [ebp - 0x1005c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x415b25
cmp dword [ebp - 0x10018], 8
lea ecx, [ebp - 0x1002c]
push esi
cmovae ecx, dword [ebp - 0x1002c]
lea eax, [ebp - 0x1005c]
cmp dword [ebp - 0x10048], 8
push ecx
cmovae eax, dword [ebp - 0x1005c]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x415b0c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [ebp - 0x100a8]
mov dword [ebp - 0x100a0], eax
lea eax, [ebp - 0x100a0]
push eax
lea eax, [ebp - 0x1002c]
push eax
lea eax, [ebp - 0x1005c]
push eax
push str.Failed_to_copy_local_remote_config_override_from_path__to_path_._Error_code_.
push 4
call fcn.00411991
jmp 0x415e98
mov edi, dword [ebp - 0x100a8]
mov ecx, edi
push str.Using_local_remote_config_override.
push 2
call fcn.00403735
jmp 0x415bb7
mov edi, dword [ebp - 0x100a8]
mov ecx, edi
push str.2147483047
push str.Looking_for_remote_config_info_for_product_id_.
push 2
call fcn.00410ec2
lea eax, [ebp + 0x20]
push eax
push ecx
mov eax, esp
mov dword [eax], str.https:__remote_config.gog.com_components_webinstaller_clients__component_version2.0.0
lea eax, [ebp - 0x10044]
push eax
call fcn.00410c3a
add esp, 0xc
cmp dword [ebp - 0x10018], 8
lea ecx, [ebp - 0x1002c]
lea eax, [ebp - 0x10044]
mov byte [ebp - 4], 9
cmovae ecx, dword [ebp - 0x1002c]
cmp dword [ebp - 0x10030], 8
cmovae eax, dword [ebp - 0x10044]
xor edx, edx
push edx
push edx
push ecx
push eax
push edx
call sub.urlmon.dll_URLDownloadToFileW
test eax, eax
jne 0x415e5f
push str.Downloaded_latest_remote_config_file.
push 2
mov ecx, edi
call fcn.00403735
xor esi, esi
lea ecx, [ebp - 0x10044]
push esi
push ebx
call fcn.0040a748
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
push esi
cmovae eax, dword [ebp - 0x1002c]
push 0x80
push 3
push esi
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x100ac], eax
lea ecx, [ebp - 0x1009c]
lea eax, [ebp - 0x100ac]
mov dword [ebp - 0x10078], esi
mov dword [ebp - 0x100a0], eax
lea eax, [ebp - 0x100a0]
push eax
call fcn.0041016a
push 0x10000
lea eax, [ebp - 0x10014]
mov byte [ebp - 4], 0xa
push esi
push eax
mov dword [ebp - 0x100b4], esi
call fcn.0044e660
add esp, 0xc
cmp dword [ebp - 0x100ac], 0xffffffff
jne 0x415c6b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x100a0], eax
lea eax, [ebp - 0x100a0]
push eax
lea eax, [ebp - 0x1002c]
push eax
push str.Failed_to_open_remote_config_file_____error___._Installation_should_process_as_normal.
push 4
mov ecx, edi
call fcn.004117d2
lea ecx, [ebp - 0x1009c]
call fcn.0040779e
jmp 0x415e98
push esi
lea eax, [ebp - 0x100b4]
push eax
push 0xffff
lea eax, [ebp - 0x10014]
push eax
push dword [ebp - 0x100ac]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x415cb0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x100a0], eax
lea eax, [ebp - 0x100a0]
push eax
lea eax, [ebp - 0x1002c]
push eax
push str.Failed_to_read_from_remote_config_file_____error___._Installation_should_proceed_as_normal.
jmp 0x415c52
push 0
lea ecx, [ebp - 0x10034]
mov byte [ebp - 4], 0xb
mov byte [ebp - 0x1003c], 0
call int.00413297
sub esp, 0x10
xor esi, esi
mov edi, esp
push esi
sub esp, 0x28
mov eax, esp
mov dword [ebp - 0x100a0], esp
mov dword [eax + 0x24], esi
push ecx
push ecx
mov ecx, esp
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x14]
mov dword [ebp - 0x100b8], ecx
push eax
lea eax, [ebp - 0x10014]
push eax
call fcn.0040ede6
push edi
mov byte [ebp - 4], 0xd
call fcn.0041cf86
add esp, 0x38
lea ecx, [ebp - 0x1003c]
call fcn.00413b34
mov dword [ebp - 4], 0xc
lea ecx, [ebp - 0x1003c]
push str.content
mov byte [ebp - 4], 0x10
call fcn.0040f48f
push str.windows
mov ecx, eax
call fcn.0040f48f
push 0x479d38
mov ecx, eax
call fcn.0040f48f
lea ecx, [ebp - 0x10074]
push ecx
mov ecx, eax
call fcn.0040f541
mov ecx, dword [ebp - 0x100b0]
push eax
call fcn.00413b74
push esi
push ebx
lea ecx, [ebp - 0x10074]
call fcn.0040a6f3
push dword [ebp - 0x1003c]
lea ecx, [ebp - 0x10034]
call fcn.004191ad
lea ecx, [ebp - 0x1009c]
call fcn.0040779e
push esi
push ebx
lea ecx, [ebp - 0x1002c]
call fcn.0040a748
push esi
push ebx
lea ecx, [ebp - 0x1005c]
call fcn.0040a748
mov ecx, dword [ebp - 0x100a4]
test ecx, ecx
je 0x415db3
call fcn.00408d35
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.0040a748
push esi
push ebx
lea ecx, [ebp + 0x20]
call fcn.0040a748
xor al, al
jmp 0x415ed7
cmp eax, 0x8007000e
jne 0x415e6d
push str.Failed_to_download_remote_config_to_file_due_to_error_E_OUTOFMEMORY.
jmp 0x415e80
cmp eax, 0x800c0008
jne 0x415e7b
push str.Failed_to_download_remote_config_to_file_due_to_error_INET_E_DOWNLOAD_FAILURE.
jmp 0x415e80
push str.Failed_to_download_remote_config_to_file_due_to_unknown_error.
push 4
mov ecx, edi
call fcn.00403735
xor esi, esi
lea ecx, [ebp - 0x10044]
push esi
push ebx
call fcn.0040a748
push esi
push ebx
lea ecx, [ebp - 0x1002c]
call fcn.0040a748
push esi
push ebx
lea ecx, [ebp - 0x1005c]
call fcn.0040a748
mov ecx, dword [ebp - 0x100a4]
test ecx, ecx
je 0x415ec1
call fcn.00408d35
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.0040a748
push esi
push ebx
lea ecx, [ebp + 0x20]
call fcn.0040a748
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043499a
mov esp, ebp
pop ebp
ret