Function at 0x4a8072
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x9c
mov dword [esp + 4], str.rescaning
mov dword [esp], 0x5694e0
call fcn.004c8905
mov dword [esp], eax
call fcn.004c8cf3
mov dword [ebx + 0x58], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 0x3c], eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4a80da
mov eax, str.socket
call fcn.004a74fc
jmp 0x4a8529
lea edx, [ebp - 0x6c]
mov dword [ebp - 0x6c], 1
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov word [ebp - 0x58], 2
sub esp, 0xc
mov dword [esp], 0x162e
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x54], 0
push edi
mov word [ebp - 0x56], ax
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 8], 0x10
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
inc eax
jne 0x4a819a
mov eax, str.bind
call fcn.004a74fc
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 0x3c], 0xffffffff
push esi
mov dword [esp + 4], fcn.004a8072
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.004cdd1c
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x1f4
call sym.winbox.exe_addTimer_unsigned_int__EventListener__void__bool_
mov dword [ebx + 0x58], eax
jmp 0x4a8529
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [ebp - 0x60]
sub esp, 0x14
call fcn.004c706c
lea eax, [ebp - 0x60]
call fcn.004a7c26
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x7c], eax
mov esi, dword [ebp - 0x80]
cmp dword [ebp - 0x7c], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
je 0x4a837c
mov dword [esp], 2
call eax
sub esp, 0xc
mov esi, eax
cmp eax, 0xffffffff
jne 0x4a822e
mov eax, str.socket
call fcn.004a74fc
jmp 0x4a8373
lea eax, [ebp - 0x68]
mov dword [ebp - 0x68], 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 1
sub esp, 0xc
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0xffff
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov word [ebp - 0x34], 2
sub esp, 0x14
mov dword [esp], 0x162e
call dword [sym.imp.WS2_32.dll_htons]
push edx
mov word [ebp - 0x32], ax
mov eax, dword [ebp - 0x7c]
mov eax, dword [eax]
mov dword [esp + 4], str.connecting_to
mov dword [esp], 0x5694e0
mov dword [ebp - 0x30], eax
call fcn.004c8905
lea ecx, [ebp - 0x48]
mov edi, eax
mov eax, dword [ebp - 0x7c]
mov dword [esp], eax
call fcn.004c9d70
mov edx, dword [ebp - 0x48]
push ecx
mov eax, dword [edx]
add edx, 4
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.004c8922
lea ecx, [ebp - 0x48]
mov edi, eax
call fcn.004c616a
mov dword [esp], edi
call fcn.004c8cf3
lea eax, [ebp - 0x34]
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
inc eax
jne 0x4a8325
mov eax, str.connect
call fcn.004a74fc
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_closesocket]
push eax
jmp 0x4a8373
mov eax, dword [ebx + 0x44]
mov edi, dword [ebx + 0x48]
mov dword [esp], eax
sub edi, eax
sar edi, 2
call fcn.004c99c3
shr eax, 2
cmp edi, eax
jne 0x4a836a
mov eax, dword [ebx + 0x48]
sub eax, dword [ebx + 0x44]
mov edx, 1
lea ecx, [ebx + 0x44]
sar eax, 2
mov dword [esp + 4], 4
add eax, eax
cmove eax, edx
shl eax, 2
mov dword [esp], eax
call fcn.004c70ac
push edi
push edi
mov eax, dword [ebx + 0x48]
mov dword [eax], esi
add dword [ebx + 0x48], 4
add dword [ebp - 0x7c], 4
jmp 0x4a81eb
mov dword [esp], 0x17
call eax
mov dword [ebx + 0x40], eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x4a846e
lea edx, [ebp - 0x64]
mov dword [ebp - 0x64], 1
lea esi, [ebp - 0x34]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov word [ebp - 0x34], 0x17
sub esp, 0xc
mov dword [esp], 0x162e
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
push ecx
mov edi, edx
mov ecx, 4
mov word [ebp - 0x32], ax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
inc eax
mov eax, str.bind6
je 0x4a8455
lea edx, [ebp - 0x48]
xor eax, eax
mov ecx, 5
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x40]
mov word [ebp - 0x48], 0x2ff
mov byte [ebp - 0x39], 1
mov dword [esp + 0x10], 0x14
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0xc
mov dword [esp + 4], 0x29
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
jns 0x4a846e
mov eax, str.IPV6_ADD_MEMBERSHIP
call fcn.004a74fc
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 0x40], 0xffffffff
push edx
mov ecx, dword [ebx + 0x4c]
call method.IWindow.getHandle__
mov dword [esp + 0xc], 1
mov esi, dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 8], 0x8001
mov dword [esp], eax
call esi
sub esp, 0x10
cmp dword [ebx + 0x40], 0xffffffff
je 0x4a84c8
mov ecx, dword [ebx + 0x50]
call method.IWindow.getHandle__
mov dword [esp + 0xc], 1
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 8], 0x8001
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 4], fcn.004a7dc4
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.004cdd1c
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x960
call sym.winbox.exe_addTimer_unsigned_int__EventListener__void__bool_
mov ecx, ebx
mov dword [ebx + 0x5c], eax
call fcn.004a7e9e
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x60]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.004c7160
lea ecx, [ebp - 0x60]
push eax
push eax
call fcn.004c707a
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4