Function at 0x41fce0
Capabilities:
Check os version
Get common file path
Set current directory

Disassembly:
push r15
push r14
mov eax, 0x3268
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.005e8740
sub rsp, rax
mov rbp, qword [0x00670bd0]
mov r14d, dword [rsp + 0x32d0]
mov dword [rsp + 0x32c0], r8d
mov rbx, r9
mov qword [rsp + 0x32b0], rcx
mov r13, rdx
lea rcx, [0x0069f188]
mov edx, 0x30
mov rax, qword [rbp]
mov dword [rsp + 0xd8], 0
mov dword [rsp + 0xdc], 0
call qword [rax + 0x998]
mov qword [rsp + 0xc8], rax
mov rax, qword [rbp]
lea rdx, [rsp + 0x1b0]
mov byte [rsp + 0x9c0], 0
mov qword [rsp + 0xf0], 0
mov rcx, rdx
mov qword [rsp + 0xc0], rdx
mov qword [rsp + 0xf8], 0
mov qword [rsp + 0x100], 0
call qword [rax + 0x3e0]
mov rax, qword [rbp]
lea rdx, [rsp + 0x290]
mov qword [rsp + 0x70], rdx
mov rcx, rdx
call qword [rax + 0x3e0]
lea rax, str._defaultextension
lea rdx, str._defaultextension
test r14d, r14d
cmovne rax, rdx
cmp dword [rsp + 0x32c0], 1
mov qword [rsp + 0x60], rax
jle 0x420869
mov eax, dword [rsp + 0x32c0]
lea r15, [rsp + 0x8b0]
add rbx, 8
mov esi, 2
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x98], 0
sub eax, 2
mov qword [rsp + 0x90], 0
shr eax, 1
lea eax, [rax + rax + 4]
mov dword [rsp + 0x6c], eax
lea rax, [rsp + 0xdc]
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x370]
mov qword [rsp + 0xb0], rax
lea rax, [rsp + 0x9c0]
mov qword [rsp + 0xb8], rax
nop
mov r12, qword [rbx]
mov rax, qword [rbp]
lea r9, [0x0062a40e]
mov rdi, qword [rbx + 8]
mov r8, qword [rsp + 0x60]
mov rcx, r13
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0
mov rdx, r12
call qword [rax + 0x130]
test eax, eax
jne 0x420334
test r14d, r14d
jne 0x41fec3
mov eax, dword [rsp + 0x8b0]
cmp eax, 3
jle 0x41fec3
add eax, 1
mov dword [rsp + 0x8b0], eax
cmp esi, dword [rsp + 0x32c0]
mov rax, qword [rbp]
je 0x4204f0
mov rcx, rdi
call qword [rax + 0xab0]
cmp dword [rsp + 0x8b0], 7
ja case.default.0x41fefd
mov r8d, dword [rsp + 0x8b0]
lea rcx, [0x0062a468]
movsxd r8, dword [rcx + r8*4]
add rcx, r8
jmp rcx
mov qword [rsp + 0x98], rax
nop dword [rax + rax]
add rbx, 0x10
add esi, 2
cmp esi, dword [rsp + 0x6c]
jne 0x41fe70
lea rax, [rsp + 0xd8]
mov r9, qword [rsp + 0x88]
mov r8, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0x80]
mov rcx, r13
mov ebx, 1
mov qword [rsp + 0x20], rax
call fcn.0041edd0
test eax, eax
jne 0x420339
mov rcx, qword [rsp + 0x32b0]
lea rsi, [rsp + 0x110]
mov rdi, rsi
call fcn.00409f80
mov rax, qword [rsp + 0x32b0]
mov rcx, qword [rax + 0x28]
call fcn.00425f20
mov ecx, 0x13
mov rbx, rax
xor eax, eax
rep stosq qword [rdi], rax
call qword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
mov rcx, rbx
mov qword [rsp + 0x118], rbx
sbb eax, eax
mov edx, 0xfffffffa
and eax, 0xfffffff0
add eax, 0x98
mov dword [rsp + 0x110], eax
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
mov qword [rsp + 0x120], rax
lea rax, [rsp + 0x9c0]
xor ecx, ecx
xor r8d, r8d
cmp r14d, 1
mov qword [rsp + 0x128], 0
mov qword [rsp + 0x140], rax
lea rax, [0x0041e400]
mov qword [rsp + 0x130], 0
mov dword [rsp + 0x138], 0
mov dword [rsp + 0x148], 0x28a0
mov qword [rsp + 0x188], rax
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x150], 0
mov dword [rsp + 0x158], 0
mov qword [rsp + 0x160], 0
mov qword [rsp + 0x180], rax
sbb eax, eax
mov qword [rsp + 0x168], 0
and eax, 0xfffff002
mov word [rsp + 0x174], cx
mov word [rsp + 0x176], r8w
add eax, 0x8182c
mov qword [rsp + 0x178], 0
mov qword [rsp + 0x190], 0
mov dword [rsp + 0x170], eax
mov rax, qword [rsp + 0xc8]
mov r9d, dword [rax]
test r9d, r9d
jne 0x42054b
mov edx, dword [rsp + 0xdc]
test edx, edx
jne 0x42083a
mov rdx, qword [rsp + 0x90]
test rdx, rdx
je 0x4200f3
mov rax, qword [rbp]
lea r9, [rsp + 0x450]
mov r8d, 0xffffffff
xor ecx, ecx
call qword [rax + 0xa78]
mov rax, qword [rsp + 0x450]
mov qword [rsp + 0x178], rax
mov rax, qword [rbp]
lea rdi, [rsp + 0x530]
mov rdx, qword [rsp + 0x1b0]
xor ecx, ecx
mov r8d, dword [rsp + 0x1b8]
mov r9, rdi
call qword [rax + 0xa78]
mov rax, qword [rsp + 0x530]
mov rdx, qword [rsp + 0x290]
mov qword [rsp + 0x128], rax
mov eax, dword [rsp + 0xd8]
mov dword [rsp + 0x13c], eax
cmp byte [rdx], 0
mov rax, qword [rbp]
jne 0x420526
mov r15, qword [rsp + 0x70]
mov rcx, r15
call qword [rax + 0x3d0]
mov rax, qword [rbp]
mov rdx, r15
mov rcx, r13
call qword [rax + 0xb78]
test rax, rax
je 0x4208aa
mov rax, qword [rbp]
lea r15, [rsp + 0x8b0]
mov rdx, qword [rsp + 0x290]
mov rcx, r13
mov r8, r15
call qword [rax + 0x7d8]
test rax, rax
je 0x4208b2
mov rax, qword [rbp]
lea r9, [rsp + 0x610]
mov r8d, dword [rsp + 0x8b8]
mov rdx, qword [rsp + 0x8b0]
xor ecx, ecx
call qword [rax + 0xa78]
mov rax, qword [rbp]
mov rcx, r15
call qword [rax + 0x3d0]
mov rdx, qword [rsp + 0x98]
mov rax, qword [rsp + 0x610]
test rdx, rdx
mov qword [rsp + 0x160], rax
je 0x420215
mov rax, qword [rbp]
lea r9, [rsp + 0x6f0]
mov r8d, 0xffffffff
xor ecx, ecx
call qword [rax + 0xa78]
mov rax, qword [rsp + 0x6f0]
mov qword [rsp + 0x168], rax
mov rdx, r15
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov rax, qword [rbp]
mov ecx, 1
call qword [rax + 0x758]
test r14d, r14d
mov r12d, eax
mov rcx, rsi
je 0x420710
call qword [sym.imp.comdlg32.dll_GetOpenFileNameA]
mov esi, eax
mov rdx, qword [rbp]
mov ecx, r12d
call qword [rdx + 0x758]
call fcn.0041e390
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.USER32.dll_EnableWindow]
mov rax, qword [rbp]
mov rcx, r13
call qword [rax + 0x6d8]
call qword [sym.imp.comdlg32.dll_CommDlgExtendedError]
test esi, esi
jne 0x4205bd
cmp eax, 0x3003
je 0x42071d
cmp eax, 0x3002
je 0x420558
xor ebx, ebx
cmp qword [rsp + 0x168], 0
je 0x4202c2
mov rax, qword [rbp]
lea rcx, [rsp + 0x6f0]
call qword [rax + 0x3d0]
cmp qword [rsp + 0x160], 0
je 0x4202df
mov rax, qword [rbp]
lea rcx, [rsp + 0x610]
call qword [rax + 0x3d0]
mov rax, qword [rbp]
mov rcx, rdi
call qword [rax + 0x3d0]
cmp qword [rsp + 0x178], 0
je 0x420339
mov rax, qword [rbp]
lea rcx, [rsp + 0x450]
call qword [rax + 0x3d0]
jmp 0x420339
mov r8, qword [rsp + 0x32b0]
mov rdx, rax
mov rcx, r13
call fcn.0040b1e0
test rax, rax
mov qword [rsp + 0x32b0], rax
jne case.default.0x41fefd
mov ebx, 1
mov rax, qword [rbp]
mov rcx, qword [rsp + 0x70]
call qword [rax + 0x3d0]
mov rax, qword [rbp]
mov rcx, qword [rsp + 0xc0]
call qword [rax + 0x3d0]
mov rcx, qword [rsp + 0x100]
test rcx, rcx
je 0x42036e
mov rax, qword [rbp]
call qword [rax + 0x30]
mov eax, ebx
add rsp, 0x3268
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rbp]
mov r8, qword [rsp + 0xa8]
mov rdx, rdi
mov rcx, r13
call qword [rax + 0x110]
test eax, eax
je case.default.0x41fefd
mov ebx, 1
jmp 0x42036e
mov rdi, qword [rsp + 0xb0]
mov r9, qword [rbp]
mov rdx, rax
mov rcx, r13
mov r8, rdi
call qword [r9 + 0x7d8]
test rax, rax
je 0x420334
mov rax, qword [rbp]
mov rdx, qword [rsp + 0xb8]
xor ecx, ecx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0x28a0
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], 0
xor edx, edx
mov dword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x378]
mov r8, qword [rsp + 0x370]
call qword [rax + 0xa70]
mov rax, qword [rbp]
mov rcx, rdi
call qword [rax + 0x3d0]
jmp case.default.0x41fefd
xor edx, edx
cmp byte [rax], 0x2e
sete dl
add rax, rdx
mov qword [rsp + 0x90], rax
jmp case.default.0x41fefd
mov rax, qword [rbp]
mov r9d, 1
xor r8d, r8d
mov rdx, rdi
mov rcx, r13
call qword [rax + 0x628]
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x88], rax
jmp case.default.0x41fefd
mov rdi, qword [rsp + 0x70]
mov rdx, qword [rbp]
mov qword [rsp + 0x78], rax
mov rcx, rdi
call qword [rdx + 0x3d0]
mov rax, qword [rsp + 0x78]
mov r9, qword [rbp]
mov r8, rdi
mov rcx, r13
mov rdx, rax
call qword [r9 + 0x7d8]
test rax, rax
jne case.default.0x41fefd
jmp 0x420334
mov qword [rsp + 0x80], rdi
jmp case.default.0x41fefd
mov rcx, r12
call qword [rax + 0xab0]
mov r10, qword [rbp]
mov r8, rax
mov qword [rsp + 0x20], 0
lea r9, [0x0062a415]
lea rdx, [0x0062a41f]
mov rcx, r13
call qword [r10 + 0x240]
jmp 0x420334
lea r9, [rsp + 0x610]
mov r8d, dword [rsp + 0x298]
xor ecx, ecx
lea r15, [rsp + 0x8b0]
call qword [rax + 0xa78]
jmp 0x4201ce
mov qword [rsp + 0xf0], r13
jmp 0x4200ad
mov rax, qword [rbp]
xor r8d, r8d
lea rdx, str.invalid_filename__
mov rcx, r13
lea rbx, [rsp + 0x370]
call qword [rax + 0x750]
mov rax, qword [rbp]
mov rdx, qword [rsp + 0x140]
mov r8, rbx
xor ecx, ecx
mov rsi, qword [rax + 0x240]
call fcn.0041e090
mov rcx, r13
mov rdx, rax
xor r9d, r9d
lea r8, [0x0062a440]
call rsi
mov rax, qword [rbp]
mov rcx, rbx
call qword [rax + 0x3d0]
mov ebx, 1
jmp 0x4202a5
test byte [rsp + 0x171], 2
jne 0x42072b
mov rax, qword [rbp]
lea rbx, [rsp + 0x370]
mov rdx, qword [rsp + 0x140]
xor ecx, ecx
mov r8, rbx
mov rsi, qword [rax + 0x240]
call fcn.0041e090
mov rcx, r13
mov rdx, rax
xor r8d, r8d
call rsi
mov rax, qword [rbp]
mov rcx, rbx
call qword [rax + 0x3d0]
mov eax, dword [rsp + 0x13c]
test eax, eax
je 0x4202a3
mov rax, qword [rbp]
mov rcx, r13
mov rbx, qword [rax + 0xbf0]
call qword [rax + 0x540]
mov rcx, rax
call rbx
test eax, eax
jle 0x4202a3
cmp qword [rsp + 0xa0], 0
je 0x4202a3
cmp qword [rsp + 0x80], 0
je 0x4202a3
mov rax, qword [rbp]
mov qword [rsp + 0xe8], 0
lea r9, [rsp + 0xe8]
mov qword [rsp + 0x7d0], 0
lea r8, [rsp + 0xe0]
mov rdx, qword [rsp + 0x80]
mov rcx, r13
call qword [rax + 0x178]
test eax, eax
jne 0x4205b3
mov eax, dword [rsp + 0x13c]
mov rdx, qword [rsp + 0xe8]
lea r9, [rsp + 0x7d0]
mov r10, qword [rbp]
lea r8, [rsp + 0xe4]
mov rcx, r13
sub eax, 1
mov rdx, qword [rdx + rax*8]
call qword [r10 + 0x178]
test eax, eax
jne 0x4205b3
mov rdx, qword [rsp + 0x7d0]
mov rax, qword [rbp]
xor r8d, r8d
mov dword [rsp + 0x20], 0x201
xor ebx, ebx
mov rcx, r13
mov r9, qword [rdx]
mov rdx, qword [rsp + 0xa0]
call qword [rax + 0x630]
test rax, rax
sete bl
jmp 0x4202a5
call qword [sym.imp.comdlg32.dll_GetSaveFileNameA]
mov esi, eax
jmp 0x420249
test byte [rsp + 0x171], 2
je 0x4202a3
mov rax, qword [rbp]
mov r15, qword [rsp + 0x100]
lea rbx, [rsp + 0x7d0]
xor r12d, r12d
call qword [rax + 0x1c8]
mov rsi, rax
lea rax, [rsp + 0x370]
mov rdx, r15
xor ecx, ecx
mov r8, rax
mov qword [rsp + 0x60], rax
call fcn.0041e090
cmp byte [r15], 0
je 0x42080d
mov rax, r15
add rax, 1
cmp byte [rax], 0
jne 0x420772
cmp byte [rax + 1], 0
lea r15, [rax + 1]
je 0x420765
mov r8, rbx
mov rdx, r15
xor ecx, ecx
call fcn.0041e090
mov rax, qword [rbp]
mov edx, dword [rsp + 0x378]
add r12d, 1
mov rcx, qword [rsp + 0x370]
call qword [rax + 0x1d0]
mov r14, rax
mov rax, qword [rbp]
mov r8d, 0xffffffff
mov rcx, r14
lea rdx, [0x0062a42b]
call qword [rax + 0x90]
mov rax, qword [rbp]
mov r8d, dword [rsp + 0x7d8]
mov rcx, r14
mov rdx, qword [rsp + 0x7d0]
call qword [rax + 0x90]
mov rax, qword [rbp]
mov rcx, rbx
call qword [rax + 0x3d0]
mov rax, qword [rbp]
mov r8, r14
mov rdx, rsi
xor ecx, ecx
call qword [rax + 0x170]
jmp 0x420765
test r12d, r12d
je 0x4208c4
mov rax, qword [rbp]
mov rcx, r13
mov rdx, rsi
call qword [rax + 0x768]
mov rax, qword [rbp]
mov rcx, qword [rsp + 0x60]
call qword [rax + 0x3d0]
jmp 0x420608
mov rax, qword [rbp]
or dword [rsp + 0x170], 0x200
mov ecx, 0x400
mov dword [rsp + 0xf8], 0x400
call qword [rax + 0x28]
mov qword [rsp + 0x100], rax
jmp 0x4200bc
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x90], 0
jmp 0x41ff21
lea r15, [rsp + 0x8b0]
mov rax, qword [rbp]
mov rcx, r13
call qword [rax + 0x6d8]
jmp 0x4201c1
mov rax, qword [rbp]
mov edx, dword [rsp + 0x378]
mov rcx, qword [rsp + 0x370]
mov rbx, qword [rax + 0x170]
call qword [rax + 0x1d0]
mov rdx, rsi
mov r8, rax
xor ecx, ecx
call rbx
jmp 0x420816