Function at 0x42f990
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0xb8
mov eax, dword [0x51501c]
xor eax, esp
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0xc0]
push ebp
mov ebp, dword [ebx]
mov dword [esp + 0x14], eax
mov dword [eax], 0xffffffff
mov eax, dword [ecx + 4]
push esi
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x6c]
cmp eax, 2
mov esi, edx
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x2c], eax
jne 0x42f9e5
mov dword [esp + 0x30], 0x11
jmp 0x42f9ec
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x30], edx
mov eax, dword [ecx + 0x10]
cmp eax, 0x80
mov dword [esp + 0x34], eax
jbe 0x42fa03
mov eax, 0x80
mov dword [esp + 0x34], eax
push eax
mov eax, dword [ecx + 0x18]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.004c7ae8
mov dword [esi], 0
mov eax, dword [ebp + 0x174]
add esp, 0xc
test eax, eax
je 0x42fa40
mov ecx, dword [ebp + 0x178]
lea edx, [esp + 0x28]
push edx
push 0
push ecx
call eax
mov edi, eax
add esp, 0xc
mov dword [esp + 0x10], edi
jmp 0x42fa5b
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x10], eax
mov edi, eax
cmp edi, 0xffffffff
je 0x42fd6d
movzx eax, word [esp + 0x38]
sub eax, 2
lea esi, [ebx + 0x96]
jne 0x42fb48
lea edx, [esp + 0x3c]
push 0x2e
push edx
call fcn.00447ab0
add esp, 8
test eax, eax
je 0x42fb48
mov eax, dword [esp + 0x3a]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [ebx + 0xc4], ecx
lea eax, [ebx + 0x38]
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
push 0x4f06b8
mov esi, ebp
call fcn.0042de00
add esp, 8
mov eax, ebx
call fcn.0042f6e0
cmp dword [ebp + 0x308], 0
je 0x42fadc
mov edx, dword [esp + 0x10]
mov edi, ebx
call fcn.0042f8d0
mov esi, dword [esp + 0x10]
call fcn.0042f930
mov eax, dword [ebp + 0x16c]
test eax, eax
mov edi, esi
je 0x42fb11
mov edx, dword [ebp + 0x170]
push 0
push edi
push edx
call eax
add esp, 0xc
cmp eax, 2
mov dword [esp + 0x18], eax
jne 0x42fb7c
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x28]
push eax
push edi
mov ecx, ebx
call fcn.0042f370
mov esi, eax
add esp, 8
test esi, esi
je 0x42fba4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00459ea4
add esp, 0xb8
ret
mov byte [esi], 0
mov dword [ebx + 0xc4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.004482a0
add esp, 4
push eax
push esi
push 0x4f0688
mov esi, ebp
call fcn.0042dec0
add esp, 0xc
jmp 0x42fd66
test eax, eax
je 0x42fb11
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x2a
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00459ea4
add esp, 0xb8
ret
lea ecx, [esp + 0x24]
push ecx
push 0x8004667e
mov esi, 1
push edi
mov dword [esp + 0x30], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x42fc6a
cmp dword [ebx + 0x6c], esi
jne 0x42fc6a
mov edx, dword [esp + 0x34]
push edx
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
mov dword [esp + 0x14], esi
call fcn.00436b40
cmp dword [ebx + 0x1fc], 1
mov dword [ebx + 0x1f4], eax
mov dword [ebx + 0x1f8], edx
jle 0x42fc13
mov eax, dword [ebx + 0x200]
push ebp
call fcn.00430a10
add esp, 4
cmp esi, 0xffffffff
jne 0x42fd0f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov dword [esp + 0x18], eax
je 0x42fcc6
cmp eax, 0x2732
jle 0x42fc41
cmp eax, 0x2734
jle 0x42fcc6
push ebx
call fcn.004482a0
add esp, 4
push eax
lea eax, [ebx + 0x38]
push eax
push 0x4f06c8
mov esi, ebp
call fcn.0042dec0
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov dword [ebp + 0x855c], ecx
jmp 0x42fc76
test eax, eax
mov dword [esp + 0x14], 0
jne 0x42fc97
push edi
lea esi, [esp + 0x1c]
call fcn.0042f670
mov ecx, dword [esp + 0x18]
add esp, 4
test ecx, ecx
jne 0x42fd2d
test eax, eax
je 0x42fd43
mov ecx, dword [esp + 0x20]
push 0x4f06e4
mov esi, ebp
mov dword [ecx], 1
call fcn.0042de00
add esp, 4
push ebx
mov ecx, edi
call fcn.0042f780
mov edx, dword [esp + 0x20]
add esp, 4
mov dword [edx], edi
jmp 0x42fd6d
mov eax, dword [esp + 0xc8]
push ebx
call fcn.0042f300
add esp, 4
cmp eax, 3
mov dword [esp + 0x14], eax
jne 0x42fd07
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x2a
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00459ea4
add esp, 0xb8
ret
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
cmp esi, 1
jne 0x42fc76
cmp dword [ebp + 0x510], 2
jne 0x42fc76
mov eax, dword [esp + 0x1c]
mov dword [eax], edi
jmp 0x42fd6d
cmp ecx, 1
jne 0x42fd43
push 0x4f06f0
mov esi, ebp
call fcn.0042de00
add esp, 4
jmp 0x42fd66
mov eax, dword [esp + 0x18]
push ebx
mov dword [ebp + 0x855c], eax
call fcn.004482a0
add esp, 4
push eax
push 0x4eab34
mov esi, ebp
call fcn.0042de00
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.00459ea4
add esp, 0xb8
ret