Function at 0x412710
Capabilities:
Create thread
Encode data using xor
Enumerate processes
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59a606
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x6d48e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
xor bl, bl
push 2
mov byte [ebp - 0x145], bl
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
mov dword [ebp - 0x160], esi
cmp esi, 0xffffffff
je 0x412c7a
lea eax, [ebp - 0x140]
mov dword [ebp - 0x140], 0x128
push eax
push esi
call sub.KERNEL32.dll_Process32First
jmp 0x412780
push dword [ebp - 0x138]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0x154], edi
test edi, edi
je 0x412c5f
mov ebx, 0x5dc40c
xor esi, esi
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x150], esi
lea eax, [ebp - 0x15c]
push eax
push 8
lea eax, [ebp - 0x18]
push eax
push dword [ebx - 4]
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x412c34
cmp dword [ebp - 0x15c], 8
jne 0x412c34
lea ecx, [ebp - 0x18]
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x412c34
mov eax, dword [ecx + 4]
cmp eax, dword [ebx + 4]
jne 0x412c34
push 0
push edi
mov byte [ebp - 0x145], 1
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [0x6e51d4], 1
jne 0x412963
mov dword [ebp - 0x144], 0x5a8eb4
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x41287c
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x412873
sub edi, ecx
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x144]
cmp edx, dword [ebx + 0xf]
jb 0x412857
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
push 1
push 0x40
push 8
push edi
lea ecx, [ebp - 0x2b8]
call fcn.0040c3d0
mov dword [ebp - 0x144], 0x5aa374
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
mov dword [ebp - 4], 0
cmp byte [ebx + 0x13], 0
je 0x4128f9
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x4128f0
sub edi, ecx
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x144]
cmp edx, dword [ebx + 0xf]
jb 0x4128d4
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
lea eax, [ebp - 0x2b8]
push edi
push eax
call fcn.0040ae60
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040ae60
add esp, 0x10
lea ecx, [ebp - 0x2b4]
call fcn.00409ff0
test eax, eax
jne 0x412945
push eax
mov eax, dword [ebp - 0x2b8]
lea ecx, [ebp - 0x2b8]
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0x258]
mov dword [ebp - 4], 0xffffffff
call fcn.0040c4e0
lea ecx, [ebp - 0x258]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
cmp dword [0x6e51e4], 1
jne 0x412bf1
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.MSVCR120.dll__time64]
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.MSVCR120.dll__localtime64]
mov dword [ebp - 0x144], 0x5a8f00
add esp, 8
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
mov dword [ebp - 0x158], eax
cmp byte [ebx + 0x13], 0
je 0x4129f7
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x4129ee
sub edi, ecx
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x144]
cmp edx, dword [ebx + 0xf]
jb 0x4129d2
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
push 1
push 0x40
push 8
push edi
lea ecx, [ebp - 0x210]
call fcn.0040c3d0
mov dword [ebp - 0x144], 0x5a8f18
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
mov dword [ebp - 4], 1
cmp byte [ebx + 0x13], 0
je 0x412a75
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x412a6c
sub edi, ecx
nop
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x144]
cmp edx, dword [ebx + 0xf]
jb 0x412a50
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0040ae60
push dword [ebp - 0x158]
call dword [sym.imp.MSVCR120.dll_asctime]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0040ae60
mov dword [ebp - 0x144], 0x5aa398
add esp, 0x14
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x412b05
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x412afc
sub edi, ecx
lea ecx, [ecx]
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [ecx + edi]
mov byte [ecx], al
mov ecx, dword [ebp - 0x144]
cmp edx, dword [ebx + 0xf]
jb 0x412ae0
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0040ae60
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0040ae60
mov dword [ebp - 0x144], 0x5a8f60
add esp, 0x10
mov ebx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x412b8d
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x144], ecx
test esi, esi
je 0x412b84
sub edi, ecx
lea edx, [eax + ecx]
mov ecx, eax
and ecx, 7
inc eax
mov cl, byte [ecx + ebx + 7]
xor cl, byte [edx + edi]
mov byte [edx], cl
mov ecx, dword [ebp - 0x144]
cmp eax, dword [ebx + 0xf]
jb 0x412b67
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0040ae60
add esp, 8
lea ecx, [ebp - 0x20c]
call fcn.00409ff0
test eax, eax
jne 0x412bc6
push eax
mov eax, dword [ebp - 0x210]
lea ecx, [ebp - 0x210]
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push 2
push 0x5aa3bc
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [ebp - 0x1b0]
mov dword [ebp - 4], 0xffffffff
call fcn.0040c4e0
lea ecx, [ebp - 0x1b0]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [0x6e51d8]
cmp eax, 1
je 0x412d6a
cmp eax, 2
je 0x412d5d
cmp eax, 3
je 0x412d35
cmp eax, 4
je 0x412c9f
test eax, eax
je 0x412d2d
mov ebx, dword [ebp - 0x14c]
mov esi, dword [ebp - 0x150]
mov edi, dword [ebp - 0x154]
add esi, 0xc
add ebx, 0xc
mov dword [ebp - 0x150], esi
mov dword [ebp - 0x14c], ebx
cmp esi, 0xbc4
jb 0x4127b6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x160]
lea eax, [ebp - 0x140]
push eax
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x412780
mov bl, byte [ebp - 0x145]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00598fe4
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0x411780
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x14c], 0x5aa3c0
mov edi, dword [ebp - 0x14c]
mov ebx, dword [ebp - 0x14c]
add ebx, 0x14
cmp byte [edi + 0x13], 0
je 0x412d18
mov esi, dword [edi + 0xf]
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCR120.dll_malloc]
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x14c], ecx
test esi, esi
je 0x412d0f
sub ebx, ecx
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + edi + 7]
xor al, byte [ecx + ebx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x14c]
cmp edx, dword [edi + 0xf]
jb 0x412cf3
mov eax, dword [edi + 0xf]
mov ebx, ecx
mov byte [ecx + eax], 0
push 0x200010
push ebx
lea eax, [ebp - 0x11c]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push 0
push 0
push 0x42ab80
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push 0
push 0
push 0x412d80
jmp 0x412d40
push 0
push 0
push 0
push 0x412e00
jmp 0x412d40