Function at 0x418c40
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:
push ebp
mov ebp, esp
sub esp, 0x850
mov eax, dword [0x5a4e60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x22a]
push edx
mov dword [ebp - 0x848], eax
mov ebx, 0x50
mov dword [ebp - 0x844], 0
mov word [ebp - 0x22c], cx
call fcn.00525e90
xor eax, eax
push 0x3fe
push eax
lea ecx, [ebp - 0x82a]
push ecx
mov word [ebp - 0x82c], ax
call fcn.00525e90
push str.5054399.com
push esi
call fcn.00523c27
add esp, 0x20
test eax, eax
jne 0x418ced
push str.4399.com
push esi
call fcn.00523c27
add esp, 8
test eax, eax
jne 0x418ced
push str.4399pk.com
push esi
call fcn.00523c27
add esp, 8
test eax, eax
jne 0x418ced
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523022
mov esp, ebp
pop ebp
ret 4
push edi
add esi, 0xe
push 0x2f
push esi
call fcn.00523e32
mov edi, eax
add esp, 8
test edi, edi
je 0x418d25
mov edx, edi
sub edx, esi
sar edx, 1
inc edx
push edx
push esi
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 2
push edi
lea ecx, [ebp - 0x82c]
push ecx
jmp 0x418d2d
push esi
lea edx, [ebp - 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x22c]
push 0x3a
push eax
call fcn.00523e32
add esp, 8
test eax, eax
je 0x418d5c
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00523a62
add esp, 4
movzx ebx, ax
push 0
push 0
push 0
push 0
push 0x57cfd0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [ebp - 0x850], esi
test esi, esi
je 0x419022
push 0
push 0
push 3
push 0
push 0
push ebx
lea edx, [ebp - 0x22c]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [ebp - 0x84c], ebx
test ebx, ebx
je 0x41901b
push 0
push SysReAllocStringLen
push 0
push 0
push str.HTTP_1.1
lea eax, [ebp - 0x82c]
push eax
push 0x57cfec
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
test edi, edi
je 0x419014
push 0
push 0
push 0x4a
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 0x419001
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor eax, eax
push eax
lea ecx, [ebp - 0x830]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0x13
push edi
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
mov dword [ebp - 0x830], 0x20
call esi
test eax, eax
je 0x419001
lea eax, [ebp - 0x24]
push eax
call fcn.00523a62
add esp, 4
cmp eax, 0x194
je 0x419001
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x830]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0x20000005
push edi
call esi
test eax, eax
je 0x419001
cmp dword [ebp - 0x830], 4
jne 0x419001
mov eax, dword [ebp - 0x24]
push 0x1ff
lea ecx, [ebp - 0x42b]
push ebx
push ecx
mov dword [ebp - 0x830], eax
mov byte [ebp - 0x42c], bl
call fcn.00525e90
add esp, 0xc
mov dword [ebp - 0x838], ebx
xor esi, esi
mov dword [ebp - 0x834], ebx
call fcn.0041d189
cmp eax, ebx
jne 0x418ec1
push 0x80004005
call fcn.00404970
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x83c], eax
call fcn.0041d189
cmp eax, ebx
jne 0x418ee6
push 0x80004005
call fcn.00404970
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [ebp - 0x848]
push 0x57d018
push ecx
lea edx, [ebp - 0x834]
lea ebx, [eax + 0x10]
push edx
mov dword [ebp - 0x840], ebx
call fcn.00523f17
add esp, 0xc
cmp dword [ebp - 0x834], esi
jne 0x418f40
lea ecx, [ebp - 0x840]
call fcn.00404140
lea ecx, [ebp - 0x83c]
call fcn.00404140
jmp 0x419001
lea eax, [ebp - 0x838]
push eax
push 0x200
lea ecx, [ebp - 0x42c]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x418f9e
mov edx, dword [ebp - 0x834]
mov eax, dword [ebp - 0x838]
push edx
push 1
push eax
lea ecx, [ebp - 0x42c]
push ecx
call fcn.005240b5
add esi, dword [ebp - 0x838]
add esp, 0x10
push 0
push 0
push 0
push esi
push edi
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
test eax, eax
je 0x418f9e
cmp dword [ebp - 0x838], 0
jne 0x418f40
mov edx, dword [ebp - 0x834]
push edx
call fcn.0052419c
add esp, 4
cmp dword [ebp - 0x830], esi
ja 0x418f1b
lea eax, [ebx - 0x10]
mov dword [ebp - 0x844], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418fdf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x83c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x419001
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 ebx, dword [ebp - 0x84c]
mov esi, dword [ebp - 0x850]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x844]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00523022
mov esp, ebp
pop ebp
ret 4