Function at 0x403170
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x3c
mov eax, dword [0x441730]
push ebx
push ebp
push esi
xor esi, esi
push edi
test eax, eax
mov ebp, 1
mov dword [esp + 0x10], esi
jle 0x403349
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x18], eax
xor edx, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [0x441734]
mov cl, byte [eax + esi*4 + 3]
mov dl, byte [eax + esi*4 + 2]
push ecx
push edx
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + esi*4 + 1]
mov dl, byte [eax + esi*4]
push ecx
push edx
lea eax, [esp + 0x28]
push 0x4365b4
push eax
call ebx
add esp, 0x18
cmp ebp, 0x64
jge 0x40326a
xor ecx, ecx
push ebp
mov dword [esp + 0x3c], ecx
lea edx, [esp + 0x3c]
mov dword [esp + 0x40], ecx
push str.NameServer_d
mov dword [esp + 0x48], ecx
push edx
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x50], ecx
call ebx
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x38]
push eax
mov eax, dword [esp + 0x54]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40326a
lea esi, [esp + 0x18]
lea eax, [esp + 0x28]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403257
test cl, cl
je 0x403253
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403257
add eax, 2
add esi, 2
test cl, cl
jne 0x403233
xor eax, eax
jmp 0x40325c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40326a
inc ebp
cmp ebp, 0x64
jl 0x4031df
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x18]
push ecx
push eax
push 1
lea ecx, [esp + 0x44]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x403356
mov eax, dword [0x441ff4]
test eax, eax
je 0x403332
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 3
je 0x4032c3
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x403332
cmp eax, 3
jle 0x403332
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 0x4032e8
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x403324
mov eax, dword [0x436030]
push 3
push eax
push 0x366
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea ecx, [esp + 0x28]
lea edx, [esp + 0x48]
push ecx
push edx
push str._s:__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 esi, dword [esp + 0x10]
mov eax, dword [0x441730]
inc ebp
inc esi
cmp esi, eax
mov dword [esp + 0x10], esi
jl 0x403195
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3c
ret
push 0x28
mov ecx, 0x442408
call fcn.0042053a
push 0
push 0
push 0
push 0
push 2
push 0x11
call fcn.0041e7ec
mov eax, dword [0x441ff4]
add esp, 0x18
test eax, eax
je 0x40340c
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 1
je 0x40339f
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40340c
cmp eax, 1
jle 0x40340c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x4033c6
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x4033fe
mov eax, dword [0x436030]
push 1
push eax
push 0x36c
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
add esp, 0x10
call ebx
push eax
push str.Failed_to_set_DNS__error_d_n
call fcn.0041c506
add esp, 8
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3c
ret