Function at 0x42f90f
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x26c
push ebx
push esi
mov esi, dword [esp + 0x278]
xor ebx, ebx
test esi, esi
je 0x42fcab
push edi
mov edi, dword [esp + 0x284]
push 2
pop ecx
push 0x17
pop eax
test edi, 0x10000000
je 0x42f951
and edi, 0xefffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x284], edi
jmp 0x42f957
mov eax, ecx
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x42f963
inc edi
mov dword [esp + 0x284], edi
push ebp
push 0
push edi
push eax
call dword [sym.imp.WSOCK32.DLL_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x42fca9
push 0x17
pop ecx
cmp dword [esp + 0x18], ecx
jne 0x42f9ed
cmp dword [0x49dbdc], ebx
je 0x42fca2
lea eax, [esp + 0x64]
push eax
push esi
push ecx
call fcn.0042f87e
add esp, 0xc
test eax, eax
jg 0x42f9e3
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push esi
call dword [0x49dbe8]
test eax, eax
jne 0x42fca2
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x64]
push eax
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 [0x49dbec]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x288]
mov dword [esp + 0x10], eax
jmp 0x42fa2b
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x42fa2b
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov ecx, eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x42fa1b
push esi
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x42fa17
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x42fa1b
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 0xffffffff
setne al
test eax, eax
je 0x42fca2
mov esi, dword [esp + 0x290]
cmp dword [esp + 0x294], ebx
jne 0x42fa43
test esi, esi
je 0x42fab4
cmp byte [esi], bl
je 0x42fab4
push 0x10
lea eax, [esp + 0x24]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [esp + 0x20], ax
cmp dword [esp + 0x294], ebx
je 0x42fa77
push dword [esp + 0x294]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x22], ax
test esi, esi
je 0x42fa9a
cmp byte [esi], bl
je 0x42fa9a
push esi
call fcn.00485bf0
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x28], eax
call fcn.00485be0
jmp 0x42fa9e
and dword [esp + 0x24], ebx
push 0x10
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x42fca2
xor eax, eax
inc eax
cmp edi, eax
jne 0x42fc55
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x42fb04
push 0x1c
lea eax, [esp + 0x4c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [esp + 0x48], di
push dword [esp + 0x284]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x4a], ax
lea esi, [esp + 0x64]
lea edi, [esp + 0x50]
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 + 0x18]
jmp 0x42fb37
push 0x10
lea eax, [esp + 0x34]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x284]
mov word [esp + 0x34], ax
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x28c]
test edi, edi
jle 0x42fc0f
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x42fca2
cmp esi, 0x17
jne 0x42fb74
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x42fb7a
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x42fca2
mov eax, edi
mov dword [esp + 0x78], ebp
cdq
mov ecx, 0x3e8
idiv ecx
xor esi, esi
mov dword [esp + 0x17c], ebp
mov dword [esp + 0x40], eax
inc esi
imul eax, eax, 0x3e8
mov dword [esp + 0x74], esi
mov dword [esp + 0x178], esi
sub edi, eax
imul eax, edi, 0x3e8
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x17c]
push eax
lea eax, [esp + 0x7c]
push eax
push 0
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WSOCK32.DLL_select]
cmp eax, esi
jne 0x42fbf7
lea eax, [esp + 0x74]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x42fbf7
mov ebx, esi
and dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x42fc34
cmp esi, 0x17
jne 0x42fc1c
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x42fc22
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x42fca2
xor esi, esi
inc esi
mov ebx, esi
test ebx, ebx
je 0x42fca2
push 0x10
push 0
push dword [0x49d758]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x42fca2
mov dword [ebx], esi
mov dword [ebx + 8], ebp
jmp 0x42fc9c
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x42fca2
push 0x20
push eax
push dword [0x49d758]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x42fca2
push 2
pop eax
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x284]
mov dword [ebx + 0x10], ebp
mov dword [ebx + 8], eax
and dword [ebx + 0xc], 0
jmp 0x42fca9
push ebp
call dword [sym.imp.WSOCK32.DLL_closesocket]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x26c
ret 0x18