Function at 0x140002940
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.14000cd90
sub rsp, rax
mov rbx, rcx
mov sil, byte [rsp + 0x2e80]
mov dword [rsp + 0x5c], 0
mov qword [0x140022c60], rbx
call fcn.140006df0
mov byte [0x140022cc0], 0
mov rcx, qword [0x140022c60]
xor edx, edx
lea r8, [0x1400229a0]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
xor ecx, ecx
lea rdx, [0x140023320]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, eax
test edi, edi
je 0x1400029b7
cmp edi, 0x104
jbe 0x1400029bf
mov dword [rsp + 0x5c], 1
test sil, sil
je 0x140002a3f
lea rdx, [0x140023940]
lea r8, [0x140023320]
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 0x1400029e0
lea rcx, [0x140023940]
call fcn.140016d20
lea rcx, [0x140023940]
lea rdx, [0x14001ac26]
call fcn.14000e600
lea rax, [0x140023940]
or rdx, 0xffffffffffffffff
nop dword [rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x140002a20
mov qword [0x140022ce0], rdx
cmp dword [rsp + 0x5c], 0
jne 0x1400030f9
jmp 0x140002a69
mov ecx, 0x104
lea rdx, [0x140023940]
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
test edi, edi
je 0x140002a5f
cmp edi, 0x104
jbe 0x140002a11
mov dword [rsp + 0x5c], 1
jmp 0x140002a11
lea rcx, [0x140022c40]
lea rdx, [0x140022c20]
lea r8, [0x140022c00]
call fcn.140002730
test eax, eax
jne 0x140002a94
mov dword [rsp + 0x5c], 3
jmp 0x1400032d1
cmp dword [0x140022c20], 0
je 0x140002a87
cmp qword [0x140022c40], 0
je 0x140002a87
cmp qword [0x140022c00], 0
je 0x140002a87
cmp dword [rsp + 0x5c], 0
jne 0x1400030f9
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 0x140002af0
mov dword [rsp + 0x5c], 1
jmp 0x140002c15
lea rdx, [0x140023940]
mov rax, qword [0x140022ce0]
lea r8, [rdx + rax*2]
lea r9, [0x14001ac20]
xor ecx, ecx
nop dword [rax + rax]
mov ax, word [r9 + rcx]
mov word [r8 + rcx], ax
add rcx, 2
test ax, ax
jne 0x140002b10
lea rax, [0x140023940]
or rcx, 0xffffffffffffffff
nop
add rcx, 1
cmp word [rax + rcx*2], 0
jne 0x140002b30
lea rdx, [rdx + rcx*2]
mov eax, esi
xor ecx, ecx
jmp 0x140002b85
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 0x140002b50
mov eax, ecx
mov word [rdx + rax*2], 0
lea rcx, [0x140023940]
call fcn.140016910
test al, al
jne 0x140002c05
lea rcx, [0x140023940]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x140002bf4
lea rcx, [0x140023940]
lea rdx, [0x14001ac26]
call fcn.14000e600
lea rax, [0x140023940]
or rdx, 0xffffffffffffffff
nop dword [rax]
nop word [rax + rax]
add rdx, 1
cmp word [rax + rdx*2], 0
jne 0x140002be0
mov qword [0x140022ce0], rdx
jmp 0x140002c15
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140002ae3
add edi, 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add esi, eax
jmp 0x140002ade
cmp dword [rsp + 0x5c], 0
jne 0x1400030f9
mov ecx, 0x61c
lea rdx, [0x140022d00]
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rcx, [0x140023940]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [0x140023940]
call fcn.140006e60
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.140006c00
lea rax, [0x140006ea0]
mov qword [rsp + 0x2de8], rax
lea rax, [0x140006ec0]
mov qword [rsp + 0x2df0], rax
lea rax, [0x140006ed0]
mov qword [rsp + 0x2dd8], rax
lea rax, [0x140006ef0]
mov qword [rsp + 0x2de0], rax
lea rcx, [rsp + 0x2dc0]
call fcn.140003790
lea rcx, [rsp + 0x2d78]
xor edx, edx
call fcn.140007240
mov qword [rsp + 0x2db0], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [0x140023320]
call fcn.1400034b0
test eax, eax
jne 0x140002d13
mov qword [rsp + 0x2e30], 0
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
call fcn.1400025e0
test eax, eax
je 0x140002d13
lea rcx, [rsp + 0x2dd0]
lea rdx, [rsp + 0x2e30]
xor r8d, r8d
call fcn.140003630
test eax, eax
je 0x140002d1b
mov dword [rsp + 0x5c], InitCommonControls
cmp dword [rsp + 0x5c], 0
jne 0x140002d87
lea rcx, [rsp + 0x2de8]
mov edx, 0x40000
call qword [rsp + 0x2de8]
mov qword [rsp + 0x2db0], rax
cmp qword [rsp + 0x2db0], 0
jne 0x140002d53
mov dword [rsp + 0x5c], 2
jmp 0x140002d87
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.140003a10
cmp dword [rsp + 0x5c], 0
jne 0x1400030b8
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2d78]
lea r8, [rsp + 0x2de8]
lea r9, [rsp + 0x2dd8]
call fcn.1400068b0
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x1400030b8
mov dword [rsp + 0x64], 0xffffffff
mov qword [rsp + 0x2e28], 0
mov qword [rsp + 0x2e20], 0
xor esi, esi
jmp 0x140003092
mov qword [rsp + 0x2e18], 0
mov qword [rsp + 0x2e10], 0
mov edx, esi
lea rcx, [rsp + 0x2ca0]
xor r8, r8
call fcn.140006b30
cmp rax, 0x104
jae 0x140002f5b
lea rax, [0x140023940]
mov rdx, qword [0x140022ce0]
lea rdi, [rax + rdx*2]
mov edx, esi
lea rcx, [rsp + 0x2ca0]
mov r8, rdi
call fcn.140006b30
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.1400068f0
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jne 0x14000309f
xor r12, r12
jmp 0x140002ef9
cmp word [rdi + r12*2], 0x2f
jne 0x140002ef5
mov word [rdi + r12*2], 0
lea rcx, [0x140023940]
call fcn.140016db0
mov word [rdi + r12*2], 0x5c
add r12, 1
cmp word [rdi + r12*2], 0
jne 0x140002ed3
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 0x140002f33
lea rcx, [0x140023940]
call fcn.140016db0
jmp 0x14000308f
lea rcx, [0x140023940]
call fcn.140016910
test al, al
jne 0x140002f5b
lea rcx, [rsp + 0x2e08]
lea rdx, [0x140023940]
call fcn.1400034c0
test eax, eax
je 0x140002f68
mov dword [rsp + 0x5c], 2
jmp 0x14000309f
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.1400035a0
test eax, eax
jne 0x140002fb6
mov rax, qword [rsp + 0x2e10]
cmp qword [rsp + 0x2e00], rax
je 0x140002fbe
mov dword [rsp + 0x5c], 2
cmp qword [rsp + 0x2d38], 0
je 0x14000302b
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 0x14000302b
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.1400034d0
cmp dword [rsp + 0x5c], 0
jne 0x14000309f
test eax, eax
je 0x140003049
mov dword [rsp + 0x5c], eax
jmp 0x14000309f
cmp qword [rsp + 0x2d28], 0
je 0x14000308f
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 0x14000308f
mov rax, qword [rsp + 0x2d30]
mov edx, esi
mov edx, dword [rax + rdx*4]
lea rcx, [0x140023940]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add esi, 1
cmp esi, dword [rsp + 0x2d00]
jb 0x140002dfa
lea rcx, [rsp + 0x2de8]
mov rdx, qword [rsp + 0x2e28]
call qword [rsp + 0x2df0]
jmp 0x1400030c0
mov dword [rsp + 0x5c], 3
lea rcx, [rsp + 0x2ca0]
lea rdx, [rsp + 0x2de8]
call fcn.140003ad0
mov rdx, qword [rsp + 0x2db0]
lea rcx, [rsp + 0x2de8]
call qword [rsp + 0x2df0]
lea rcx, [rsp + 0x2dd0]
call fcn.1400034d0
lea rax, [0x140023940]
mov rdx, qword [0x140022ce0]
mov word [rax + rdx*2], 0
mov dword [rsp + 0x58], 0
cmp dword [rsp + 0x5c], 0
jne 0x1400032ad
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, [0x14001ac12]
lea r9, [0x140023940]
call fcn.14000e8d0
lea rcx, [rsp + 0x2068]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x14000318b
xor ecx, ecx
lea rdx, str.Unable_to_load_module_PBCore
lea r8, [0x1400229a0]
mov r9d, 0x40010
call qword [sym.imp.USER32.dll_MessageBoxW]
lea rcx, str.APPTITLE
lea rdx, [0x1400229a0]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, str.ARCNAME
lea rdx, [0x140023320]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, str.PBSFXPATH
lea rdx, [0x140023940]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rcx, [0x14001ab80]
lea rdx, [0x140022d00]
call qword [sym.imp.pbcore64.dll_SetVar]
lea rdx, [0x140022d00]
lea r8, [0x140023320]
xor ecx, ecx
nop dword [rax + rax]
mov ax, word [r8 + rcx]
mov word [rdx + rcx], ax
add rcx, 2
test ax, ax
jne 0x1400031f0
lea rcx, [0x140022d00]
call fcn.140016d20
lea rcx, str.ARCPATH
lea rdx, [0x140022d00]
call qword [sym.imp.pbcore64.dll_SetVar]
mov rcx, rbx
call qword [sym.imp.pbcore64.dll_InitSFX]
call fcn.140001660
mov dword [rsp + 0x58], eax
jmp 0x14000326f
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp qword [rsp + 0x50], 0
je 0x140003288
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x14001aad6]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1400032ad
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x140022d00]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [0x140023940]
call fcn.140001d00
cmp dword [rsp + 0x58], 0
jne 0x140003386
cmp dword [rsp + 0x5c], 0
je 0x140003382
mov rcx, qword [0x140022c60]
mov edx, 1
lea r8, [rsp + 0x2a98]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
lea rcx, [rsp + 0x2a98]
lea rdx, [0x14001aad0]
call fcn.14000e600
lea rcx, [rsp + 0x2684]
lea rdx, [rsp + 0x2a98]
call fcn.14000e600
mov eax, dword [rsp + 0x5c]
lea edx, [eax + 1]
mov rcx, qword [0x140022c60]
lea r8, [rsp + 0x2a98]
mov r9d, 0x104
call qword [sym.imp.USER32.dll_LoadStringW]
lea rcx, [rsp + 0x2684]
lea rdx, [rsp + 0x2a98]
call fcn.14000e600
xor ecx, ecx
lea rdx, [rsp + 0x2684]
lea r8, [0x1400229a0]
mov r9d, 0x40010
call qword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [rsp + 0x5c]
neg eax
jmp 0x14000338a
xor eax, eax
jmp 0x14000338a
mov eax, dword [rsp + 0x58]
add rsp, 0x2e38
pop r12
pop rdi
pop rsi
pop rbx
ret