Function at 0x5064a0
Capabilities:
Check if file exists
Delete file
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x599789
mov eax, dword fs:[0]
push eax
sub esp, 0x51c
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x508], edi
mov al, byte [ebp + 8]
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x500], 0
xorps xmm0, xmm0
mov byte [ebp - 0x4f1], al
mov byte [ebp - 0x4f8], al
movq qword [ebp - 0x420], xmm0
mov dword [ebp - 0x418], 0
call fcn.0051ea00
push dword [ebp - 0x4f8]
mov eax, dword [edi]
lea ecx, [ebp - 0x420]
push 0
mov dword [ebp - 4], 0
push dword [eax]
push 0x5a4fa4
call fcn.0051ec50
test al, al
jne 0x50655f
push str.Unable_to_open_HTTP_transaction
push 0xcb
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x14
mov byte [ebp - 0x4f1], 0
jmp 0x506f68
push dword [edi + 0xc]
mov ecx, dword [edi + 4]
push dword [edi + 8]
call fcn.00505f10
xorps xmm0, xmm0
mov dword [ebp - 0x4e4], 0
push 0x200
lea eax, [ebp - 0x210]
movlpd qword [ebp - 0x4ec], xmm0
push 0
push eax
movlpd qword [ebp - 0x4d8], xmm0
movlpd qword [ebp - 0x4d0], xmm0
mov dword [ebp - 0x4c8], 0
movlpd qword [ebp - 0x4bc], xmm0
mov dword [ebp - 0x4f0], 0x3c
call fcn.005561e0
push 0x200
lea eax, [ebp - 0x410]
push 0
push eax
call fcn.005561e0
add esp, 0x18
mov dword [ebp - 0x4dc], 0x100
lea eax, [ebp - 0x210]
mov dword [ebp - 0x4c0], 0x100
mov dword [ebp - 0x4e0], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x4c4], eax
lea eax, [ebp - 0x4f0]
push eax
mov eax, dword [edi + 0x10]
push 0
push 0
push dword [eax]
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x506648
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.WinHttpCrackUrl_failed___d___url:__s
push 0xde
jmp 0x5068ae
cmp word [ebp - 0x4d8], 0
jne 0x50666d
cmp dword [ebp - 0x4e4], 2
mov eax, 0x50
mov ecx, 0x1bb
cmove eax, ecx
mov word [ebp - 0x4d8], ax
mov eax, dword [edi]
lea ecx, [ebp - 0x420]
push dword [eax]
lea eax, [ebp - 0x210]
push dword [ebp - 0x4d8]
push eax
call fcn.0051eaa0
test al, al
jne 0x5066b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_connection_failed___d___url:__s
push 0xec
jmp 0x5068ae
xor eax, eax
mov ecx, 0x800000
cmp dword [ebp - 0x4e4], 2
cmove eax, ecx
lea ecx, [ebp - 0x420]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x410]
push eax
push 0x5bb110
call fcn.0051eca0
test al, al
jne 0x506716
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_GET_request_failed___d___url:__s
push 0xf5
jmp 0x5068ae
push 0x40000000
push 0xffffffffffffffff
push str.Cache_Control:_no_cache
lea ecx, [ebp - 0x420]
call fcn.0051ea70
test al, al
jne 0x50675c
mov eax, dword [edi + 0x10]
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
push str.HTTP_add_request_headers_failed___d___url:__s
push 0xfb
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 3
call fcn.00500e60
add esp, 0x1c
push 0
push 0
lea ecx, [ebp - 0x420]
call fcn.0051ee60
test al, al
jne 0x5067ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
cmp byte [ebp - 0x4f1], 0
mov eax, 0x5d6438
mov ecx, 0x5cac18
cmove ecx, eax
mov eax, dword [edi + 0x10]
push ecx
push dword [eax]
push esi
push str.HTTP_send_request_failed___d___url:__s__ignore_proxy_flag__s
push 0x103
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506f68
lea ecx, [ebp - 0x420]
call fcn.0051ee40
test al, al
jne 0x506804
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_receive_response_failed___d___url:__s
push 0x10b
jmp 0x5068ae
lea ecx, [ebp - 0x420]
call fcn.0051ed80
mov dword [ebp - 0x4f8], eax
cmp eax, 0xc8
je 0x506868
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push dword [ebp - 0x4f8]
push str.HTTP_status___d__error___d___url:__s
push 0x114
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x20
mov byte [ebp - 0x4f1], 0
jmp 0x506f68
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x43c], 0
push eax
lea ecx, [ebp - 0x420]
call fcn.0051ece0
test al, al
jne 0x5068ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi + 4]
mov esi, eax
push esi
push 7
push dword [edi + 8]
call fcn.00505d10
mov ecx, dword [edi + 0x10]
push dword [ecx]
push esi
push str.HTTP_query_content_length___d___url:__s
push 0x11d
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x1c
mov byte [ebp - 0x4f1], 0
jmp 0x506f68
mov eax, dword [ebp - 0x43c]
mov ecx, 0x100000
cmp eax, ecx
cmova eax, ecx
mov dword [ebp - 0x50c], eax
push eax
mov byte [ebp - 4], 1
call fcn.005602f1
mov esi, eax
add esp, 4
mov dword [ebp - 0x510], esi
test esi, esi
jne 0x50693b
mov ecx, dword [edi + 4]
push eax
push 2
push dword [edi + 8]
call fcn.00505d10
push dword [ebp - 0x50c]
push str.Unable_to_allocate__d_bytes
push 0x126
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506f5f
mov eax, dword [edi + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x506984
xor ecx, ecx
mov dword [ebp - 0x438], 0
mov word [ebp - 0x438], cx
lea ecx, [ebp - 0x438]
push eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
call fcn.00424550
lea eax, [ebp - 0x438]
mov ecx, 1
jmp 0x5069a0
push 0x2f
push dword [ebp - 0x4c4]
lea eax, [ebp - 0x528]
push eax
call fcn.00507f80
add esp, 0xc
mov ecx, 2
mov dword [ebp - 0x458], 0
xor edx, edx
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x458], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x448], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], dx
mov dword [ebp - 4], 3
test cl, 2
je 0x506a0e
and ecx, 0xfffffffd
mov dword [ebp - 0x4f8], ecx
lea ecx, [ebp - 0x528]
call fcn.00424580
mov ecx, dword [ebp - 0x4f8]
mov byte [ebp - 4], 4
test cl, 1
je 0x506a22
lea ecx, [ebp - 0x438]
call fcn.00424580
cmp dword [ebp - 0x448], 0
jne 0x506a92
mov eax, dword [edi + 0x14]
cmp dword [eax], 0
je 0x506a53
push str.empty_filename
push 0x12f
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x14
jmp 0x506a77
push dword [ebp - 0x4c4]
push str.Unable_to_extract_the_filename_from_url___s_
push 0x133
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x18
mov ecx, dword [edi + 4]
push 0
push 3
push dword [edi + 8]
call fcn.00505d10
mov byte [ebp - 0x4f1], 0
jmp 0x506f54
cmp dword [ebp - 0x444], 8
lea ecx, [ebp - 0x458]
mov eax, dword [edi + 0x1c]
cmovae ecx, dword [ebp - 0x458]
push 0x5c
push ecx
push dword [eax]
lea eax, [ebp - 0x438]
push eax
call fcn.00507740
mov ecx, eax
add esp, 0x10
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x500], ecx
mov dword [ebp - 0x4f8], eax
cmp eax, ecx
je 0x506b49
mov edx, dword [eax + 0x14]
cmp edx, 8
jb 0x506b17
mov eax, dword [eax]
lea ecx, [edx*2 + 2]
cmp ecx, 0x1000
jb 0x506b01
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x506fee
mov eax, edx
push ecx
push eax
call fcn.005541c2
mov eax, dword [ebp - 0x4f8]
add esp, 8
mov ecx, dword [ebp - 0x500]
mov dword [eax + 0x10], 0
xor edx, edx
mov dword [eax + 0x14], 7
mov word [eax], dx
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [eax + 0x10], xmm0
xor eax, eax
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], 7
mov word [ecx], ax
lea ecx, [ebp - 0x438]
call fcn.00424580
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506b5f
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x506d3a
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x18]
mov dword [ebp - 0x4fc], ecx
cmp byte [eax], 0
je 0x506db4
mov edx, dword [ecx + 0x10]
mov eax, SysReAllocString
sub eax, edx
mov dword [ebp - 0x4f8], edx
cmp eax, 4
jb 0x506fe9
cmp dword [ecx + 0x14], 8
jb 0x506baa
mov ecx, dword [ecx]
mov dword [ebp - 0x4fc], ecx
add edx, 4
mov dword [ebp - 0x438], 0
mov edi, 7
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x438]
mov dword [ebp - 0x504], edx
mov dword [ebp - 0x500], eax
cmp edx, edi
jbe 0x506c36
mov edi, edx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x506bfa
mov edi, SysReAllocString
jmp 0x506c04
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
xor ecx, ecx
mov eax, edi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x438]
call fcn.00425a60
mov ecx, dword [ebp - 0x4fc]
mov edx, dword [ebp - 0x504]
mov dword [ebp - 0x500], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x424], edi
mov edi, dword [ebp - 0x4f8]
add edi, edi
mov dword [ebp - 0x428], edx
push edi
push ecx
push eax
call fcn.00555c60
mov eax, dword [ebp - 0x500]
xor edx, edx
mov ecx, dword [ebp - 0x4f8]
add esp, 0xc
mov dword [edi + eax], 0x62002e
mov dword [edi + eax + 4], 0x6b0061
mov word [eax + ecx*2 + 8], dx
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 5
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [ebp - 0x508]
lea ecx, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae ecx, dword [ebp - 0x438]
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506cbb
mov eax, dword [eax]
push ecx
push eax
call fcn.0056d83b
add esp, 8
test eax, eax
je 0x506d2b
call fcn.0055ec85
mov ecx, dword [edi + 4]
mov eax, dword [eax]
push eax
push 4
push dword [edi + 8]
mov dword [ebp - 0x504], eax
call fcn.00505d10
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506cef
mov eax, dword [eax]
push eax
push dword [ebp - 0x504]
push str.Unable_to_rename_the_old_file___d_:__s
push 0x146
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x1c
lea ecx, [ebp - 0x438]
call fcn.00424580
mov byte [ebp - 0x4f1], 0
jmp 0x506f54
lea ecx, [ebp - 0x438]
mov byte [ebp - 4], 4
call fcn.00424580
mov eax, dword [edi + 0x18]
cmp dword [eax + 0x14], 8
jb 0x506d45
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4fc], eax
cmp eax, 0xffffffff
jne 0x506df6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x508]
mov edi, eax
push edi
push 5
push dword [ecx + 8]
mov ecx, dword [ecx + 4]
call fcn.00505d10
push edi
push str.CreateFile_failed___d_
push 0x159
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x18
mov byte [ebp - 0x4f1], 0
jmp 0x506f54
cmp dword [ecx + 0x14], 8
jb 0x506dbc
mov ecx, dword [ecx]
push ecx
push str.File_already_exists:__s
push 0x14e
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 3
call fcn.00500e60
mov ecx, dword [edi + 4]
add esp, 0x18
push 0
push 1
push dword [edi + 8]
call fcn.00505d10
mov byte [ebp - 0x4f1], 1
jmp 0x506f54
lea ecx, [ebp - 0x4b4]
call fcn.0051dd20
lea eax, [ebp - 0x414]
mov byte [ebp - 4], 6
push eax
push dword [ebp - 0x50c]
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x414], 0
push esi
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x4f8], 0
call fcn.0051ee10
test al, al
je 0x506eca
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x506eca
push 0
lea ecx, [ebp - 0x440]
push ecx
push eax
push esi
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x506f96
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x4f8]
push eax
add ecx, eax
push ecx
push dword [ebp - 0x43c]
mov dword [ebp - 0x4f8], ecx
push dword [edi + 0xc]
mov ecx, dword [edi + 4]
push dword [edi + 8]
call fcn.00505c80
push dword [ebp - 0x414]
lea ecx, [ebp - 0x4b4]
push esi
call fcn.0051e950
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x50c]
lea ecx, [ebp - 0x420]
push esi
call fcn.0051ee10
test al, al
jne 0x506e44
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x504]
push eax
lea ecx, [ebp - 0x4b4]
call fcn.0051dd70
push dword [eax]
mov ecx, dword [edi + 0x24]
mov byte [ebp - 4], 7
call fcn.00424550
mov ecx, dword [ebp - 0x504]
or eax, 0xffffffff
mov byte [ebp - 4], 6
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x506f34
mov eax, dword [ecx]
mov dword [ebp - 0x4f8], eax
push ecx
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x5a0478]
mov ecx, dword [ebp - 0x4f8]
call edi
mov edi, dword [ebp - 0x508]
mov ecx, dword [edi + 4]
push 0
push 0
push dword [edi + 8]
call fcn.00505d10
mov byte [ebp - 0x4f1], 1
mov dword [ebp - method.XMLUpdater::v2::CMD5Checksum.virtual_0], vtable.XMLUpdater::v2::CMD5Checksum.0
lea ecx, [ebp - 0x458]
call fcn.00424580
push esi
call fcn.0055e84d
add esp, 4
lea ecx, [ebp - 0x420]
call fcn.0051ea20
mov al, byte [ebp - 0x4f1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00553d2a
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x508]
mov edi, eax
push edi
push 6
push dword [ecx + 8]
mov ecx, dword [ecx + 4]
call fcn.00505d10
push edi
push str.WriteFile_failed___d_
push 0x167
push str.XMLUpdater::v2::NHttp::NDownloadFile::StoreOnDisk::_lambda_c33c743214c1ffa292a71f271a4eb81e_::operator___
push str.E:BT71e4c9fa_1978_4386_a3da_49ea31fa22b7WebAdvisor_XmlUpdater_srcXmlUpdaterHttpsDownloadFile.cpp
push 1
call fcn.00500e60
add esp, 0x18
push dword [ebp - 0x4fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x4f1], 0
jmp 0x506f4a
call fcn.004213b0
call fcn.0055eb97
int3