Function at 0x14007bd50
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 r12
push r14
push r15
lea rbp, [rsp - 0xf80]
mov eax, 0x1080
call fcn.14006a900
sub rsp, rax
mov rax, qword [0x1400d0128]
xor rax, rsp
mov qword [rbp + 0xf70], rax
mov rdi, rdx
mov r15, rcx
mov qword [rsp + 0x58], rdx
xor r12d, r12d
mov dword [rsp + 0x30], r12d
mov qword [rdx], r12
mov qword [rdx + 0x10], r12
mov qword [rdx + 0x18], 7
mov word [rdx], r12w
mov dword [rsp + 0x30], 1
mov edx, 0x400
mov rcx, rdi
call fcn.14008a4c0
mov rax, qword [r15 + 0x48]
mov ebx, dword [rax + 0x10]
lea r8d, [r12 + 4]
lea rdx, [0x1400b3170]
mov rcx, rdi
call fcn.140004980
test ebx, ebx
jne 0x14007bee1
mov rax, qword [r15 + 0x48]
mov rdx, qword [rax + 0x28]
cmp word [rdx], bx
je 0x14007be18
mov rsi, 0xffffffffffffffff
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x14007be00
mov rcx, rdi
call fcn.1400047e0
jmp 0x14007c04d
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x400
lea rdx, [rsp + 0x70]
lea rcx, str._programdata_BDLogging
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rdx, str._programdata_
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_wcsstr
test rax, rax
je 0x14007be76
mov word [rsp + 0x70], r12w
mov r8d, 0x400
lea rdx, [rsp + 0x70]
lea rcx, str._ALLUSERSPROFILE_Application_DataBDLogging
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rax, [rsp + 0x70]
mov rsi, 0xffffffffffffffff
mov rdx, rsi
inc rdx
cmp word [rax + rdx*2], 0
jne 0x14007be85
mov rcx, qword [rdi + 0x10]
mov r8, qword [rdi + 0x18]
mov rax, r8
sub rax, rcx
cmp rdx, rax
ja 0x14007bed2
lea r14, [rcx + rdx]
mov qword [rdi + 0x10], r14
mov rbx, rdi
cmp r8, 8
jb 0x14007beb6
mov rbx, qword [rdi]
lea rcx, [rbx + rcx*2]
lea r8, [rdx + rdx]
lea rdx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + r14*2], r12w
jmp 0x14007c04d
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x70]
jmp 0x14007c042
mov qword [rsp + 0x60], r12
mov r8d, 4
lea rdx, [rsp + 0x60]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rax, [rsp + 0x60]
mov rsi, 0xffffffffffffffff
mov rdx, rsi
nop dword [rax + rax]
inc rdx
cmp word [rax + rdx*2], 0
jne 0x14007bf10
mov rcx, qword [rdi + 0x10]
mov r8, qword [rdi + 0x18]
mov rax, r8
sub rax, rcx
cmp rdx, rax
ja 0x14007bf5a
lea r14, [rcx + rdx]
mov qword [rdi + 0x10], r14
mov rbx, rdi
cmp r8, 8
jb 0x14007bf41
mov rbx, qword [rdi]
lea rcx, [rbx + rcx*2]
lea r8, [rdx + rdx]
lea rdx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + r14*2], r12w
jmp 0x14007bf6f
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x60]
xor r8d, r8d
mov rcx, rdi
call fcn.140002460
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 0xb
jb 0x14007bfb4
lea r14, [rcx + 0xb]
mov qword [rdi + 0x10], r14
mov rbx, rdi
cmp rdx, 8
jb 0x14007bf97
mov rbx, qword [rdi]
lea rcx, [rbx + rcx*2]
mov r8d, 0x16
lea rdx, str.ProgramData
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + r14*2], r12w
jmp 0x14007bfd3
mov qword [rsp + 0x20], ntohs
lea r9, str.ProgramData
xor r8d, r8d
lea edx, [r8 + 0xb]
mov rcx, rdi
call fcn.140002460
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007bfe0
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 0xa
jb 0x14007c02d
lea r14, [rcx + 0xa]
mov qword [rdi + 0x10], r14
mov rbx, rdi
cmp rdx, 8
jb 0x14007c010
mov rbx, qword [rdi]
lea rcx, [rbx + rcx*2]
mov r8d, reloc.WS2_32.dll_sendto
lea rdx, str.BDLogging
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + r14*2], r12w
jmp 0x14007c04d
mov qword [rsp + 0x20], 0xa
lea r9, str.BDLogging
mov edx, 0xa
xor r8d, r8d
mov rcx, rdi
call fcn.140002460
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c05a
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c06f
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c087
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx edx, word [0x1400d0178]
cmp word [rcx + rax*2 - 2], dx
je 0x14007c0a1
mov rcx, rdi
call fcn.140007870
mov r8d, 7
lea rdx, str.CstLogs
mov rcx, rdi
call fcn.1400047e0
mov rdx, rdi
mov rcx, qword [rdi + 0x18]
cmp rcx, 8
jb 0x14007c0c6
mov rdx, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx r8d, word [0x1400d0178]
cmp word [rdx + rax*2 - 2], r8w
je 0x14007c0ea
movzx edx, r8w
mov rcx, rdi
call fcn.140007870
mov rcx, qword [rdi + 0x18]
mov rax, rdi
cmp rcx, 8
jb 0x14007c0f6
mov rax, qword [rdi]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c10e
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor edx, edx
mov r8d, 0x1000
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x800
lea rdx, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x5c
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_wcsrchr
test rax, rax
je 0x14007c158
add rax, 2
jmp 0x14007c15d
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], 7
mov word [rsp + 0x38], r12w
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x14007c180
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.140004980
mov dword [rsp + 0x30], 3
lea rbx, [rsp + 0x38]
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x14007c1be
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x14007c26e
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c1cb
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx edx, word [0x1400d0178]
cmp word [rcx + rax*2 - 2], dx
je 0x14007c1e5
mov rcx, rdi
call fcn.140007870
mov r8, rsi
nop dword [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x14007c1f0
mov rdx, rbx
mov rcx, rdi
call fcn.1400047e0
mov r8, rdi
mov rcx, qword [rdi + 0x18]
cmp rcx, 8
jb 0x14007c216
mov r8, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx edx, word [0x1400d0178]
cmp word [r8 + rax*2 - 2], dx
je 0x14007c235
mov rcx, rdi
call fcn.140007870
mov rcx, qword [rdi + 0x18]
mov rax, rdi
cmp rcx, 8
jb 0x14007c241
mov rax, qword [rdi]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c259
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rdx, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x14007c2ac
lea rdx, [rdx*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x14007c2a4
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14007c2a4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.14006a280
lea rdx, [rsp + 0x38]
mov rcx, r15
call fcn.140081ce0
mov rbx, rax
cmp qword [rax + 0x18], 8
jb 0x14007c2c6
mov rbx, qword [rax]
test rbx, rbx
je 0x14007c369
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c2dc
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx edx, word [0x1400d0178]
cmp word [rcx + rax*2 - 2], dx
je 0x14007c2f6
mov rcx, rdi
call fcn.140007870
inc rsi
cmp word [rbx + rsi*2], 0
jne 0x14007c2f6
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call fcn.1400047e0
mov rcx, rdi
mov r8, qword [rdi + 0x18]
cmp r8, 8
jb 0x14007c31e
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx edx, word [0x1400d0178]
cmp word [rcx + rax*2 - 2], dx
je 0x14007c33c
mov rcx, rdi
call fcn.140007870
mov r8, qword [rdi + 0x18]
mov rcx, rdi
cmp r8, 8
jb 0x14007c348
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14007c35d
mov rcx, qword [rdi]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x14007c3ae
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14007c3a9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14007c3a9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14006a280
mov rax, rdi
mov rcx, qword [rbp + 0xf70]
xor rcx, rsp
call fcn.14006a600
lea r11, [rsp + 0x1080]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret