Function at 0x140061640
Capabilities:
Create directory
Persist via windows service
Set file attributes
Set registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x8d8]
sub rsp, 0x9b0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14017c430]
xor rax, rsp
mov qword [rbp + 0x8a0], rax
mov rbx, rcx
mov qword [rsp + 0x78], rcx
lea rax, vtable.CRCServer.0
mov qword [rcx], rax
or r12, 0xffffffffffffffff
mov qword [rcx + 8], r12
lea rsi, [rcx + 0x20]
mov qword [rsp + 0x50], rsi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsi], rax
xor r15d, r15d
mov qword [rbx + 0x30], r15
mov qword [rbx + 0x38], r15
mov qword [rbx + 0x40], r15
lea rdi, [rbx + 0x50]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x58]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x60]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x68]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x70]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x78]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x80]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x88]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x90]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x98]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xa0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xa8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xb0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xb8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xc0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xc8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xd0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xd8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xe0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xe8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xf0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0xf8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x100]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x108]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea r14, [rbx + 0x110]
mov qword [rsp + 0x50], r14
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
lea rdi, [rbx + 0x118]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
mov qword [rbx + 0x128], r15
lea rcx, [rbx + 0x140]
mov qword [rcx], r15
xor edx, edx
call fcn.14009c060
nop
mov qword [rbx + 0x150], r15
lea rdi, [rbx + 0x190]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
mov qword [rbx + 0x1a0], r15
lea rdi, [rbx + 0x1d8]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rdi, [rbx + 0x1e0]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
mov qword [rbx + 0x1e8], r15
mov qword [rbx + 0x1f0], r15
mov qword [rbx + 0x1f8], r15
mov qword [rbx + 0x208], r15
mov qword [rbx + 0x210], r15
mov qword [rbx + 0x218], r15
mov qword [rbx + 0x228], r15
mov qword [rbx + 0x230], r15
mov qword [rbx + 0x238], r15
mov qword [rbx + 0x248], r15
mov qword [rbx + 0x250], r15
mov qword [rbx + 0x258], r15
lea rdi, [rbx + 0x270]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
mov qword [rbx + 0x278], r15
mov qword [rbx + 0x280], r15
mov qword [rbx + 0x288], r15
lea rdi, [rbx + 0x298]
mov qword [rsp + 0x50], rdi
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi], rax
lea rcx, [rbx + 0x2a8]
call fcn.14005d910
nop
lea rcx, [rbx + 0x1140]
mov qword [rsp + 0x50], rcx
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], r15
mov word [rcx], r15w
xor r8d, r8d
lea rdx, [0x140129a38]
call fcn.1400139e0
nop
lea rcx, [rbx + 0x1168]
mov qword [rsp + 0x50], rcx
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], r15
mov word [rcx], r15w
xor r8d, r8d
lea rdx, [0x140129a38]
call fcn.1400139e0
nop
lea rcx, [rbx + 0x1190]
mov qword [rsp + 0x50], rcx
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], r15
mov word [rcx], r15w
xor r8d, r8d
lea rdx, [0x140129a38]
call fcn.1400139e0
nop
lea rcx, [rbx + 0x11b8]
mov qword [rsp + 0x50], rcx
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], r15
mov word [rcx], r15w
xor r8d, r8d
lea rdx, [0x140129a38]
call fcn.1400139e0
nop
xor edi, edi
mov dword [rbx + 0x15e0], edi
lea rcx, [rbx + 0x15e8]
mov qword [rsp + 0x50], rcx
call fcn.14007ad00
nop
mov qword [rbx + 0x1608], rdi
mov qword [rbx + 0x1610], rdi
mov qword [rbx + 0x1618], rdi
lea rcx, [rbx + 0x1628]
mov qword [rcx], rdi
lea rdx, str.PROCVECMTXAGZ
call fcn.14009c060
nop
lea rcx, [rbx + 0x1630]
mov qword [rcx], rdi
lea rdx, str.BWSITESMTXAGZ
call fcn.14009c060
nop
lea rcx, [rbx + 0x1638]
mov qword [rcx], rdi
lea rdx, str.BWPRCMTXAGZ
call fcn.14009c060
nop
lea rcx, [rbx + 0x1640]
mov qword [rcx], rdi
xor edx, edx
call fcn.14009c060
nop
lea rcx, [rbx + 0x1648]
mov qword [rcx], rdi
lea rdx, str.SERVUSERSMTXAGZ
call fcn.14009c060
nop
mov qword [rbx + 0x1650], rdi
mov qword [rbx + 0x1658], rdi
mov qword [rbx + 0x1660], rdi
mov qword [rbx + 0x26a8], rdi
mov qword [rbx + 0x26b0], rdi
mov dword [rbx + 0x2a0], edi
xor edx, edx
mov r8d, 0x11c
lea rcx, [rbp - 0x80]
call fcn.1400dd9f0
mov dword [rbp - 0x80], 0x11c
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x140061d66
movzx eax, byte [rbp + 0x9a]
cmp al, 3
je 0x140061d5c
cmp al, 2
jne 0x140061d66
mov dword [rbx + 0x2a0], 1
mov qword [0x140183698], rbx
lea rcx, [rsp + 0x50]
call fcn.140085530
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001cf0
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140061da4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov r8d, recv
lea rdx, [0x14012bab8]
mov rcx, rsi
call fcn.14003bd50
lea rcx, [rsp + 0x58]
call fcn.1400853d0
nop
xor eax, eax
lea rdi, [0x140129a38]
mov r8, qword [rsp + 0x58]
mov rsi, r8
mov ecx, 1
repe cmpsw word [rsi], word [rdi]
je 0x140061de4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x140062115
lea r9, [0x14012b86c]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x58]
call fcn.140016060
lea r9, [0x14012b874]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x60]
call fcn.140016060
lea r9, [0x14012b884]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x68]
call fcn.140016060
lea r9, [0x14012b88c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x70]
call fcn.140016060
lea r9, [0x14012b894]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x80]
call fcn.140016060
lea r9, [0x14012b89c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x78]
call fcn.140016060
lea r9, [0x14012b8a4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x88]
call fcn.140016060
lea r9, [0x14012b8dc]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x98]
call fcn.140016060
lea r9, [0x14012b87c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x90]
call fcn.140016060
lea r9, [0x14012b8e4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x100]
call fcn.140016060
lea r9, [0x14012b8ec]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x108]
call fcn.140016060
lea r9, [0x14012b8b4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xa0]
call fcn.140016060
lea r9, [0x14012b8ac]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xa8]
call fcn.140016060
lea r9, [0x14012b8c4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xb0]
call fcn.140016060
lea r9, [0x14012b90c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xb8]
call fcn.140016060
lea r9, [0x14012b914]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xc0]
call fcn.140016060
lea r9, [0x14012b8cc]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xc8]
call fcn.140016060
lea r9, [0x14012b8f4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xd0]
call fcn.140016060
lea r9, [0x14012b8fc]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xd8]
call fcn.140016060
lea r9, [0x14012b8d4]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xe0]
call fcn.140016060
lea r9, [0x14012b924]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xe8]
call fcn.140016060
lea r9, [0x14012b934]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x50]
call fcn.140016060
lea r9, [0x14012b8bc]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xf0]
call fcn.140016060
lea r9, [0x14012b91c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0xf8]
call fcn.140016060
lea r9, [0x14012b92c]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
lea rcx, [rbx + 0x118]
call fcn.140016060
lea r9, [0x14012b904]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012ffb8]
mov rcx, r14
call fcn.140016060
xor edx, edx
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, 2
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rdx, [rbx + 0x2a8]
mov rcx, rbx
call fcn.14006c800
test eax, eax
jne 0x14006213f
mov rcx, rbx
call fcn.1400639e0
lea rdx, [rbx + 0x2a8]
mov rcx, rbx
call fcn.14006c950
mov dword [reloc.WS2_32.dll_accept], 1
xor edx, edx
mov r8d, 0x400
lea rcx, [rbx + 0x11e0]
call fcn.1400dd9f0
lea r8, [rbx + 0x15e0]
lea rdx, [rbx + 0x11e0]
mov rcx, rbx
call fcn.14006ccd0
lea r9, [0x140129da0]
lea r8, str.SYSTEMCurrentControlSetServices_sParameters
mov edx, 0x400
lea rcx, [rbp + 0xa0]
call fcn.1400d9998
xor edx, edx
mov qword [rsp + 0x40], rdx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], edx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0xa0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x1400621df
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140062273
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x20], 0x316
mov r9d, 6
lea r8d, [r9 - 1]
lea rdx, str._u._u._u
lea rcx, [rsp + 0x68]
call fcn.140016060
mov rdi, qword [rsp + 0x68]
mov eax, dword [rdi - 0x10]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
mov r9d, 1
xor r8d, r8d
lea rdx, str.Version
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140062273
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov byte [rbx + 0x168], 1
mov dword [rbx + 0x188], 1
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x1400622a7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
jmp 0x1400622a7
mov rax, rbx
mov rcx, qword [rbp + 0x8a0]
xor rcx, rsp
call fcn.1400d4d90
lea r11, [rsp + 0x9b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret