Function at 0x4168f0
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, 0x850
mov eax, dword [0x47c944]
xor eax, esp
mov dword [esp + 0x84c], eax
mov eax, dword [esp + 0x854]
push ebx
push ebp
push esi
xor ebx, ebx
push 0x206
mov esi, ecx
lea edx, [esp + 0x56]
xor ecx, ecx
push ebx
push edx
mov dword [esp + 0x30], eax
mov ebp, 0x50
mov dword [esp + 0x2c], ebx
mov word [esp + 0x5c], cx
call fcn.00447b40
push 0x3fe
lea ecx, [esp + 0x46a]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x470], ax
call fcn.00447b40
push str.5054399.com
push esi
call fcn.00445446
add esp, 0x20
cmp eax, ebx
jne 0x416990
push str.4399.com
push esi
call fcn.00445446
add esp, 8
cmp eax, ebx
jne 0x416990
push str.4399pk.com
push esi
call fcn.00445446
add esp, 8
cmp eax, ebx
jne 0x416990
xor eax, eax
jmp 0x416ca5
push edi
add esi, 0xe
push 0x2f
push esi
call fcn.004460f0
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x4169c7
mov edx, edi
sub edx, esi
sar edx, 1
inc edx
push edx
push esi
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 2
push edi
lea ecx, [esp + 0x460]
push ecx
jmp 0x4169cd
push esi
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x54]
push 0x3a
push eax
call fcn.004460f0
add esp, 8
cmp eax, ebx
je 0x4169fa
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00445d12
add esp, 4
movzx ebp, ax
push ebx
push ebx
push ebx
push ebx
push 0x46ac44
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, ebx
je 0x416ca0
push ebx
push ebx
push 3
push ebx
push ebx
push ebp
lea edx, [esp + 0x6c]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebp, eax
mov dword [esp + 0x30], ebp
cmp ebp, ebx
je 0x416c99
push ebx
push SysReAllocStringLen
push ebx
push ebx
push str.HTTP_1.1
lea eax, [esp + 0x470]
push eax
push 0x46ac60
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
cmp edi, ebx
je 0x416c92
mov eax, str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
lea edx, [eax + 2]
jmp 0x416a70
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x416a70
push ebx
sub eax, edx
push ebx
sar eax, 1
push eax
push str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x416c83
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0x13
push edi
mov byte [esp + 0x48], bl
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 dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov word [esp + 0x65], ax
mov byte [esp + 0x67], al
mov dword [esp + 0x24], 0x20
call esi
test eax, eax
je 0x416c83
lea eax, [esp + 0x34]
push eax
call fcn.00445d12
add esp, 4
cmp eax, 0x194
je 0x416c83
push ebx
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0x20000005
push edi
call esi
test eax, eax
je 0x416c83
cmp dword [esp + 0x10], 4
jne 0x416c83
mov eax, dword [esp + 0x34]
push 0x1ff
lea ecx, [esp + 0x261]
push ebx
push ecx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x268], bl
call fcn.00447b40
add esp, 0xc
mov dword [esp + 0x18], ebx
xor esi, esi
mov dword [esp + 0x14], ebx
call fcn.00419da5
cmp eax, ebx
jne 0x416b67
push 0x80004005
call fcn.004045a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
call fcn.00419da5
cmp eax, ebx
jne 0x416b8a
push 0x80004005
call fcn.004045a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [esp + 0x28]
push 0x46ac88
mov ebp, eax
push ecx
lea edx, [esp + 0x1c]
add ebp, 0x10
push edx
mov dword [esp + 0x2c], ebp
call fcn.004461dc
add esp, 0xc
cmp dword [esp + 0x14], ebx
jne 0x416bd0
lea ecx, [esp + 0x20]
call fcn.00403ec0
lea ecx, [esp + 0x1c]
call fcn.00403ec0
jmp 0x416c83
mov ebx, dword [sym.imp.WININET.dll_InternetSetFilePointer]
lea eax, [esp + 0x18]
push eax
push 0x200
lea ecx, [esp + 0x264]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x416c28
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push edx
push 1
push eax
lea ecx, [esp + 0x268]
push ecx
call fcn.00446391
add esi, dword [esp + 0x28]
add esp, 0x10
push 0
push 0
push 0
push esi
push edi
call ebx
test eax, eax
je 0x416c28
cmp dword [esp + 0x18], 0
jne 0x416bd6
mov edx, dword [esp + 0x14]
push edx
call fcn.0044648a
add esp, 4
cmp dword [esp + 0x10], esi
ja 0x416bb9
lea eax, [ebp - 0x10]
mov dword [esp + 0x24], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416c63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416c83
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x24]
pop edi
mov ecx, dword [esp + 0x858]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00445369
add esp, 0x850
ret 4