Function at 0x140001d40
Capabilities:
Check if file exists
Create directory
Get file attributes
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x230]
sub rsp, 0x330
mov rax, qword [0x14001e010]
xor rax, rsp
mov qword [rbp + 0x220], rax
lea rcx, [0x1400076a0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14000289c
lea rcx, [rbp - 0x20]
call fcn.140001290
nop
movabs rax, 0x7fffffffffffffff
mov r15, rax
mov rsi, qword [rbp - 0x10]
sub r15, rsi
cmp r15, 0x14
jb 0x1400028f0
lea rdx, [rbp - 0x20]
mov r14, qword [rbp - 0x20]
mov r13, qword [rbp - 8]
cmp r13, 0x10
cmovae rdx, r14
mov qword [rbp - 0x50], rdx
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
lea r12, [rsi + 0x14]
mov ebx, 0xf
lea rdi, [rsp + 0x30]
movabs rcx, 0x8000000000000000
lea r8d, [rbx + 7]
cmp r12, rbx
jbe 0x140001e76
mov rbx, r12
or rbx, 0xf
cmp rbx, rax
jbe 0x140001e32
mov rbx, rax
lea rax, [rcx + 0x27]
mov rcx, rax
call fcn.140005210
test rax, rax
je 0x140001e55
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
mov rdx, qword [rbp - 0x50]
jmp 0x140001e71
cmp rbx, r8
cmovb rbx, r8
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x140001e5c
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400028d2
jmp 0x140001e13
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140001e6f
call fcn.140005210
mov rdi, rax
mov rdx, qword [rbp - 0x50]
jmp 0x140001e71
xor edi, edi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], rbx
movups xmm0, xmmword [str.C:WindowsSystem32_]
movups xmmword [rdi], xmm0
mov eax, dword [0x140007708]
mov dword [rdi + 0x10], eax
lea rcx, [rdi + 0x14]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rdi + r12], 0
mov r8d, 4
lea rdx, [0x1400076ec]
lea rcx, [rsp + 0x30]
call fcn.140004150
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xor r12d, r12d
mov qword [rbp - 0x30], r12
mov qword [rbp - 0x28], r12
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x30], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 0xf
mov byte [rax], r12b
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140001f2b
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001f26
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001f26
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
movdqa xmm0, xmmword [0x14001ae10]
movdqu xmmword [rsp + 0x40], xmm0
mov byte [rsp + 0x30], 0
xor edx, edx
lea rcx, [0x140007710]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0x10
cmovae rdx, qword [rbp - 0x40]
mov r8d, 0x20
lea rcx, [rbp]
call fcn.140003a50
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx], rax
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 4], edx
cmp qword [rbp + 0x88], 0
je 0x14000280a
mov r8d, 0x13400
lea rdx, [0x1400079f0]
lea rcx, [rbp]
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 + 8]
call fcn.140004090
test rax, rax
jne 0x140002001
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, [rbp]
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 qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
lea rdx, [rbp - 0x20]
cmp r13, 0x10
cmovae rdx, r14
mov qword [rbp - 0x50], rdx
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
lea r12, [rsi + 0xe]
mov ebx, 0xf
lea rdi, [rsp + 0x30]
cmp r12, rbx
jbe 0x1400020d7
mov rbx, r12
or rbx, 0xf
movabs rcx, 0x7fffffffffffffff
cmp rbx, rcx
jbe 0x140002094
mov rbx, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140005210
test rax, rax
je 0x14000219f
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
mov rdx, qword [rbp - 0x50]
jmp 0x1400020d2
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x1400020bd
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400028d8
jmp 0x140002071
test rcx, rcx
je 0x1400020d0
call fcn.140005210
mov rdi, rax
mov rdx, qword [rbp - 0x50]
jmp 0x1400020d2
xor edi, edi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], rbx
movsd xmm0, qword [0x1400077a8]
movsd qword [rdi], xmm0
mov eax, dword [0x1400077b0]
mov dword [rdi + 8], eax
movzx eax, word [0x1400077b4]
mov word [rdi + 0xc], ax
lea rcx, [rdi + 0xe]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rdi + r12], 0
mov r8d, 0x50
lea rdx, [0x140007750]
lea rcx, [rsp + 0x30]
call fcn.140004150
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xor r12d, r12d
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x50], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x60], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 0xf
mov byte [rax], r12b
lea rcx, [rsp + 0x50]
call fcn.1400014b0
movzx ebx, al
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x1400021ab
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021a6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400021a6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
test bl, bl
je 0x14000280a
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
cmp r15, 0x2f
jb 0x1400028f6
lea r12, [rbp - 0x20]
cmp r13, 0x10
cmovae r12, r14
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
lea r15, [rsi + 0x2f]
mov ebx, 0xf
lea rdi, [rsp + 0x50]
cmp r15, rbx
jbe 0x140002287
mov rbx, r15
or rbx, 0xf
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
jbe 0x140002248
mov rbx, rax
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140005210
test rax, rax
je 0x1400024a2
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140002282
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x140002271
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400028de
jmp 0x140002229
test rcx, rcx
je 0x140002280
call fcn.140005210
mov rdi, rax
jmp 0x140002282
xor edi, edi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], rbx
movups xmm0, xmmword [0x1400077f0]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [0x140007800]
movups xmmword [rdi + 0x10], xmm1
movsd xmm0, qword [0x140007810]
movsd qword [rdi + 0x20], xmm0
mov eax, dword [0x140007818]
mov dword [rdi + 0x28], eax
movzx eax, word [0x14000781c]
mov word [rdi + 0x2c], ax
movzx eax, byte [0x14000781e]
mov byte [rdi + 0x2e], al
lea rcx, [rdi + 0x2f]
mov r8, rsi
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov byte [rdi + r15], 0
mov r8d, 0x2e
lea rdx, [0x1400077c0]
lea rcx, [rsp + 0x50]
call fcn.140004150
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x80], xmm1
xor r12d, r12d
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 0xf
mov byte [rax], r12b
lea rdx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0x10
cmovae rdx, qword [rbp - 0x40]
mov r8, qword [rbp - 0x30]
lea rcx, [rsp + 0x70]
call fcn.140004150
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 0xf
mov byte [rax], r12b
lea r8d, [r12 + 3]
lea rdx, [0x1400077b8]
lea rcx, [rsp + 0x30]
call fcn.140004150
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x60], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 0xf
mov byte [rax], r12b
lea rcx, [rbp - 0x70]
call fcn.1400014b0
movzx ebx, al
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x14000240a
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002405
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002405
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
movdqa xmm0, xmmword [0x14001ae10]
movdqu xmmword [rsp + 0x40], xmm0
mov byte [rsp + 0x30], 0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x14000245c
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002457
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002457
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
movdqa xmm0, xmmword [0x14001ae10]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x1400024ae
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024a9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400024a9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
test bl, bl
je 0x14000280a
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
lea rdi, [rbp - 0x20]
cmp r13, 0x10
cmovae rdi, r14
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x1400028cc
mov qword [rsp + 0x48], 0xf
cmp rsi, 0x10
jae 0x140002519
mov qword [rsp + 0x40], rsi
movups xmm0, xmmword [rdi]
movups xmmword [rsp + 0x30], xmm0
jmp 0x1400025b1
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
jbe 0x140002554
mov rbx, rax
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140005210
mov rcx, rax
test rax, rax
je 0x14000257d
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140002593
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x140002584
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400028e4
jmp 0x140002536
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140002590
call fcn.140005210
jmp 0x140002593
mov rax, r12
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rbx
lea r8, [rsi + 1]
mov rdx, rdi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rsp + 0x30]
call fcn.140001560
test al, al
je 0x14000280a
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
lea r12, [rbp - 0x20]
cmp r13, 0x10
cmovae r12, r14
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
lea r15, [rsi + 0xd]
mov ebx, 0xf
lea rdi, [rsp + 0x50]
cmp r15, rbx
jbe 0x14000268f
mov rbx, r15
or rbx, 0xf
movabs rcx, 0x7fffffffffffffff
cmp rbx, rcx
jbe 0x14000264d
mov rbx, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140005210
test rax, rax
je 0x140002676
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14000268a
cmp rbx, 0x16
mov ecx, 0x16
cmovb rbx, rcx
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x14000267d
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400028ea
jmp 0x140002632
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140002687
call fcn.140005210
mov rdi, rax
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], rbx
movsd xmm0, qword [0x140007820]
movsd qword [rdi], xmm0
mov eax, dword [0x140007828]
mov dword [rdi + 8], eax
movzx eax, byte [0x14000782c]
mov byte [rdi + 0xc], al
lea rcx, [rdi + 0xd]
mov r8, rsi
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov byte [rdi + r15], 0
lea rcx, [rsp + 0x50]
call fcn.1400014b0
test al, al
je 0x140002807
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x110]
call sub.VCRUNTIME140.dll_memset
mov r8d, 2
lea rdx, str.C:WindowsSystem32winsvcfwinlogsvc
lea rcx, [rbp + 0x110]
call fcn.140003a50
nop
cmp qword [rbp + 0x198], 0
je 0x1400027f6
lea rcx, [rbp + 0x110]
call fcn.1400046d0
lea rcx, [rbp + 0x118]
call fcn.140004090
test rax, rax
jne 0x14000276a
mov rax, qword [rbp + 0x110]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x110]
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 qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
xor r12d, r12d
mov qword [rbp - 0x50], r12
mov dword [rbp - 0x48], r12d
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9d, [r12 + 2]
xor r8d, r8d
lea rdx, [0x140007570]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400027e3
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
lea r9d, [r12 + 4]
xor r8d, r8d
lea rdx, [0x1400075e0]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rbp - 0x50], 0x9c4
lea rcx, [rbp - 0x50]
call fcn.140004540
jmp 0x1400027f9
xor r12d, r12d
lea rcx, [rbp + 0x110]
call fcn.140002900
jmp 0x14000280a
xor r12d, r12d
lea rcx, [rbp]
call fcn.140002900
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x140002852
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000284d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000284d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000524c
mov qword [rbp - 0x30], r12
mov qword [rbp - 0x28], 0xf
mov byte [rbp - 0x40], 0
cmp r13, 0x10
jb 0x14000289c
lea rdx, [r13 + 1]
mov rax, r14
cmp rdx, 0x1000
jb 0x140002894
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002894
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r14
call fcn.14000524c
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.1400051f0
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400011b0
nop
call fcn.140001110
nop
call fcn.140001110
int3
call fcn.140001110
int3
call fcn.140001110
int3
call fcn.140001110
nop
call fcn.1400011b0
nop
call fcn.1400011b0
int3