Function at 0x500ce0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
push edi
push 4
lea eax, [ebp + 0x1338]
push eax
push 0x80
mov word [eax], 1
mov eax, dword [ebp + 0x1310]
push 0xffff
push eax
mov word [ebp + 0x133a], 0xa
call sub.WS2_32.dll_setsockopt
call dword [sym.imp.MSVCR80.dll__errno]
mov dword [eax], 0
mov ebx, dword [ebp + 0x1310]
lea esi, [ebp + 8]
push esi
call fcn.00507e40
movzx eax, ax
add esp, 4
cmp eax, 2
mov dword [ebp + 0x133c], eax
jge 0x500d86
push str.Error_Getting_TCP_DNS_Message
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
cmp byte [0x617f22], 1
jb 0x500d72
push 0x5e7878
push 0x6180b8
call fcn.00435820
add esp, 8
mov ecx, dword [ebp + 0x1310]
push ecx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
movzx edx, word [esi]
push edx
call sub.WS2_32.dll_ntohs
lea eax, [ebp + 0xa]
lea ecx, [eax + 0xc]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
test dword [eax], 0x800000
jne 0x50178c
movzx edx, word [eax + 4]
push edx
call sub.WS2_32.dll_ntohs
cmp ax, 1
jne 0x50178c
mov eax, dword [ebp]
movzx ecx, word [eax + 6]
push ecx
call sub.WS2_32.dll_ntohs
test ax, ax
jne 0x50178c
mov edx, dword [ebp]
movzx eax, word [edx + 4]
push eax
mov esi, 1
call sub.WS2_32.dll_ntohs
cmp ax, si
jb 0x500e4a
lea edi, [ebp + 0x1008]
lea ebx, [esi + 1]
mov ecx, dword [ebp]
push ecx
mov ecx, dword [ebp + 4]
push edi
call fcn.004feb60
movzx edx, ax
add dword [ebp + 4], edx
mov eax, dword [ebp + 4]
movzx eax, word [eax]
add esp, 8
push eax
call sub.WS2_32.dll_ntohs
add dword [ebp + 4], ebx
mov word [ebp + 0x1342], ax
mov eax, dword [ebp + 4]
movzx ecx, word [eax]
push ecx
call sub.WS2_32.dll_ntohs
add dword [ebp + 4], ebx
mov word [ebp + 0x1344], ax
mov edx, dword [ebp]
movzx eax, word [edx + 4]
push eax
add esi, 1
call sub.WS2_32.dll_ntohs
movzx ecx, ax
cmp esi, ecx
jle 0x500df1
mov edx, dword [ebp + 0x1328]
test edx, edx
je 0x500ee8
xor al, al
lea ebx, [ebx]
movzx ecx, al
mov ecx, dword [ecx*4 + 0x5edf8c]
test ecx, ecx
je 0x500e8c
cmp ecx, edx
je 0x500e7a
add al, 1
cmp al, 0x7d
jb 0x500e60
jmp 0x500e8c
movzx eax, al
lea eax, [eax*4 + 0x5edf8c]
test eax, eax
jne 0x500f21
xor al, al
mov edi, edi
movzx ecx, al
mov ecx, dword [ecx*4 + 0x5efff8]
test ecx, ecx
je 0x500eb8
cmp ecx, edx
je 0x500eaa
add al, 1
cmp al, 0x10
jb 0x500e90
jmp 0x500eb8
movzx eax, al
lea eax, [eax*4 + 0x5efff8]
test eax, eax
jne 0x500f21
xor al, al
lea ebx, [ebx]
movzx ecx, al
mov ecx, dword [ecx*4 + 0x5f0000]
test ecx, ecx
je 0x500ee8
cmp ecx, edx
je 0x500eda
add al, 1
cmp al, 0xe
jb 0x500ec0
jmp 0x500ee8
movzx eax, al
lea eax, [eax*4 + 0x5f0000]
test eax, eax
jne 0x500f21
push str.DNS_TCP_Query__Access_Denied
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
mov al, 1
call fcn.00509880
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov edx, dword [eax]
and edx, 0xf5ffffff
or edx, 0x5000000
mov dword [eax], edx
jmp 0x5017dd
mov ecx, dword [ebp]
mov eax, dword [ecx]
shr eax, 0x13
and eax, 0xf
je 0x500fe3
lea ecx, [eax - 1]
cmp ecx, 4
ja case.0x500f3a.3
jmp dword [ecx*4 + 0x5017f8]
push str.Inverse_query_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
jmp 0x500fa9
push str.Server_Status_Request_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
jmp 0x500fa9
push str.Notify_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
jmp 0x500fa9
push str.Dynamic_Update_not_needed_supported_by_Dual_Server
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
jmp 0x500fa9
push eax
push str.OpCode__u_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp byte [0x617f22], 1
jb 0x500fc4
push 0x5e7878
push 0x6180b8
call fcn.00435820
add esp, 8
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov edx, dword [eax]
and edx, 0xf4ffffff
or edx, 0x4000000
mov dword [eax], edx
jmp 0x5017dd
movzx eax, word [ebp + 0x1344]
cmp ax, 1
je 0x501041
movzx ecx, ax
push ecx
push str.DNS_Class__u_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp byte [0x617f22], 1
jb 0x501022
push 0x5e7878
push 0x6180b8
call fcn.00435820
add esp, 8
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov edx, dword [eax]
and edx, 0xf4ffffff
or edx, 0x4000000
mov dword [eax], edx
jmp 0x5017dd
cmp word [ebp + 0x1342], 0
jne 0x50109a
push str.missing_query_type
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
mov al, 1
call fcn.00509880
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov ecx, dword [eax]
and ecx, 0xf1ffffff
or ecx, 0x1000000
mov esi, ebp
mov dword [eax], ecx
call fcn.00501940
mov edx, dword [ebp + 0x1310]
push edx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
lea ebx, [ebp + 0x1008]
lea esi, [ebp + 0x1108]
mov edx, esi
mov dword [esp + 0x1c], ebx
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x5010b0
lea eax, [ebp + 0x1208]
mov edi, eax
mov ecx, ebx
sub edi, ebx
mov dl, byte [ecx]
mov byte [edi + ecx], dl
add ecx, 1
test dl, dl
jne 0x5010c8
call fcn.005077f0
mov ecx, esi
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x5010e0
sub ecx, esi
mov esi, eax
mov word [ebp + 0x1340], cx
call fcn.00507900
cmp al, 0x1a
mov byte [ebp + 0x1346], al
mov byte [esp + 0x3c], 0
jne 0x501147
mov cl, byte [0x5eede0]
movzx eax, word [ebp + 0x1340]
movzx dx, cl
cmp ax, dx
jbe 0x501147
movzx edx, ax
movzx ecx, cl
sub edx, ecx
lea eax, [edx + ebp + 0x1108]
push 0x5eece0
push eax
call dword [sym.imp.MSVCR80.dll__stricmp]
add esp, 8
test eax, eax
jne 0x501147
mov byte [ebp + 0x1346], 0x21
movzx ecx, word [ebp + 0x1342]
mov edi, 2
cmp cx, di
je 0x5011b4
cmp cx, 6
je 0x5011b4
cmp cx, 0xfc
je 0x5011b4
cmp cx, 0xfb
je 0x5011b4
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov ecx, dword [eax]
and ecx, 0xf4ffffff
or ecx, 0x4000000
mov esi, ebp
mov dword [eax], ecx
call fcn.00501940
call fcn.00506f00
push eax
push str.DNS_TCP_query___Query_Type_not_supported
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
cmp byte [0x617f24], 0
je 0x501770
mov al, byte [ebp + 0x1346]
cmp al, 0x1d
je 0x5011db
cmp al, 0x21
je 0x5011db
cmp al, 0x20
je 0x5011db
cmp al, 0x1f
jne 0x501770
mov edx, dword [0x5effd4]
cmp edx, dword [0x61972c]
jg 0x50123c
jl 0x5011f9
mov edx, dword [0x5effd0]
cmp edx, dword [0x619728]
jae 0x50123c
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov ecx, dword [eax]
and ecx, 0xfaffffff
or ecx, 0xa000000
mov esi, ebp
mov dword [eax], ecx
call fcn.00501940
push ebx
push str.Zone__s_expired
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
movzx ecx, cx
add ecx, 0xfffffffe
cmp ecx, 0xfa
ja case.0x501255.3
movzx edx, byte [ecx + 0x50181c]
jmp dword [edx*4 + 0x50180c]
cmp al, 0x1d
je 0x5012b9
cmp al, 0x20
je 0x5012b9
mov eax, ebp
call fcn.004fed60
mov esi, ebp
call fcn.00500380
mov eax, dword [ebp]
and dword [eax], 0xfffbffff
mov eax, dword [ebp]
and dword [eax], 0xdfffffff
mov eax, dword [ebp]
and dword [eax], 0xf0ffffff
call fcn.00501940
call fcn.00506f00
push eax
push str._s_not_found
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
mov eax, ebp
call fcn.004fed60
mov esi, ebp
call fcn.005001c0
mov eax, dword [ebp]
and dword [eax], 0xfffbffff
mov eax, dword [ebp]
and dword [eax], 0xdfffffff
mov eax, dword [ebp]
and dword [eax], 0xf0ffffff
call fcn.00501940
push ebx
push str.SOA_Sent_for_zone__s
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
cmp al, 0x1d
je 0x501341
cmp al, 0x20
je 0x501341
mov eax, ebp
call fcn.004fed60
mov eax, ebp
call fcn.00500540
mov eax, dword [ebp]
and dword [eax], 0xfffbffff
mov eax, dword [ebp]
and dword [eax], 0xdfffffff
mov eax, dword [ebp]
and dword [eax], 0xf0ffffff
mov esi, ebp
jmp 0x50128d
mov eax, ebp
call fcn.004fed60
mov esi, ebp
call fcn.00500070
call fcn.005006a0
mov eax, dword [ebp]
and dword [eax], 0xfffbffff
mov eax, dword [ebp]
and dword [eax], 0xdfffffff
mov eax, dword [ebp]
and dword [eax], 0xf0ffffff
call fcn.00501940
push ebx
push str.NS_Sent_for_Zone__s
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
cmp al, 0x1d
jne 0x50159f
mov eax, dword [0x5effac]
mov dword [esp + 0x18], eax
mov eax, ebp
call fcn.004fed10
mov esi, ebp
call fcn.005001c0
call fcn.00501940
test ax, ax
je case.0x501255.3
mov eax, ebp
call fcn.004fed10
call fcn.00500070
call fcn.00501940
test ax, ax
je case.0x501255.3
movzx eax, byte [0x5e96e9]
lea eax, [eax + eax*2]
mov ecx, dword [eax*4 + 0x6196f0]
mov ecx, dword [ecx]
lea eax, [eax*4 + 0x6196ec]
lea ebx, [ebp + 0x1308]
mov dword [esp + 0x14], edi
mov dword [ebx], eax
mov dword [ebx + 4], ecx
movzx eax, byte [0x5e96e9]
lea eax, [eax + eax*2]
mov edx, dword [eax*4 + 0x6196f0]
lea eax, [eax*4 + 0x6196ec]
lea esi, [esp + 0x20]
mov edi, ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
call fcn.00509f30
test al, al
je 0x5014df
mov eax, ebp
call fcn.004fed10
mov esi, ebx
call fcn.0053c0d0
mov eax, dword [eax + 0x1c]
mov ecx, dword [eax + 0xc]
cmp ecx, dword [0x61972c]
jl 0x5014ba
jg 0x501462
mov edx, dword [eax + 8]
cmp edx, dword [0x619728]
jbe 0x5014ba
call fcn.0053c0d0
mov eax, dword [eax + 0x1c]
movzx eax, byte [eax + 0x11]
add eax, 0xfffffffe
cmp eax, 0xb
ja case.0x50147d.3
movzx ecx, byte [eax + 0x501928]
jmp dword [ecx*4 + 0x501918]
mov esi, ebp
call fcn.005007b0
jmp 0x50149d
mov esi, ebp
call fcn.005007b0
jmp 0x50149d
mov esi, ebp
call fcn.00500a30
mov edx, dword [esp + 0x18]
cmp edx, dword [0x5effac]
jne 0x5014da
mov esi, ebp
call fcn.00501940
test ax, ax
je 0x5014da
add dword [esp + 0x14], 1
lea edi, [esp + 0x30]
mov eax, ebx
call fcn.00509f10
jmp 0x501406
lea edi, [esp + 0x28]
mov eax, ebx
call fcn.00509f10
jmp 0x501406
mov byte [esp + 0x3c], 1
movzx eax, byte [0x5e96e9]
mov edi, dword [esp + 0x14]
xor ebx, ebx
cmp byte [eax + 0x5eff76], bl
jbe 0x50153b
mov eax, ebp
call fcn.004fed10
push ebx
mov esi, ebp
call fcn.00500bd0
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp ecx, dword [0x5effac]
jne 0x501536
call fcn.00501940
test ax, ax
je 0x501536
movzx edx, byte [0x5e96e9]
movzx eax, byte [edx + 0x5eff76]
add ebx, 1
add edi, 1
cmp ebx, eax
jl 0x5014f4
jmp 0x50153b
mov byte [esp + 0x3c], 1
mov eax, ebp
call fcn.004fed10
mov esi, ebp
call fcn.005001c0
cmp byte [esp + 0x3c], 0
jne case.0x501255.3
mov ecx, dword [esp + 0x18]
cmp ecx, dword [0x5effac]
jne case.0x501255.3
call fcn.00501940
test ax, ax
je case.0x501255.3
mov eax, dword [esp + 0x1c]
add edi, 1
movzx edx, di
push edx
push eax
push str.Zone__s_with__d_RRs_Sent
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x10
mov al, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
cmp al, 0x20
mov eax, ebp
jne 0x50172f
mov ecx, dword [0x5effb0]
mov dword [esp + 0x14], ecx
call fcn.004fed10
mov esi, ebp
call fcn.005001c0
call fcn.00501940
test ax, ax
je case.0x501255.3
mov eax, ebp
call fcn.004fed10
call fcn.00500070
call fcn.00501940
test ax, ax
je case.0x501255.3
movzx eax, byte [0x5e96e9]
lea eax, [eax + eax*2]
mov edx, dword [eax*4 + 0x6196f0]
mov ecx, dword [edx]
lea eax, [eax*4 + 0x6196ec]
lea ebx, [ebp + 0x1308]
mov dword [esp + 0x18], edi
mov dword [ebx], eax
mov dword [ebx + 4], ecx
movzx eax, byte [0x5e96e9]
lea eax, [eax + eax*2]
mov ecx, dword [eax*4 + 0x6196f0]
lea eax, [eax*4 + 0x6196ec]
lea esi, [esp + 0x20]
mov edi, ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
call fcn.00509f30
test al, al
je 0x5016c7
mov eax, ebp
call fcn.004fed10
mov esi, ebx
call fcn.0053c0d0
mov eax, dword [eax + 0x1c]
mov edx, dword [eax + 0xc]
cmp edx, dword [0x61972c]
jl 0x5016b2
jg 0x50166c
mov eax, dword [eax + 8]
cmp eax, dword [0x619728]
jbe 0x5016b2
call fcn.0053c0d0
mov ecx, dword [eax + 0x1c]
mov al, byte [ecx + 0x11]
cmp al, 3
je 0x501690
cmp al, 8
je 0x501690
cmp al, 0xe
je 0x501690
lea edi, [esp + 0x30]
mov eax, ebx
call fcn.00509f10
jmp 0x501610
mov esi, ebp
call fcn.005008e0
mov edx, dword [esp + 0x14]
cmp edx, dword [0x5effb0]
jne 0x5016c2
call fcn.00501940
test ax, ax
je 0x5016c2
add dword [esp + 0x18], 1
lea edi, [esp + 0x28]
mov eax, ebx
call fcn.00509f10
jmp 0x501610
mov byte [esp + 0x3c], 1
mov eax, ebp
call fcn.004fed10
mov esi, ebp
call fcn.005001c0
cmp byte [esp + 0x3c], 0
jne case.0x501255.3
mov eax, dword [esp + 0x14]
cmp eax, dword [0x5effb0]
jne case.0x501255.3
call fcn.00501940
test ax, ax
je case.0x501255.3
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add ecx, 1
movzx edx, cx
push edx
push eax
push str.Zone__s_with__d_RRs_Sent
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x10
mov al, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
call fcn.004fed60
mov eax, dword [ebp]
mov ecx, dword [eax]
and ecx, 0xf9ffffff
or ecx, 0x9000000
mov dword [eax], ecx
mov esi, ebp
call fcn.00501940
push ebx
push str.Server_is_not_authority_for_zone__s
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp fcn.00509880
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov edx, dword [eax]
and edx, 0xf9ffffff
or edx, 0x9000000
mov dword [eax], edx
jmp 0x501747
push str.DNS_Query_Format_Error
push 0x5e7878
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
cmp byte [0x617f22], 1
jb 0x5017ba
push 0x5e7878
push 0x6180b8
call fcn.00435820
add esp, 8
mov eax, ebp
call fcn.004fed60
mov eax, dword [ebp]
mov ecx, dword [eax]
and ecx, 0xf1ffffff
or ecx, 0x1000000
mov dword [eax], ecx
mov edx, dword [ebp]
mov word [edx + 4], 0
mov esi, ebp
call fcn.00501940
mov eax, dword [ebp + 0x1310]
push eax
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret