Function at 0x508fe3
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff34
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov edi, 1
xor eax, eax
mov dword [ebp - 0x24], eax
xor edx, edx
mov dword [ebp - 0x18], edx
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 1
mov word [ebp - 0x26], 0
xor eax, eax
mov dword [ebp - 0x1c], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 4], eax
mov word [ebp - 0x28], 0
mov eax, dword [esi + edi*4]
test eax, eax
je 0x5090a4
cmp byte [eax], 0x2d
jne 0x5090a4
push 0x74
push eax
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x509045
xor edx, edx
mov dword [ebp - 0x10], edx
push 0x6e
push dword [esi + edi*4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x50905d
mov dword [ebp - 0x14], 1
push 0x62
push dword [esi + edi*4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x509075
mov dword [ebp - 0x18], 1
push 0x6b
push dword [esi + edi*4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x50908d
mov dword [ebp - 0x1c], 1
push 0x64
push dword [esi + edi*4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x5090a3
mov ebx, 1
inc edi
test ebx, ebx
je 0x5090e3
cmp dword [esi + edi*4], 0
jne 0x5090c0
push 0
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
push dword [esi + edi*4]
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x5090df
push 3
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
mov dword [ebp - 0x24], edi
inc edi
cmp dword [esi + edi*4], 0
jne 0x5090fb
push 0
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 0x20]
push dword [esi + eax*4]
call fcn.0054e28c
pop ecx
cmp eax, 0x5a
jbe 0x50913b
push 0
push 0x1452
call fcn.0042c771
push eax
mov edx, dword [ebp - 0x20]
push dword [esi + edx*4]
push 0x56ddc4
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x509963
inc edi
push dword [esi + edi*4]
call fcn.004e54ab
test eax, eax
je 0x50916f
push dword [esi + edi*4]
call fcn.005570e0
pop ecx
mov word [ebp - 0x26], ax
cmp word [ebp - 0x26], 0
ja 0x50916e
push 3
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
inc edi
mov ebx, dword [esi + edi*4]
test ebx, ebx
je 0x5091d7
push ebx
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x509197
push 3
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
inc edi
cmp dword [esi + edi*4], 0
jne 0x5091b0
push 0
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
push dword [esi + edi*4]
call fcn.005570e0
pop ecx
mov word [ebp - 0x28], ax
cmp word [ebp - 0x28], 0
ja 0x5091d6
push 3
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
inc edi
mov eax, dword [ebp - 0x20]
push dword [esi + eax*4]
call fcn.00508d16
mov ebx, eax
test ebx, ebx
je 0x50926c
cmp dword [ebx + 0x158], 0
jne 0x509221
push 0
push 0x1453
call fcn.0042c771
push eax
mov eax, dword [ebp - 0x20]
push dword [esi + eax*4]
push 0x56ddd9
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x509963
cmp word [ebp - 0x26], 0
je 0x50959d
mov dx, word [ebx + 0xc8]
cmp dx, word [ebp - 0x26]
je 0x50959d
movzx ecx, word [ebx + 0xc8]
push ecx
mov eax, dword [ebp - 0x20]
push dword [esi + eax*4]
push 0
push 0x1451
call fcn.0042c771
push eax
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x509963
call fcn.00508ad8
mov ebx, eax
test ebx, ebx
jne 0x509289
push 2
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
mov eax, dword [ebp - 0x20]
mov edx, dword [esi + eax*4]
push esi
push edi
mov edi, edx
mov esi, ebx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
lea eax, [ebx + 0x64]
mov edx, dword [ebp + 0x14]
add edx, 0x1170
push esi
push edi
mov esi, eax
mov edi, edx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov ax, word [ebp - 0x26]
mov word [ebx + 0xc8], ax
mov dword [ebx + 0x14c], 2
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebx + 0x178], eax
mov edx, dword [ebx + 0x178]
mov dword [ebx + 0x17c], edx
mov ecx, dword [ebx + 0x178]
mov dword [ebx + 0x180], ecx
mov dword [ebx + 0x158], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x15c], eax
mov edx, dword [ebp - 4]
mov dword [ebx + 0x160], edx
mov cx, word [ebp - 0x28]
mov word [ebx + 0x164], cx
xor eax, eax
mov dword [ebx + 0x168], eax
mov word [ebx + 0x16c], 0
cmp dword [ebp - 0x24], 0
je 0x509372
mov edx, dword [ebp - 0x24]
push dword [esi + edx*4]
push 0x64
lea ecx, [ebx + 0xca]
push ecx
call fcn.0042e5e3
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x190], eax
cmp word [ebp - 0x26], 0
jne 0x509442
push 0x5864bc
push 0x64
lea edx, [ebp - 0x9c]
push edx
call fcn.0042e5e3
mov ecx, dword [0x56cdd0]
mov dword [ebp - 0x30], ecx
cmp byte [ebx + 0xca], 0
je 0x5093c8
lea eax, [ebx + 0xca]
push eax
push 0x64
push 0x5864bc
call fcn.0042e5e3
mov dword [0x56cdd0], 2
push 0
push 1
lea edx, [ebx + 0xc8]
push edx
mov cx, word [0x563c12]
push ecx
mov ax, word [0x563c10]
push eax
call fcn.004f316d
mov dword [ebx + 0x18c], eax
lea edx, [ebp - 0x9c]
push edx
push 0x64
push 0x5864bc
call fcn.0042e5e3
mov ecx, dword [ebp - 0x30]
mov dword [0x56cdd0], ecx
cmp dword [ebx + 0x18c], 0xffffffff
jne 0x50952d
push ebx
call fcn.00508c2b
push 0
push 0x1454
call fcn.0042c771
push eax
push 0x56ddee
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0xc
xor eax, eax
jmp 0x509963
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov dword [ebx + 0x18c], eax
cmp dword [ebx + 0x18c], 0xffffffff
jne 0x509488
push ebx
call fcn.00508c2b
push 0
push 0x1455
call fcn.0042c771
push eax
push 0x56ddfe
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0xc
xor eax, eax
jmp 0x509963
push 0x5864bc
push 0x64
lea edx, [ebp - 0x9c]
push edx
call fcn.0042e5e3
mov ecx, dword [0x56cdd0]
mov dword [ebp - 0x30], ecx
cmp byte [ebx + 0xca], 0
je 0x5094ca
lea eax, [ebx + 0xca]
push eax
push 0x64
push 0x5864bc
call fcn.0042e5e3
mov dword [0x56cdd0], 2
mov dx, word [ebx + 0xc8]
push edx
push dword [ebx + 0x18c]
call fcn.004f30ad
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x9c]
push ecx
push 0x64
push 0x5864bc
call fcn.0042e5e3
mov eax, dword [ebp - 0x30]
mov dword [0x56cdd0], eax
cmp dword [ebp - 0x2c], 0
jne 0x50952d
push ebx
call fcn.00508c2b
push 0
push 0x1456
call fcn.0042c771
push eax
push str.__sockudp:__s
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0xc
xor eax, eax
jmp 0x509963
push 0x23
push 0x8038
push dword [0x56f018]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_WSAAsyncSelect
cmp dword [ebx + 0x18c], 0xffffffff
je 0x50959d
mov dword [ebp - 0x38], 0x10
lea edx, [ebp - 0x38]
push edx
lea ecx, [ebp - 0xcc]
push ecx
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x50959d
push dword [ebp - 0xc8]
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x64
lea eax, [ebx + 0xca]
push eax
call fcn.0042e5e3
mov dx, word [ebp - 0xca]
push edx
call sub.WSOCK32.dll_ntohs
mov word [ebx + 0x12e], ax
cmp dword [ebp - 0x18], 0
je 0x5095c1
cmp dword [esi + edi*4], 0
je 0x5095c1
push dword [esi + edi*4]
call fcn.005570e0
pop ecx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jg 0x5095c0
xor ecx, ecx
mov dword [ebp - 0x18], ecx
inc edi
cmp dword [esi + edi*4], 0
jne 0x50960d
cmp dword [ebp - 0x14], 0
jne 0x5095e6
cmp dword [ebx + 0x15c], 0
jne 0x5095dc
push ebx
call fcn.00508c2b
mov eax, 1
jmp 0x509963
mov edx, dword [ebp + 0xc]
push esi
mov esi, 0x56de1e
mov edi, edx
mov eax, edi
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop esi
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x34], edx
push dword [ebp + 0xc]
call fcn.0054e28c
pop ecx
mov edi, eax
jmp 0x5096c1
cmp dword [ebp - 0x10], 0
je 0x50961b
mov eax, dword [esi + edi*4]
cmp byte [eax], 0x26
je 0x509661
mov edx, dword [ebp + 0xc]
mov byte [edx], 0
push esi
push dword [ebp + 0xc]
push edi
call fcn.004e56b5
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x34], ecx
push dword [ebp + 0xc]
call fcn.0054e28c
pop ecx
mov edi, eax
cmp dword [ebp - 0x14], 0
je 0x5096b3
mov eax, dword [ebp + 0xc]
cmp byte [eax + edi - 1], 0xa
je 0x5096b3
push 0x56de22
push dword [ebp + 0xc]
call fcn.0054e1b0
add esp, 8
add edi, 2
jmp 0x5096b3
push dword [ebp + 0x10]
push dword [esi + edi*4]
call fcn.0042aa5c
test eax, eax
jne 0x5096a8
cmp dword [ebx + 0x15c], 0
jne 0x50967f
push ebx
call fcn.00508c2b
push 0
push 0x1457
call fcn.0042c771
push eax
push dword [esi + edi*4]
push 0x56de26
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x509963
mov edx, dword [eax]
add edx, dword [eax + 0xc]
mov dword [ebp - 0x34], edx
mov edi, dword [eax + 8]
cmp dword [ebp - 0x18], 0
je 0x5096c1
cmp edi, dword [ebp - 0x18]
jle 0x5096c1
mov edi, dword [ebp - 0x18]
cmp dword [ebx + 0x140], 0
je 0x50977a
mov eax, dword [ebx + 0x144]
add eax, edi
cmp eax, 0x4000
jle 0x509718
cmp dword [ebx + 0x15c], 0
jne 0x5096ec
push ebx
call fcn.00508c2b
push 0
push 0x1458
call fcn.0042c771
push eax
mov edx, dword [ebp - 0x20]
push dword [esi + edx*4]
push str.__sockudp:__s__s
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x509963
mov edx, dword [ebx + 0x144]
add edx, edi
add edx, 0xa
push edx
push dword [ebx + 0x140]
call fcn.0055a23c
add esp, 8
test eax, eax
jne 0x509757
cmp dword [ebx + 0x15c], 0
jne 0x509745
push ebx
call fcn.00508c2b
push 2
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
mov edx, eax
mov dword [ebx + 0x140], edx
push edi
push dword [ebp - 0x34]
add edx, dword [ebx + 0x144]
push edx
call fcn.0054e09c
add esp, 0xc
add dword [ebx + 0x144], edi
jmp 0x5097cc
lea eax, [edi + 0xa]
push eax
call fcn.00559d70
pop ecx
mov dword [ebx + 0x140], eax
cmp dword [ebx + 0x140], 0
jne 0x5097b4
cmp dword [ebx + 0x15c], 0
jne 0x5097a2
push ebx
call fcn.00508c2b
push 2
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x509963
push edi
push dword [ebp - 0x34]
push dword [ebx + 0x140]
call fcn.0054e09c
add esp, 0xc
mov dword [ebx + 0x144], edi
lea eax, [ebp - 0xc]
mov dword [ebp - 0xb0], eax
lea edx, [ebp - 4]
mov dword [eax], edx
xor ecx, ecx
mov dword [eax + 4], ecx
mov word [ebp - 0xb2], 4
mov word [ebp - 0xb4], 2
lea esi, [ebp - 0xbc]
push 0x10
push 0
lea eax, [ebp - 0xac]
push eax
call fcn.0054e10c
add esp, 0xc
mov word [ebp - 0xac], 2
movsx edx, word [esi + 0xa]
push edx
mov ecx, dword [esi + 0xc]
push dword [ecx]
lea eax, [ebp - 0xa8]
push eax
call fcn.0054e09c
add esp, 0xc
mov dx, word [ebp - 0x28]
push edx
call sub.WSOCK32.dll_htons
mov word [ebp - 0xaa], ax
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax]
mov dword [ebp - 0xa8], edx
mov eax, dword [ebx + 0x144]
cmp eax, 0x2000
jle 0x50985c
mov eax, 0x2000
push 0x10
lea edx, [ebp - 0xac]
push edx
push 0
push eax
push dword [ebx + 0x140]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_sendto
mov edi, eax
cmp edi, 0xffffffff
jne 0x5098c6
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x509896
mov eax, 1
jmp 0x509963
mov dword [ebx + 0x184], eax
movzx edx, ax
shl edx, 0x10
or edx, 2
push edx
push dword [ebx + 0x18c]
push 0x8038
push dword [0x56f018]
call sub.USER32.dll_PostMessageA
mov eax, 1
jmp 0x509963
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebx + 0x17c], eax
test edi, edi
jle 0x50990e
add dword [ebx + 0x170], edi
cmp edi, dword [ebx + 0x144]
jge 0x50990e
sub dword [ebx + 0x144], edi
push dword [ebx + 0x144]
add edi, dword [ebx + 0x140]
push edi
push dword [ebx + 0x140]
call fcn.0054e0c0
add esp, 0xc
mov eax, 1
jmp 0x509963
push dword [ebx + 0x140]
call fcn.00559c5c
pop ecx
xor edx, edx
mov dword [ebx + 0x140], edx
xor ecx, ecx
mov dword [ebx + 0x144], ecx
cmp dword [0x56cdd8], 0
je 0x50994f
cmp dword [ebx + 0x15c], 0
je 0x50994f
push ebx
push 0
push 0x803a
push dword [0x56f018]
call sub.USER32.dll_PostMessageA
cmp dword [ebx + 0x15c], 0
jne 0x50995e
push ebx
call fcn.00508c2b
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10