Function at 0x4139fb
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Move file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push 0x34
mov eax, 0x4b148a
call fcn.0048bc6e
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x1c]
push eax
call fcn.0040e2d6
mov byte [ebp - 4], 1
mov dword [esp], 0x4c3f08
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00403e3d
add esp, 0xc
mov byte [ebp - 4], 2
mov dword [ebp - 0x18], ebx
mov edx, dword [ebp - 0x1c]
call fcn.00425830
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov ecx, eax
and ecx, edx
cmp ecx, 0xffffffff
je 0x413a51
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x11], bl
push ebx
push ebx
push ebx
push ebx
push 0x4c2cb8
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 3
cmp eax, ebx
je 0x413c09
push ebx
push ebx
push 3
push ebx
push ebx
push ebx
push str.asrupdates.com
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 4
cmp eax, ebx
je 0x413bea
push ebx
push 0x8400f200
push ebx
push ebx
push ebx
push str._db5_1.dat
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov dword [ebp - 0x24], edi
mov byte [ebp - 4], 5
cmp edi, ebx
je 0x413bd8
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x413bd8
mov dword [ebp - 0x2c], edi
push 0x13
lea esi, [ebp - 0x2c]
call fcn.0040dbc6
pop ecx
cmp eax, 0xc8
jne 0x413bd8
mov dword [ebp - 0x3c], edi
push 5
lea esi, [ebp - 0x3c]
call fcn.0040dbc6
pop ecx
mov dword [ebp - 0x3c], eax
cmp eax, ebx
jle 0x413bd8
cmp eax, dword [ebp - 0x18]
je 0x413bd8
mov dword [ebp - 0x20], ebx
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x40], esi
mov byte [ebp - 4], 6
cmp eax, 0xffffffff
je 0x413b98
mov dword [ebp - 0x18], ebx
mov edi, 0x10000
lea ebx, [ebp - 0x2c]
call fcn.00404101
mov byte [ebp - 4], 7
mov edi, dword [ebp - 0x2c]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
lea edx, [ebp - 0x18]
push edx
push eax
push ecx
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x413b83
cmp dword [ebp - 0x18], 0
je 0x413b83
mov eax, dword [edi]
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413b83
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x20], eax
jmp 0x413b46
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 4], 6
lea ebx, [ebp - 0x2c]
call fcn.00404146
xor ebx, ebx
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x20], eax
jne 0x413bc8
cmp esi, 0xffffffff
je 0x413bac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov dword [ebp - 0x40], esi
push 1
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x413bc8
mov byte [ebp - 0x11], 1
mov byte [ebp - 4], 5
cmp esi, 0xffffffff
je 0x413bd8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 4
cmp dword [ebp - 0x24], ebx
je 0x413bea
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 3
cmp dword [ebp - 0x30], ebx
je 0x413bfc
push dword [ebp - 0x30]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp byte [ebp - 0x11], bl
je 0x413c09
mov esi, dword [ebp + 8]
call fcn.004146ba
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], ebx
je 0x413c1b
push dword [ebp - 0x34]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00403910
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call fcn.00403910
or dword [ebp - 4], 0xffffffff
call fcn.0048bd13
ret 4