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

Disassembly:
push 0x5e0
mov eax, 0x570583
call fcn.00523a34
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.00517bf0
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 0x4090f5
lea eax, [ebp - 0x554]
push eax
call fcn.00403689
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.00405d65
pop ecx
pop ecx
push edi
push esi
call fcn.00410496
lea eax, [ebp - 0x464]
push eax
mov eax, esi
call fcn.004036f3
mov byte [ebp - 4], 1
cmp dword [ebp - 0x450], 8
mov eax, dword [ebp - 0x464]
jae 0x4090c8
lea eax, [ebp - 0x464]
xor ecx, ecx
push eax
inc ecx
call fcn.00492cc7
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x464]
call fcn.0040412d
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x554]
call fcn.0040262a
jmp 0x4094f0
lea eax, [ebp - 0x42c]
push eax
lea esi, [ebp - 0x49c]
call fcn.00403350
push str.Originlocal.xml
mov eax, esi
push eax
mov dword [ebp - 4], 2
call fcn.0040d9a0
mov dword [ebp - 0x4a8], ebx
mov edi, esi
mov byte [ebp - 4], 4
call fcn.00494934
cmp eax, ebx
je 0x409136
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.00493b61
mov dword [ebp - 0x4a4], ebx
mov ebx, dword [ebp - 0x454]
sub ebx, dword [ebp - 0x458]
sar ebx, 2
test ebx, ebx
je 0x40934f
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.00493e80
push str.Setting
mov ecx, eax
mov byte [ebp - 4], 0xa
call fcn.00410382
test eax, eax
setne byte [ebp - 0x49e]
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov byte [ebp - 4], 9
call fcn.0040412d
cmp byte [ebp - 0x49e], 0
jne 0x40924e
push 0x587364
lea esi, [ebp - 0x448]
call fcn.00403350
mov eax, esi
push eax
mov eax, dword [ebp - 0x4ac]
mov byte [ebp - 4], 0xb
mov esi, dword [eax]
call fcn.00493db3
push 1
lea esi, [ebp - 0x448]
mov dword [ebp - 0x4ac], eax
mov byte [ebp - 4], 9
call fcn.0040412d
mov eax, dword [ebp - 0x4ac]
test eax, eax
je 0x40924e
push str.DownloadInPlaceDir
lea ecx, [eax + 0x1c]
call fcn.00410382
test eax, eax
je 0x409265
inc dword [ebp - 0x4a4]
cmp dword [ebp - 0x4a4], ebx
jb 0x4091a1
jmp 0x409342
push 0x587394
lea esi, [ebp - 0x448]
call fcn.00403350
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.00493db3
push 1
xor edi, edi
lea esi, [ebp - 0x448]
mov ebx, eax
mov byte [ebp - 4], 9
call fcn.0040412d
test ebx, ebx
je 0x409342
push 0xffffffffffffffff
push edi
lea eax, [ebx + 0x1c]
lea ecx, [ebp - 0x480]
mov byte [ebp - 0x49d], 1
call fcn.0040406a
lea eax, [ebp - 0x554]
push eax
call fcn.00403689
mov esi, eax
push str.Origin_game_directory_discovered:
push esi
mov byte [ebp - 4], 0xd
call fcn.00405d65
push esi
lea ecx, [ebp - 0x480]
call fcn.00411926
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.004036f3
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x40931a
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492cc7
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.0040412d
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.0040262a
cmp byte [ebp - 0x49d], 0
jne 0x409497
lea eax, [ebp - 0x554]
push eax
call fcn.00403689
mov esi, eax
push str.Origin_config_doesnt_have_the_path__trying_default_instead.
push esi
mov byte [ebp - 4], 0xf
call fcn.00405d65
pop ecx
pop ecx
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.004036f3
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409395
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492cc7
xor ebx, ebx
pop ecx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.0040412d
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.0040262a
xor eax, eax
push 0x206
mov word [ebp - 0x224], ax
lea eax, [ebp - 0x222]
push edi
push eax
call fcn.00517bf0
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 0x4094f8
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x480]
push eax
call fcn.00404104
push str.Origin_Games
lea eax, [ebp - 0x480]
push eax
call fcn.0040d9a0
lea eax, [ebp - 0x554]
push eax
call fcn.00403689
mov esi, eax
push str.Falling_back_to_the_default_Origin_game_directory:
push esi
mov byte [ebp - 4], 0x11
call fcn.00405d65
push esi
lea ecx, [ebp - 0x480]
call fcn.00411926
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
mov eax, esi
call fcn.004036f3
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409470
lea eax, [ebp - 0x448]
push eax
push 3
pop ecx
call fcn.00492cc7
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.0040412d
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.0040262a
mov ecx, dword [ebp - 0x4b0]
lea edx, [ebp - 0x480]
mov byte [ebp - 4], 0x15
call fcn.00408629
mov dword [ebp - 4], 9
lea esi, [ebp - 0x458]
call fcn.004e7046
push 1
xor edi, edi
lea esi, [ebp - 0x480]
call fcn.0040412d
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x4094e1
mov eax, dword [ecx]
push 1
call dword [eax]
push 1
xor edi, edi
lea esi, [ebp - 0x49c]
call fcn.0040412d
call fcn.00523a90
ret 4
lea eax, [ebp - 0x554]
push eax
call fcn.00403689
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.00405d65
pop ecx
pop ecx
push esi
push edi
call fcn.00410496
lea eax, [ebp - 0x448]
push eax
mov eax, edi
call fcn.004036f3
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x409545
lea eax, [ebp - 0x448]
push eax
mov ecx, ebx
call fcn.00492cc7
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x448]
call fcn.0040412d
lea eax, [ebp - 0x554]
mov byte [ebp - 4], 9
call fcn.0040262a
lea esi, [ebp - 0x458]
call fcn.004e7046
push ebx
lea esi, [ebp - 0x480]
call fcn.0040412d
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4a8]
test ecx, ecx
je 0x409595
mov eax, dword [ecx]
push ebx
call dword [eax]
push ebx
jmp 0x4094e3