Function at 0x417860
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:
sub esp, 0xe14
push ebx
push ebp
push esi
push edi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x41788e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov edi, dword [esp + 0xe34]
test edi, edi
mov ebx, dword [esp + 0xe2c]
mov esi, dword [esp + 0xe28]
mov word [esp + 0x14], 2
je 0x4178ea
mov eax, dword [esp + 0xe38]
test eax, eax
je 0x4178ea
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4178d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [esp + 0xe38]
mov dword [esp + 0x18], edx
push eax
jmp 0x417912
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x417906
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x18], eax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea ecx, [esp + 0x18]
push ecx
push ebp
mov word [esp + 0x22], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x417948
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
test edi, edi
je 0x417bd4
mov eax, dword [esp + 0xe38]
test eax, eax
je 0x417bd4
xor eax, eax
mov byte [esp + 0x624], 0
mov ecx, 0xff
lea edi, [esp + 0x625]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [esp + 0xe3c]
xor eax, eax
mov byte [esp + 0x24], 0
mov ecx, 0xff
lea edi, [esp + 0x25]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
test edx, edx
mov byte [esp + 0x424], 0
mov ecx, 0x7f
lea edi, [esp + 0x425]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x4179ff
lea eax, [esp + 0x424]
push eax
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call dword [sym.imp.mcl.dll_mcl_Base64Encode]
add esp, 0xc
lea ecx, [esp + 0x424]
push ecx
push esi
push ebx
push esi
lea edx, [esp + 0x634]
push str.CONNECT__s:_d_HTTP_1.0_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__r_nHost:__s_r_nContent_Length:_0_r_nProxy_Connection:_Keep_Alive_r_nPragma:_no_cache_r_nProxy_Authorization:_Basic__s_r_n_r_n
push edx
mov byte [esp + eax + 0x43c], 0
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
jmp 0x417a18
push esi
push ebx
push esi
lea eax, [esp + 0x630]
push str.CONNECT__s:_d_HTTP_1.0_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__r_nHost:__s_r_nContent_Length:_0_r_nProxy_Connection:_Keep_Alive_r_nPragma:_no_cache_r_n_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
push 0
mov esi, eax
push esi
lea ecx, [esp + 0x62c]
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
je 0x417a41
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
push 0x1e
push ebp
call fcn.00418b90
add esp, 8
test eax, eax
jne 0x417a61
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov ebx, dword [sym.imp.WS2_32.dll_recv]
push 0
push 0x400
lea edx, [esp + 0x2c]
push edx
push ebp
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x417a8e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov edi, dword [sym.imp.MSVCRT.dll__strnicmp]
push 0xc
lea eax, [esp + 0x28]
push str.HTTP_1.0_407
push eax
call edi
add esp, 0xc
test eax, eax
je 0x417c83
push 0xc
lea ecx, [esp + 0x28]
push str.HTTP_1.0_401
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x417c83
push 0xc
lea edx, [esp + 0x28]
push str.HTTP_1.1_407
push edx
call edi
add esp, 0xc
test eax, eax
je 0x417c83
push 0xc
lea eax, [esp + 0x28]
push str.HTTP_1.1_401
push eax
call edi
add esp, 0xc
test eax, eax
je 0x417c83
push 0xc
lea ecx, [esp + 0x28]
push str.HTTP_1.0_200
push ecx
call edi
add esp, 0xc
test eax, eax
je 0x417b80
push 0xc
lea edx, [esp + 0x28]
push str.HTTP_1.1_200
push edx
call edi
add esp, 0xc
test eax, eax
je 0x417b80
lea eax, [esp + 0x24]
push eax
push 0x429b34
lea ecx, [esp + 0xa2c]
push 0x400
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea edx, [esp + 0x10]
push edx
mov ecx, 0x429ee8
call fcn.00405970
mov eax, dword [eax]
push 0x10
push eax
lea ecx, [esp + 0xa2c]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x24]
push str._r_n_r_n
push edx
call edi
add esp, 8
test eax, eax
jne 0x417bd4
push 0x1e
push ebp
call fcn.00418b90
add esp, 8
test eax, eax
je 0x417bea
push 0
mov eax, 0x400
sub eax, esi
push eax
lea ecx, [esp + esi + 0x2c]
push ecx
push ebp
call ebx
cmp eax, 0xffffffff
je 0x417c25
lea edx, [esp + 0x24]
push str._r_n_r_n
push edx
add esi, eax
call edi
add esp, 8
test eax, eax
je 0x417b99
mov ecx, dword [esp + 0xe30]
pop edi
pop esi
mov dword [ecx], ebp
pop ebp
xor eax, eax
pop ebx
add esp, 0xe14
ret
lea eax, [esp + 0x10]
push eax
mov ecx, 0x429ee8
call fcn.00405970
mov ecx, dword [eax]
push 0x10
push ecx
push 0x429b10
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
push eax
push 0x429ad8
lea edx, [esp + 0xa2c]
push 0x400
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
mov ecx, 0x429ee8
call fcn.00405970
mov ecx, dword [eax]
push 0x10
push ecx
lea edx, [esp + 0xa2c]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
mov eax, dword [esp + 0xe3c]
test eax, eax
je 0x417cc9
lea eax, [esp + 0x10]
push eax
mov ecx, 0x429ee8
call fcn.00405970
mov ecx, dword [eax]
push 0x10
push ecx
push 0x429aac
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret
lea edx, [esp + 0x10]
push edx
mov ecx, 0x429ee8
call fcn.00410440
mov eax, dword [eax]
push 0
push eax
push 0x429a7c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe14
ret