Function at 0x404cd0
Capabilities:
Check http status code
Check if file exists
Delete file
Initialize winhttp library
Move file
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd1c
mov eax, dword [0x4a4300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0xd00], 0
push 0xc6
push eax
mov word [ebp - 0x138], ax
xor ebx, ebx
lea eax, [ebp - 0x136]
mov dword [ebp - 0xcf8], 4
push eax
mov esi, ecx
mov dword [ebp - 0xcf4], 0
mov dword [ebp - 0xcfc], ebx
mov dword [ebp - 0xd04], ebx
mov dword [ebp - 0xd0c], ebx
call fcn.00452270
add esp, 0xc
xor eax, eax
mov word [ebp - 0xcf0], ax
push 0x4ae
push eax
lea eax, [ebp - 0xcee]
push eax
call fcn.00452270
add esp, 0xc
mov dword [ebp - 0xd18], ebx
lea eax, [ebp - 0x38f]
mov dword [ebp - 0xd14], ebx
mov dword [ebp - 0xd10], ebx
mov byte [ebp - 0x390], bl
push 0x257
push ebx
push eax
call fcn.00452270
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 2]
jmp 0x404d90
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404d90
sub ecx, edx
sar ecx, 1
je 0x4052c8
push 0x482a2c
push esi
call fcn.00453376
add esp, 8
test eax, eax
je 0x4052c8
lea edx, [eax + 4]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404dc0
lea edi, [ebp - 0x138]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404dd6
mov ecx, edx
lea eax, [ebp - 0x138]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x482a34
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00453376
add esp, 8
test eax, eax
je 0x4052c8
xor ecx, ecx
lea edx, [eax + 2]
mov word [eax], cx
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404e16
lea edi, [ebp - 0xcf0]
sub edx, esi
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404e30
mov ecx, edx
lea eax, [ebp - 0x138]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x482a38
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00453376
add esp, 8
test eax, eax
je 0x404e77
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00454849
add esp, 4
mov esi, eax
jmp 0x404e7c
mov esi, 0x50
push 0
push 0
push 0
push 0
push 0x482a3c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 0xd08], eax
test eax, eax
je 0x4051bb
push 0x7530
push 0x7530
push 0x1770
push 0x7530
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x404fa9
push 0
push esi
lea eax, [ebp - 0x138]
push eax
push dword [ebp - 0xd08]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0xd18], eax
test eax, eax
je 0x404fa9
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0xcf0]
push ecx
push 0x482a54
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0xd14], esi
test esi, esi
je 0x404fa9
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x404fa9
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x404fa9
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
lea eax, [ebp - 0xcf8]
push 0
push eax
lea eax, [ebp - 0xd00]
push eax
push 0
push 0x20000013
push esi
call edi
test eax, eax
je 0x404fa9
cmp dword [ebp - 0xd00], 0xc8
jne 0x404fa9
push 0
lea eax, [ebp - 0xcf8]
mov dword [ebp - 0xcf8], 4
push eax
lea eax, [ebp - 0xcf4]
push eax
push 0
push 0x20000005
push esi
call edi
test eax, eax
je 0x404fa9
mov eax, dword [ebp - 0xcf4]
test eax, eax
jne 0x405011
mov dword [ebp - 0xd0c], 1
xor edi, edi
push dword [ebp - 0xd08]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
mov eax, dword [ebp - 0xd14]
test eax, eax
je 0x404fc6
push eax
call esi
mov eax, dword [ebp - 0xd18]
test eax, eax
je 0x404fd3
push eax
call esi
test edi, edi
je 0x404fe0
push edi
call fcn.00453c4d
add esp, 4
mov ebx, dword [ebp - 0xd10]
test ebx, ebx
je 0x404ff8
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0xd0c]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test esi, esi
jne 0x4051c6
jmp 0x4051bd
add eax, 0xffff0000
cmp eax, 0x7fff0000
ja 0x404fa9
push 0x258
lea eax, [ebp - 0x390]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x390]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405038
mov eax, dword [str..tmp]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ecx], eax
mov al, byte [0x482a60]
mov byte [ecx + 4], al
lea eax, [ebp - 0x390]
push eax
call edi
cmp eax, 1
jne 0x405072
lea eax, [ebp - 0x390]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x390]
push eax
call edi
cmp eax, 1
je 0x404fa9
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x390]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xd10], eax
cmp eax, 0xffffffff
je 0x404fa9
push 0x2000
call fcn.00452a93
mov edi, eax
add esp, 4
test edi, edi
je 0x404fab
cmp dword [ebp - 0xcf4], ebx
je 0x405195
jmp 0x4050e0
lea eax, [ebp - 0xcfc]
push eax
push 0x2000
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40518d
push 0
lea eax, [ebp - 0xd04]
push eax
push dword [ebp - 0xcfc]
push edi
push dword [ebp - 0xd10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40518d
add ebx, dword [ebp - 0xcfc]
mov ecx, dword [0x4ab490]
test ecx, ecx
je 0x40517f
movd xmm1, ebx
mov eax, ebx
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x4837c0]
mov eax, dword [ebp - 0xcf4]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4837c0]
divsd xmm1, xmm0
mulsd xmm1, qword [0x4837b8]
cvttsd2si eax, xmm1
push eax
push 0x482558
call ecx
call eax
mov ecx, dword [0x4ab490]
add esp, 4
cmp ebx, dword [ebp - 0xcf4]
jne 0x4050e0
jmp 0x40519b
mov ecx, dword [0x4ab490]
jmp 0x4051a5
mov ecx, dword [0x4ab490]
mov dword [ebp - 0xd0c], 1
test ecx, ecx
je 0x404fab
push str._STS_DUILIB_CloseUpdateWnd
call ecx
call eax
jmp 0x404fab
xor esi, esi
lea eax, [ebp - 0x390]
push eax
call edi
lea eax, [ebp - 0x390]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4051ea
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00451570
mov esp, ebp
pop ebp
ret
push 0x63
lea eax, [ebp - 0x6f]
mov byte [ebp - 0x70], 0
push 0
push eax
call fcn.00452270
add esp, 0xc
lea edx, [ebp - 0x70]
lea ecx, [ebp - 0x390]
call fcn.004024e0
test eax, eax
je 0x4052c8
lea ecx, [ebp - 0x70]
call fcn.0040dc50
push 0x257
lea eax, [ebp - 0x83f]
mov byte [ebp - 0x840], 0
push 0
push eax
call fcn.00452270
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x840]
add esp, 0xc
push 0x258
push eax
push 0
call ebx
push 0x257
lea eax, [ebp - 0x5e7]
mov byte [ebp - 0x5e8], 0
push 0
push eax
call fcn.00452270
add esp, 0xc
lea eax, [ebp - 0x5e8]
push 0x258
push eax
push 0
call ebx
lea ecx, [ebp - 0x5e8]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405283
mov eax, dword [str..del]
mov dword [ecx], eax
mov al, byte [0x482a68]
mov byte [ecx + 4], al
lea eax, [ebp - 0x5e8]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x5e8]
push eax
lea eax, [ebp - 0x840]
push eax
call esi
test eax, eax
jne 0x4052db
lea eax, [ebp - 0x390]
push eax
call edi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00451570
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x390]
push eax
call esi
test eax, eax
je 0x4052bf
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x5e8]
call fcn.00402fc0
add esp, 4
call fcn.00401440
int3