Function at 0x18002e820
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.180061590
sub rsp, rax
mov rax, qword [0x1800b2020]
xor rax, rsp
mov qword [rbp + 0xfb0], rax
mov rdi, rdx
mov rsi, rcx
mov qword [rsp + 0x78], 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.18002df60
mov qword [rdi + 0x10], r14
mov rax, qword [rsi + 0x48]
mov ebx, dword [rax + 0x10]
lea r8d, [r14 + 4]
lea rdx, [0x1800a54c0]
mov rcx, rdi
call fcn.180002a60
test ebx, ebx
jne 0x18002e961
mov rax, qword [rsi + 0x48]
mov rdx, qword [rax + 0x28]
cmp word [rdx], bx
je 0x18002e8e0
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x18002e8d0
jmp 0x18002e9d3
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp - 0x50]
call fcn.1800633e0
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.1800629c4
test rax, rax
je 0x18002e939
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 0x18002e950
lea rdx, [rbp - 0x50]
jmp 0x18002e9d3
mov qword [rbp - 0x80], r14
mov r8d, 4
lea rdx, [rbp - 0x80]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rax, [rbp - 0x80]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp word [rax + r8*2], 0
jne 0x18002e985
lea rdx, [rbp - 0x80]
mov rcx, rdi
call fcn.18002e290
mov r8d, 0xb
lea rdx, str.ProgramData
mov rcx, rdi
call fcn.18002e290
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x18002e9be
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.18002e290
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x18002e9e8
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x18002e9fd
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea r8, str.CstLogs
mov rdx, rdi
call fcn.18002e4b0
xor edx, edx
mov r8d, 0x1000
lea rcx, [rbp - 0x50]
call fcn.1800633e0
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.180062914
test rax, rax
je 0x18002ea53
add rax, 2
jmp 0x18002ea57
lea rax, [rbp - 0x50]
mov qword [rbp - 0x78], r14
mov qword [rbp - 0x68], r14
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], r14w
mov r8, rbx
nop
inc r8
cmp word [rax + r8*2], 0
jne 0x18002ea70
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.180002a60
mov esi, 3
mov dword [rsp + 0x50], esi
lea r8, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae r8, qword [rbp - 0x78]
mov rdx, rdi
call fcn.18002e4b0
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x18002eae7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18002eae2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18002ecad
call fcn.18006080c
mov ecx, dword [0x1800b4d94]
mov rax, qword gs:[0x58]
mov edx, 4
mov rcx, qword [rax + rcx*8]
mov eax, dword [rdx + rcx]
cmp dword [0x1800b5cf8], eax
jle 0x18002ec13
lea rcx, [0x1800b5cf8]
call fcn.1800609c8
cmp dword [0x1800b5cf8], 0xffffffff
jne 0x18002ec13
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp - 0x50]
call fcn.1800633e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x80]
lea r8, [rbp - 0x80]
lea rdx, [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_GetProcessTimes]
xorps xmm0, xmm0
movups xmmword [rbp - 0x78], xmm0
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movzx ecx, word [rbp - 0x6c]
movzx edx, word [rbp - 0x6e]
movzx r10d, word [rbp - 0x70]
movzx r11d, word [rbp - 0x72]
movzx r9d, word [rbp - 0x76]
movzx r8d, word [rbp - 0x78]
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.18002e5c0
mov qword [0x1800b5d00], r14
movdqa xmm0, xmmword [0x1800a5d00]
movdqu xmmword [0x1800b5d10], xmm0
lea rax, [rbp - 0x50]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x18002ebd4
mov r8, rbx
lea rdx, [rbp - 0x50]
lea rcx, [0x1800b5d00]
call fcn.180002a60
mov esi, 0xb
mov dword [rsp + 0x50], esi
lea rcx, [0x180093940]
call fcn.180060e40
nop
lea rcx, [0x1800b5cf8]
call fcn.180060968
lea rdx, [0x1800b5d00]
lea rcx, [rsp + 0x58]
call fcn.18002e720
or esi, 4
mov dword [rsp + 0x50], esi
lea r8, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae r8, qword [rsp + 0x58]
mov rdx, rdi
call fcn.18002e4b0
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 8
jb 0x18002ec83
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18002ec7e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18002ecad
call fcn.18006080c
mov rax, rdi
mov rcx, qword [rbp + 0xfb0]
xor rcx, rsp
call fcn.1800607b0
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.18006e72c
int3