Function at 0x404340
Capabilities:
Check http status code
Check if file exists
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x543874
mov eax, dword fs:[0]
push eax
mov eax, 0x13b54
call fcn.00525f50
mov eax, dword [0x5acd88]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x13b5c], ebx
mov dword [ebp - 0x13b60], 0x400
mov dword [ebp - 0x13b44], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x13b48], 0
push 0x1c
mov byte [ebp - 4], 1
call fcn.00414c57
add esp, 4
mov dword [ebp - 0x13b54], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4043c8
mov ecx, eax
call fcn.00413380
jmp 0x4043ca
xor eax, eax
mov dword [0x5ae8ac], eax
push 0x10000000
lea eax, [ebp - 0x13b60]
push eax
lea eax, [ebp - 0x1338]
push eax
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
push esi
push 0x55539c
lea eax, [ebp - 0xb38]
push 0x400
push eax
call fcn.00525204
push esi
push 0x55539c
lea eax, [ebp - 0x1338]
push 0x400
push eax
call fcn.00525204
push 0x104
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0xb38]
push eax
call fcn.00405010
lea eax, [ebp - 0x1338]
push eax
push 0x5571d4
push str.__s__pBuffer___s
call fcn.0040bef0
lea eax, [ebp - 0x520]
push eax
push 0x5571d4
push str.__s__szFileName___s
call fcn.0040bef0
add esp, 0x44
lea eax, [ebp - 0x930]
push 1
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push ebx
lea eax, [ebp - 0x728]
push 0x104
push eax
call fcn.00525204
lea eax, [ebp - 0x728]
push 0x55514c
push eax
call fcn.00525079
add esp, 0x14
test eax, eax
lea eax, [ebp - 0x520]
push eax
push 0x5ae488
jne 0x4044b9
lea eax, [ebp - 0x930]
push eax
push str._sCyberLinkCLToast_s__s
jmp 0x4044c5
lea eax, [ebp - 0x728]
push eax
push str._s_s__s
lea eax, [ebp - 0x318]
push 0x104
push eax
call fcn.00525204
add esp, 0x18
push 0x55514c
push 0x104
push ebx
call fcn.00525204
add esp, 0xc
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40450a
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x1338]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404513
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x1338]
push eax
lea ecx, [ebp - 0x13b44]
call fcn.00403180
mov edi, dword [ebp - 0x13b44]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jns 0x404562
call ebx
push eax
lea eax, [ebp - 0x1338]
push eax
push edi
push str.DownloadIconAndBanner
push str.__S____s__append___s__failed__errCode:__d.
call fcn.0040bef0
add esp, 0x14
lea ecx, [ebp - 0x318]
lea edx, [ecx + 2]
jmp 0x404570
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404570
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x318]
push eax
lea ecx, [ebp - 0x13b48]
call fcn.00403180
mov esi, dword [ebp - 0x13b48]
test eax, eax
jns 0x4045b9
call ebx
push eax
lea eax, [ebp - 0x318]
push eax
push esi
push str.DownloadIconAndBanner
push str.__S____s__append___s__failed__errCode:__d.
call fcn.0040bef0
add esp, 0x14
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x1b38], ax
lea eax, [ebp - 0x1b36]
push eax
call fcn.005265d0
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x3338], ax
lea eax, [ebp - 0x3336]
push eax
call fcn.005265d0
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x3b38], ax
lea eax, [ebp - 0x3b36]
push eax
call fcn.005265d0
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x2b38], ax
lea eax, [ebp - 0x2b36]
push eax
call fcn.005265d0
push 0x5571d4
push str.__s__m_pNetworkMgr__CrackUrl_...
mov dword [ebp - 0x13b4c], 0
mov dword [ebp - 0x13b50], 0
call fcn.0040bef0
add esp, 0x38
mov ecx, dword [0x5ae8ac]
push 0x400
lea eax, [ebp - 0x3338]
push eax
lea eax, [ebp - 0x13b50]
push eax
push 0x400
lea eax, [ebp - 0x1b38]
push eax
push 0x400
lea eax, [ebp - 0x2b38]
push eax
push 0x400
lea eax, [ebp - 0x3b38]
push eax
lea eax, [ebp - 0x13b4c]
push eax
push edi
call fcn.00413700
test eax, eax
jne 0x4046ad
push str._CDownload::DownloadProc__m_pNetworkMgr__CrackUrl_failed
call fcn.0040bef0
add esp, 4
xor ebx, ebx
jmp 0x404acb
push str._CDownload::DownloadProc__m_pNetworkMgr__Open_...
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 4
push 0
push 0
push 0
push 0
call fcn.00413db0
mov dword [0x5ae8a0], eax
test eax, eax
jne 0x4046ea
push str._CDownload::DownloadProc__m_pNetworkMgr__Open_failed
call fcn.0040bef0
add esp, 4
xor ebx, ebx
jmp 0x404acb
push str._CDownload::DownloadProc__m_pNetworkMgr__Connect_...
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 4
lea eax, [ebp - 0x2b38]
push 0
push 0
push 3
push eax
lea eax, [ebp - 0x3b38]
push eax
push dword [ebp - 0x13b50]
lea eax, [ebp - 0x1b38]
push eax
push dword [0x5ae8a0]
call fcn.00413660
mov dword [0x5ae8a4], eax
test eax, eax
jne 0x404746
push str._CDownload::DownloadProc__m_pNetworkMgr__Connect_failed
call fcn.0040bef0
add esp, 4
xor ebx, ebx
jmp 0x404acb
xor eax, eax
push 0xfe
push eax
mov word [ebp - 0x110], ax
lea eax, [ebp - 0x10e]
push eax
call fcn.005265d0
push 0x557588
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.00524c94
xor ebx, ebx
cmp dword [ebp - 0x13b4c], 4
mov eax, 0x800000
cmove ebx, eax
push str._CDownload::DownloadProc__m_pNetworkMgr__OpenRequest_...
or ebx, 0x400000
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 0x1c
lea eax, [ebp - 0x3338]
push 0
push ebx
push 0
push 0
push str.HTTP_1.1
push eax
lea eax, [ebp - 0x110]
push eax
push dword [0x5ae8a4]
call fcn.00413ea0
mov dword [0x5ae8a8], eax
test eax, eax
jne 0x4047e3
push str._CDownload::DownloadProc__m_pNetworkMgr__OpenRequest_failed
call fcn.0040bef0
add esp, 4
xor ebx, ebx
jmp 0x404acb
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x2338], ax
lea eax, [ebp - 0x2336]
push eax
call fcn.005265d0
lea eax, [ebp - 0x1b38]
push eax
push str.Host:__s_r_n
lea eax, [ebp - 0x2338]
push 0x400
push eax
call fcn.00525204
push str._CDownload::DownloadProc__m_pNetworkMgr__AddRequestHeaders_...
call fcn.0040bef0
lea ecx, [ebp - 0x2338]
add esp, 0x20
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404831
sub ecx, edx
push 0x20000000
sar ecx, 1
push ecx
mov ecx, dword [0x5ae8ac]
lea eax, [ebp - 0x2338]
push eax
push dword [0x5ae8a8]
call fcn.00413650
test eax, eax
jne 0x40487e
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push str._CDownload::DownloadProc__m_pNetworkMgr__AddRequestHeaders_failed__errCode___d
call fcn.0040bef0
add esp, 8
xor ebx, ebx
jmp 0x404acb
push str._CDownload::DownloadProc__m_pNetworkMgr__SendRequest_...
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 4
push 0
push 0
push 0
push 0
push dword [0x5ae8a8]
call fcn.00413fb0
test eax, eax
je 0x404a95
push str._CDownload::DownloadProc__m_pNetworkMgr__QueryInfo_...
mov dword [ebp - 0x13b58], 0
mov dword [ebp - 0x13b54], 4
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 4
lea eax, [ebp - 0x13b54]
push 0
push eax
lea eax, [ebp - 0x13b58]
push eax
push 0x20000013
push dword [0x5ae8a8]
call fcn.00413f50
test eax, eax
jne 0x404913
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push str._CDownload::DownloadProc__m_pNetworkMgr__QueryInfo_failed__errCode___d
call fcn.0040bef0
add esp, 8
xor ebx, ebx
jmp 0x404acb
mov eax, dword [ebp - 0x13b58]
cmp eax, 0xc8
jne 0x404a85
call fcn.00405220
push esi
call fcn.004050f0
push esi
push str._CDownload::DownloadProc__write__s
mov ebx, eax
call fcn.0040bef0
push 0x557988
lea eax, [ebp - 0x13b3c]
push esi
push eax
mov dword [ebp - 0x13b3c], 0
call fcn.00525220
mov eax, dword [ebp - 0x13b3c]
add esp, 0x18
test eax, eax
jne 0x404982
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push esi
push str._CDownload::DownloadProc___wfopen__s_failed__errCode___d
call fcn.0040bef0
add esp, 0xc
xor ebx, ebx
jmp 0x404acb
push 2
push 0
push eax
call fcn.00525887
mov ecx, dword [0x5ae8ac]
add esp, 0xc
push 0
push 0
push 0
push ebx
push dword [0x5ae8a8]
call fcn.00414040
push esi
push str._CDownload::DownloadProc__write__s
mov ebx, eax
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 8
lea eax, [ebp - 0x13b40]
push eax
push 0x10000
lea eax, [ebp - 0x13b38]
push eax
push dword [0x5ae8a8]
mov dword [ebp - 0x13b40], 0
call fcn.00413f60
test eax, eax
je 0x404a78
lea ecx, [ecx]
mov eax, dword [ebp - 0x13b40]
test eax, eax
je 0x404a54
push dword [ebp - 0x13b3c]
add ebx, eax
push eax
lea eax, [ebp - 0x13b38]
push 1
push eax
call fcn.00525a5d
push ebx
push str._CDownload::DownloadProc___d_bytes
call fcn.0040bef0
mov ecx, dword [0x5ae8ac]
add esp, 0x18
lea eax, [ebp - 0x13b40]
push eax
push 0x10000
lea eax, [ebp - 0x13b38]
push eax
push dword [0x5ae8a8]
call fcn.00413f60
test eax, eax
jne 0x4049f0
push dword [ebp - 0x13b3c]
call fcn.00525781
jmp 0x404ac3
push esi
push str._CDownload::DownloadProc__write__s_complete
call fcn.0040bef0
push esi
push 0x55539c
push 0x104
push dword [ebp - 0x13b5c]
call fcn.00525204
add esp, 0x18
push dword [ebp - 0x13b3c]
call fcn.00525781
jmp 0x404ac3
push eax
push str._CDownload::DownloadProc__unexpected_ulStatusCode___d
call fcn.0040bef0
add esp, 8
jmp 0x404aa2
push str._CDownload::DownloadProc__m_pNetworkMgr__SendRequest_failed
call fcn.0040bef0
add esp, 4
mov ebx, dword [0x5ae8ac]
test ebx, ebx
je 0x404ac6
mov ecx, ebx
call fcn.00413480
push ebx
call fcn.00414c8d
mov dword [0x5ae8ac], 0
add esp, 4
mov ebx, 1
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push edi
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525af7
mov esp, ebp
pop ebp
ret