Function at 0x4a0d40
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x6bc858]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
push 2
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x4a0da2
push str.init_BROADPORT_creat_sock_error.
push 0x675fac
push 0xd
push str.IDBHandle.cpp
push 0x6c5bd8
mov edx, str.InitUdpSock
mov ecx, 0x12c
call fcn.004ccb50
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f0da0
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 1
lea ecx, [ebp - 0x35]
push ecx
push 0x20
push 0xffff
push eax
mov byte [ebp - 0x35], 1
call edi
cmp eax, 0xffffffff
jne 0x4a0e16
push str.Got_an_error_on_init_BROADPORT_sock.
push 0x17
push str.IDBHandle.cpp
push 0x6c5bd8
mov edx, str.InitUdpSock
mov ecx, 0x12c
call fcn.004ccb50
mov eax, dword [esi]
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a0e03
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f0da0
mov esp, ebp
pop ebp
ret
mov eax, 0x1388
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4a0e5d
push 4
lea ecx, [ebp - 0x40]
push ecx
push 0x1005
push 0xffff
push eax
call edi
test eax, eax
jne 0x4a0e5d
cmp dword [ebp - 0x3c], eax
jle 0x4a0e8f
mov eax, dword [esi]
push 4
lea edx, [ebp - 0x3c]
push edx
push 0x1006
push 0xffff
push eax
call edi
test eax, eax
je 0x4a0e8f
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4a0e03
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f0da0
mov esp, ebp
pop ebp
ret
xor eax, eax
mov edx, 2
mov dword [ebp - 0x14], eax
push str.0.0.0.0
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov word [ebp - 0x14], dx
call fcn.00412330
mov eax, dword [ebp - 0x30]
mov edi, 0x10
cmp dword [ebp - 0x1c], edi
jae 0x4a0ec3
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x10], eax
call fcn.00412410
push 0x1c
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi]
mov word [ebp - 0x12], ax
push edi
lea eax, [ebp - 0x14]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4a0f62
push 0x1c
push str.init_BROADPORT_bind_127.0.0.1__d_error
push 0x33
push str.IDBHandle.cpp
push 0x6c5bd8
mov edx, str.InitUdpSock
mov ecx, 0x12c
call fcn.004ccb50
add esp, 0x14
push 0x68c9c0
lea ecx, [ebp - 0x34]
call fcn.004d2ae0
mov eax, dword [ebp - 0x30]
add esp, 4
cmp dword [ebp - 0x1c], edi
jae 0x4a0f33
lea eax, [ebp - 0x30]
push edi
push 0x67afb0
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.00429f90
lea ecx, [ebp - 0x34]
call fcn.00412410
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f0da0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.005f0da0
mov esp, ebp
pop ebp
ret