Function at 0x403ec0
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
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x406415
push eax
mov eax, 0x241c
mov dword fs:[0], esp
call fcn.00405a00
push ebx
push ebp
push esi
push 0x409ab0
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], 0
call sub.MFC42.DLL_CString::CString_2
mov ebp, 1
push 6
push ebp
push 2
mov dword [esp + 0x243c], ebp
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403f2f
mov esi, dword [esp + 0x2438]
lea eax, [esp + 0xc]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x10], ebp
jmp 0x403f98
push str.nic.nju.edu.cn
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x403f81
xor edx, edx
push 0x50
mov dword [esp + 0x18], edx
mov word [esp + 0x18], 2
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
lea eax, [esp + 0x14]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x403fb0
mov esi, dword [esp + 0x2438]
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0xc]
mov byte [esp + 0x2430], 0
call sub.MFC42.DLL_CString::CString
mov eax, esi
jmp 0x404161
push edi
mov edi, str.GET_http:__nic.nju.edu.cn_bras_ru.txt
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str._HTTP_1.1_r_nAccept:___r_nReferer:_http:__nic.nju.edu.cn_bras_ru.txt_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 edi, edx
mov edx, ecx
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
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 ebx
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]
xor esi, esi
rep stosd dword es:[edi], eax
push esi
lea ecx, [esp + 0x430]
push 0x1000
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40412b
jmp 0x40405b
mov ebp, 1
inc esi
cmp esi, ebp
mov dword [esp + 0x28], esi
jne 0x40411a
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x42c]
push str.HTTP_1.1_200_OK
push edx
call edi
add esp, 8
test eax, eax
je 0x4040c5
lea eax, [esp + 0x42c]
push str.Content_Type:_text_plain_r_n_r_n
push eax
call edi
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4040c5
mov edx, ebp
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
lea eax, [edx + 0x1c]
mov esi, ecx
cmp eax, esi
jl 0x4040e5
mov esi, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x430]
push 0x1000
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x404056
jmp 0x40412b
sub esi, edx
add ebp, 0x1c
sub esi, 0x1c
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x142c]
push esi
lea edx, [esp + 0x1430]
push ebp
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea eax, [esp + 0x142c]
push eax
jmp 0x404122
lea ecx, [esp + 0x42c]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esp + 0x243c]
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], 1
mov byte [esp + 0x2434], 0
call sub.MFC42.DLL_CString::CString
mov eax, esi
pop edi
mov ecx, dword [esp + 0x2428]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2428
ret 4