Function at 0x106f3b0
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x111121c]
or dword [ebp - 0x28], 0xffffffff
or dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 4], eax
push ebx
xor eax, eax
push esi
push edi
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor esi, esi
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ebx, ecx
mov eax, dword [ebx + 0x160]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov word [ebp - 0x24], 2
mov word [ebp - 0x14], 2
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], eax
mov edi, 0x80070000
mov eax, dword [ebp - 0x30]
inc dword [ebp - 0x30]
cmp eax, 3
jge 0x106f56f
and word [ebp - 0x12], 0
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
push 0
push 2
push 2
mov dword [ebp - 0x28], eax
call sub.WSOCK32.dll_socket
test esi, esi
mov dword [ebp - 0x2c], eax
jl 0x106f43e
cmp dword [ebp - 0x28], 0xffffffff
je 0x106f443
cmp eax, 0xffffffff
jne 0x106f464
call sub.WSOCK32.dll_WSAGetLastError
test eax, eax
jg 0x106f455
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
jmp 0x106f464
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
and esi, 0xffff
or esi, edi
test esi, esi
jl 0x106f49c
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x106f49c
call sub.WSOCK32.dll_WSAGetLastError
test eax, eax
jg 0x106f48d
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
jmp 0x106f49c
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
and esi, 0xffff
or esi, edi
test esi, esi
mov dword [ebp - 0x38], 0x10
jl 0x106f4dd
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
call sub.WSOCK32.dll_getsockname
cmp eax, 0xffffffff
jne 0x106f4dd
call sub.WSOCK32.dll_WSAGetLastError
test eax, eax
jg 0x106f4ce
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
jmp 0x106f4dd
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
and esi, 0xffff
or esi, edi
push dword [ebp - 0x12]
call sub.WSOCK32.dll_ntohs
movzx eax, ax
push 2
cdq
pop ecx
idiv ecx
cmp edx, 1
je 0x106f529
push dword [ebp - 0x12]
call sub.WSOCK32.dll_ntohs
inc eax
push eax
call sub.WSOCK32.dll_htons
test esi, esi
mov word [ebp - 0x22], ax
jl 0x106f55e
push 0x10
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x2c]
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x106f55e
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2740
jne 0x106f53b
push dword [ebp - 0x28]
call sub.WSOCK32.dll_closesocket
push dword [ebp - 0x2c]
call sub.WSOCK32.dll_closesocket
jmp 0x106f565
call sub.WSOCK32.dll_WSAGetLastError
test eax, eax
jg 0x106f54d
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
jmp 0x106f565
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
and esi, 0xffff
or esi, edi
jmp 0x106f565
mov dword [ebp - 0x34], 1
cmp dword [ebp - 0x34], 0
je 0x106f404
mov eax, dword [ebp - 0x28]
push dword [ebx + 0x160]
mov dword [ebx + 0x114], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 0x118], eax
call sub.WSOCK32.dll_ntohl
push dword [ebp - 0x12]
mov dword [ebx + 0x68], eax
mov dword [ebx + 0x44], eax
call sub.WSOCK32.dll_ntohs
push dword [ebp - 0x22]
mov word [ebx + 0x48], ax
call sub.WSOCK32.dll_ntohs
mov ecx, dword [ebp - 4]
mov word [ebx + 0x6c], ax
pop edi
mov eax, esi
pop esi
pop ebx
call fcn.0105eca9
leave
ret