Function at 0x5b53a3
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, 0x400
mov edi, edx
mov esi, ecx
mov eax, dword [0x7a8498]
xor eax, ebp
mov dword [esp + 0x3f8], eax
mov ecx, 0xff
lea eax, [esp + 0x160]
push 0x90
push ecx
push eax
call fcn.006ccfc0
add esp, 0xc
xor ebx, ebx
dec ebx
lea eax, [esp + 0x24]
mov dword [eax], ebx
pcmpeqd xmm0, xmm0
movdqu xmmword [esp + 0x14e], xmm0
movdqa xmmword [esp + 0x140], xmm0
movdqa xmmword [esp + 0x130], xmm0
mov dword [esp + 0x20], ebx
lea eax, [esp + 0x30]
push 0x100
mov ecx, 0xff
push ecx
push eax
call fcn.006ccfc0
add esp, 0xc
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x150], ebx
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x164]
push eax
push dword [ebp + 8]
push esi
call fcn.005b5dfc
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x5b5c73
lea ecx, [esp + 0x170]
sub esp, 0x10
lea eax, [esp + 0x30]
mov dword [esp + 0xc], eax
lea edi, [esp + 0x140]
mov dword [esp + 8], edi
mov dword [esp], ecx
call fcn.005b45b6
add esp, 0x10
test al, al
je 0x5b55f5
push dword [esp + 0x20]
push edi
push str.__Trying__s:_d..._n
push esi
call fcn.005ae893
add esp, 0x10
mov eax, dword [esp + 0x160]
cmp eax, 0x17
je 0x5b54ac
cmp eax, 2
jne 0x5b563c
cmp dword [esp + 0x164], 1
jne 0x5b563c
cmp byte [esi + 0x6e6], 0
mov ebx, dword [esp + 0x24]
je 0x5b552c
xor eax, eax
inc eax
lea edi, [esp + 0x370]
mov dword [edi], eax
lea eax, [esp + 0x270]
push 0x100
push 0xff
push eax
call fcn.006ccfc0
add esp, 0xc
push 4
push edi
xor eax, eax
inc eax
push eax
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x5b552c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea ecx, [esp + 0x274]
push ecx
push eax
call fcn.005a7355
add esp, 0xc
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.005ae893
add esp, 0xc
push ebx
call fcn.005b5155
add esp, 4
movzx eax, byte [esi + 0x6ef]
test eax, eax
je 0x5b5649
lea ecx, [esp + 0x370]
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 0x5b5823
lea eax, [esp + 0x1f0]
mov dword [eax], 0xffffffff
lea edi, [esp + 0x270]
mov dword [edi], 1
push dword [esi + 0x68c]
call fcn.005b115d
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x370], eax
mov dword [edi + 4], eax
push dword [esi + 0x690]
call fcn.005b115d
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x370], eax
mov dword [edi + 8], eax
xor eax, eax
push eax
push eax
lea ecx, [esp + 0x1f8]
push ecx
push eax
push eax
push 0xc
push edi
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x5b5649
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.005ae893
add esp, 0x10
jmp 0x5b5649
call fcn.006dadc4
push 0x100
lea ecx, [esp + 0x34]
push ecx
push dword [eax]
call fcn.005a7355
add esp, 0xc
mov ebx, eax
call fcn.006dadc4
push ebx
push dword [eax]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.005ae9f9
add esp, 0x10
push dword [esp + 0x24]
push dword [esp + 0x18]
push esi
call fcn.005b50d3
add esp, 0xc
jmp 0x5b5c71
mov ebx, dword [esp + 0x24]
push ebx
call fcn.005b5155
add esp, 4
xor eax, eax
cmp dword [esi + 0x1b8], 0
mov dword [esp], ebx
je 0x5b56bb
push 1
push esi
call fcn.004ed8af
add esp, 8
mov ecx, dword [esi + 0x1b8]
mov edi, esi
mov esi, dword [esi + 0x1bc]
call dword [section..00cfg]
xor eax, eax
push eax
push ebx
push esi
mov esi, edi
call ecx
add esp, 0xc
mov ebx, eax
xor eax, eax
push eax
push edi
call fcn.004ed8af
add esp, 8
test ebx, ebx
je 0x5b56b6
mov al, 1
cmp ebx, 2
mov ebx, dword [esp]
je 0x5b56bb
push ebx
push dword [esp + 0x18]
push esi
call fcn.005b50d3
add esp, 0xc
mov ebx, 0x2a
jmp 0x5b5c73
xor eax, eax
mov ebx, dword [esp]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x160]
cmp eax, 0x17
je 0x5b56d4
cmp eax, 2
jne 0x5b5af7
lea eax, [esp + 0x170]
push eax
call fcn.0063885c
add esp, 4
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x160]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x2c], 0
movzx ebx, word [esi + 0x190]
mov edi, dword [esi + 0x194]
mov edx, dword [esi + 0x528]
test edx, edx
jne 0x5b571e
test bx, bx
jne 0x5b571e
mov ebx, dword [esp]
jmp 0x5b5af7
mov dword [esp + 0x10], eax
pxor xmm0, 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
movdqa xmmword [esp + 0x370], xmm0
test edx, edx
je 0x5b57e9
push edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
call fcn.006e65e0
mov ecx, dword [esp + 0xc]
add esp, 4
cmp eax, 0xfe
ja 0x5b57e9
lea eax, [esp + 0x270]
push 0x100
push 0
push eax
call fcn.006ccfc0
add esp, 0xc
push 3
push dword [esp + 8]
push 0x750fca
call fcn.006e6670
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x5b5837
push 5
push dword [esp + 8]
push str.host_
call fcn.006e6670
add esp, 0xc
test eax, eax
jne 0x5b583c
add dword [esp + 4], 5
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 8]
jmp 0x5b58ca
cmp ecx, 2
je 0x5b5a0f
xor edx, edx
cmp ecx, 0x17
jne 0x5b5a30
mov word [esp + 0x370], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x372], ax
mov edx, 0x1c
jmp 0x5b5a30
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.005ae893
add esp, 0xc
jmp 0x5b5649
add dword [esp + 4], 3
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
push 0x100
lea edx, [esp + 0x274]
push edx
push dword [esp + 0xc]
push dword [eax + 0x54]
push dword [esp + 0x1c]
push ecx
call fcn.00406420
add esp, 0x18
cmp eax, 2
je 0x5b5894
cmp eax, 1
mov edx, dword [esp + 8]
je 0x5b59c5
test eax, eax
jne 0x5b58bb
cmp dword [esp + 0x18], 0
mov ecx, dword [esp + 0x10]
jne 0x5b58ca
push dword [esp + 4]
push str.Couldnt_bind_to_interface__s
jmp 0x5b59e1
push dword [esp + 8]
lea eax, [esp + 0x274]
push eax
push dword [esp + 0xc]
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.005ae893
mov ecx, dword [esp + 0x1c]
add esp, 0x14
jmp 0x5b598c
cmp dword [esp + 0x18], 0
mov ecx, dword [esp + 0x10]
je 0x5b59d1
mov al, byte [ecx + 0x100]
mov byte [esp + 0xc], al
cmp edx, 2
je 0x5b58e6
cmp edx, 0x17
mov edx, dword [esp + 4]
jne 0x5b58f2
mov al, 2
jmp 0x5b58ec
mov al, 1
mov edx, dword [esp + 4]
mov byte [ecx + 0x100], al
lea ecx, [esp + 0x2c]
xor eax, eax
push ecx
push eax
push eax
push edx
push esi
call fcn.005b6ef1
add esp, 0x14
cmp eax, 1
jne 0x5b5918
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.005a965c
add esp, 8
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0xc]
mov byte [eax + 0x100], cl
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x5b59d1
push 0x100
lea ecx, [esp + 0x274]
push ecx
push dword [eax]
call fcn.005b69a8
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0x274]
push eax
push dword [esp + 0x10]
push dword [esp + 0x10]
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.005ae893
add esp, 0x18
push dword [esp + 0x2c]
push esi
call fcn.005b71a0
mov ecx, dword [esp + 0x10]
add esp, 8
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
cmp dword [eax + 4], ecx
jne 0x5b59c5
xor edx, edx
cmp ecx, 2
je 0x5b59ef
cmp ecx, 0x17
jne 0x5b5a30
push 0x25
lea eax, [esp + 0x274]
push eax
call fcn.006cd120
add esp, 8
test eax, eax
je 0x5b5ceb
mov ecx, eax
inc ecx
mov dword [esp + 0xc], ecx
mov byte [eax], 0
jmp 0x5b5cf3
push dword [esp]
push dword [esp + 0x18]
jmp 0x5b5bd9
mov byte [esi + 0xcbf], 0
push dword [esp + 4]
push str.Couldnt_bind_to__s
push esi
call fcn.005ae9f9
add esp, 0xc
jmp 0x5b5cd4
lea eax, [esp + 0x374]
push eax
lea eax, [esp + 0x274]
push eax
push 2
call fcn.00621b68
xor edx, edx
add esp, 0xc
test eax, eax
jle 0x5b5a30
mov word [esp + 0x370], 2
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x372], ax
mov edx, 0x10
mov dword [esp + 0xc], edx
lea eax, [esp + 0x370]
push edx
push eax
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x5b5a87
cmp edi, 2
jl 0x5b5c8b
dec edi
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.005ae893
add esp, 0xc
inc ebx
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x372], ax
push dword [esp + 0xc]
lea eax, [esp + 0x374]
jmp 0x5b5a3c
lea eax, [esp + 0x28]
mov dword [eax], 0x80
pxor xmm0, xmm0
lea ecx, [esp + 0x1f0]
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
mov edi, dword [esp + 8]
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x5b5bec
movzx eax, bx
push eax
push str.Local_port:__hu_n
push esi
call fcn.005ae893
add esp, 0xc
mov eax, dword [esp + 0x10]
mov byte [eax + 0x254], 1
mov ebx, edi
push 1
push ebx
call fcn.005b8008
add esp, 8
mov edi, esi
lea esi, [esp + 0x270]
push esi
call fcn.005b80e8
add esp, 4
movdqu xmm0, xmmword [esi]
mov esi, edi
mov edi, dword [esp + 0x14]
movdqu xmmword [edi + 0x268], xmm0
cmp dword [edi + 0x260], 2
jl 0x5b5b5d
push 3
push dword [edi + 0x27c]
push dword [edi + 0x278]
push esi
call fcn.004ea8ed
add esp, 0x10
push 4
push dword [edi + 0x284]
push dword [edi + 0x280]
push esi
call fcn.004ea8ed
add esp, 0x10
cmp byte [esp + 0x1c], 0
jne 0x5b5b6a
cmp dword [edi + 0x58], 4
jne 0x5b5b79
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x150], ebx
jmp 0x5b5c71
cmp byte [edi + 0x256], 0
je 0x5b5c42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
add eax, 0xffffd8cd
cmp eax, 2
jb 0x5b5c64
cmp ebx, 0xb
je 0x5b5c64
push 0x100
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.005a7355
add esp, 0xc
push eax
lea eax, [esp + 0x134]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.005ae893
add esp, 0x10
mov dword [esi + 0x92c], ebx
push dword [esp]
push edi
push esi
call fcn.005b50d3
add esp, 0xc
mov ebx, 7
jmp 0x5b5c73
mov eax, 0x100
lea ecx, [esp + 0x270]
push eax
push 0xff
push ecx
call fcn.006ccfc0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [esi + 0x92c], eax
mov eax, 0x100
push eax
lea eax, [esp + 0x274]
push eax
push ebx
call fcn.005a7355
add esp, 0xc
push eax
push ebx
push str.getsockname___failed_with_errno__d:__s
push esi
call fcn.005ae9f9
add esp, 0x10
push edi
jmp 0x5b5cd7
push dword [esp + 0x16c]
lea eax, [esp + 0x174]
push eax
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x5b5b86
mov eax, dword [esp]
mov ecx, dword [ebp + 0xc]
mov dword [edi + ecx*4 + 0x150], eax
xor ebx, ebx
mov ecx, dword [esp + 0x3f8]
xor ecx, ebp
call fcn.006c9121
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 0x100
lea edi, [esp + 0x270]
push eax
push 0xff
push edi
call fcn.006ccfc0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [esi + 0x92c], eax
mov eax, 0x100
push eax
push edi
push ebx
call fcn.005a7355
add esp, 0xc
push eax
push ebx
push str.bind_failed_with_errno__d:__s
push esi
call fcn.005ae9f9
add esp, 0x10
push dword [esp]
push dword [esp + 0x18]
push esi
call fcn.005b50d3
add esp, 0xc
mov ebx, 0x2d
jmp 0x5b5c73
mov dword [esp + 0xc], 0
lea eax, [esp + 0x378]
push eax
lea eax, [esp + 0x274]
push eax
push 0x17
call fcn.00621b68
add esp, 0xc
mov edx, 0x1c
test eax, eax
jle 0x5b5a30
mov word [esp + 0x370], 0x17
movzx eax, bx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x372], ax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x5b5819
push eax
call fcn.006d716d
add esp, 4
mov dword [esp + 0x388], eax
jmp 0x5b5819