Function at 0x402270
Capabilities:
Accept command line arguments
Create process on windows
Delete registry key
Delete registry value
Get common file path
Get program files directory
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x405689
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4b8
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
lea eax, [esp + 0x4c]
push 0x26
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push str._adt_tpn_
lea ecx, [esp + 0x14]
mov dword [esp + 0x4d4], ebx
call sub.MFC42.DLL_CString::operator_1
call fcn.00404d40
push str.30668122_808D_472a_BF3B_CF084B12A684
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov ebp, eax
push ebx
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call sub.MFC42.DLL_AfxWinInit
test eax, eax
jne 0x402303
cmp ebp, ebx
je 0x4029e8
jmp 0x4029e1
cmp dword [esp + 0x4d8], 2
jge 0x40231a
cmp ebp, ebx
je 0x4029e8
jmp 0x4029e1
mov edx, dword [esp + 0x4dc]
mov esi, 0x4083d4
mov edi, dword [edx + 4]
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40234f
test cl, cl
je 0x40234b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40234f
add eax, 2
add esi, 2
test cl, cl
jne 0x40232b
xor eax, eax
jmp 0x402354
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x402362
mov dword [esp + 0x14], 1
jmp 0x40239e
mov esi, 0x4083d0
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40238d
test cl, cl
je 0x402389
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40238d
add eax, 2
add esi, 2
test cl, cl
jne 0x402369
xor eax, eax
jmp 0x402392
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x4029dd
mov dword [esp + 0x14], ebx
push str.tpnmangr.exe
call fcn.00402c50
push str.tpnclt.exe
call fcn.00402c50
push str.tpnclt.exe
call fcn.00402170
push str.tpnmangr.exe
call fcn.00402170
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0x10
push 0x7d0
call edi
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x402a20
call sub.MFC42.DLL_AfxBeginThread
push 0x104
push 0x408ce0
mov dword [esp + 0x20], eax
mov dword [eax + 0x28], 1
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x104
push 0x408fec
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push 0x408fec
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
cmp eax, ebx
jne 0x402432
cmp ebp, ebx
je 0x4029e8
jmp 0x4029e1
mov ebx, dword [sym.imp.USER32.dll_FindWindowA]
mov ebp, dword [sym.imp.USER32.dll_PostMessageA]
mov byte [eax], 0
xor esi, esi
push 0
push str.TpnMangr
call ebx
test eax, eax
je 0x402463
push 0
push 0
push 0x12
push eax
call ebp
push 0xa
call edi
inc esi
cmp esi, 0x64
jl 0x402443
xor esi, esi
mov eax, dword [0x4091c0]
test eax, eax
je 0x402475
mov ecx, dword [eax + 0x20]
test ecx, ecx
jne 0x40247f
push 0x32
call edi
inc esi
cmp esi, 0x64
jl 0x402465
mov esi, dword [esp + 0x14]
push esi
call fcn.00403470
mov edi, eax
mov eax, dword [0x4091c0]
add esp, 4
mov dword [esp + 0x24], edi
test eax, eax
je 0x4024ac
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4024ac
push 5
lea ecx, [eax + 0x60]
call sub.MFC42.DLL_CWnd::ShowWindow
mov eax, dword [esp + 0x18]
push 0xffffffffffffffff
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebp, dword [sym.imp.KERNEL32.dll_WinExec]
cmp edi, 2
jne 0x40254d
test esi, esi
jne 0x4025df
lea edx, [esp + 0x14]
push edx
push 0xf003f
push esi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0x14]
push 0x408374
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push str.SOFTWAREAdtTpnClient_
push 0x80000002
call esi
push str.SOFTWAREAdtTpnClient_
push 0x80000001
call esi
push 0x1041
push 0x408350
push 0x4082fc
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x40254d
push 2
call fcn.00404c80
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40255c
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp edi, 1
jne 0x4029e8
lea ecx, [esp + 0x2c]
call fcn.004052de
lea edx, [esp + 0x10]
push str.update.dat
lea eax, [esp + 0x24]
mov bl, 9
push edx
push eax
mov byte [esp + 0x4dc], bl
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x4d8], 0xa
call sub.MFC42.DLL_CFileFind::FindFile
lea ecx, [esp + 0x20]
mov esi, eax
mov byte [esp + 0x4d0], bl
call sub.MFC42.DLL_CString::CString
test esi, esi
je 0x4029a6
lea ecx, [esp + 0x10]
push str.TpnMangr.exe__R
lea edx, [esp + 0x24]
push ecx
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 5
push eax
call ebp
lea ecx, [esp + 0x20]
jmp 0x4029c5
push 0x1041
push 0x408350
push 0x40828c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x4028fe
lea ecx, [esp + 0x2c]
call fcn.004052de
lea edx, [esp + 0x10]
push str.update.dat
lea eax, [esp + 0x18]
push edx
push eax
mov byte [esp + 0x4dc], 1
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x4d8], 2
call sub.MFC42.DLL_CFileFind::FindFile
lea ecx, [esp + 0x14]
mov esi, eax
mov byte [esp + 0x4d0], 1
call sub.MFC42.DLL_CString::CString
test esi, esi
je 0x40279c
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0xc8]
mov dword [esp + 0x28], 0x400
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
push 0xf003f
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
lea eax, [esp + 0xc8]
push edx
push eax
push 0
push 0
push 0x408374
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0xc8]
lea ecx, [esp + 0x1c]
push edx
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x1c]
mov bl, 3
mov byte [esp + 0x4d0], bl
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x402719
push str.__r__x
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::operator_1
push 0x400
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 1
push eax
push 0x408374
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::ReleaseBuffer
jmp 0x402780
lea edx, [esp + 0x10]
push str.TpnMangr.exe__x
lea eax, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_operator
push 0x400
lea ecx, [esp + 0x18]
mov byte [esp + 0x4d4], 4
call sub.MFC42.DLL_CString::GetBuffer
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 1
push eax
push 0x408374
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x14]
mov byte [esp + 0x4d0], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x4d0], 1
lea ecx, [esp + 0x1c]
jmp 0x4028df
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0xc8]
mov dword [esp + 0x28], 0x400
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x28]
lea edx, [esp + 0xc8]
push ecx
push edx
push 0
push 0
push 0x408374
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0xc8]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x1c]
mov byte [esp + 0x4d0], 5
mov eax, dword [edx - 8]
test eax, eax
jle 0x402860
push 0x408240
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::operator_1
push 0x400
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::GetBuffer
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x28]
push 0x408374
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::ReleaseBuffer
jmp 0x4028c8
lea ecx, [esp + 0x10]
push str.TpnMangr.exe__x
lea edx, [esp + 0x18]
push ecx
push edx
call sub.MFC42.DLL_operator
push 0x400
lea ecx, [esp + 0x18]
mov byte [esp + 0x4d4], 6
call sub.MFC42.DLL_CString::GetBuffer
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x28]
push 0x408374
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x14]
mov byte [esp + 0x4d0], 5
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x4d0], 1
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4d0], 0
call sub.MFC42.DLL_CFileFind::CFileFind
mov edi, dword [esp + 0x24]
jmp 0x402543
lea ecx, [esp + 0x2c]
call fcn.004052de
lea edx, [esp + 0x10]
push str.update.dat
lea eax, [esp + 0x28]
mov bl, 7
push edx
push eax
mov byte [esp + 0x4dc], bl
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x4d8], 8
call sub.MFC42.DLL_CFileFind::FindFile
lea ecx, [esp + 0x24]
mov esi, eax
mov byte [esp + 0x4d0], bl
call sub.MFC42.DLL_CString::CString
test esi, esi
push str.TpnMangr.exe__x__s
je 0x402971
lea ecx, [esp + 0x14]
lea edx, [esp + 0x28]
push ecx
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 5
push eax
call ebp
lea ecx, [esp + 0x24]
jmp 0x40298b
lea eax, [esp + 0x14]
lea ecx, [esp + 0x28]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 5
push eax
call ebp
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4d0], 0
call sub.MFC42.DLL_CFileFind::CFileFind
jmp 0x40254d
lea eax, [esp + 0x10]
push str.TpnMangr.exe__X
lea ecx, [esp + 0x24]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 5
push eax
call ebp
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4d0], 0
call sub.MFC42.DLL_CFileFind::CFileFind
jmp 0x4029e8
cmp ebp, ebx
je 0x4029e8
push ebp
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esp + 0x10]
mov dword [esp + 0x4d0], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x4c8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x4c4
ret