Function at 0x4066c0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x314
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], 0
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x21c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21d]
mov byte [esp + 0xf], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xf]
push eax
call fcn.0041f84f
add esp, 4
test al, al
je 0x406b17
mov al, byte [esp + 0xf]
test al, al
je 0x406b17
push 0
lea ecx, [esp + 0x18]
push 0
push ecx
call fcn.00406150
add esp, 0xc
test al, al
je 0x406b17
push 1
call fcn.00406630
lea edx, [esp + 0x18]
add esp, 4
test edx, edx
je 0x40678b
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x324]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x21c]
push ecx
push str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x441ff4]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
test eax, eax
je 0x40683b
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 3
je 0x4067d5
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x40683b
cmp eax, 3
jle 0x40683b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x4067f6
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x40682d
mov eax, dword [0x436030]
push 3
push eax
push 0x660
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.PPPoESaveReg_key_name___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]
lea edx, [esp + 0x10]
lea eax, [esp + 0x21c]
push edx
push 0xf003f
push 0
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406a86
lea ecx, [esp + 0x118]
push ebp
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, str.reg_bak.arr
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x11c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x11c]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyA]
mov ebp, eax
cmp ebp, 0x522
jne 0x406960
mov eax, dword [0x441ff4]
test eax, eax
je 0x406a70
mov eax, dword [0x441fd4]
mov eax, dword [eax]
cmp eax, 1
je 0x406909
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x406a70
cmp eax, 1
jle 0x406a70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x40692a
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x406a62
mov eax, dword [0x436030]
push 1
push eax
push 0x66d
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
push str.Set_Proviledge_fail__cant_save_registry_n
call fcn.0041c506
add esp, 0x14
jmp 0x406a5d
mov eax, dword [0x441ff4]
test ebp, ebp
jne 0x4069ed
test eax, eax
je 0x406a70
mov ecx, dword [0x441fd4]
mov eax, dword [ecx]
cmp eax, 3
je 0x40699a
mov edx, dword [0x441fdc]
cmp dword [edx], 0
jne 0x406a70
cmp eax, 3
jle 0x406a70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x4069b9
mov eax, dword [0x441fa0]
mov dword [0x436030], eax
call fcn.0041c4b1
test eax, eax
je 0x406a62
mov ecx, dword [0x436030]
push 3
push ecx
push 0x671
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
push str.Save_registry_success__n
call fcn.0041c506
add esp, 0x14
jmp 0x406a5d
test eax, eax
je 0x406a70
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 1
je 0x406a0e
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x406a70
cmp eax, 1
jle 0x406a70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x406a2f
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x406a62
mov eax, dword [0x436030]
push 1
push eax
push 0x675
push str.C:_build_rel_sp_8_4_6_2_srcwindows_atpclient_arr_srvsAdaptCof.cpp
call fcn.0041c4e1
push ebp
push str.RegSaveKeyEx_fail__error___d_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 ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x314
ret
mov eax, dword [0x441ff4]
test eax, eax
je 0x406b17
mov edx, dword [0x441fd4]
mov eax, dword [edx]
cmp eax, 1
je 0x406ab0
mov ecx, dword [0x441fdc]
cmp dword [ecx], 0
jne 0x406b17
cmp eax, 1
jle 0x406b17
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call ebx
mov edi, eax
mov eax, dword [0x436030]
test eax, eax
jge 0x406ad1
mov edx, dword [0x441fa0]
mov dword [0x436030], edx
call fcn.0041c4b1
test eax, eax
je 0x406b09
mov eax, dword [0x436030]
push 1
push eax
push 0x67c
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.RegOpenKeyEx_fail__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 ebx
add esp, 0x314
ret