Function at 0x407220
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], 0
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x140]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x3c]
push str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_s
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x38]
push ecx
push 0x20006
push 0
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40732a
mov eax, dword [0x441ff4]
test eax, eax
je 0x407522
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 1
je 0x4072b1
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x407522
cmp eax, 1
jle 0x407522
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call esi
mov ebp, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x4072d8
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x407311
mov eax, dword [0x436030]
push 1
push eax
push 0x704
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
add esp, 0x10
call esi
push eax
push ebx
push str.Failed_to_open_interface_registry:_s__error_d_n
call fcn.0041c506
add esp, 0xc
call fcn.0041c4cc
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, dword [0x44177c]
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 3]
mov dl, byte [eax + 2]
push ecx
push edx
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 1]
mov dl, byte [eax]
push ecx
push edx
lea eax, [esp + 0x24]
push str._d._d._d._d
push eax
call esi
mov edi, dword [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.NameServer
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x407460
mov eax, dword [0x441ff4]
test eax, eax
je 0x407517
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 3
je 0x4073f7
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x407517
cmp eax, 3
jle 0x407517
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 0x40741c
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x407453
mov eax, dword [0x436030]
push 3
push eax
push 0x70f
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
lea ecx, [esp + 0x24]
push ecx
push str.Name_Servers:__s_n
call fcn.0041c506
add esp, 0x18
call fcn.0041c4cc
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
jmp 0x407511
push 0x26
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 0x407517
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 1
je 0x4074aa
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x407517
cmp eax, 1
jle 0x407517
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call esi
mov ebp, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x4074d1
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x407509
mov eax, dword [0x436030]
push 1
push eax
push 0x715
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
add esp, 0x10
call esi
push eax
push str.Failed_to_set_DNS__error_d_n
call fcn.0041c506
add esp, 8
call fcn.0041c4cc
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret