Function at 0x42cc19
Capabilities:
Connect socket
Get socket status
Resolve dns
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
sub esp, 0x290
push ebx
push edi
xor edi, edi
mov ebx, edi
cmp dword [esp + 0x29c], ebx
je 0x42cfd1
mov ecx, dword [esp + 0x2a4]
push ebp
push esi
mov esi, dword [esp + 0x2ac]
and ecx, 0xefffffff
push 0x17
pop eax
push 2
and esi, 0x10000000
pop edx
test esi, esi
mov dword [esp + 0x14], esi
push edi
cmove ecx, dword [esp + 0x2b0]
cmove eax, edx
xor edx, edx
inc edx
test ecx, ecx
cmove ecx, edx
push ecx
push eax
mov dword [esp + 0x30], ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x42cfcf
push dword [esp + 0x2a4]
call fcn.004593d0
mov dword [esp + 0x18], eax
test esi, esi
je 0x42cd0a
cmp dword [0x4b1d98], ebx
je 0x42cfbb
lea ecx, [esp + 0x5c]
push ecx
push eax
push 0x17
call fcn.0042cb4b
add esp, 0xc
test eax, eax
jg 0x42cd01
lea eax, [esp + 0x20]
push eax
push edi
push edi
push dword [esp + 0x24]
call dword [0x4b1d84]
test eax, eax
jne 0x42cfbb
mov eax, dword [esp + 0x20]
lea edi, [esp + 0x5c]
push eax
mov dword [esp + 0x20], 1
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x4b1d88]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
jmp 0x42cd35
mov edi, dword [esp + 0x1c]
xor eax, eax
inc eax
jmp 0x42cd35
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
jne 0x42cd2d
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x42cd2d
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov edi, dword [eax]
xor eax, eax
cmp edi, 0xffffffff
setne al
test eax, eax
je 0x42cfbb
xor ecx, ecx
cmp dword [esp + 0x2b8], ebx
jne 0x42cd58
mov eax, dword [esp + 0x2b4]
test eax, eax
je 0x42cda9
cmp word [eax], cx
je 0x42cda9
push 0x1c
push ecx
lea eax, [esp + 0x84]
push eax
call fcn.0041f270
push 0x10
lea eax, [esp + 0x7c]
push 0
push eax
call fcn.0041f270
add esp, 0x18
lea eax, [esp + 0x7c]
push dword [esp + 0x2b8]
push dword [esp + 0x2b8]
push eax
lea eax, [esp + 0x78]
push eax
xor eax, eax
test esi, esi
push ebp
setne al
push eax
call fcn.0042d1a8
test eax, eax
je 0x42cfbb
xor ecx, ecx
test esi, esi
je 0x42cdeb
push 0x1c
push ecx
lea eax, [esp + 0x48]
push eax
call fcn.0041f270
add esp, 0xc
push 0x17
pop eax
mov word [esp + 0x40], ax
movzx eax, word [esp + 0x2a8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x42], ax
lea esi, [esp + 0x5c]
lea edi, [esp + 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
jmp 0x42ce1b
push 0x10
push ecx
lea eax, [esp + 0x30]
push eax
call fcn.0041f270
add esp, 0xc
push 2
pop eax
mov word [esp + 0x28], ax
movzx eax, word [esp + 0x2a8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x2c], edi
xor edi, edi
inc edi
cmp dword [esp + 0x24], edi
jne 0x42cf5c
cmp dword [esp + 0x2b0], ebx
jle 0x42cf18
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edi
mov edi, dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
push 0x8004667e
push ebp
call edi
test eax, eax
jne 0x42cfbb
test esi, esi
je 0x42ce60
push 0x1c
lea eax, [esp + 0x44]
jmp 0x42ce66
push 0x10
lea eax, [esp + 0x2c]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x42cfbb
mov ecx, dword [esp + 0x2b0]
xor eax, eax
inc eax
mov dword [esp + 0x9c], ebp
mov dword [esp + 0x98], eax
xor edx, edx
mov dword [esp + 0x19c], eax
mov esi, 0x3e8
mov eax, ecx
mov dword [esp + 0x1a0], ebp
div esi
mov dword [esp + 0x38], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x1a0]
push eax
lea eax, [esp + 0xa0]
push eax
push 0
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
xor esi, esi
inc esi
cmp eax, esi
jne 0x42cef9
lea eax, [esp + 0x98]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne ebx, esi
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push ebp
call edi
test ebx, ebx
je 0x42cfbb
xor edi, edi
inc edi
jmp 0x42cf3b
test esi, esi
je 0x42cf24
push 0x1c
lea eax, [esp + 0x44]
jmp 0x42cf2a
push 0x10
lea eax, [esp + 0x2c]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x42cfbb
push 0x10
push 0
push dword [0x4b0774]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x42cfbb
and dword [ebx + 0xc], 0
mov dword [ebx], edi
mov dword [ebx + 8], ebp
jmp 0x42cfbb
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edi
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x42cfbb
push 0x38
push eax
push dword [0x4b0774]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x42cfbb
lea edi, [ebx + 4]
push 2
pop eax
mov dword [ebx], eax
test esi, esi
je 0x42cfa1
push 7
pop ecx
lea esi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
jmp 0x42cfa9
lea esi, [esp + 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x14], 0
mov dword [ebx + 0x28], ebp
setne al
and dword [ebx + 0x24], 0
mov byte [ebx + 0x20], al
push dword [esp + 0x18]
call fcn.004593c0
test ebx, ebx
jne 0x42cfcf
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop ebp
pop edi
mov eax, ebx
pop ebx
add esp, 0x290
ret 0x18