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

Disassembly:
push 0x5e0
mov eax, 0x570881
call fcn.00523ccd
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.00517e90
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 0x4090b9
lea eax, [ebp - 0x554]
push eax
call fcn.004036c8
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.00405d7d
pop ecx
pop ecx
push edi
push esi
call fcn.00410478
lea eax, [ebp - 0x464]
push eax
mov eax, esi
call fcn.00403732
mov byte [ebp - 4], 1
cmp dword [ebp - 0x450], 8
mov eax, dword [ebp - 0x464]
jae 0x40908c
lea eax, [ebp - 0x464]
xor ecx, ecx
push eax
inc ecx
call fcn.00492b4d
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x464]
call fcn.00404145
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x554]
call fcn.00402669
jmp 0x4094b4
lea eax, [ebp - 0x42c]
push eax
lea esi, [ebp - 0x49c]
call fcn.0040338f
push str.Originlocal.xml
mov eax, esi
push eax
mov dword [ebp - 4], 2
call fcn.0040d964
mov dword [ebp - 0x4a8], ebx
mov edi, esi
mov byte [ebp - 4], 4
call fcn.00494607
cmp eax, ebx
je 0x4090fa
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.00493a00
mov dword [ebp - 0x4a4], ebx
mov ebx, dword [ebp - 0x454]
sub ebx, dword [ebp - 0x458]
sar ebx, 2
test ebx, ebx
je 0x409313
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.00493d1f
push str.Setting
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.00410364
test eax, eax
setne byte [ebp - 0x49e]
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov byte [ebp - 4], 9
call fcn.00404145
cmp byte [ebp - 0x49e], 0
jne 0x409212
push 0x587364
lea esi, [ebp - 0x448]
call fcn.0040338f
mov eax, esi
push eax
mov eax, dword [ebp - 0x4ac]
mov byte [ebp - 4], 0xb
mov esi, dword [eax]
call fcn.00493c52
push 1
lea esi, [ebp - 0x448]
mov dword [ebp - 0x4ac], eax
mov byte [ebp - 4], 9
call fcn.00404145
mov eax, dword [ebp - 0x4ac]
test eax, eax
je 0x409212
push str.DownloadInPlaceDir
lea ecx, [eax + 0x1c]
call fcn.00410364
test eax, eax
je 0x409229
inc dword [ebp - 0x4a4]
cmp dword [ebp - 0x4a4], ebx
jb 0x409165
jmp 0x409306
push 0x587394
lea esi, [ebp - 0x448]
call fcn.0040338f
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.00493c52
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov ebx, eax
mov byte [ebp - 4], 9
call fcn.00404145
test ebx, ebx
je 0x409306
push 0xffffffffffffffff
push edi
lea eax, [ebx + 0x1c]
lea ecx, [ebp - 0x480]
mov byte [ebp - 0x49d], 1
call fcn.00404082
lea eax, [ebp - 0x554]
push eax
call fcn.004036c8
mov esi, eax
push str.Origin_game_directory_discovered:
push esi
mov byte [ebp - 4], 0xd
call fcn.00405d7d
push esi
lea ecx, [ebp - 0x480]
call fcn.0041193b
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403732
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x4092de
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492b4d
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404145
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.00402669
cmp byte [ebp - 0x49d], 0
jne 0x40945b
lea eax, [ebp - 0x554]
push eax
call fcn.004036c8
mov esi, eax
push str.Origin_config_doesnt_have_the_path__trying_default_instead.
push esi
mov byte [ebp - 4], 0xf
call fcn.00405d7d
pop ecx
pop ecx
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403732
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409359
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492b4d
xor ebx, ebx
pop ecx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404145
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.00402669
xor eax, eax
push 0x206
mov word [ebp - 0x224], ax
lea eax, [ebp - 0x222]
push edi
push eax
call fcn.00517e90
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 0x4094bc
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x480]
push eax
call fcn.0040411c
push str.Origin_Games
lea eax, [ebp - 0x480]
push eax
call fcn.0040d964
lea eax, [ebp - 0x554]
push eax
call fcn.004036c8
mov esi, eax
push str.Falling_back_to_the_default_Origin_game_directory:
push esi
mov byte [ebp - 4], 0x11
call fcn.00405d7d
push esi
lea ecx, [ebp - 0x480]
call fcn.0041193b
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.00403732
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409434
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492b4d
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404145
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.00402669
mov ecx, dword [ebp - 0x4b0]
lea edx, [ebp - 0x480]
mov byte [ebp - 4], 0x15
call fcn.004085ed
mov dword [ebp - 4], 9
lea esi, [ebp - 0x458]
call fcn.00426e9d
push 1
xor edi, edi
lea esi, [ebp - 0x480]
call fcn.00404145
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x4094a5
mov eax, dword [ecx]
push 1
call dword [eax]
push 1
xor edi, edi
lea esi, [ebp - 0x49c]
call fcn.00404145
call fcn.00523d29
ret 4
lea eax, [ebp - 0x554]
push eax
call fcn.004036c8
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.00405d7d
pop ecx
pop ecx
push esi
push edi
call fcn.00410478
lea eax, [ebp - 0x448]
push eax
mov eax, edi
call fcn.00403732
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409509
lea eax, [ebp - 0x448]
push eax
mov ecx, ebx
call fcn.00492b4d
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.00404145
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.00402669
lea esi, [ebp - 0x458]
call fcn.00426e9d
push ebx
lea esi, [ebp - 0x480]
call fcn.00404145
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x409559
mov eax, dword [ecx]
push ebx
call dword [eax]
push ebx
jmp 0x4094a7