Function at 0x4094f0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push 0x5e0
mov eax, 0x5b5ed4
call fcn.0056bee1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4b0], eax
xor eax, eax
push 0x206
mov word [ebp - 0x42c], ax
xor ebx, ebx
lea eax, [ebp - 0x42a]
push ebx
push eax
call fcn.0055fda0
add esp, 0xc
lea eax, [ebp - 0x42c]
push eax
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
cmp edi, ebx
je 0x4095b9
lea eax, [ebp - 0x554]
push eax
call fcn.00403aba
mov esi, eax
push str.Cannot_check_Origin_game_directory_due_to_inability_to_get_CSIDL_APPDATA_path:
push esi
mov dword [ebp - 4], ebx
call fcn.0040635f
pop ecx
pop ecx
push edi
push esi
call fcn.004108f3
lea eax, [ebp - 0x464]
push eax
mov eax, esi
call fcn.00403b24
mov byte [ebp - 4], 1
cmp dword [ebp - 0x450], 8
mov eax, dword [ebp - 0x464]
jae 0x40958c
lea eax, [ebp - 0x464]
xor ecx, ecx
push eax
inc ecx
call fcn.0047feaf
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x464]
call fcn.00404589
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x554]
call fcn.004027ed
jmp 0x4099b4
lea eax, [ebp - 0x42c]
push eax
lea esi, [ebp - 0x49c]
call fcn.004037ae
push str.Originlocal.xml
mov eax, esi
push eax
mov dword [ebp - 4], 2
call fcn.0040dc78
mov dword [ebp - 0x4a8], ebx
mov edi, esi
mov byte [ebp - 4], 4
call fcn.00482267
cmp eax, ebx
je 0x4095fa
mov dword [ebp - 0x4a8], eax
mov dword [ebp - 4], 3
xor eax, eax
mov byte [ebp - 0x49d], 0
mov dword [ebp - 0x46c], 7
mov dword [ebp - 0x470], ebx
mov word [ebp - 0x480], ax
mov dword [ebp - 0x458], ebx
mov dword [ebp - 0x454], ebx
mov dword [ebp - 0x450], ebx
mov byte [ebp - 4], 9
push dword [ebp - 0x4a8]
lea ecx, [ebp - 0x458]
call fcn.004813e5
mov dword [ebp - 0x4a4], ebx
mov ebx, dword [ebp - 0x454]
sub ebx, dword [ebp - 0x458]
sar ebx, 2
test ebx, ebx
je 0x409813
mov ecx, dword [ebp - 0x4a4]
mov eax, dword [ebp - 0x458]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x4ac], eax
mov eax, dword [eax]
lea ecx, [ebp - 0x448]
call fcn.00481704
push str.Setting
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.004107df
test eax, eax
setne byte [ebp - 0x49e]
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov byte [ebp - 4], 9
call fcn.00404589
cmp byte [ebp - 0x49e], 0
jne 0x409712
push 0x5cac84
lea esi, [ebp - 0x448]
call fcn.004037ae
mov eax, esi
push eax
mov eax, dword [ebp - 0x4ac]
mov byte [ebp - 4], 0xb
mov esi, dword [eax]
call fcn.00481637
push 1
lea esi, [ebp - 0x448]
mov dword [ebp - 0x4ac], eax
mov byte [ebp - 4], 9
call fcn.00404589
mov eax, dword [ebp - 0x4ac]
test eax, eax
je 0x409712
push str.DownloadInPlaceDir
lea ecx, [eax + 0x1c]
call fcn.004107df
test eax, eax
je 0x409729
inc dword [ebp - 0x4a4]
cmp dword [ebp - 0x4a4], ebx
jb 0x409665
jmp 0x409806
push 0x5cacb4
lea esi, [ebp - 0x448]
call fcn.004037ae
mov ecx, dword [ebp - 0x4a4]
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x458]
lea eax, [eax + ecx*4]
mov ecx, esi
mov esi, dword [eax]
push ecx
call fcn.00481637
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov ebx, eax
mov byte [ebp - 4], 9
call fcn.00404589
test ebx, ebx
je 0x409806
push 0xffffffffffffffff
push edi
lea eax, [ebx + 0x1c]
lea ecx, [ebp - 0x480]
mov byte [ebp - 0x49d], 1
call fcn.004044c6
lea eax, [ebp - 0x554]
push eax
call fcn.00403aba
mov esi, eax
push str.Origin_game_directory_discovered:
push esi
mov byte [ebp - 4], 0xd
call fcn.0040635f
push esi
lea ecx, [ebp - 0x480]
call fcn.00411d36
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403b24
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x4097de
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.0047feaf
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404589
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.004027ed
cmp byte [ebp - 0x49d], 0
jne 0x40995b
lea eax, [ebp - 0x554]
push eax
call fcn.00403aba
mov esi, eax
push str.Origin_config_doesnt_have_the_path__trying_default_instead.
push esi
mov byte [ebp - 4], 0xf
call fcn.0040635f
pop ecx
pop ecx
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403b24
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409859
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.0047feaf
xor ebx, ebx
pop ecx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404589
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.004027ed
xor eax, eax
push 0x206
mov word [ebp - 0x224], ax
lea eax, [ebp - 0x222]
push edi
push eax
call fcn.0055fda0
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
push edi
push edi
push 0x26
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, eax
cmp esi, edi
jne 0x4099bc
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x480]
push eax
call fcn.00404560
push str.Origin_Games
lea eax, [ebp - 0x480]
push eax
call fcn.0040dc78
lea eax, [ebp - 0x554]
push eax
call fcn.00403aba
mov esi, eax
push str.Falling_back_to_the_default_Origin_game_directory:
push esi
mov byte [ebp - 4], 0x11
call fcn.0040635f
push esi
lea ecx, [ebp - 0x480]
call fcn.00411d36
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403b24
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409934
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.0047feaf
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404589
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.004027ed
mov ecx, dword [ebp - 0x4b0]
lea edx, [ebp - 0x480]
mov byte [ebp - 4], 0x15
call fcn.00408ade
mov dword [ebp - 4], 9
lea esi, [ebp - 0x458]
call fcn.0043460f
push 1
xor edi, edi
lea esi, [ebp - 0x480]
call fcn.00404589
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x4099a5
mov eax, dword [ecx]
push 1
call dword [eax]
push 1
xor edi, edi
lea esi, [ebp - 0x49c]
call fcn.00404589
call fcn.0056bf3d
ret 4
lea eax, [ebp - 0x554]
push eax
call fcn.00403aba
mov edi, eax
push str.Cannot_check_the_default_Origin_game_directory_due_to_inability_to_get_CSIDL_PROGRAM_FILES_path:
push edi
mov byte [ebp - 4], 0x13
call fcn.0040635f
pop ecx
pop ecx
push esi
push edi
call fcn.004108f3
lea eax, [ebp - 0x448]
push eax
mov eax, edi
call fcn.00403b24
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409a09
lea eax, [ebp - 0x448]
push eax
mov ecx, ebx
call fcn.0047feaf
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404589
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.004027ed
lea esi, [ebp - 0x458]
call fcn.0043460f
push ebx
lea esi, [ebp - 0x480]
call fcn.00404589
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x409a59
mov eax, dword [ecx]
push ebx
call dword [eax]
push ebx
jmp 0x4099a7