Function at 0x40f0d0
Capabilities:
Reference cloudflare dns server

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov edi, dword [0x441df4]
xor ebp, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov esi, dword [edi]
cmp esi, edi
je 0x40f11a
mov eax, esi
mov esi, dword [esi]
push eax
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
call sub.MFC42.DLL_operatordelete
mov ecx, dword [0x441df8]
add esp, 4
dec ecx
cmp esi, edi
mov dword [0x441df8], ecx
jne 0x40f0ed
lea eax, [esp + 0x14]
push eax
push ebp
call sub.iphlpapi.dll_GetAdaptersInfo
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea edx, [esp + 0x14]
mov edi, eax
push edx
push edi
mov dword [esp + 0x24], edi
call sub.iphlpapi.dll_GetAdaptersInfo
mov esi, eax
cmp esi, ebp
je 0x40f1f0
push edi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [0x441ff4]
add esp, 4
cmp eax, ebp
je 0x40f1e6
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 1
je 0x40f180
mov ecx, dword [0x441fdc]
cmp dword [ecx], ebp
jne 0x40f1e6
cmp eax, 1
jle 0x40f1e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x436030]
cmp eax, ebp
jge 0x40f1a5
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40f1d8
mov eax, dword [0x436030]
push 1
push eax
push 0xd7e
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
push esi
push str.AddDnsServerRoute__Failed_to_call_GetAdaptersInfo__error:_d
call fcn.0041c506
add esp, 0x18
call fcn.0041c4cc
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x40fa5f
mov eax, dword [0x441ff4]
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x40f293
mov ecx, dword [0x441fd4]
mov eax, dword [ecx]
cmp eax, 3
je 0x40f22c
mov edx, dword [0x441fdc]
cmp dword [edx], 0
jne 0x40f293
cmp eax, 3
jle 0x40f293
call ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f24b
mov eax, dword [0x441fa0]
mov dword [0x436030], eax
call fcn.0041c4b1
test eax, eax
je 0x40f285
mov ecx, dword [0x436030]
push 3
push ecx
push 0xd85
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea edx, [ebp + 0x10c]
push edx
push str.AddDnsServerRoute__adapter:__s_n
call fcn.0041c506
add esp, 0x18
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x19c]
mov ecx, dword [esp + 0x90]
cmp eax, ecx
jne 0x40f34d
mov eax, dword [0x441ff4]
test eax, eax
je 0x40fa50
mov ecx, dword [0x441fd4]
mov eax, dword [ecx]
cmp eax, 3
je 0x40f2da
mov edx, dword [0x441fdc]
cmp dword [edx], 0
jne 0x40fa50
cmp eax, 3
jle 0x40fa50
call ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f2f9
mov eax, dword [0x441fa0]
mov dword [0x436030], eax
call fcn.0041c4b1
test eax, eax
je 0x40f33a
mov ecx, dword [0x436030]
push 3
push ecx
push 0xd89
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
mov eax, dword [ebp + 0x19c]
lea edx, [ebp + 0x10c]
push edx
push eax
push str.AddDnsServerRoute__adapter__d_:_s__our_adapter__pass_n
call fcn.0041c506
add esp, 0x1c
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40fa50
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x34
mov eax, dword [ebp + 0x19c]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call sub.iphlpapi.dll_GetPerAdapterInfo
mov ebx, eax
test ebx, ebx
je 0x40f594
mov eax, dword [0x441ff4]
cmp ebx, 0x6f
je 0x40f421
test eax, eax
je 0x40fa50
mov ecx, dword [0x441fd4]
mov eax, dword [ecx]
cmp eax, 1
je 0x40f3b0
mov edx, dword [0x441fdc]
cmp dword [edx], 0
jne 0x40fa50
cmp eax, 1
jle 0x40fa50
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f3d3
mov eax, dword [0x441fa0]
mov dword [0x436030], eax
call fcn.0041c4b1
test eax, eax
je 0x40f40e
mov ecx, dword [0x436030]
push 1
push ecx
push 0xd92
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea edx, [ebp + 0x10c]
push ebx
push edx
push str.AddDnsServerRoute__adapter__s__failed_to_get_informatino__error:__d_n
call fcn.0041c506
add esp, 0x1c
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40fa50
test eax, eax
je 0x40f4b1
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 2
je 0x40f445
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40f4b1
cmp eax, 2
jle 0x40f4b1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f46a
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40f4a3
mov eax, dword [0x436030]
push 2
push eax
push 0xd98
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea ecx, [ebp + 0x10c]
push ecx
push str.AddDnsServerRoute__adapter__s__failed_to_get_info__buffer_overflow__try_again_n
call fcn.0041c506
add esp, 0x18
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, dword [ebp + 0x19c]
add esp, 4
mov edi, eax
lea eax, [esp + 0x14]
push eax
push edi
push ecx
mov dword [esp + 0x24], edi
call sub.iphlpapi.dll_GetPerAdapterInfo
mov esi, eax
test esi, esi
je 0x40f58b
mov eax, dword [0x441ff4]
test eax, eax
je 0x40f57c
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 1
je 0x40f50b
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40f57c
cmp eax, 1
jle 0x40f57c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f530
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40f56a
mov eax, dword [0x436030]
push 1
push eax
push 0xd9f
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea ecx, [ebp + 0x10c]
push esi
push ecx
push str.AddDnsServerRoute__adapter__s__failed_to_get_adapter_info_again__error:__d_n
call fcn.0041c506
add esp, 0x1c
call fcn.0041c4cc
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x40fa50
lea ebx, [edi + 0xc]
mov dword [esp + 0x10], ebx
jmp 0x40f5a0
mov edi, dword [esp + 0x18]
lea ebx, [esp + 0x2c]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x40fa3a
jmp 0x40f5ae
mov ebx, dword [esp + 0x10]
mov eax, dword [0x441ff4]
test eax, eax
je 0x40f650
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 3
je 0x40f5d8
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40f650
cmp eax, 3
jle 0x40f650
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f5fd
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40f63e
mov eax, dword [0x436030]
push 3
push eax
push 0xdae
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
mov ecx, dword [esp + 0x20]
lea edx, [ebp + 0x10c]
add ecx, 4
push ecx
push edx
push str.AddDnsServerRoute__adapter__s__dns:__s_n
call fcn.0041c506
add esp, 0x1c
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esp + 0x10]
mov edi, dword [sym.imp.MSVCRT.dll__stricmp]
lea esi, [ebx + 4]
push str.1.1.1.1
push esi
call edi
add esp, 8
test eax, eax
je 0x40fa24
push 0x441e2c
push esi
call edi
add esp, 8
test eax, eax
je 0x40fa24
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
push 0xffffffffffffffff
push edi
call fcn.00405f30
add esp, 8
test al, al
je 0x40f740
mov eax, dword [0x441ff4]
test eax, eax
je 0x40f731
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 3
je 0x40f6c4
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40f731
cmp eax, 3
jle 0x40f731
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f6e9
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40f723
mov eax, dword [0x436030]
push 3
push eax
push 0xdb9
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea ecx, [ebp + 0x10c]
push esi
push ecx
push str.AddDnsServerRoute__adapter__s__dns:__s__belong_to_zone__do_not_add_n
call fcn.0041c506
add esp, 0x1c
call fcn.0041c4cc
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
mov dword [esp + 0x10], eax
jmp 0x40fa2a
lea ecx, [esp + 0x58]
mov dword [esp + 0x58], edi
push ecx
mov dword [esp + 0x60], 0xffffffff
call sub.iphlpapi.dll_CreateIpForwardEntry
mov ebx, eax
test ebx, ebx
jne 0x40f8d9
mov esi, dword [0x441df4]
push 0x40
mov edi, dword [esi + 4]
call sub.MFC42.DLL_operatornew
add esp, 4
mov ecx, esi
test esi, esi
jne 0x40f77b
mov ecx, eax
mov dword [eax], ecx
mov ecx, edi
test edi, edi
jne 0x40f785
mov ecx, eax
mov dword [eax + 4], ecx
mov dword [esi + 4], eax
mov edx, dword [eax + 4]
lea edi, [eax + 8]
test edi, edi
mov dword [edx], eax
je 0x40f7a2
mov ecx, 0xe
lea esi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x441df8]
mov eax, dword [0x441ff4]
inc ecx
test eax, eax
mov dword [0x441df8], ecx
je 0x40fa18
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 3
je 0x40f7e0
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40fa18
cmp eax, 3
jle 0x40fa18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f805
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40fa0a
mov eax, dword [0x436030]
push 3
push eax
push 0xdc5
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x77]
mov eax, dword [esp + 0x76]
push ecx
mov ecx, dword [esp + 0x79]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x7c]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x7b]
push ecx
mov ecx, dword [esp + 0x7e]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x81]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x87]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x8a]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x8d]
push ecx
mov ecx, dword [esp + 0x90]
and edx, 0xff
and eax, 0xff
push edx
and ecx, 0xff
push eax
lea edx, [ebp + 0x10c]
push ecx
push edx
push str.AddDnsServerRoute__add_DNS_server_route_for__s___d._d._d._d__d._d._d._d_____d._d._d._d__d__n
call fcn.0041c506
add esp, 0x4c
jmp 0x40fa05
mov eax, dword [0x441ff4]
test eax, eax
je 0x40fa18
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 1
je 0x40f90a
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40fa18
cmp eax, 1
jle 0x40fa18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40f92f
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40fa0a
mov eax, dword [0x436030]
push 1
push eax
push 0xdcb
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x77]
mov eax, dword [esp + 0x76]
push ebx
push ecx
mov ecx, dword [esp + 0x7d]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x80]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x7f]
push ecx
mov ecx, dword [esp + 0x82]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x85]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x88]
push ecx
mov ecx, dword [esp + 0x8b]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x8e]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x91]
push ecx
mov ecx, dword [esp + 0x94]
and edx, 0xff
and eax, 0xff
push edx
and ecx, 0xff
push eax
lea edx, [ebp + 0x10c]
push ecx
push edx
push str.AddDnsServerRoute__Failed_to_add_DNS_server_route_for__s___d._d._d._d__d._d._d._d_____d._d._d._d__d___error:_d_n
call fcn.0041c506
add esp, 0x50
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x40fa2a
mov edx, dword [ebx]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40f5aa
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40fa50
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [esp + 0x18], 0
mov ebp, dword [ebp]
test ebp, ebp
jne 0x40f1fc
mov ebp, dword [esp + 0x1c]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret