Function at 0x140002400
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.14000cc10
sub rsp, rax
mov rbx, rcx
mov sil, byte [rsp + 0x2e80]
mov dword [rsp + 0x5c], 0
mov qword [0x140022b20], rbx
call fcn.140006cd0
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 0x140002477
cmp edi, 0x104
jbe 0x14000247f
mov dword [rsp + 0x5c], 1
test sil, sil
je 0x1400024ff
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 0x1400024a0
lea rcx, [0x140023800]
call fcn.140016660
lea rcx, [0x140023800]
lea rdx, [0x14001a6e6]
call fcn.14000e020
lea rax, [0x140023800]
or rdx, 0xffffffffffffffff
nop dword [rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x1400024e0
mov qword [0x140022ba0], rdx
cmp dword [rsp + 0x5c], 0
jne 0x140002bb9
jmp 0x140002529
mov ecx, 0x104
lea rdx, [0x140023800]
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
test edi, edi
je 0x14000251f
cmp edi, 0x104
jbe 0x1400024d1
mov dword [rsp + 0x5c], 1
jmp 0x1400024d1
lea rcx, [0x140022b00]
lea rdx, [0x140022ae0]
lea r8, [0x140022ac0]
call fcn.1400021f0
test eax, eax
jne 0x140002554
mov dword [rsp + 0x5c], 3
jmp 0x140002d91
cmp dword [0x140022ae0], 0
je 0x140002547
cmp qword [0x140022b00], 0
je 0x140002547
cmp qword [0x140022ac0], 0
je 0x140002547
cmp dword [rsp + 0x5c], 0
jne 0x140002bb9
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 0x1400025b0
mov dword [rsp + 0x5c], 1
jmp 0x1400026d5
lea rdx, [0x140023800]
mov rax, qword [0x140022ba0]
lea r8, [rdx + rax*2]
lea r9, [0x14001a6e0]
xor ecx, ecx
nop dword [rax + rax]
mov ax, word [r9 + rcx]
mov word [r8 + rcx], ax
add rcx, 2
test ax, ax
jne 0x1400025d0
lea rax, [0x140023800]
or rcx, 0xffffffffffffffff
nop
add rcx, 1
cmp word [rax + rcx*2], 0
jne 0x1400025f0
lea rdx, [rdx + rcx*2]
mov eax, esi
xor ecx, ecx
jmp 0x140002645
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 0x140002610
mov eax, ecx
mov word [rdx + rax*2], 0
lea rcx, [0x140023800]
call fcn.140016250
test al, al
jne 0x1400026c5
lea rcx, [0x140023800]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1400026b4
lea rcx, [0x140023800]
lea rdx, [0x14001a6e6]
call fcn.14000e020
lea rax, [0x140023800]
or rdx, 0xffffffffffffffff
nop dword [rax]
nop word [rax + rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x1400026a0
mov qword [0x140022ba0], rdx
jmp 0x1400026d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400025a3
add edi, 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add esi, eax
jmp 0x14000259e
cmp dword [rsp + 0x5c], 0
jne 0x140002bb9
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.140006d40
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.140002f40
lea rax, [0x140002e60]
mov qword [rsp + 0x2de8], rax
lea rax, [0x140002e80]
mov qword [rsp + 0x2df0], rax
lea rax, [0x140002e90]
mov qword [rsp + 0x2dd8], rax
lea rax, [0x140002eb0]
mov qword [rsp + 0x2de0], rax
lea rcx, [rsp + 0x2dc0]
call fcn.140003490
lea rcx, [rsp + 0x2d78]
xor edx, edx
call fcn.1400038a0
mov qword [rsp + 0x2db0], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [0x1400231e0]
call fcn.1400031b0
test eax, eax
jne 0x1400027d3
mov qword [rsp + 0x2e30], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
call fcn.1400020a0
test eax, eax
je 0x1400027d3
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
xor r8d, r8d
call fcn.140003330
test eax, eax
je 0x1400027db
mov dword [rsp + 0x5c], InitCommonControls
cmp dword [rsp + 0x5c], 0
jne 0x140002847
lea rcx, [rsp + 0x2de8]
mov edx, 0x40000
call qword [rsp + 0x2de8]
mov qword [rsp + 0x2db0], rax
cmp qword [rsp + 0x2db0], 0
jne 0x140002813
mov dword [rsp + 0x5c], 2
jmp 0x140002847
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.140003ad0
cmp dword [rsp + 0x5c], 0
jne 0x140002b78
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2d78]
lea r8, [rsp + 0x2de8]
lea r9, [rsp + 0x2dd8]
call fcn.140006970
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x140002b78
mov dword [rsp + 0x64], 0xffffffff
mov qword [rsp + 0x2e28], 0
mov qword [rsp + 0x2e20], 0
xor esi, esi
jmp 0x140002b52
mov qword [rsp + 0x2e18], 0
mov qword [rsp + 0x2e10], 0
mov edx, esi
lea rcx, [rsp + 0x2ca0]
xor r8, r8
call fcn.140006bf0
cmp rax, 0x104
jae 0x140002a1b
lea rax, [0x140023800]
mov rdx, qword [0x140022ba0]
lea rdi, [rax + rdx*2]
mov edx, esi
lea rcx, [rsp + 0x2ca0]
mov r8, rdi
call fcn.140006bf0
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.1400069b0
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x140002b5f
xor r12, r12
jmp 0x1400029b9
cmp word [rdi + r12*2], 0x2f
jne 0x1400029b5
mov word [rdi + r12*2], 0
lea rcx, [0x140023800]
call fcn.1400166f0
mov word [rdi + r12*2], 0x5c
add r12, 1
cmp word [rdi + r12*2], 0
jne 0x140002993
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 0x1400029f3
lea rcx, [0x140023800]
call fcn.1400166f0
jmp 0x140002b4f
lea rcx, [0x140023800]
call fcn.140016250
test al, al
jne 0x140002a1b
lea rcx, [rsp + 0x2e08]
lea rdx, [0x140023800]
call fcn.1400031c0
test eax, eax
je 0x140002a28
mov dword [rsp + 0x5c], 2
jmp 0x140002b5f
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.1400032a0
test eax, eax
jne 0x140002a76
mov rax, qword [rsp + 0x2e10]
cmp qword [rsp + 0x2e00], rax
je 0x140002a7e
mov dword [rsp + 0x5c], 2
cmp qword [rsp + 0x2d38], 0
je 0x140002aeb
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 0x140002aeb
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.1400031d0
cmp dword [rsp + 0x5c], 0
jne 0x140002b5f
test eax, eax
je 0x140002b09
mov dword [rsp + 0x5c], eax
jmp 0x140002b5f
cmp qword [rsp + 0x2d28], 0
je 0x140002b4f
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 0x140002b4f
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 0x1400028ba
lea rcx, [rsp + 0x2de8]
mov rdx, qword [rsp + 0x2e28]
call qword [rsp + 0x2df0]
jmp 0x140002b80
mov dword [rsp + 0x5c], 3
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2de8]
call fcn.140003b90
mov rdx, qword [rsp + 0x2db0]
lea rcx, [rsp + 0x2de8]
call qword [rsp + 0x2df0]
lea rcx, [rsp + 0x2dd0]
call fcn.1400031d0
lea rax, [0x140023800]
mov rdx, qword [0x140022ba0]
mov word [rax + rdx*2], 0
mov dword [rsp + 0x58], 0
cmp dword [rsp + 0x5c], 0
jne 0x140002d6d
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, [0x14001a6d2]
lea r9, [0x140023800]
call fcn.14000e500
lea rcx, [rsp + 0x2068]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x140002c4b
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, [0x14001a640]
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 0x140002cb0
lea rcx, [0x140022bc0]
call fcn.140016660
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 0x140002d2f
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp qword [rsp + 0x50], 0
je 0x140002d48
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x14001a596]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x140002d6d
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.140001550
cmp dword [rsp + 0x58], 0
jne 0x140002e46
cmp dword [rsp + 0x5c], 0
je 0x140002e42
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, [0x14001a590]
call fcn.14000e020
lea rcx, [rsp + 0x2684]
lea rdx, [rsp + 0x2a98]
call fcn.14000e020
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.14000e020
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 0x140002e4a
xor eax, eax
jmp 0x140002e4a
mov eax, dword [rsp + 0x58]
add rsp, 0x2e38
pop r12
pop rdi
pop rsi
pop rbx
ret