Function at 0x5004a0
Capabilities:
Check if file exists
Get common file path
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50c6e6
mov eax, dword fs:[0]
push eax
sub esp, 0x5d4
mov eax, dword [0x531304]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x5b4], 0
mov byte [ebp - 0x285], 0
mov dword [ebp - 0x284], 0
mov byte [ebp - 0x13c], 0
push 0x103
push 0
lea eax, [ebp - 0x13b]
push eax
call fcn.00415fc0
add esp, 0xc
lea ecx, [ebp - 0x260]
call fcn.004011e0
mov dword [ebp - 4], 0
cmp dword [0x55b9f4], 0
jne 0x500552
push 0x5203e4
call fcn.004e4170
add esp, 4
mov dword [ebp - 0x52c], 0xfffffffc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00401260
mov eax, dword [ebp - 0x52c]
jmp 0x500de9
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f9c00
add esp, 4
mov dword [ebp - 0x294], eax
mov edx, dword [ebp - 0x294]
push edx
call fcn.00415e20
add esp, 4
test eax, eax
jne 0x50059e
mov dword [ebp - 0x530], 0xfffffffd
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00401260
mov eax, dword [ebp - 0x530]
jmp 0x500de9
push 0x520408
call fcn.004f49c0
add esp, 4
test eax, eax
je 0x5005bc
push 0x520414
call fcn.004349e0
add esp, 4
mov eax, dword [ebp - 0x294]
push eax
push 0x520420
call fcn.004e4170
add esp, 8
push 0x104
push 0
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00415fc0
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x13c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x13c]
push eax
lea ecx, [ebp - 0x260]
call fcn.004012a0
push str.Opera_SoftwareOpera_StablePreferences
lea ecx, [ebp - 0x260]
call fcn.0040bb70
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x500651
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
push 0x520478
call fcn.004e4170
add esp, 8
mov byte [ebp - 0x285], 1
movzx ecx, byte [ebp - 0x285]
test ecx, ecx
jne 0x500683
mov dword [ebp - 0x534], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00401260
mov eax, dword [ebp - 0x534]
jmp 0x500de9
mov byte [ebp - 0x244], 0
push 0x103
push 0
lea edx, [ebp - 0x243]
push edx
call fcn.00415fc0
add esp, 0xc
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
push 0x104
lea eax, [ebp - 0x244]
push eax
call fcn.004188fa
add esp, 0xc
lea ecx, [ebp - 0x244]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea edx, [ebp - 0x244]
push edx
call fcn.004f4b10
add esp, 4
test eax, eax
je 0x500707
mov dword [ebp - 0x538], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00401260
mov eax, dword [ebp - 0x538]
jmp 0x500de9
push 0x7c
call fcn.00418aea
add esp, 4
mov dword [ebp - 0x540], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x540], 0
je 0x500747
lea eax, [ebp - 0x544]
push eax
call fcn.004eee80
add esp, 4
push eax
mov ecx, dword [ebp - 0x540]
call fcn.004ef190
mov dword [ebp - 0x5b8], eax
jmp 0x500751
mov dword [ebp - 0x5b8], 0
mov ecx, dword [ebp - 0x5b8]
mov dword [ebp - 0x53c], ecx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x53c]
mov dword [ebp - 0x290], edx
push 0
lea ecx, [ebp - 0x27c]
call fcn.004ebad0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.004e7500
mov byte [ebp - 4], 3
push 0x5204a4
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x264], eax
push 2
push 0
mov eax, dword [ebp - 0x264]
push eax
call fcn.00416afd
add esp, 0xc
mov ecx, dword [ebp - 0x264]
push ecx
call fcn.004169d3
add esp, 4
mov dword [ebp - 0x280], eax
push 0
push 0
mov edx, dword [ebp - 0x264]
push edx
call fcn.00416afd
add esp, 0xc
mov eax, dword [ebp - 0x280]
add eax, 1
push eax
call fcn.00415d52
add esp, 4
mov dword [ebp - 0x28c], eax
mov ecx, dword [ebp - 0x264]
push ecx
mov edx, dword [ebp - 0x280]
push edx
push 1
mov eax, dword [ebp - 0x28c]
push eax
call fcn.0041651a
add esp, 0x10
mov ecx, dword [ebp - 0x28c]
add ecx, dword [ebp - 0x280]
mov byte [ecx], 0
mov edx, dword [ebp - 0x264]
push edx
call fcn.00416bf5
add esp, 4
cmp dword [ebp - 0x280], 0xa
jge 0x5008b8
mov eax, dword [ebp - 0x28c]
push eax
call fcn.00415c75
add esp, 4
mov dword [ebp - 0x280], 0x4a26
mov ecx, dword [ebp - 0x280]
add ecx, 1
push ecx
call fcn.00415d52
add esp, 4
mov dword [ebp - 0x28c], eax
mov edx, dword [ebp - 0x280]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x28c]
push eax
call fcn.00415fc0
add esp, 0xc
mov ecx, dword [ebp - 0x280]
push ecx
push str._ab_testing_:_uid_:_MjczMzk0QTAtMjkzRC00NkNBLUFCMUEtMzVBMkM2REUwMkE5___bookmark_editor_:_expanded_nodes_:____browser_:_window_placement_:_height_:576__left_:128__maximized_:true__top_:96__width_:768__default_search_provider_:_synced_guid_:_FF57F01A_0718_44B7_8A1F_8B15BC33A50B___dns_prefetching_:_host_referral_list_:_2___http:__www.126.com_____http:__dl.reg.163.com___2.2733802__http:__ir3.mail.126.com___2.2733802__http:__mail.163.com___2.2733802__http:__mimg.127.net___4.585621599999999__http:__www.126.com___2.2733802__https:__irpmt.mail.163.com___2.2733802__https:__mimg.127.net___2.2733802__https:__ursdoccdn.nosdn.127.net___2.6037003999999997_____startup_list_:_1__http:__dl.reg.163.com____http:__ir3.mail.126.com____http:__mail.163.com____http:__mimg.127.net____http:__www.126.com____http:__www.google.com.hk____https:__addons.opera.com____https:__af.opera.com____https:__duckduckgo.com____https:__ursdoccdn.nosdn.127.net_____download_:_directory_upgrade_:true__extensions_:_alerts_:_initialized_:true__autoupdate_:_next_check_:_13150265856755180___chrome_url_overrides_:_activity_:__active_:true__entry_:_chrome_extension:__kdbnkohokganecpjedddmjapjjdifdkl_activity.html____bookmarks_:__active_:true__entry_:_chrome_extension:__knohfebhibeknbfioecpdmdkjkjdnjnl_manager_bookmark_manager.html____downloads_:__active_:true__entry_:_chrome_extension:__hcmncblfhbahlnahjaipdnopbjllbmpa_downloads.html____history_:__active_:true__entry_:_chrome_extension:__fedlkbnjggmaojpbfkgefgmdbocapell_history.html____last_opera_version_:_49.0.2623.112___settings_:_bcibcaaakpeekhbnddgnajbmjdcemfkf_:_active_permissions_:_api_:__management___addonsPrivate____manifest_permissions_:____app_launcher_ordinal_:_t___commands_:__content_settings_:____creation_flags_:1__events_:____from_bookmark_:false__from_webstore_:false__granted_permissions_:_api_:__management___addonsPrivate____manifest_permissions_:____incognito_content_settings_:____incognito_preferences_:__install_time_:_13150265578661866___is_pending_third_party_install_:false__location_:5__manifest_:_app_:_launch_:_web_url_:_https:__addons.opera.com____urls_:__https:__addons.opera.com_____description_:_Opera_Addons_Portal___key_:_MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAbTKr4g11sfL12IByl8cC1NThF3SIMBhYJlyF4vYe0RhuAztV06xdKladCVB3msDBaKfZwPF_tgBIly76R_X4XiFyNeD01Tb4XYy8iBohVh8_ZP8c93OVTZ0pTGE10UUjqtBPtcs6q2kz5z9eZ4LLCl2RX6_Kf8h6vsjuigUQIDAQAB___manifest_version_:2__name_:_Opera_Addons_Portal___permissions_:__addonsPrivate___management____version_:_1___page_ordinal_:_n___path_:_C:Program_FilesOpera36.0.2130.80_resources_addons_portal_app___preferences_:__regular_only_preferences_:__state_:1__was_installed_by_default_:false__was_installed_by_oem_:false__fedlkbnjggmaojpbfkgefgmdbocapell_:_active_permissions_:_api_:__history___themesPrivate___operaResourcesPrivate___speeddialPrivate___statsPrivate____explicit_host_:__u003Call_urls____chrome:__favicon_____manifest_permissions_:____commands_:__content_settings_:____creation_flags_:1__events_:____from_bookmark_:false__from_webstore_:false__granted_permissions_:_api_:__history___themesPrivate___operaResourcesPrivate___speeddialPrivate___statsPrivate____explicit_host_:__u003Call_urls____chrome:__favicon_____manifest_permissions_:____incognito_content_settings_:____incognito_preferences_:__initial_keybindings_set_:true__install_time_:_13150265578665841___is_pending_third_party_install_:false__location_:5__manifest_:_chrome_url_overrides_:_history_:_history.html___content_security_policy_:_script_src_chrome:__resources_chrome:__op_resources_self__object_src_self___description_:_Implements_opera:__history_page___incognito_:_split___key_:_MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDjsnrc_LzbU7eT3cebDOnAzHdddcbqszrWPwuqYFOvYKuRsIB8u7neRVDZTW_r5ZGI90ELiMS7ZEcbsR_4LA9fWlmyeMotqNi1dpZpYY0LlJtiSr0GH_C2PgekrYD9EkvC9qudAuf0UpSvLDtUQnFNCc0hfSPJrVVFAW5FIfMh69toe39975tJJ3RlmljOVDb84ysTw4U_ZgzbCFoYH119Cszq_rbPewDMYm4hxZhixWlSIHdg0N0BDdvgyYW0PV4DxNCj3McVHZSTweQLgDBOYhN6bNaQfU4DM4
mov edx, dword [ebp - 0x28c]
push edx
call fcn.00415910
add esp, 0xc
mov eax, dword [ebp - 0x28c]
add eax, dword [ebp - 0x280]
mov byte [eax], 0
cmp dword [ebp - 0x280], 0x3e8
jle 0x50093d
push 0x5204a8
mov ecx, dword [ebp - 0x28c]
push ecx
call fcn.00401000
add esp, 8
test eax, eax
je 0x50093d
push 0x5204ac
mov edx, dword [ebp - 0x28c]
push edx
call fcn.00401000
add esp, 8
push eax
lea ecx, [ebp - 0x564]
call fcn.00401e20
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x5b4]
or eax, 1
mov dword [ebp - 0x5b4], eax
push 1
lea ecx, [ebp - 0x27c]
push ecx
lea edx, [ebp - 0x564]
push edx
mov ecx, dword [ebp - 0x290]
call fcn.004f3df0
movzx eax, al
test eax, eax
je 0x50093d
mov dword [ebp - 0x5bc], 1
jmp 0x500947
mov dword [ebp - 0x5bc], 0
mov cl, byte [ebp - 0x5bc]
mov byte [ebp - 0x545], cl
mov dword [ebp - 4], 3
mov edx, dword [ebp - 0x5b4]
and edx, 1
je 0x500977
and dword [ebp - 0x5b4], 0xfffffffe
lea ecx, [ebp - 0x564]
call fcn.00401260
movzx eax, byte [ebp - 0x545]
test eax, eax
je 0x500d5b
mov dword [ebp - 0x298], 0x17
push 0x5204bc
push 0x5204b0
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov ecx, eax
call fcn.004eaa50
test eax, eax
je 0x500af9
mov byte [ebp - 0x524], 0
push 0x103
push 0
lea ecx, [ebp - 0x523]
push ecx
call fcn.00415fc0
add esp, 0xc
lea edx, [ebp - 0x580]
push edx
push str.last_opera_version
push 0x5204d0
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov ecx, eax
call fcn.004ed160
mov dword [ebp - 0x5c0], eax
mov eax, dword [ebp - 0x5c0]
mov dword [ebp - 0x5c4], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x5c4]
call fcn.004012e0
push eax
lea ecx, [ebp - 0x524]
push ecx
call fcn.00415eb0
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x580]
call fcn.00401260
lea edx, [ebp - 0x524]
push edx
push str._DEBUGINFO__LOCK__SET_LockOpera_szVer1___s_n
call fcn.004e4170
add esp, 8
push 0x520520
lea eax, [ebp - 0x524]
push eax
call fcn.00401000
add esp, 8
test eax, eax
je 0x500aed
lea ecx, [ebp - 0x524]
push ecx
push str.__._
lea edx, [ebp - 0x524]
push edx
call fcn.0041706e
add esp, 0xc
lea eax, [ebp - 0x524]
push eax
push str._DEBUGINFO__LOCK__SET_LockOpera_szVer2___s_n
call fcn.004e4170
add esp, 8
lea ecx, [ebp - 0x528]
push ecx
push 0x52055c
lea edx, [ebp - 0x524]
push edx
call fcn.0041706e
add esp, 0xc
mov eax, dword [ebp - 0x528]
push eax
push str._DEBUGINFO__LOCK__SET_LockOpera_vernumber___d_n
call fcn.004e4170
add esp, 8
cmp dword [ebp - 0x528], 0x17
jge 0x500ae1
mov dword [ebp - 0x298], 0x16
jmp 0x500aeb
mov dword [ebp - 0x298], 0x17
jmp 0x500af7
mov dword [ebp - 0x298], 0x17
jmp 0x500b03
mov dword [ebp - 0x298], 0x17
mov ecx, dword [ebp - 0x298]
push ecx
lea edx, [ebp - 0x41c]
push edx
call fcn.004f9300
add esp, 8
lea eax, [ebp - 0x2e4]
push eax
mov ecx, dword [ebp - 0x294]
push ecx
lea edx, [ebp - 0x41c]
push edx
call fcn.004f9030
add esp, 0xc
lea eax, [ebp - 0x2e4]
push eax
push str._DEBUGINFO__LOCK__SET_LockOpera_url_signature___s_n
call fcn.004e4170
add esp, 8
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x584], esp
push 4
call fcn.004eac00
mov dword [ebp - 0x5c8], eax
mov ecx, dword [ebp - 0x5c8]
mov dword [ebp - 0x5cc], ecx
mov byte [ebp - 4], 6
push 0x5205cc
push 0x5205c4
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.004eb520
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x588], esp
lea edx, [ebp - 0x2e4]
push edx
call fcn.004edc90
mov dword [ebp - 0x5d0], eax
mov eax, dword [ebp - 0x5d0]
mov dword [ebp - 0x5d4], eax
mov byte [ebp - 4], 7
push str.urls_signature
push 0x5205e0
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.004eb520
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x58c], esp
mov edx, dword [0x55bc34]
push edx
call fcn.004ed9d0
mov dword [ebp - 0x5d8], eax
mov eax, dword [ebp - 0x5d8]
mov dword [ebp - 0x5dc], eax
mov byte [ebp - 4], 8
push 0x520600
push 0x5205f8
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.004eb520
mov ecx, dword [ebp - 0x294]
push ecx
lea ecx, [ebp - 0x5a4]
call fcn.004edc90
mov byte [ebp - 4], 9
lea edx, [ebp - 0x5a4]
push edx
push 0x520618
push 0x520610
lea ecx, [ebp - 0x27c]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov ecx, eax
call fcn.004ee2a0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x5a4]
call fcn.004eb3f0
lea eax, [ebp - 0x27c]
push eax
lea ecx, [ebp - 0x300]
push ecx
lea ecx, [ebp - 0x34]
call fcn.004ea3e0
mov byte [ebp - 4], 0xa
push 0x80
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x520628
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x264], eax
mov edx, dword [ebp - 0x264]
push edx
push 1
lea ecx, [ebp - 0x300]
call fcn.004012e0
push eax
call fcn.00415e20
add esp, 4
push eax
lea ecx, [ebp - 0x300]
call fcn.004012e0
push eax
call fcn.004167ae
add esp, 0x10
mov eax, dword [ebp - 0x264]
push eax
call fcn.00416bf5
add esp, 4
push 1
lea ecx, [ebp - 0x260]
call fcn.004012e0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push str._DEBUGINFO__LOCK__SET_LockOpera_json_ok_n
call fcn.004e4170
add esp, 4
mov dword [ebp - 0x284], 1
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x300]
call fcn.00401260
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 0x5ac], ecx
mov edx, dword [ebp - 0x5ac]
mov dword [ebp - 0x5a8], edx
cmp dword [ebp - 0x5a8], 0
je 0x500d91
push 1
mov ecx, dword [ebp - 0x5a8]
call fcn.00413240
mov dword [ebp - 0x5e0], eax
jmp 0x500d9b
mov dword [ebp - 0x5e0], 0
mov eax, dword [ebp - 0x28c]
push eax
call fcn.00415c75
add esp, 4
mov ecx, dword [ebp - 0x284]
mov dword [ebp - 0x5b0], ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.00410630
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x27c]
call fcn.004eb3f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x260]
call fcn.00401260
mov eax, dword [ebp - 0x5b0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004158f4
mov esp, ebp
pop ebp
ret 4