Function at 0x140002420
Capabilities:
Create directory
Get common file path
Set current directory
Set file attributes

Disassembly:
push rbx
push rsi
push rdi
push r12
mov eax, 0x2e38
call fcn.14000cc30
sub rsp, rax
mov rbx, rcx
mov sil, byte [rsp + 0x2e80]
mov dword [rsp + 0x5c], 0
mov qword [0x140022b20], rbx
call fcn.140006cf0
mov byte [0x140022b80], 0
mov rcx, qword [0x140022b20]
xor edx, edx
lea r8, [0x140022860]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
xor ecx, ecx
lea rdx, [0x1400231e0]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, eax
test edi, edi
je 0x140002497
cmp edi, 0x104
jbe 0x14000249f
mov dword [rsp + 0x5c], 1
test sil, sil
je 0x14000251f
lea rdx, [0x140023800]
lea r8, [0x1400231e0]
xor ecx, ecx
nop dword [rax]
nop word [rax + rax]
mov ax, word [r8 + rcx]
mov word [rdx + rcx], ax
add rcx, 2
test ax, ax
jne 0x1400024c0
lea rcx, [0x140023800]
call fcn.140016680
lea rcx, [0x140023800]
lea rdx, [0x14001a876]
call fcn.14000e040
lea rax, [0x140023800]
or rdx, 0xffffffffffffffff
nop dword [rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x140002500
mov qword [0x140022ba0], rdx
cmp dword [rsp + 0x5c], 0
jne 0x140002bd9
jmp 0x140002549
mov ecx, 0x104
lea rdx, [0x140023800]
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
test edi, edi
je 0x14000253f
cmp edi, 0x104
jbe 0x1400024f1
mov dword [rsp + 0x5c], 1
jmp 0x1400024f1
lea rcx, [0x140022b00]
lea rdx, [0x140022ae0]
lea r8, [0x140022ac0]
call fcn.140002210
test eax, eax
jne 0x140002574
mov dword [rsp + 0x5c], 3
jmp 0x140002db1
cmp dword [0x140022ae0], 0
je 0x140002567
cmp qword [0x140022b00], 0
je 0x140002567
cmp qword [0x140022ac0], 0
je 0x140002567
cmp dword [rsp + 0x5c], 0
jne 0x140002bd9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
shl esi, 0xc
shl edi, 0xe
xor esi, edi
xor esi, eax
xor edi, edi
cmp edi, 0x64
jb 0x1400025d0
mov dword [rsp + 0x5c], 1
jmp 0x1400026f5
lea rdx, [0x140023800]
mov rax, qword [0x140022ba0]
lea r8, [rdx + rax*2]
lea r9, [0x14001a870]
xor ecx, ecx
nop dword [rax + rax]
mov ax, word [r9 + rcx]
mov word [r8 + rcx], ax
add rcx, 2
test ax, ax
jne 0x1400025f0
lea rax, [0x140023800]
or rcx, 0xffffffffffffffff
nop
add rcx, 1
cmp word [rax + rcx*2], 0
jne 0x140002610
lea rdx, [rdx + rcx*2]
mov eax, esi
xor ecx, ecx
jmp 0x140002665
mov r8d, eax
and r8d, 0xf
shr eax, 4
lea r9d, [r8d + 0x30]
lea r10d, [r8d + 0x37]
cmp r8d, 0xa
cmovae r9d, r10d
mov r8d, ecx
neg r8d
add r8d, 7
mov r8d, r8d
mov r9w, r9w
mov word [rdx + r8*2], r9w
add ecx, 1
cmp ecx, 8
jb 0x140002630
mov eax, ecx
mov word [rdx + rax*2], 0
lea rcx, [0x140023800]
call fcn.140016270
test al, al
jne 0x1400026e5
lea rcx, [0x140023800]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1400026d4
lea rcx, [0x140023800]
lea rdx, [0x14001a876]
call fcn.14000e040
lea rax, [0x140023800]
or rdx, 0xffffffffffffffff
nop dword [rax]
nop word [rax + rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x1400026c0
mov qword [0x140022ba0], rdx
jmp 0x1400026f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400025c3
add edi, 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add esi, eax
jmp 0x1400025be
cmp dword [rsp + 0x5c], 0
jne 0x140002bd9
mov ecx, 0x61c
lea rdx, [0x140022bc0]
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rcx, [0x140023800]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [0x140023800]
call fcn.140006d60
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.140002f60
lea rax, [0x140002e80]
mov qword [rsp + 0x2de8], rax
lea rax, [0x140002ea0]
mov qword [rsp + 0x2df0], rax
lea rax, [0x140002eb0]
mov qword [rsp + 0x2dd8], rax
lea rax, [0x140002ed0]
mov qword [rsp + 0x2de0], rax
lea rcx, [rsp + 0x2dc0]
call fcn.1400034b0
lea rcx, [rsp + 0x2d78]
xor edx, edx
call fcn.1400038c0
mov qword [rsp + 0x2db0], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [0x1400231e0]
call fcn.1400031d0
test eax, eax
jne 0x1400027f3
mov qword [rsp + 0x2e30], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
call fcn.1400020c0
test eax, eax
je 0x1400027f3
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
xor r8d, r8d
call fcn.140003350
test eax, eax
je 0x1400027fb
mov dword [rsp + 0x5c], InitCommonControls
cmp dword [rsp + 0x5c], 0
jne 0x140002867
lea rcx, [rsp + 0x2de8]
mov edx, 0x40000
call qword [rsp + 0x2de8]
mov qword [rsp + 0x2db0], rax
cmp qword [rsp + 0x2db0], 0
jne 0x140002833
mov dword [rsp + 0x5c], 2
jmp 0x140002867
mov qword [rsp + 0x2db8], 0x40000
lea rax, [rsp + 0x2dc0]
mov qword [rsp + 0x2d98], rax
mov qword [rsp + 0x2da8], 0
mov qword [rsp + 0x2da0], 0
lea rcx, [rsp + 0x2ca0]
call fcn.140003af0
cmp dword [rsp + 0x5c], 0
jne 0x140002b98
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2d78]
lea r8, [rsp + 0x2de8]
lea r9, [rsp + 0x2dd8]
call fcn.140006990
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x140002b98
mov dword [rsp + 0x64], 0xffffffff
mov qword [rsp + 0x2e28], 0
mov qword [rsp + 0x2e20], 0
xor esi, esi
jmp 0x140002b72
mov qword [rsp + 0x2e18], 0
mov qword [rsp + 0x2e10], 0
mov edx, esi
lea rcx, [rsp + 0x2ca0]
xor r8, r8
call fcn.140006c10
cmp rax, 0x104
jae 0x140002a3b
lea rax, [0x140023800]
mov rdx, qword [0x140022ba0]
lea rdi, [rax + rdx*2]
mov edx, esi
lea rcx, [rsp + 0x2ca0]
mov r8, rdi
call fcn.140006c10
lea rax, [rsp + 0x2dd8]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x2de8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x2e10]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x2e18]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x2e20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x2e28]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2d78]
mov r8d, esi
lea r9, [rsp + 0x64]
call fcn.1400069d0
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x140002b7f
xor r12, r12
jmp 0x1400029d9
cmp word [rdi + r12*2], 0x2f
jne 0x1400029d5
mov word [rdi + r12*2], 0
lea rcx, [0x140023800]
call fcn.140016710
mov word [rdi + r12*2], 0x5c
add r12, 1
cmp word [rdi + r12*2], 0
jne 0x1400029b3
mov rax, qword [rsp + 0x2d10]
mov edx, esi
shr edx, 3
movzx eax, byte [rax + rdx]
mov edx, pe_nt_image_headers64
mov ecx, esi
and ecx, 7
sar edx, cl
test eax, edx
je 0x140002a13
lea rcx, [0x140023800]
call fcn.140016710
jmp 0x140002b6f
lea rcx, [0x140023800]
call fcn.140016270
test al, al
jne 0x140002a3b
lea rcx, [rsp + 0x2e08]
lea rdx, [0x140023800]
call fcn.1400031e0
test eax, eax
je 0x140002a48
mov dword [rsp + 0x5c], 2
jmp 0x140002b7f
mov rax, qword [rsp + 0x2e10]
mov qword [rsp + 0x2e00], rax
mov rax, qword [rsp + 0x2e28]
mov rdx, rax
add rdx, qword [rsp + 0x2e18]
lea rcx, [rsp + 0x2e08]
lea r8, [rsp + 0x2e00]
call fcn.1400032c0
test eax, eax
jne 0x140002a96
mov rax, qword [rsp + 0x2e10]
cmp qword [rsp + 0x2e00], rax
je 0x140002a9e
mov dword [rsp + 0x5c], 2
cmp qword [rsp + 0x2d38], 0
je 0x140002b0b
mov rax, qword [rsp + 0x2d38]
mov edx, esi
shr edx, 3
movzx eax, byte [rax + rdx]
mov edx, pe_nt_image_headers64
mov ecx, esi
and ecx, 7
sar edx, cl
test eax, edx
je 0x140002b0b
mov rax, qword [rsp + 0x2d40]
mov edx, esi
lea rax, [rax + rdx*8]
mov edx, dword [rax]
mov eax, dword [rax + 4]
mov ecx, eax
mov edx, edx
shl rcx, 0x20
or rcx, rdx
mov qword [rsp + 0x2df8], rcx
mov rcx, qword [rsp + 0x2e08]
xor edx, edx
xor r8, r8
lea r9, [rsp + 0x2df8]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
lea rcx, [rsp + 0x2e08]
call fcn.1400031f0
cmp dword [rsp + 0x5c], 0
jne 0x140002b7f
test eax, eax
je 0x140002b29
mov dword [rsp + 0x5c], eax
jmp 0x140002b7f
cmp qword [rsp + 0x2d28], 0
je 0x140002b6f
mov rax, qword [rsp + 0x2d28]
mov edx, esi
shr edx, 3
movzx eax, byte [rax + rdx]
mov edx, pe_nt_image_headers64
mov ecx, esi
and ecx, 7
sar edx, cl
test eax, edx
je 0x140002b6f
mov rax, qword [rsp + 0x2d30]
mov edx, esi
mov edx, dword [rax + rdx*4]
lea rcx, [0x140023800]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add esi, 1
cmp esi, dword [rsp + 0x2d00]
jb 0x1400028da
lea rcx, [rsp + 0x2de8]
mov rdx, qword [rsp + 0x2e28]
call qword [rsp + 0x2df0]
jmp 0x140002ba0
mov dword [rsp + 0x5c], 3
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2de8]
call fcn.140003bb0
mov rdx, qword [rsp + 0x2db0]
lea rcx, [rsp + 0x2de8]
call qword [rsp + 0x2df0]
lea rcx, [rsp + 0x2dd0]
call fcn.1400031f0
lea rax, [0x140023800]
mov rdx, qword [0x140022ba0]
mov word [rax + rdx*2], 0
mov dword [rsp + 0x58], 0
cmp dword [rsp + 0x5c], 0
jne 0x140002d8d
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
lea rax, str.PBCore64.dll
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x2068]
mov edx, 0x30e
lea r8, [0x14001a862]
lea r9, [0x140023800]
call fcn.14000e520
lea rcx, [rsp + 0x2068]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x140002c6b
xor ecx, ecx
lea rdx, str.Unable_to_load_module_PBCore
lea r8, [0x140022860]
mov r9d, 0x40010
call qword [sym.imp.USER32.dll_MessageBoxW]
lea rcx, str.APPTITLE
lea rdx, [0x140022860]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, str.ARCNAME
lea rdx, [0x1400231e0]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, str.PBSFXPATH
lea rdx, [0x140023800]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, [0x14001a7d0]
lea rdx, [0x140022bc0]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rdx, [0x140022bc0]
lea r8, [0x1400231e0]
xor ecx, ecx
nop dword [rax + rax]
mov ax, word [r8 + rcx]
mov word [rdx + rcx], ax
add rcx, 2
test ax, ax
jne 0x140002cd0
lea rcx, [0x140022bc0]
call fcn.140016680
lea rcx, str.ARCPATH
lea rdx, [0x140022bc0]
call qword [sym.imp.pbcore64.dll_SetVar]
mov rcx, rbx
call qword [sym.imp.pbcore64.dll_InitSFX]
call fcn.140001170
mov dword [rsp + 0x58], eax
jmp 0x140002d4f
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp qword [rsp + 0x50], 0
je 0x140002d68
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x14001a726]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x140002d8d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x140022bc0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [0x140023800]
call fcn.140001570
cmp dword [rsp + 0x58], 0
jne 0x140002e66
cmp dword [rsp + 0x5c], 0
je 0x140002e62
mov rcx, qword [0x140022b20]
mov edx, 1
lea r8, [rsp + 0x2a98]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
lea rcx, [rsp + 0x2a98]
lea rdx, [0x14001a720]
call fcn.14000e040
lea rcx, [rsp + 0x2684]
lea rdx, [rsp + 0x2a98]
call fcn.14000e040
mov eax, dword [rsp + 0x5c]
lea edx, [eax + 1]
mov rcx, qword [0x140022b20]
lea r8, [rsp + 0x2a98]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
lea rcx, [rsp + 0x2684]
lea rdx, [rsp + 0x2a98]
call fcn.14000e040
xor ecx, ecx
lea rdx, [rsp + 0x2684]
lea r8, [0x140022860]
mov r9d, 0x40010
call qword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [rsp + 0x5c]
neg eax
jmp 0x140002e6a
xor eax, eax
jmp 0x140002e6a
mov eax, dword [rsp + 0x58]
add rsp, 0x2e38
pop r12
pop rdi
pop rsi
pop rbx
ret