Function at 0x140008d20
Capabilities:
Create directory
Query environment variable
Set file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0xfc0]
mov eax, 0x10c0
call fcn.140049090
sub rsp, rax
mov rax, qword [0x14009c020]
xor rax, rsp
mov qword [rbp + 0xfb0], rax
mov rdi, rdx
mov rsi, rcx
mov qword [rsp + 0x60], rdx
xor r14d, r14d
mov dword [rsp + 0x50], r14d
mov qword [rdx], r14
mov qword [rdx + 0x10], r14
mov qword [rdx + 0x18], 7
mov word [rdx], r14w
mov dword [rsp + 0x50], 1
mov edx, 0x400
mov rcx, rdi
call fcn.14000ac90
mov qword [rdi + 0x10], r14
mov rax, qword [rsi + 0x48]
mov ebx, dword [rax + 0x10]
lea r8d, [r14 + 4]
lea rdx, str.__
mov rcx, rdi
call fcn.14000b2e0
test ebx, ebx
jne 0x140008e61
mov rax, qword [rsi + 0x48]
mov rdx, qword [rax + 0x28]
cmp word [rdx], bx
je 0x140008de0
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140008dd0
jmp 0x140008ed3
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp - 0x50]
call fcn.14004b2f0
mov r8d, 0x400
lea rdx, [rbp - 0x50]
lea rcx, str._programdata_BDLogging
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rdx, str._programdata_
lea rcx, [rbp - 0x50]
call fcn.14004a854
test rax, rax
je 0x140008e39
mov word [rbp - 0x50], r14w
mov r8d, 0x400
lea rdx, [rbp - 0x50]
lea rcx, str._ALLUSERSPROFILE_Application_DataBDLogging
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rax, [rbp - 0x50]
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140008e50
lea rdx, [rbp - 0x50]
jmp 0x140008ed3
mov qword [rbp - 0x58], r14
mov r8d, 4
lea rdx, [rbp - 0x58]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rax, [rbp - 0x58]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp word [rax + r8*2], 0
jne 0x140008e85
lea rdx, [rbp - 0x58]
mov rcx, rdi
call fcn.140002150
mov r8d, 0xb
lea rdx, str.ProgramData
mov rcx, rdi
call fcn.140002150
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140008ebe
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r8d, 0xa
lea rdx, str.BDLogging
mov rcx, rdi
call fcn.140002150
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140008ee8
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140008efd
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea r8, str.CstLogs
mov rdx, rdi
call fcn.140008bb0
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x50]
call fcn.14004b2f0
mov r8d, 0x800
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x5c
lea rcx, [rbp - 0x50]
call fcn.14004a7a4
test rax, rax
je 0x140008f53
add rax, 2
jmp 0x140008f57
lea rax, [rbp - 0x50]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x78], r14
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], r14w
mov r8, rbx
inc r8
cmp word [rax + r8*2], 0
jne 0x140008f72
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.14000b2e0
mov esi, 3
mov dword [rsp + 0x50], esi
lea r8, [rsp + 0x68]
cmp qword [rbp - 0x80], 8
cmovae r8, qword [rsp + 0x68]
mov rdx, rdi
call fcn.140008bb0
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, 8
jb 0x140008fed
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008fe8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400091b3
call fcn.140048430
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14009f918], eax
jle 0x14000911f
lea rcx, [0x14009f918]
call fcn.140048630
cmp dword [0x14009f918], 0xffffffff
jne 0x14000911f
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp - 0x50]
call fcn.14004b2f0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rax, [rbp - 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x58]
lea r8, [rbp - 0x58]
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetProcessTimes]
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movzx ecx, word [rsp + 0x74]
movzx edx, word [rsp + 0x72]
movzx r10d, word [rsp + 0x70]
movzx r11d, word [rsp + 0x6e]
movzx r9d, word [rsp + 0x6a]
movzx r8d, word [rsp + 0x68]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
lea rdx, str._.2d__.2d__.2d__.2d__.2d__.2d___.4d
lea rcx, [rbp - 0x50]
call fcn.140008cc0
mov qword [0x14009f920], r14
movdqa xmm0, xmmword [0x1400904a0]
movdqu xmmword [0x14009f930], xmm0
lea rax, [rbp - 0x50]
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1400090e0
mov r8, rbx
lea rdx, [rbp - 0x50]
lea rcx, [0x14009f920]
call fcn.14000b2e0
mov esi, 0xb
mov dword [rsp + 0x50], esi
lea rcx, [0x14007b8a0]
call fcn.140048978
nop
lea rcx, [0x14009f918]
call fcn.1400485d0
lea rdx, [0x14009f920]
lea rcx, [rbp - 0x78]
call fcn.14000b1e0
or esi, 4
mov dword [rsp + 0x50], esi
lea r8, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae r8, qword [rbp - 0x78]
mov rdx, rdi
call fcn.140008bb0
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x140009189
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140009184
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400091b3
call fcn.140048430
mov rax, rdi
mov rcx, qword [rbp + 0xfb0]
xor rcx, rsp
call fcn.140048410
lea r11, [rsp + 0x10c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.140054034
int3