Function at 0x140003c50
Capabilities:
Encode data using xor
Get process image filename
Terminate process

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x470]
sub rsp, 0x570
mov rax, qword [0x14000b008]
xor rax, rsp
mov qword [rbp + 0x460], rax
mov r13, rdx
mov r14, rcx
mov dword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
xor edx, edx
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
mov r8d, 0x1f4
lea rdx, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
mov edi, eax
test eax, eax
je 0x140003ce9
lea rdx, [rdi*2 + 2]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
lea rdx, [rdi + 1]
lea r8, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x140003cee
mov rbx, qword [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rbx, rax
xor edx, edx
mov r8d, 0x110
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.140004f20
nop
lea rdi, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
cmp qword [rbp - 0x10], 0
je 0x14000416a
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____cdecl_std::basic_istream_char__struct_std::char_traits_char__::tellg_void____ptr64]
movups xmm2, xmmword [rax]
movdqa xmm1, xmm2
psrldq xmm1, 8
movq rbx, xmm1
movq rax, xmm2
add rbx, rax
mov qword [rsp + 0x30], rbx
mov rcx, rbx
call fcn.14000542c
mov r12, rax
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int____ptr64]
mov r8, rbx
mov rdx, r12
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x70]
call fcn.1400037a0
test rax, rax
jne 0x140003dbc
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rdi, r12
lea r15, [r12 - 0x3e80]
add r15, rbx
cmp r12, r15
jae 0x140003df1
nop
mov r8d, 0x3e80
lea rdx, [0x14000b160]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140003df1
inc rdi
cmp rdi, r15
jb 0x140003dd0
cmp rdi, r15
jae 0x140004220
mov rsi, 0xffffffffffffffff
mov r8, rsi
inc r8
cmp byte [r14 + r8], 0
jne 0x140003e04
inc r8
mov rdx, r14
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
movdqa xmm2, xmmword [0x140007d80]
lea rax, [rdi + 0x20]
mov ecx, 0xfa
nop dword [rax]
movdqu xmm0, xmmword [rax - 0x20]
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rax - 0x20], xmm1
movdqu xmm0, xmmword [rax - 0x10]
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rax - 0x10], xmm1
movdqu xmm0, xmmword [rax]
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rax], xmm1
movdqu xmm0, xmmword [rax + 0x10]
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rax + 0x10], xmm1
lea rax, [rax + 0x40]
sub rcx, 1
jne 0x140003e30
mov rbx, r12
mov r14d, 0x100
cmp r12, r15
jae 0x140003eae
nop
mov r8, r14
lea rdx, [0x14000b050]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140003eae
inc rbx
cmp rbx, r15
jb 0x140003e90
mov r15, qword [rsp + 0x30]
lea rax, [r15 - 0x100]
add rax, r12
cmp rbx, rax
jae 0x140004220
nop word [rax + rax]
lea rsi, [rsi + 1]
cmp byte [rsi + r13], 0
jne 0x140003ed0
lea r8, [rsi + 1]
mov rdx, r13
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbx + 0xff]
lea rax, [rdi + 0xff]
cmp rbx, rax
ja 0x140003f22
cmp rcx, rdi
jb 0x140003f22
sub rdi, rbx
nop word [rax + rax]
movzx eax, byte [rdi + rbx]
xor byte [rbx], al
lea rbx, [rbx + 1]
sub r14, 1
jne 0x140003f10
jmp 0x140003f87
lea rax, [rbx + 0x10]
sub rdi, rbx
mov ecx, 4
nop
movdqu xmm1, xmmword [rdi + rax - 0x10]
movdqu xmm0, xmmword [rax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [rax - 0x10], xmm1
movdqu xmm2, xmmword [rdi + rax]
movdqu xmm0, xmmword [rax]
pxor xmm2, xmm0
movdqu xmmword [rax], xmm2
movdqu xmm1, xmmword [rdi + rax + 0x10]
movdqu xmm0, xmmword [rax + 0x10]
pxor xmm1, xmm0
movdqu xmmword [rax + 0x10], xmm1
movdqu xmm1, xmmword [rdi + rax + 0x20]
movdqu xmm0, xmmword [rax + 0x20]
pxor xmm1, xmm0
movdqu xmmword [rax + 0x20], xmm1
lea rax, [rax + 0x40]
sub rcx, 1
jne 0x140003f30
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x70]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x140007d78]
mov qword [rbp + 0x70], rax
lea rcx, [rbp + 0x118]
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, [rbp + 0x78]
lea rcx, [rbp + 0x70]
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 + 0x70]
movsxd rcx, dword [rax + 4]
lea rbx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x70], rbx
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x6c], edx
lea rax, [rbp + 0x78]
mov qword [rsp + 0x38], rax
lea rcx, [rbp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
lea rdi, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x78], rdi
mov byte [rbp + 0xf4], 0
mov byte [rbp + 0xe9], 0
lea rcx, [rbp + 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
xor ecx, ecx
mov qword [rbp + 0xf8], rcx
mov rax, qword [0x14000f918]
mov qword [rbp + 0xec], rax
mov qword [rbp + 0xe0], rcx
lea r8d, [rcx + 0x22]
lea rdx, str.Flag.exe
lea rcx, [rbp + 0x78]
call fcn.140003820
test rax, rax
jne 0x14000407f
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x70]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
cmp qword [rbp + 0xf8], 0
je 0x1400040c3
mov r8, r15
mov rdx, r12
lea rcx, [rbp + 0x70]
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]
lea rcx, [rbp + 0x78]
call fcn.1400037a0
test rax, rax
jne 0x1400040c3
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x70]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 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, r12
call fcn.14000527c
nop
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x70], rbx
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x6c], edx
mov qword [rbp + 0x78], rdi
cmp qword [rbp + 0xf8], 0
je 0x140004132
mov rax, qword [rbp + 0x90]
lea rcx, [rbp + 0xe8]
cmp qword [rax], rcx
jne 0x140004132
mov rdx, qword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
mov qword [rax], rcx
mov rax, qword [rbp + 0xb0]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0xc8]
mov dword [rax], edx
cmp byte [rbp + 0xf4], 0
je 0x140004144
lea rcx, [rbp + 0x78]
call fcn.1400037a0
lea rcx, [rbp + 0x78]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rbp + 0x80]
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 + 0x118]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
mov qword [rsp + 0x70], rdi
cmp qword [rbp - 0x10], 0
je 0x1400041c5
mov rax, qword [rbp - 0x78]
lea rcx, [rbp - 0x20]
cmp qword [rax], rcx
jne 0x1400041c5
mov rdx, qword [rbp]
mov rcx, qword [rbp - 8]
mov qword [rax], rcx
mov rax, qword [rbp - 0x58]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x40]
mov dword [rax], edx
cmp byte [rbp - 0x14], 0
je 0x1400041d5
lea rcx, [rsp + 0x70]
call fcn.1400037a0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rbp + 0x460]
xor rcx, rsp
call fcn.140005220
mov rbx, qword [rsp + 0x5c0]
add rsp, 0x570
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.Error_generating_flag_file_n
call fcn.140001020
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3