Function at 0x402648
Capabilities:
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd9c
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
push 0
push 2
push 2
call sub.WSOCK32.DLL_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402671
or eax, 0xffffffff
jmp 0x4029e4
push 0x10
push 0
lea edx, [ebp - 0x160]
push edx
call fcn.0045b10c
add esp, 0xc
mov word [ebp - 0x160], 2
push 0
call sub.WSOCK32.DLL_htonl
mov dword [ebp - 0x15c], eax
push 0xc7b
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x15e], ax
mov dword [ebp - 4], 1
cmp byte [esi + 0x6c], 0
je 0x40270b
push 4
lea ecx, [ebp - 4]
push ecx
push 0x20
push 0xffff
push ebx
call sub.WSOCK32.DLL_setsockopt
inc eax
jne 0x4026de
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffffe
jmp 0x4029e4
mov dword [ebp - 4], 1
push 4
lea edx, [ebp - 4]
push edx
push 0x10
push 0xffff
push ebx
call sub.WSOCK32.DLL_setsockopt
inc eax
jne 0x40270b
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffffd
jmp 0x4029e4
push 0x10
lea edx, [ebp - 0x160]
push edx
push ebx
call sub.WSOCK32.DLL_bind
inc eax
jne 0x40272d
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffffc
jmp 0x4029e4
push 0x10
push 0
lea edx, [ebp - 0x150]
push edx
call fcn.0045b10c
add esp, 0xc
mov word [ebp - 0x150], 2
cmp byte [esi + 0x6c], 0
je 0x40275e
push 0xffffffffffffffff
call sub.WSOCK32.DLL_htonl
mov dword [ebp - 0x14c], eax
jmp 0x402773
lea ecx, [esi + 0x58]
push ecx
call sub.WSOCK32.DLL_inet_addr
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14c], eax
push 0xc7b
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x14e], ax
push esi
mov esi, str.RTA83XS
lea edi, [ebp - 0x140]
mov eax, edi
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov dl, byte [esi + 0x73]
mov byte [ebp - 0x139], dl
push 6
push esi
lea ecx, [ebp - 0x138]
push ecx
call fcn.0045b09c
add esp, 0xc
cmp byte [esi + 0x73], 2
jne 0x402882
lea eax, [esi + 0x14]
push eax
call sub.WSOCK32.DLL_inet_addr
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x4027db
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffffb
jmp 0x4029e4
push 4
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x132]
push ecx
call fcn.0045b09c
add esp, 0xc
lea eax, [esi + 0x28]
push eax
call sub.WSOCK32.DLL_inet_addr
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x402811
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffffa
jmp 0x4029e4
push 4
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x12e]
push ecx
call fcn.0045b09c
add esp, 0xc
lea eax, [esi + 0x3c]
push eax
call sub.WSOCK32.DLL_inet_addr
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x402847
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffff9
jmp 0x4029e4
push 4
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x12a]
push ecx
call fcn.0045b09c
movzx eax, word [esi + 0x50]
add esp, 0xc
sar eax, 8
mov byte [ebp - 0x126], al
mov eax, 0x1d
mov dl, byte [esi + 0x50]
mov byte [ebp - 0x125], dl
mov cl, byte [esi + 0x52]
mov byte [ebp - 0x124], cl
jmp 0x40289c
push 6
lea edx, [esi + 0x6d]
push edx
lea ecx, [ebp - 0x132]
push ecx
call fcn.0045b09c
add esp, 0xc
mov eax, 0x15
push 0x10
lea edx, [ebp - 0x150]
push edx
push 4
push eax
lea ecx, [ebp - 0x140]
push ecx
push ebx
call sub.WSOCK32.DLL_sendto
inc eax
jne 0x4028c8
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffff8
jmp 0x4029e4
mov edx, dword [esi + 0x54]
mov dword [ebp - 0x10], edx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
xor eax, eax
mov dword [ebp - 0x264], eax
xor eax, eax
lea edx, [ebp - 0x260]
jmp 0x4028ed
cmp ebx, dword [edx]
je 0x4028f5
inc eax
add edx, 4
cmp eax, dword [ebp - 0x264]
jb 0x4028e5
mov edx, dword [ebp - 0x264]
cmp eax, edx
jne 0x402911
cmp edx, 0x40
jae 0x402911
mov dword [ebp + eax*4 - 0x260], ebx
inc dword [ebp - 0x264]
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x264]
push eax
push 0
push 0
push ecx
push 0x40
call sub.WSOCK32.DLL_select
test eax, eax
jle 0x4029d9
lea eax, [ebp - 0x264]
push eax
push ebx
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x4028c8
mov dword [ebp - 8], 0x10
push 0x100
push 0
lea edx, [ebp - 0x140]
push edx
call fcn.0045b10c
add esp, 0xc
lea ecx, [ebp - 8]
lea eax, [ebp - 0x150]
lea edx, [ebp - 0x140]
push ecx
push eax
push 0
push 0x100
push edx
push ebx
call sub.WSOCK32.DLL_recvfrom
cmp eax, 0xe
jl 0x4028c8
push 7
push str.RTA83XR
lea ecx, [ebp - 0x140]
push ecx
call fcn.0045b2e0
add esp, 0xc
test eax, eax
jne 0x4028c8
mov al, byte [ebp - 0x139]
cmp al, 2
je 0x4029b5
cmp al, 3
jne 0x4028c8
push 6
push esi
lea edx, [ebp - 0x138]
push edx
call fcn.0045b2e0
add esp, 0xc
test eax, eax
jne 0x4028c8
push ebx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
jmp 0x4029e4
push ebx
call sub.WSOCK32.DLL_closesocket
mov eax, 0xfffffff5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret