Function at 0x404670
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x406445
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc1c
push ebx
push ebp
push esi
push edi
push 0x409ab0
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0
call sub.MFC42.DLL_CString::CString_2
mov edi, 1
push 6
push edi
push 2
mov dword [esp + 0xc40], edi
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4046e6
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0xc3c]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x14], edi
jmp 0x404976
mov ecx, dword [esp + 0xc40]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
jne 0x404720
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0xc3c]
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x14], edi
jmp 0x404976
push 2
lea eax, [esp + 0x2c]
push 4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
je 0x404779
xor edx, edx
push 0x1f90
mov dword [esp + 0x1c], edx
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x20], edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
lea eax, [esp + 0x18]
push 0x10
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x40479c
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0xc3c]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x14], edi
jmp 0x404976
or ecx, 0xffffffff
mov edi, str.GET_http:__
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [esp + 0x2c]
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
mov edx, dword [esp + 0xc44]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._HTTP_1.1_r_nAccept:___r_nReferer:_http:__
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._Accept_Language:_zh_cn_r_nAccept_Encoding:_gzip__deflate_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_5.01__Windows_NT_5.0__r_nHost:_nic.nju.edu.cn_r_nConnection:_Keep_Alive_r_n_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x30]
push ecx
push eax
push ebp
call dword [sym.imp.WS2_32.dll_send]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x42c]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x430]
push 0x400
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x404954
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x42c]
push str.HTTP_1.1_200_OK
push edx
call esi
add esp, 8
test eax, eax
je 0x4049a9
lea eax, [esp + 0x42c]
push str.__xml
push eax
call esi
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4049a2
mov edx, ebx
lea ecx, [esp + 0x42c]
sub edx, ecx
lea edi, [esp + 0x42c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
cmp edx, esi
jge 0x40495b
sub esi, edx
mov ecx, 0x100
lea edi, [esp + 0x82c]
push esi
lea edx, [esp + 0x830]
push ebx
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea eax, [esp + 0x82c]
lea ecx, [esp + 0x10]
push eax
call fcn.00405810
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
push ecx
mov esi, dword [esp + 0xc40]
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x14], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0xc34], 0
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xc2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xc28
ret
lea edx, [esp + 0x10]
push edx
jmp 0x404960
lea eax, [esp + 0x10]
push eax
jmp 0x404960