Function at 0x411220
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x417f09
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x42202c]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push esi
push edi
mov eax, dword [0x42202c]
xor eax, esp
push eax
lea eax, [esp + 0x160]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 6
push 1
mov edi, edx
push 2
mov esi, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 8], eax
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x4112b6
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x4112b6
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
push ecx
push edx
push str.ConnectAndSend__socket0x_x__m_iTime_d
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 0xc
cmp dword [esi + 8], 0xffffffff
jne 0x411300
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x41151a
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x41151a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_error_d
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 8
jmp 0x41151a
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
jne 0x41134f
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x411515
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x411515
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.ConnectAndSend__gethostbyname_error_d
lea ecx, [edi + 0xe]
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 8
jmp 0x411515
mov eax, esi
call fcn.00412280
test eax, eax
je 0x411397
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x411515
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x411515
push str.ConnectAndSend__gethostbyname_cancel
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 4
jmp 0x411515
xor eax, eax
mov dword [esp + 0x12c], eax
push 0x50
mov dword [esp + 0x134], eax
mov dword [esp + 0x138], eax
mov dword [esp + 0x13c], eax
mov word [esp + 0x130], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12e], ax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [esi + 8]
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x13c], edx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [esp + 0x130]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [esi + 8]
mov ebx, eax
push 0x10
lea eax, [esp + 0x130]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov ecx, dword [esi + 0xc]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edi, edi
test eax, eax
jle 0x4114e0
jmp 0x411440
mov ecx, dword [esi]
cmp dword [ecx + 0xc0], 0
jne 0x411545
mov ecx, dword [esi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x34]
call eax
test eax, eax
jne 0x411575
mov eax, dword [esi + 8]
mov ecx, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x14]
push ecx
push 0
lea edx, [esp + 0x2c]
push edx
push 0
push 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4115b4
jl 0x411598
call fcn.0040aaa0
test al, al
je 0x4114c1
push str.ConnectAndSend__connect_timeout__continue
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 4
mov ecx, dword [esi + 0xc]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edi, 1
add eax, edx
cmp edi, eax
jl 0x411440
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x411515
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x411515
mov ecx, dword [esi + 8]
push ebx
push ecx
push str.ConnectAndSend__connect_timeout__socket0x_x__ip_s
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 0xc
call fcn.00411b50
mov eax, 1
mov ecx, dword [esp + 0x160]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.004158da
mov esp, ebp
pop ebp
ret 4
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x411575
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x411575
push str.IsCanceled_TRUE
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 4
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x411515
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x411515
push str.ConnectAndSend__connect_cancel
jmp 0x411380
call fcn.0040aaa0
test al, al
je 0x411515
mov ecx, dword [esi + 8]
push ebx
push ecx
push str.ConnectAndSend__connect_failed__socket0x_x__ip_s
jmp 0x411503
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x4115e9
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x4115e9
mov edx, dword [esi + 8]
push ebx
push edx
push str.ConnectAndSend__connect_success__socket0x_x__ip_s
mov ecx, 0xe
mov edx, str..HttpSocket.cpp
call fcn.0040a820
add esp, 0xc
lea ecx, [esp + 0x13c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
push esi
lea ecx, [esp + 0x144]
mov dword [esp + 0x170], 0
call fcn.00411060
mov eax, dword [esp + 0x150]
cmp eax, 0x800
jbe 0x411642
lea ecx, [esp + 0x13c]
mov dword [esp + 0x168], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x41151a
cmp dword [esp + 0x154], 0x10
mov ecx, dword [esp + 0x140]
jae 0x41165a
lea ecx, [esp + 0x140]
mov edi, esi
call fcn.00411690
lea ecx, [esp + 0x13c]
mov esi, eax
mov dword [esp + 0x168], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
test esi, esi
je 0x411686
mov eax, esi
jmp 0x41151f
xor eax, eax
jmp 0x41151f