Function at 0x4049a0
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
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd1c
mov eax, dword [0x4a2300]
xor eax, esp
mov dword [esp + 0xd18], eax
push ebx
push esi
push edi
xor eax, eax
mov dword [esp + 0x30], 0
push 0xc6
push eax
mov word [esp + 0xa8], ax
xor ebx, ebx
lea eax, [esp + 0xaa]
mov dword [esp + 0x30], 4
push eax
mov esi, ecx
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x24], ebx
call fcn.00451650
add esp, 0xc
xor eax, eax
mov word [esp + 0x870], ax
push 0x4ae
push eax
lea eax, [esp + 0x87a]
push eax
call fcn.00451650
add esp, 0xc
mov dword [esp + 0x20], ebx
lea eax, [esp + 0x169]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ebx
mov byte [esp + 0x168], bl
push 0x257
push ebx
push eax
call fcn.00451650
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404a53
sub ecx, edx
sar ecx, 1
je 0x404f79
push 0x4809ec
push esi
call fcn.00452756
add esp, 8
test eax, eax
je 0x404f79
lea edx, [eax + 4]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404a83
lea edi, [esp + 0xa0]
sub edx, esi
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404aa0
mov ecx, edx
lea eax, [esp + 0xa0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x4809f4
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00452756
add esp, 8
test eax, eax
je 0x404f79
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 0x404ae1
lea edi, [esp + 0x870]
sub edx, esi
add edi, 0xfffffffe
jmp 0x404b00
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404b00
mov ecx, edx
lea eax, [esp + 0xa0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x4809f8
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.00452756
add esp, 8
test eax, eax
je 0x404b48
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00453ba4
add esp, 4
mov esi, eax
jmp 0x404b4d
mov esi, 0x50
push 0
push 0
push 0
push 0
push 0x4809fc
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x404e4f
push 0x7530
push 0x7530
push 0x1770
push 0x7530
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x404c60
push 0
push esi
lea eax, [esp + 0xa8]
push eax
push dword [esp + 0x20]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [esp + 0x20], eax
test eax, eax
je 0x404c60
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x880]
push ecx
push 0x480a14
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
je 0x404c60
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 0x404c60
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x404c60
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
lea eax, [esp + 0x28]
push 0
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x20000013
push esi
call edi
test eax, eax
je 0x404c60
cmp dword [esp + 0x30], 0xc8
jne 0x404c60
push 0
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 4
push eax
lea eax, [esp + 0x2c]
push eax
push 0
push 0x20000005
push esi
call edi
test eax, eax
je 0x404c60
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x404cbe
mov dword [esp + 0x18], 1
xor edi, edi
push dword [esp + 0x14]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404c79
push eax
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404c84
push eax
call esi
test edi, edi
je 0x404c91
push edi
call fcn.0045302d
add esp, 4
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x404ca7
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test esi, esi
jne 0x404e5b
jmp 0x404e51
add eax, 0xffff0000
cmp eax, 0x7fff0000
ja 0x404c60
push 0x258
lea eax, [esp + 0x16c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x168]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404ce7
mov eax, dword [str..tmp]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ecx], eax
mov al, byte [0x480a20]
mov byte [ecx + 4], al
lea eax, [esp + 0x168]
push eax
call edi
cmp eax, 1
jne 0x404d23
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x168]
push eax
call edi
cmp eax, 1
je 0x404c60
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x404c60
push 0x2000
call fcn.00451e73
mov edi, eax
add esp, 4
test edi, edi
je 0x404c62
cmp dword [esp + 0x24], ebx
je 0x404e2b
lea eax, [esp + 0x2c]
push eax
push 0x2000
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x404e23
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x34]
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404e23
add ebx, dword [esp + 0x2c]
mov ecx, dword [0x4a6ae8]
test ecx, ecx
je 0x404e17
movd xmm1, ebx
mov eax, ebx
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x4815c0]
mov eax, dword [esp + 0x24]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4815c0]
divsd xmm1, xmm0
mulsd xmm1, qword [0x4815b8]
cvttsd2si eax, xmm1
push eax
push 0x480548
call ecx
call eax
mov ecx, dword [0x4a6ae8]
add esp, 4
cmp ebx, dword [esp + 0x24]
jne 0x404d84
jmp 0x404e31
mov ecx, dword [0x4a6ae8]
jmp 0x404e39
mov ecx, dword [0x4a6ae8]
mov dword [esp + 0x18], 1
test ecx, ecx
je 0x404c62
push str._STS_DUILIB_CloseUpdateWnd
call ecx
call eax
jmp 0x404c62
xor esi, esi
lea eax, [esp + 0x168]
push eax
call edi
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404e84
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd18]
xor ecx, esp
call fcn.0045094b
mov esp, ebp
pop ebp
ret
push 0x63
lea eax, [esp + 0x3d]
mov byte [esp + 0x3c], 0
push 0
push eax
call fcn.00451650
add esp, 0xc
lea edx, [esp + 0x38]
lea ecx, [esp + 0x168]
call fcn.00402460
test eax, eax
je 0x404f79
lea ecx, [esp + 0x38]
call fcn.0040c850
push 0x257
lea eax, [esp + 0x61d]
mov byte [esp + 0x61c], 0
push 0
push eax
call fcn.00451650
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x624]
add esp, 0xc
push 0x258
push eax
push 0
call ebx
push 0x257
lea eax, [esp + 0x3c5]
mov byte [esp + 0x3c4], 0
push 0
push eax
call fcn.00451650
add esp, 0xc
lea eax, [esp + 0x3c0]
push 0x258
push eax
push 0
call ebx
lea ecx, [esp + 0x3c0]
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404f30
mov eax, dword [str..del]
mov dword [ecx], eax
mov al, byte [0x480a28]
mov byte [ecx + 4], al
lea eax, [esp + 0x3c0]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [esp + 0x3c0]
push eax
lea eax, [esp + 0x61c]
push eax
call esi
test eax, eax
jne 0x404f90
lea eax, [esp + 0x168]
push eax
call edi
mov ecx, dword [esp + 0xd24]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045094b
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x618]
push eax
lea eax, [esp + 0x16c]
push eax
call esi
test eax, eax
je 0x404f6f
lea eax, [esp + 0x618]
push eax
lea ecx, [esp + 0x3c4]
call fcn.00402de0
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]