Function at 0x4050d0
Capabilities:
Create udp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x338
mov ebx, dword [ecx]
mov edi, dword [ecx + 4]
call fcn.00403c30
cmp ebx, 1
jg 0x405239
jmp case.0x40510b.99
sub eax, 0x62
cmp eax, 0x14
ja case.0x40510b.99
jmp dword [eax*4 + 0x408298]
mov eax, dword [0x4093ec]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
test eax, eax
mov dword [ebp - 0x2c8], eax
jne 0x405295
mov eax, dword [0x4093ec]
mov dword [esp], str.Bad_timeout_value:__s_n
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
call fcn.0040158c
mov dword [esp], str.Warning:__r_option_not_supported_under_Windows._Running_without_it._n
call sub.msvcrt.dll_puts
jmp 0x405295
mov dword [ebp - 0x2d0], 1
jmp 0x405295
mov dword [ebp - 0x2d4], 1
jmp 0x405295
mov dword [0x409020], 1
jmp 0x405295
mov eax, dword [0x4093ec]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
test eax, eax
mov esi, eax
jne 0x405295
cmp dword [0x409020], 0
jne 0x405295
mov dword [esp], str.Bad_bandwidth_value__ignoring_it
call sub.msvcrt.dll_perror
jmp 0x405295
mov dword [ebp - 0x2ec], 1
jmp 0x405295
mov eax, dword [0x4093ec]
mov dword [ebp - 0x2e0], eax
jmp 0x405295
mov eax, dword [0x4093ec]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
test eax, eax
mov dword [ebp - 0x2f4], eax
jne 0x405295
mov eax, dword [0x4093ec]
mov dword [esp], str.Bad_number_of_retransmits:__s_n
mov dword [esp + 4], eax
jmp 0x40513d
mov edx, dword [0x4093ec]
mov dword [ebp - 0x2d8], edx
jmp 0x405295
call fcn.00401560
jmp 0x405142
mov dword [ebp - 0x2cc], 1
jmp 0x405295
mov dword [ebp - 0x2c4], 1
jmp 0x405295
mov dword [ebp - 0x2f4], 0
xor esi, esi
mov dword [ebp - 0x2d8], 0
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 0x2d4], 0
mov dword [ebp - 0x2d0], 0
mov dword [ebp - 0x2ec], 0
mov dword [ebp - 0x2c4], 0
mov dword [ebp - 0x2cc], 0
mov dword [ebp - 0x2c8], 0x3e8
mov dword [esp + 8], str.vrdelqhm:s:t:b:f:
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00404ac0
cmp eax, 0xffffffff
jne 0x4050ff
mov ecx, dword [ebp - 0x2cc]
test dword [ebp - 0x2c4], ecx
je 0x4052cc
mov dword [esp], str.Cannot_be_used_with_both_dump___d__and_verbose___v__options.
jmp 0x40539b
cmp dword [ebp - 0x2e0], 0
je 0x4052ea
cmp dword [ebp - 0x2c4], 0
je 0x4052ea
mov dword [esp], str.Cannot_be_used_with_both_dump___d__and_script_friendly___s__options.
jmp 0x40539b
mov eax, dword [ebp - 0x2c4]
test dword [ebp - 0x2d4], eax
je 0x405304
mov dword [esp], str.Cannot_be_used_with_both_dump___d__and_lmhosts___l__options.
call sub.msvcrt.dll_puts
mov edx, dword [ebp - 0x2c4]
test dword [ebp - 0x2d0], edx
je 0x40531e
mov dword [esp], str.Cannot_be_used_with_both_dump___d__and__etc_hosts___e__options.
call sub.msvcrt.dll_puts
mov ecx, dword [ebp - 0x2cc]
test dword [ebp - 0x2d4], ecx
je 0x405338
mov dword [esp], str.Cannot_be_used_with_both_verbose___v__and_lmhosts___l__options.
call sub.msvcrt.dll_puts
mov eax, dword [ebp - 0x2cc]
test dword [ebp - 0x2d0], eax
je 0x405352
mov dword [esp], str.Cannot_be_used_with_both_verbose___v__and__etc_hosts___e__options.
call sub.msvcrt.dll_puts
mov edx, dword [ebp - 0x2d0]
test dword [ebp - 0x2d4], edx
je 0x40536c
mov dword [esp], str.Cannot_be_used_with_both_lmhosts___l__and__etc_hosts___e__options.
call sub.msvcrt.dll_puts
mov ecx, dword [ebp - 0x2c4]
test dword [ebp - 0x2ec], ecx
je 0x405383
mov dword [esp], str.Cannot_be_used_with_both_dump___d__and__human_readable_service_names____h__options.
jmp 0x40539b
mov eax, dword [ebp - 0x2cc]
xor eax, 1
test dword [ebp - 0x2ec], eax
je 0x4053a5
mov dword [esp], str._Human_readable_service_names____h__option_cannot_be_used_without_verbose___v__option.
call sub.msvcrt.dll_puts
jmp 0x405142
cmp dword [ebp - 0x2d8], 0
je 0x405450
mov eax, dword [ebp - 0x2d8]
mov dword [esp + 4], 0x408160
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4053de
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edi, str.STDIN
mov dword [ebp - 0x2e4], eax
jmp 0x405400
mov edx, dword [ebp - 0x2d8]
mov dword [esp + 4], 0x408162
mov dword [esp], edx
call sub.msvcrt.dll_fopen
mov edi, dword [ebp - 0x2d8]
mov dword [ebp - 0x2e4], eax
cmp dword [ebp - 0x2e4], 0
jne 0x4054c4
mov ecx, dword [ebp - 0x2d8]
lea eax, [ebp - 0x248]
mov dword [esp + 8], str.Cannot_open_file__s
mov dword [esp + 4], 0x50
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call fcn.00404b50
cmp dword [0x409020], 0
jne 0x4054c4
lea eax, [ebp - 0x248]
mov dword [esp], eax
jmp 0x4055cf
mov eax, dword [0x4063f8]
sub ebx, eax
dec ebx
je 0x40545f
jmp 0x405142
mov eax, dword [edi + eax*4]
mov dword [esp], eax
call sub.msvcrt.dll__strdup
test eax, eax
mov ebx, eax
mov edi, eax
jne 0x405487
cmp dword [0x409020], 0
jne 0x405487
mov dword [esp], 0x408178
jmp 0x4055cf
lea eax, [ebp - 0x2a0]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004017ae
mov dword [ebp - 0x2e4], 0
test eax, eax
jne 0x4054c4
mov dword [esp + 4], ebx
mov dword [esp], str.Error:__s_is_not_an_IP_address_or_address_range._n
call sub.msvcrt.dll_printf
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x405142
cmp dword [0x409020], 0
jne 0x4054f8
cmp dword [ebp - 0x2d4], 0
jne 0x4054f8
cmp dword [ebp - 0x2e0], 0
jne 0x4054f8
cmp dword [ebp - 0x2d0], 0
jne 0x4054f8
mov dword [esp + 4], edi
mov dword [esp], str.Doing_NBT_name_scan_for_addresses_from__s_n_n
call sub.msvcrt.dll_printf
lea eax, [ebp - 0x1a8]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
push ecx
push ecx
je 0x40552a
cmp dword [0x409020], 0
jne 0x40552a
mov dword [esp], str.ERROR:_initializing_Winsock
jmp 0x4055cf
mov dword [esp + 8], 0x11
mov dword [esp + 4], 2
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
test eax, eax
mov ebx, eax
jns 0x405562
cmp dword [0x409020], 0
jne 0x405562
mov dword [esp], str.Failed_to_create_socket
jmp 0x4055cf
lea edx, [ebp - 0x268]
xor eax, eax
mov edi, edx
mov ecx, 4
rep stosd dword es:[edi], eax
mov word [ebp - 0x268], 2
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
inc eax
jne 0x4055a9
cmp dword [0x409020], 0
jne 0x4055a9
mov dword [esp], str.Failed_to_bind
jmp 0x4055cf
mov dword [esp], 0x104
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x2b8], eax
jne 0x4055e0
cmp dword [0x409020], 0
jne 0x4055e0
mov dword [esp], 0x408229
call sub.msvcrt.dll_perror
mov dword [esp], 1
jmp 0x405c72
mov eax, dword [ebp - 0x2b8]
mov dword [eax + 4], ebx
mov dword [eax], 1
mov dword [esp], 0x104
call sub.msvcrt.dll_malloc
test eax, eax
mov edi, eax
jne 0x40560a
cmp dword [0x409020], 0
je 0x4055c8
mov eax, dword [ebp - 0x2c8]
mov ecx, 0x3e8
mov dword [edi + 4], ebx
mov dword [edi], 1
mov dword [esp], 4
cdq
idiv ecx
mov dword [ebp - 0x2a4], 0x10
imul edx, edx, 0x3e8
mov dword [ebp - 0x2c8], eax
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x304], edx
mov dword [ebp - 0x294], edx
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x2dc], eax
jne 0x40566c
cmp dword [0x409020], 0
je 0x4055c8
mov dword [esp], 0x400
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x308], eax
jne 0x40568f
cmp dword [0x409020], 0
je 0x4055c8
test esi, esi
mov dword [ebp - 0x314], 0
je 0x4056ba
mov eax, 0x25317c00
cdq
idiv esi
cmp eax, 0xf423f
jle 0x4056ba
mov ecx, 0xf4240
cdq
idiv ecx
mov dword [ebp - 0x314], eax
lea eax, [ebp - 0x290]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 0x30c], ecx
call fcn.00402c78
mov dword [ebp - 0x2f8], eax
mov eax, dword [ebp - 0x2cc]
or eax, dword [ebp - 0x2c4]
or eax, dword [0x409020]
jne 0x40571b
cmp dword [ebp - 0x2d4], 0
jne 0x40571b
cmp dword [ebp - 0x2e0], 0
jne 0x40571b
cmp dword [ebp - 0x2d0], 0
jne 0x40571b
call fcn.004017fe
fld dword [0x4082ec]
mov dword [ebp - 0x2e8], 0
fstp dword [ebp - 0x2fc]
mov dword [ebp - 0x2f0], 0
jmp 0x405d48
lea eax, [ebp - 0x280]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
lea ecx, [ebx + 1]
mov dword [ebp - 0x300], 1
mov dword [ebp - 0x310], 0
mov dword [ebp - 0x31c], ecx
jmp 0x405c0f
mov eax, dword [ebp - 0x2b8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
push edx
je 0x4059c7
lea eax, [ebp - 0x2a4]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x258]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x308]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_recvfrom]
sub esp, 0x18
test eax, eax
mov esi, eax
jg 0x405818
mov eax, dword [ebp - 0x254]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push esi
lea esi, [ebp - 0x248]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_tRecvfrom_failed
mov dword [esp + 4], 0x50
mov dword [esp], esi
call fcn.00404b50
cmp dword [0x409020], 0
jne 0x405c0f
mov dword [esp], esi
jmp 0x40585a
lea eax, [ebp - 0x270]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
mov eax, dword [ebp - 0x308]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.004023d4
test eax, eax
mov esi, eax
jne 0x405864
cmp dword [0x409020], 0
jne 0x405c0f
mov dword [esp], str.parse_response_returned_NULL
call sub.msvcrt.dll_perror
jmp 0x405c0f
mov eax, dword [ebp - 0x254]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohl]
push ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
call fcn.00402d7f
test eax, eax
je 0x4059bf
mov eax, dword [ebp - 0x26c]
mov ecx, 0xf4240
cdq
idiv ecx
mov edx, dword [ebp - 0x270]
mov ecx, dword [ebp - 0x30c]
add eax, edx
xor edx, edx
sub eax, ecx
mov ecx, 0x3e8
mov dword [ebp - 0x324], eax
mov eax, dword [esi]
mov eax, dword [eax]
mov word [ebp - 0x316], ax
div cx
xor edx, edx
mov dword [ebp - 0x2bc], edx
mov word [ebp - 0x31e], ax
movzx eax, ax
sub dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x2c0], eax
mov eax, dword [ebp - 0x254]
fild qword [ebp - 0x2c0]
fsub dword [ebp - 0x2f0]
fld st(0)
fmul dword [0x4082f0]
fadd dword [ebp - 0x2f0]
fstp dword [ebp - 0x2f0]
fld st(0)
fchs
fldz
fucompi st(2)
fcmovbe st(0), st(1)
fstp st(1)
cmp dword [ebp - 0x2cc], 0
fld dword [ebp - 0x2fc]
fsub st(1), st(0)
fxch st(1)
fmul dword [0x4082f4]
faddp st(1)
fstp dword [ebp - 0x2fc]
je 0x405960
mov edx, dword [ebp - 0x2ec]
mov ecx, dword [ebp - 0x2e0]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
call fcn.00401c33
jmp 0x4059bf
cmp dword [ebp - 0x2c4], 0
je 0x405977
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401846
jmp 0x4059bf
cmp dword [ebp - 0x2d0], 0
je 0x40598a
mov dword [esp + 8], 0
jmp 0x40599b
cmp dword [ebp - 0x2d4], 0
je 0x4059a9
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00402096
jmp 0x4059bf
mov edx, dword [ebp - 0x2e0]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00401e74
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x2b8]
mov dword [eax + 4], ebx
mov dword [eax], 1
lea eax, [ebp - 0x288]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
mov edx, dword [ebp - 0x284]
sub edx, dword [ebp - 0x28c]
mov eax, dword [ebp - 0x288]
sub eax, dword [ebp - 0x290]
cmp edx, 0x80000000
adc eax, 0xffffffff
xor edx, edx
cmp eax, dword [ebp - 0x314]
setge dl
cmp dword [ebp - 0x300], 0
mov esi, edx
je 0x405c0f
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
push edx
je 0x405d5f
test esi, esi
je 0x405d5f
cmp dword [ebp - 0x2e4], 0
je 0x405b54
mov eax, dword [ebp - 0x2e4]
lea esi, [ebp - 0x1f8]
mov dword [esp + 4], 0x50
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_fgets
test eax, eax
je 0x405b03
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [ebp - 0x2dc]
inc eax
sete al
movzx eax, al
test eax, eax
push ecx
mov dword [edx], eax
je 0x405ab8
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], esi
mov dword [esp + 4], str._s___bad_IP_address_n
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x405d5f
mov dword [esp], 0
call dword [sym.imp.WS2_32.dll_ntohl]
push edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
call fcn.00402e33
test eax, eax
jne 0x405d5f
mov ecx, dword [ebp - 0x30c]
mov edx, dword [ebp - 0x2dc]
mov dword [esp + 8], ecx
mov eax, dword [edx]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00402216
jmp 0x405d5f
mov eax, dword [ebp - 0x2e4]
mov dword [esp], eax
call sub.msvcrt.dll_feof
test eax, eax
je 0x405b1a
jmp 0x405be7
mov eax, dword [ebp - 0x2d8]
mov dword [esp + 8], str.Read_failed_from_file__s
mov dword [esp + 4], 0x50
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x248]
mov dword [esp], eax
call fcn.00404b50
cmp dword [0x409020], 0
jne 0x405d5f
jmp 0x405442
mov eax, dword [ebp - 0x2dc]
mov ecx, dword [ebp - 0x310]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2a0]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00402ad4
test eax, eax
je 0x405be7
mov edx, dword [ebp - 0x2dc]
mov eax, dword [edx]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
call fcn.00402e33
test eax, eax
jne 0x405bc0
mov ecx, dword [ebp - 0x30c]
mov edx, dword [ebp - 0x2dc]
mov dword [esp + 8], ecx
mov eax, dword [edx]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00402216
lea eax, [ebp - 0x290]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
mov eax, dword [ebp - 0x2dc]
mov dword [ebp - 0x310], eax
jmp 0x405d5f
mov eax, dword [ebp - 0x2c8]
mov ecx, dword [ebp - 0x304]
mov dword [edi], 0
mov dword [ebp - 0x300], 0
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x294], ecx
lea eax, [ebp - 0x298]
mov ecx, dword [ebp - 0x31c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2b8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
test eax, eax
jg 0x405778
mov eax, dword [ebp - 0x2f4]
cmp dword [ebp - 0x2e8], eax
jl 0x405c77
mov eax, dword [ebp - 0x2f8]
mov dword [esp], eax
call fcn.00402d03
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov dword [esp], 0
call sub.msvcrt.dll_exit
fld dword [ebp - 0x2fc]
fmul dword [0x4082f8]
inc dword [ebp - 0x2e8]
fnstcw word [ebp - 0x2b2]
mov ax, word [ebp - 0x2b2]
fadd dword [ebp - 0x2f0]
or ah, 0xc
mov word [ebp - 0x2b4], ax
fimul dword [ebp - 0x2e8]
fldcw word [ebp - 0x2b4]
fistp dword [ebp - 0x2b0]
fldcw word [ebp - 0x2b2]
mov esi, dword [ebp - 0x2b0]
mov dword [ebp - 0x2b0], esi
fild dword [ebp - 0x2b0]
fld dword [0x4082fc]
fucompi st(1)
fstp st(0)
jbe 0x405ce1
mov esi, 2
mov dword [ebp - 0x2b0], esi
fild dword [ebp - 0x2b0]
fld dword [0x408300]
fxch st(1)
fucompi st(1)
fstp st(0)
jbe 0x405d00
mov esi, 0x3c
lea eax, [ebp - 0x278]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00404c80
mov eax, dword [ebp - 0x278]
add esi, dword [ebp - 0x280]
cmp eax, esi
jge 0x405d30
sub esi, eax
mov dword [esp], esi
call fcn.00404d20
mov eax, dword [ebp - 0x2b8]
mov dword [edi + 4], ebx
mov dword [edi], 1
mov dword [eax + 4], ebx
mov dword [eax], 1
mov eax, dword [ebp - 0x2f4]
cmp dword [ebp - 0x2e8], eax
jle 0x405740
jmp 0x405c57
mov dword [edi + 4], ebx
mov dword [edi], 1
jmp 0x405c0f