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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0xc], esi
cmp edi, esi
je 0x428805
test dword [ebp + 0x10], 0x10000000
je 0x4286d0
and dword [ebp + 0x10], 0xefffffff
mov dword [ebp - 4], 0x17
jmp 0x4286d7
mov dword [ebp - 4], 2
cmp dword [ebp + 0x10], esi
jne 0x4286e3
mov dword [ebp + 0x10], 1
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.WSOCK32.DLL_socket]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x428805
cmp dword [ebp - 4], 0x17
push ebx
jne 0x4287cb
cmp dword [0x59f244], esi
je 0x4287fb
lea eax, [ebp - 0x64]
push eax
push edi
push 0x17
call fcn.004282fb
add esp, 0xc
test eax, eax
jg 0x428754
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push edi
call dword [0x59f248]
test eax, eax
jne 0x4287fb
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 0x18]
add esi, 8
lea edi, [ebp - 0x64]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [0x59f24c]
xor esi, esi
mov ebx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp dword [ebp + 0x10], eax
jne 0x4289a0
cmp dword [ebp + 0x1c], esi
mov esi, dword [sym.imp.WSOCK32.DLL_htons]
mov edi, dword [ebp + 0x18]
jne 0x428782
test edi, edi
je 0x428825
cmp byte [edi], 0
je 0x428825
push 0x10
lea eax, [ebp - 0x20]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x1c], 0
push 2
pop eax
mov word [ebp - 0x20], ax
je 0x4287a8
push dword [ebp + 0x1c]
call esi
mov word [ebp - 0x1e], ax
test edi, edi
je 0x42880e
cmp byte [edi], 0
je 0x42880e
push edi
call fcn.0049ddd0
mov edi, eax
push edi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push edi
mov dword [ebp - 0x1c], eax
call fcn.0049dde0
jmp 0x428812
push edi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4287eb
push edi
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
cmp eax, esi
je 0x4287eb
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ebx, dword [eax]
xor eax, eax
cmp ebx, 0xffffffff
setne al
cmp eax, esi
jne 0x428757
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.DLL_closesocket]
pop ebx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret 0x18
and dword [ebp - 0x1c], 0
push 0x10
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x4287fb
cmp dword [ebp - 4], 0x17
jne 0x428857
push 0x1c
lea eax, [ebp - 0x54]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x17
pop eax
push dword [ebp + 0xc]
mov word [ebp - 0x54], ax
call esi
mov word [ebp - 0x52], ax
lea esi, [ebp - 0x64]
lea edi, [ebp - 0x4c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x42887a
push 0x10
lea eax, [ebp - 0x30]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [ebp + 0xc]
mov word [ebp - 0x30], ax
call esi
mov word [ebp - 0x2e], ax
mov dword [ebp - 0x2c], ebx
mov esi, dword [ebp + 0x14]
test esi, esi
jle 0x42894b
mov edi, dword [sym.imp.WSOCK32.DLL_ioctlsocket]
lea eax, [ebp - 8]
push eax
mov ebx, 0x8004667e
push ebx
push dword [ebp + 8]
mov dword [ebp - 8], 1
call edi
test eax, eax
jne 0x4287fb
cmp dword [ebp - 4], 0x17
jne 0x4288b6
push 0x1c
lea eax, [ebp - 0x54]
jmp 0x4288bb
push 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x4287fb
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp + 8]
call edi
test eax, eax
jne 0x4287fb
inc eax
mov dword [ebp - 0x168], eax
mov dword [ebp - 0x26c], eax
mov eax, esi
cdq
mov ecx, 0x3e8
idiv ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x164], edi
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x38], eax
imul eax, eax, 0x3e8
sub esi, eax
lea eax, [ebp - 0x38]
imul esi, esi, 0x3e8
push eax
lea eax, [ebp - 0x26c]
push eax
lea eax, [ebp - 0x168]
push eax
push 0
push 0
mov dword [ebp - 0x34], esi
call dword [sym.imp.WSOCK32.DLL_select]
lea eax, [ebp - 0x168]
push eax
push edi
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
jmp 0x42896a
cmp dword [ebp - 4], 0x17
jne 0x428958
push 0x1c
lea eax, [ebp - 0x54]
jmp 0x42895d
push 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x4287fb
push 0x10
push 0
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4287fb
mov ecx, dword [ebp + 8]
and dword [eax + 0xc], 0
mov dword [eax], 1
mov dword [eax + 8], ecx
jmp 0x428804
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 0x8004667e
push dword [ebp + 8]
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x4287fb
push 0x20
push esi
push dword [0x59efb8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x4287fb
mov ecx, dword [ebp + 8]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax], 2
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
jmp 0x428804