Function at 0x140058b90
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x800]
sub rsp, 0x900
mov rax, qword [0x1400d50c0]
xor rax, rsp
mov qword [rbp + 0x7f0], rax
xor r13d, r13d
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp - 0x10]
call fcn.1400972c0
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 0x1a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x48], xmm1
lea rax, [rbp - 0x10]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r13w
jne 0x140058c11
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x58]
call fcn.140004ac0
nop
mov rdi, qword [rbp - 0x48]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
sub rax, rdi
cmp rax, 0x18
jb 0x140058c74
lea rax, [rdi + 0x18]
mov qword [rbp - 0x48], rax
lea rbx, [rbp - 0x58]
cmp rcx, 7
cmova rbx, qword [rbp - 0x58]
lea rcx, [rbx + rdi*2]
mov r8d, 0x30
lea rdx, str.Jagged_Alliance_3Mods_
call fcn.140096c20
mov word [rbx + rdi*2 + 0x30], r13w
lea rax, [rbp - 0x58]
jmp 0x140058c98
mov qword [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetElement
lea r9, str.Jagged_Alliance_3Mods_
movzx r8d, byte [rsp + 0x40]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetElement
lea rcx, [rbp - 0x58]
call fcn.14002ba30
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x48], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x58], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 7
mov word [rax], r13w
lea rdx, [0x1400d9338]
cmp qword [0x1400d9350], 7
cmova rdx, qword [0x1400d9338]
mov r8, qword [0x1400d9348]
lea rcx, [rsp + 0x48]
call fcn.14002b6f0
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x28], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x38], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x28], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 7
mov word [rax], r13w
mov rcx, qword [rbp - 0x28]
mov rdx, qword [rbp - 0x20]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140058d56
lea rax, [rcx + 1]
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x38]
cmp rdx, 7
cmova rax, qword [rbp - 0x38]
mov dword [rax + rcx*2], 0x5c
lea rax, [rbp - 0x38]
jmp 0x140058d7a
mov qword [rsp + 0x20], 1
lea r9, [0x1400be798]
movzx r8d, byte [rsp + 0x40]
mov edx, 1
lea rcx, [rbp - 0x38]
call fcn.14002ba30
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x78], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 7
mov word [rax], r13w
mov rdx, qword [rbp - 0x20]
cmp rdx, 7
jbe 0x140058dec
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140058de7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140059554
call fcn.14006f4c0
movdqa xmm0, xmmword [0x1400c5980]
movdqu xmmword [rbp - 0x28], xmm0
mov word [rbp - 0x38], r13w
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x140058e40
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140058e3b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005955a
call fcn.14006f4c0
movdqa xmm0, xmmword [0x1400c5980]
movdqu xmmword [rsp + 0x58], xmm0
mov word [rsp + 0x48], r13w
mov rdx, qword [rbp - 0x40]
cmp rdx, 7
jbe 0x140058e94
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140058e8f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140059560
call fcn.14006f4c0
movdqa xmm0, xmmword [0x1400c5980]
movdqu xmmword [rbp - 0x48], xmm0
mov word [rbp - 0x58], r13w
mov r15, qword [rsp + 0x78]
movabs rsi, 0x7ffffffffffffffe
mov rax, rsi
sub rax, r15
cmp rax, 5
jb 0x140059566
lea r12, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova r12, qword [rsp + 0x68]
xorps xmm0, xmm0
movups xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], r13
lea r14, [r15 + 5]
mov ebx, 7
lea rdi, [rbp - 0x78]
lea eax, [rbx + 3]
cmp r14, rbx
jbe 0x140058f88
mov rbx, r14
or rbx, 7
cmp rbx, rsi
jbe 0x140058f1c
mov rbx, rsi
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140058f46
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x14005956c
add rcx, rcx
cmp rcx, 0x1000
jb 0x140058f72
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14005956c
mov rcx, rax
call fcn.14006f4f4
test rax, rax
je 0x140059590
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140058f84
test rcx, rcx
je 0x140058f81
call fcn.14006f4f4
mov rdi, rax
jmp 0x140058f84
mov rdi, r13
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x68], r14
mov qword [rbp - 0x60], rbx
lea rbx, [r15 + r15]
mov r8, rbx
mov rdx, r12
mov rcx, rdi
call fcn.140096c20
movsd xmm0, qword [str.Code_]
movsd qword [rdi + rbx], xmm0
movzx eax, word [0x1400c58b0]
mov word [rdi + rbx + 8], ax
mov word [rdi + r14*2], r13w
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140058ff6
lea rdx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rdx, qword [rsp + 0x68]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 7
cmova rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140059028
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 7
cmova rdx, qword [rbp - 0x78]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov ecx, 0x20
call fcn.14006f4f4
mov rdi, rax
mov qword [rsp + 0x48], rax
mov r15d, 0x1b
mov r14d, r15d
mov qword [rsp + 0x58], r15
mov r13d, 0x1f
mov r12d, r13d
mov qword [rsp + 0x60], r13
movups xmm0, xmmword [str.__Platform.developer__true]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1400c5898]
movsd qword [rax + 0x10], xmm0
movzx eax, word [0x1400c58a0]
mov word [rdi + 0x18], ax
movzx eax, byte [0x1400c58a2]
mov byte [rdi + 0x1a], al
mov byte [rdi + 0x1b], 0
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
lea ecx, [r15 + 5]
call fcn.14006f4f4
mov rsi, rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x48], 0x19
mov qword [rbp - 0x40], r13
movups xmm0, xmmword [str.Platform.developer__true]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1400c58e8]
movsd qword [rax + 0x10], xmm0
movzx ecx, byte [0x1400c58f0]
mov byte [rax + 0x18], cl
mov byte [rax + 0x19], 0
xor ebx, ebx
nop dword [rax + rax]
lea rcx, [0x1400d9318]
cmp qword [0x1400d9330], 0xf
cmova rcx, qword [0x1400d9318]
mov qword [rsp + 0x20], 0x19
mov r9, rsi
mov r8, rbx
mov rdx, qword [0x1400d9328]
call fcn.1400203a0
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140059156
lea r9, [rsp + 0x48]
cmp r12, 0xf
cmova r9, rdi
mov qword [rsp + 0x20], r14
mov r8d, 0x19
mov rdx, rax
lea rcx, [0x1400d9318]
call fcn.140045c50
mov r14, qword [rsp + 0x58]
add rbx, r14
mov r12, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x48]
jmp 0x1400590e0
mov edx, 0x20
mov rcx, rsi
call fcn.14006f4c0
nop
cmp r12, 0xf
movabs rsi, 0x7ffffffffffffffe
jbe 0x1400591a6
lea rdx, [r12 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x14005919e
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140059572
mov rcx, rdi
call fcn.14006f4c0
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov ecx, 0x20
call fcn.14006f4f4
mov rdi, rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x60], r13
movups xmm0, xmmword [str.__config.LuaDebugger__true]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1400c58c8]
movsd qword [rax + 0x10], xmm0
movzx eax, word [0x1400c58d0]
mov word [rdi + 0x18], ax
movzx eax, byte [0x1400c58d2]
mov byte [rdi + 0x1a], al
mov byte [rdi + 0x1b], 0
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov ecx, 0x20
call fcn.14006f4f4
mov r14, rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x48], 0x19
mov qword [rbp - 0x40], r13
movups xmm0, xmmword [str.config.LuaDebugger__true]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1400c5928]
movsd qword [rax + 0x10], xmm0
movzx ecx, byte [0x1400c5930]
mov byte [rax + 0x18], cl
mov byte [rax + 0x19], 0
xor r12d, r12d
mov ebx, r12d
nop dword [rax]
lea rcx, [0x1400d9318]
cmp qword [0x1400d9330], 0xf
cmova rcx, qword [0x1400d9318]
mov qword [rsp + 0x20], 0x19
mov r9, r14
mov r8, rbx
mov rdx, qword [0x1400d9328]
call fcn.1400203a0
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400592c6
lea r9, [rsp + 0x48]
cmp r13, 0xf
cmova r9, rdi
mov qword [rsp + 0x20], r15
mov r8d, 0x19
mov rdx, rax
lea rcx, [0x1400d9318]
call fcn.140045c50
mov r15, qword [rsp + 0x58]
add rbx, r15
mov r13, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x48]
jmp 0x140059250
mov edx, 0x20
mov rcx, r14
call fcn.14006f4c0
nop
cmp r13, 0xf
jbe 0x14005930b
lea rdx, [r13 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140059303
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140059572
mov rcx, rdi
call fcn.14006f4c0
mov rax, rsi
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 0xc
jb 0x140059578
lea r9, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova r9, qword [rsp + 0x68]
mov qword [rsp + 0x30], SafeArrayDestroy
lea rax, str.metadata.lua
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x48]
call fcn.14002b5a0
nop
lea rdx, [0x1400d92d8]
lea rcx, [rsp + 0x48]
call fcn.140058a90
nop
mov r8, qword [rsp + 0x60]
cmp r8, 7
jbe 0x140059381
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x48]
call fcn.14001ebc0
mov rax, rsi
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 9
jb 0x14005957e
lea r9, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova r9, qword [rsp + 0x68]
mov qword [rsp + 0x30], 9
lea rax, str.items.lua
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x48]
call fcn.14002b5a0
nop
lea rdx, [0x1400d92f8]
lea rcx, [rsp + 0x48]
call fcn.140058a90
nop
mov r8, qword [rsp + 0x60]
cmp r8, 7
jbe 0x1400593f7
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x48]
call fcn.14001ebc0
mov rax, qword [rbp - 0x68]
sub rsi, rax
cmp rsi, 0xa
jb 0x140059584
lea r9, [rbp - 0x78]
cmp qword [rbp - 0x60], 7
cmova r9, qword [rbp - 0x78]
mov qword [rsp + 0x30], 0xa
lea rcx, str.Script.lua
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x48]
call fcn.14002b5a0
nop
lea rdx, [0x1400d9318]
lea rcx, [rsp + 0x48]
call fcn.140058a90
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x140059490
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005948a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005958a
call fcn.14006f4c0
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 7
jbe 0x1400594d0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400594cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140059590
call fcn.14006f4c0
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], r12w
mov rdx, qword [rbp - 0x80]
cmp rdx, 7
jbe 0x14005951e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140059519
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005954e
call fcn.14006f4c0
mov rcx, qword [rbp + 0x7f0]
xor rcx, rsp
call fcn.14006f4a0
lea r11, [rsp + 0x900]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400765b0
nop
call fcn.1400765b0
nop
call fcn.1400765b0
nop
call fcn.1400765b0
int3
call fcn.1400017e0
int3
call fcn.140001740
nop
call fcn.1400765b0
int3
call fcn.1400017e0
int3
call fcn.1400017e0
int3
call fcn.1400017e0
int3
call fcn.1400765b0
nop
call fcn.1400765b0
int3