Function at 0x4f6a20
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x410
mov esi, edx
mov dword [esp + 0x10], ecx
mov eax, dword [0x7aa024]
xor eax, ebp
mov dword [esp + 0x408], eax
mov ecx, 0xff
lea eax, [esp + 0x170]
push 0x90
push ecx
push eax
call fcn.00650600
add esp, 0xc
xor edi, edi
dec edi
lea ebx, [esp + 0x34]
mov dword [ebx], edi
pcmpeqd xmm0, xmm0
movdqu xmmword [esp + 0x15e], xmm0
movdqa xmmword [esp + 0x150], xmm0
movdqa xmmword [esp + 0x140], xmm0
mov dword [esp + 0x30], edi
lea eax, [esp + 0x40]
push 0x100
mov ecx, 0xff
push ecx
push eax
call fcn.00650600
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [esi + eax*4 + 0x150], edi
push ebx
lea eax, [esp + 0x174]
push eax
mov edi, dword [esp + 0x18]
push dword [ebp + 8]
push edi
call fcn.004f7490
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x4f735b
lea ecx, [esp + 0x180]
lea eax, [esp + 0x30]
lea ebx, [esp + 0x140]
push eax
push ebx
push dword [ecx - 4]
push ecx
call fcn.004f5510
add esp, 0x10
test al, al
je 0x4f6c87
push dword [esp + 0x30]
push ebx
push str.__Trying__s:_d...
push edi
call fcn.00514fc0
add esp, 0x10
mov eax, dword [esp + 0x170]
cmp eax, 0x17
je 0x4f6b1f
cmp eax, 2
jne 0x4f6ccb
cmp dword [esp + 0x174], 1
jne 0x4f6ccb
cmp byte [edi + 0x716], 0
mov ebx, dword [esp + 0x34]
mov dword [esp + 0xc], ebx
je 0x4f6bb0
mov dword [esp + 0x18], esi
xor esi, esi
inc esi
lea edi, [esp + 0x380]
mov dword [edi], esi
lea eax, [esp + 0x280]
push 0x100
push 0xff
push eax
call fcn.00650600
add esp, 0xc
push 4
push edi
push esi
mov edi, dword [esp + 0x1c]
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4f6ba8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea ecx, [esp + 0x284]
push ecx
push eax
call fcn.0051cc80
add esp, 0xc
push eax
push str.Could_not_set_TCP_NODELAY:__s
push edi
call fcn.00514fc0
add esp, 0xc
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0xc]
push ebx
call fcn.004f6690
add esp, 4
movzx eax, byte [edi + 0x71f]
test eax, eax
je 0x4f6cd8
lea ecx, [esp + 0x380]
mov dword [ecx], eax
push 4
push ecx
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x4f6eb9
lea ebx, [esp + 0x280]
xor eax, eax
dec eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
lea edi, [esp + 0x200]
mov dword [edi], eax
mov dword [ebx], 1
mov eax, dword [esp + 0x10]
push dword [eax + 0x6bc]
call fcn.00530500
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x380], eax
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x10]
push dword [eax + 0x6c0]
call fcn.00530500
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x380], eax
mov dword [ebx + 8], eax
xor eax, eax
push eax
push eax
push edi
mov edi, dword [esp + 0x1c]
push eax
push eax
push 0xc
push ebx
mov ebx, dword [esp + 0x28]
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4f6cd8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push edi
call fcn.00514fc0
add esp, 0x10
jmp 0x4f6cd8
call fcn.0065f7ad
push 0x100
lea ecx, [esp + 0x44]
push ecx
push dword [eax]
call fcn.0051cc80
add esp, 0xc
mov ebx, eax
call fcn.0065f7ad
push ebx
push dword [eax]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.00515170
add esp, 0x10
push dword [esp + 0x34]
push esi
push edi
call fcn.004f6600
add esp, 0xc
jmp 0x4f7359
mov ebx, dword [esp + 0x34]
push ebx
call fcn.004f6690
add esp, 4
xor eax, eax
cmp dword [edi + 0x1b8], 0
mov dword [esp + 0xc], ebx
je 0x4f6d4e
push 1
push edi
call fcn.00511e80
add esp, 8
mov ecx, dword [edi + 0x1b8]
mov eax, dword [esp + 0x10]
mov edi, dword [eax + 0x1bc]
call dword [section..00cfg]
xor eax, eax
push eax
push ebx
push edi
mov edi, dword [esp + 0x1c]
call ecx
add esp, 0xc
mov ebx, eax
xor eax, eax
push eax
push edi
call fcn.00511e80
add esp, 8
test ebx, ebx
je 0x4f6d48
mov al, 1
cmp ebx, 2
mov ebx, dword [esp + 0xc]
je 0x4f6d4e
push ebx
push esi
push edi
call fcn.004f6600
add esp, 0xc
mov ebx, 0x2a
jmp 0x4f735b
xor eax, eax
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x170]
cmp eax, 0x17
je 0x4f6d67
cmp eax, 2
jne 0x4f71f3
mov dword [esp + 0x18], esi
lea eax, [esp + 0x180]
push eax
call fcn.005096a0
add esp, 4
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x170]
mov eax, dword [edi + 0xc]
mov dword [esp + 0x3c], 0
movzx ebx, word [edi + 0x190]
mov ecx, dword [edi + 0x194]
mov esi, dword [edi + 0x548]
test esi, esi
jne 0x4f6db1
test bx, bx
je 0x4f71eb
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], eax
pxor xmm0, xmm0
movdqa xmmword [esp + 0x3f0], xmm0
movdqa xmmword [esp + 0x3e0], xmm0
movdqa xmmword [esp + 0x3d0], xmm0
movdqa xmmword [esp + 0x3c0], xmm0
movdqa xmmword [esp + 0x3b0], xmm0
movdqa xmmword [esp + 0x3a0], xmm0
movdqa xmmword [esp + 0x390], xmm0
movdqa xmmword [esp + 0x380], xmm0
test esi, esi
je 0x4f6e7f
push esi
mov dword [esp + 0x24], edx
call fcn.0066b230
mov edx, dword [esp + 0x24]
add esp, 4
cmp eax, 0xfe
ja 0x4f6e7f
lea eax, [esp + 0x280]
push 0x100
push 0
push eax
call fcn.00650600
add esp, 0xc
push 3
push esi
push 0x74df11
call fcn.0066b2c0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
je 0x4f6ecd
push 5
push esi
push str.host_
call fcn.0066b2c0
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
lea ecx, [ecx + ecx*4]
add ecx, esi
mov esi, ecx
test eax, eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
jne 0x4f6ed8
jmp 0x4f6f56
cmp edx, 2
je 0x4f70a9
xor esi, esi
cmp edx, 0x17
jne 0x4f7167
mov word [esp + 0x380], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x382], ax
mov esi, 0x1c
jmp 0x4f7167
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push edi
call fcn.00514fc0
add esp, 0xc
jmp 0x4f6cd8
add esi, 3
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push 0x100
lea eax, [esp + 0x284]
push eax
push esi
push dword [ecx + 0x54]
push dword [esp + 0x24]
push edx
call fcn.004a2890
add esp, 0x18
cmp eax, 2
je 0x4f6f22
cmp eax, 1
mov edx, dword [esp + 0x20]
je 0x4f704e
test eax, eax
jne 0x4f6f47
cmp dword [esp + 0x24], 0
mov ecx, dword [esp + 0x1c]
jne 0x4f6f56
push esi
push str.Couldnt_bind_to_interface__s
jmp 0x4f7070
mov ecx, esi
mov esi, dword [esp + 0x20]
push esi
lea eax, [esp + 0x284]
push eax
push ecx
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.00514fc0
mov ecx, esi
add esp, 0x14
jmp 0x4f7015
cmp dword [esp + 0x24], 0
mov ecx, dword [esp + 0x1c]
je 0x4f7063
mov dword [esp + 0x14], esi
mov al, byte [ecx + 0x100]
mov byte [esp + 0x24], al
cmp edx, 2
je 0x4f6f72
cmp edx, 0x17
jne 0x4f6f7a
mov al, 2
jmp 0x4f6f74
mov al, 1
mov byte [ecx + 0x100], al
lea esi, [esp + 0x3c]
xor eax, eax
push esi
push eax
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004fff90
add esp, 0x14
cmp eax, 1
jne 0x4f6fa5
push esi
push dword [esp + 0x14]
call fcn.004f3c40
add esp, 8
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 0x24]
mov byte [eax + 0x100], cl
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4f705b
push 0x100
lea esi, [esp + 0x284]
push esi
push dword [eax]
call fcn.004ff910
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
push dword [eax + 4]
push esi
mov esi, dword [esp + 0x28]
push esi
push dword [esp + 0x20]
push str.Name__s_family__i_resolved_to__s_family__i
mov edi, dword [esp + 0x24]
push edi
call fcn.00514fc0
add esp, 0x18
push dword [esp + 0x3c]
push edi
call fcn.00500440
mov ecx, esi
add esp, 8
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
cmp dword [eax + 4], esi
jne 0x4f704e
xor esi, esi
cmp ecx, 2
je 0x4f7087
cmp ecx, 0x17
jne 0x4f7167
push 0x25
lea eax, [esp + 0x284]
push eax
call fcn.00650760
add esp, 8
test eax, eax
je 0x4f70cf
mov ecx, eax
inc ecx
mov dword [esp + 0x14], ecx
mov byte [eax], 0
jmp 0x4f70d7
push dword [esp + 0xc]
push dword [esp + 0x1c]
jmp 0x4f72d2
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov byte [edi + 0xcf7], 0
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.00515170
add esp, 0xc
push dword [esp + 0xc]
push dword [esp + 0x1c]
push edi
jmp 0x4f73c7
lea eax, [esp + 0x384]
push eax
lea eax, [esp + 0x284]
push eax
push 2
call fcn.00509b30
add esp, 0xc
test eax, eax
jle 0x4f7167
mov word [esp + 0x380], 2
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x382], ax
mov esi, 0x10
jmp 0x4f7167
mov dword [esp + 0x14], 0
lea eax, [esp + 0x388]
push eax
lea eax, [esp + 0x284]
push eax
push 0x17
call fcn.00509b30
add esp, 0xc
mov esi, 0x1c
test eax, eax
jle 0x4f7167
mov word [esp + 0x380], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x382], ax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4f7167
push eax
call fcn.006673c5
add esp, 4
mov dword [esp + 0x398], eax
jmp 0x4f7167
mov eax, dword [esp + 0x28]
cmp eax, 2
jl 0x4f72e2
dec eax
mov dword [esp + 0x28], eax
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.00514fc0
add esp, 0xc
inc ebx
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x382], ax
push esi
lea eax, [esp + 0x384]
push eax
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4f7130
lea eax, [esp + 0x38]
mov dword [eax], 0x80
pxor xmm0, xmm0
lea ecx, [esp + 0x200]
movdqa xmmword [ecx], xmm0
movdqa xmmword [ecx + 0x10], xmm0
movdqa xmmword [ecx + 0x20], xmm0
movdqa xmmword [ecx + 0x30], xmm0
movdqa xmmword [ecx + 0x40], xmm0
movdqa xmmword [ecx + 0x50], xmm0
movdqa xmmword [ecx + 0x60], xmm0
movdqa xmmword [ecx + 0x70], xmm0
push eax
push ecx
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x4f7373
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.00514fc0
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x26c], 1
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0xc]
push 1
push ebx
call fcn.005127d0
add esp, 8
lea edi, [esp + 0x280]
push edi
call fcn.0051daf0
add esp, 4
movdqu xmm0, xmmword [edi]
mov edi, dword [esp + 0x10]
movdqu xmmword [esi + 0x280], xmm0
cmp dword [esi + 0x278], 2
jl 0x4f7255
push 3
push dword [esi + 0x294]
push dword [esi + 0x290]
push edi
call fcn.0050e4e0
add esp, 0x10
push 4
push dword [esi + 0x29c]
push dword [esi + 0x298]
push edi
call fcn.0050e4e0
add esp, 0x10
cmp byte [esp + 0x2c], 0
jne 0x4f7262
cmp dword [esi + 0x58], 4
jne 0x4f7271
mov eax, dword [ebp + 0xc]
mov dword [esi + eax*4 + 0x150], ebx
jmp 0x4f7359
cmp byte [esi + 0x26e], 0
je 0x4f7329
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
add eax, 0xffffd8cd
cmp eax, 2
jb 0x4f734b
cmp ebx, 0xb
je 0x4f734b
push 0x100
lea eax, [esp + 0x44]
push eax
push ebx
call fcn.0051cc80
add esp, 0xc
push eax
lea eax, [esp + 0x144]
push eax
push str.Immediate_connect_fail_for__s:__s
push edi
call fcn.00514fc0
add esp, 0x10
mov dword [edi + 0x964], ebx
push dword [esp + 0xc]
push esi
push edi
call fcn.004f6600
add esp, 0xc
mov ebx, 7
jmp 0x4f735b
mov esi, edi
mov eax, 0x100
lea edi, [esp + 0x280]
push eax
push 0xff
push edi
call fcn.00650600
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [esi + 0x964], eax
mov eax, 0x100
push eax
push edi
push ebx
call fcn.0051cc80
add esp, 0xc
push eax
push ebx
push str.bind_failed_with_errno__d:__s
jmp 0x4f73b5
push dword [esp + 0x17c]
lea eax, [esp + 0x184]
push eax
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4f727e
mov eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0xc]
mov dword [esi + ecx*4 + 0x150], eax
xor ebx, ebx
mov ecx, dword [esp + 0x408]
xor ecx, ebp
call fcn.0064d372
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, edi
mov eax, 0x100
lea edi, [esp + 0x280]
push eax
push 0xff
push edi
call fcn.00650600
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [esi + 0x964], eax
mov eax, 0x100
push eax
push edi
push ebx
call fcn.0051cc80
add esp, 0xc
push eax
push ebx
push str.getsockname___failed_with_errno__d:__s
push esi
call fcn.00515170
add esp, 0x10
push dword [esp + 0xc]
push dword [esp + 0x1c]
push esi
call fcn.004f6600
add esp, 0xc
mov ebx, 0x2d
jmp 0x4f735b