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

Disassembly:
sub esp, 0x848
mov eax, dword [0x45c680]
xor eax, esp
mov dword [esp + 0x844], eax
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push 0x206
lea ecx, [esp + 0x4e]
xor eax, eax
push ebp
mov dword [esp + 0x24], esi
push ecx
add esi, 0xd4
mov ebx, 0x50
mov dword [esp + 0x24], ebp
mov word [esp + 0x54], ax
call fcn.004329f0
push 0x3fe
lea eax, [esp + 0x462]
xor edx, edx
push ebp
push eax
mov word [esp + 0x468], dx
call fcn.004329f0
push str.5054399.com
push esi
call fcn.004322bb
add esp, 0x20
cmp eax, ebp
jne 0x40a962
push str.4399.com
push esi
call fcn.004322bb
add esp, 8
cmp eax, ebp
jne 0x40a962
push str.4399pk.com
push esi
call fcn.004322bb
add esp, 8
cmp eax, ebp
jne 0x40a962
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x844]
xor ecx, esp
call fcn.00430f92
add esp, 0x848
ret
push edi
add esi, 0xe
push 0x2f
push esi
call fcn.00431f16
mov edi, eax
add esp, 8
cmp edi, ebp
je 0x40a999
mov ecx, edi
sub ecx, esi
sar ecx, 1
inc ecx
push ecx
push esi
lea edx, [esp + 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 2
push edi
lea eax, [esp + 0x458]
push eax
jmp 0x40a99f
push esi
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [esp + 0x4c]
push 0x3a
push edx
call fcn.00431f16
add esp, 8
cmp eax, ebp
je 0x40a9cc
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00431f91
add esp, 4
movzx ebx, ax
push ebp
push ebp
push ebp
push ebp
push 0x44f864
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, ebp
je 0x40ac00
push ebp
push ebp
push 3
push ebp
push ebp
push ebx
lea edx, [esp + 0x64]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [esp + 0x24], ebx
cmp ebx, ebp
je 0x40abf9
push ebp
push SysReAllocString
push ebp
push ebp
push str.HTTP_1.1
lea eax, [esp + 0x468]
push eax
push 0x44f880
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
cmp edi, ebp
je 0x40abf2
mov eax, 0x44f788
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40aa40
push ebp
sub eax, edx
push ebp
sar eax, 1
push eax
push 0x44f788
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x40abe7
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebp
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x13
push edi
mov byte [esp + 0x40], 0
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov word [esp + 0x5d], ax
mov byte [esp + 0x5f], al
mov dword [esp + 0x24], 0x20
call esi
test eax, eax
je 0x40abe7
lea eax, [esp + 0x2c]
push eax
call fcn.00431f91
add esp, 4
cmp eax, 0x194
je 0x40abe7
push ebp
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x20000005
push edi
call esi
test eax, eax
je 0x40abe7
cmp dword [esp + 0x10], 4
jne 0x40abe7
mov eax, dword [esp + 0x2c]
push 0x1ff
lea ecx, [esp + 0x259]
push ebp
push ecx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x260], 0
call fcn.004329f0
mov edx, dword [esp + 0x2c]
push 0x44f888
add edx, 0x4d4
push edx
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x2c], ebp
xor esi, esi
mov dword [esp + 0x30], ebp
call fcn.004323e2
add esp, 0x18
cmp dword [esp + 0x18], ebp
je 0x40abe7
mov ebp, dword [sym.imp.WININET.dll_InternetSetFilePointer]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x14]
push ecx
push 0x200
lea edx, [esp + 0x25c]
push edx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40abc8
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push 1
push ecx
lea edx, [esp + 0x260]
push edx
call fcn.00432597
add esi, dword [esp + 0x24]
xor edx, edx
mov eax, esi
imul eax, eax, 0x64
div dword [esp + 0x20]
add esp, 0x10
push 0
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x94]
push 0x402
push ecx
call ebx
push 0
push 0
push 0
push esi
push edi
call ebp
test eax, eax
je 0x40abc8
cmp dword [esp + 0x14], 0
jne 0x40ab56
mov edx, dword [esp + 0x18]
push edx
call fcn.00432690
mov ebx, dword [esp + 0x28]
add esp, 4
cmp dword [esp + 0x10], esi
ja 0x40abe7
mov dword [esp + 0x1c], 1
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esp + 0x28]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [esp + 0x854]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00430f92
add esp, 0x848
ret