Function at 0x403b00
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:
sub esp, 0x228
push ebx
push ebp
push esi
push edi
mov ebp, 1
push 0
push ebp
push 2
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], 0xa
mov dword [esp + 0x28], 0
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403b4c
lea eax, [esp + 0x10]
push 0x422748
push eax
mov dword [esp + 0x18], 0x6a
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [esp + 0x240]
test ax, ax
je 0x403b61
push eax
call dword [sym.imp.WS2_32.dll_htons]
jmp 0x403b80
push 0
push str.mail
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
jne 0x403b7c
push 0x19
call dword [sym.imp.WS2_32.dll_htons]
jmp 0x403b80
mov ax, word [eax + 8]
mov esi, dword [esp + 0x23c]
mov word [esp + 0x20], 2
push esi
mov word [esp + 0x26], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x403bc9
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x403bfd
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
lea edi, [esp + 0x24]
mov esi, dword [edx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [esp + 0x14]
push edx
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x403c1b
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [esp + 0x10]
push 0x422748
push eax
mov dword [esp + 0x18], 0x6c
call sub.MSVCRT.dll__CxxThrowException
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
push 0x422748
push ecx
mov dword [esp + 0x18], 0x69
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [esp + 0x20]
push 0x10
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x403da0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x403c5d
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea edx, [esp + 0x10]
push 0x422748
push edx
mov dword [esp + 0x18], 0x68
call sub.MSVCRT.dll__CxxThrowException
mov edi, dword [sym.imp.WS2_32.dll_select]
lea esi, [ebx + 1]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x134]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push 0
push esi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x14c], ebx
mov dword [esp + 0x148], ebp
call edi
cmp eax, 0xffffffff
je 0x403cbf
test eax, eax
je 0x403cdd
lea eax, [esp + 0x30]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x403d19
lea ecx, [esp + 0x134]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x403cfb
jmp 0x403c66
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea edx, [esp + 0x10]
push 0x422748
push edx
mov dword [esp + 0x18], 0x6d
call sub.MSVCRT.dll__CxxThrowException
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [esp + 0x10]
push 0x422748
push eax
mov dword [esp + 0x18], 0x193
call sub.MSVCRT.dll__CxxThrowException
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
push 0x422748
push ecx
mov dword [esp + 0x18], 0x6d
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [esp + 0x30]
xor eax, eax
test edx, edx
jbe 0x403d50
lea ecx, [esp + 0x34]
cmp dword [ecx], ebx
je 0x403d35
inc eax
add ecx, 4
cmp eax, edx
jb 0x403d27
jmp 0x403d50
dec edx
cmp eax, edx
jae 0x403d50
lea ecx, [esp + eax*4 + 0x34]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x30]
add ecx, 4
dec edx
cmp eax, edx
jb 0x403d3e
mov edx, dword [esp + 0x134]
xor eax, eax
test edx, edx
jbe 0x403da0
lea ecx, [esp + 0x138]
cmp dword [ecx], ebx
je 0x403d7f
inc eax
add ecx, 4
cmp eax, edx
jb 0x403d64
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x228
ret 8
dec edx
cmp eax, edx
jae 0x403da0
lea ecx, [esp + eax*4 + 0x138]
mov edx, dword [ecx + 4]
inc eax
mov dword [ecx], edx
mov edx, dword [esp + 0x134]
add ecx, 4
dec edx
cmp eax, edx
jb 0x403d8b
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x228
ret 8