Function at 0x140001010
Capabilities:
Accept command line arguments
Check if file exists
Get common file path

Disassembly:
mov eax, 0x28
call fcn.140016e60
sub rsp, rax
add rsp, 0x28
jmp 0x140004160
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 - 0x860]
mov eax, 0x960
call fcn.140016e60
sub rsp, rax
mov rax, qword [0x140022008]
xor rax, rsp
mov qword [rbp + 0x850], rax
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0x640]
call fcn.140002ba0
xorps xmm0, xmm0
mov dword [rsp + 0x70], 0x68
xor eax, eax
lea rcx, [rsp + 0x70]
movups xmmword [rsp + 0x74], xmm0
mov dword [rbp - 0x2c], eax
movups xmmword [rbp - 0x7c], xmm0
movups xmmword [rbp - 0x6c], xmm0
movups xmmword [rbp - 0x5c], xmm0
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov r14, 0xffffffffffffffff
mov dword [rsp + 0x50], 0xffffffff
mov rsi, r14
lea rax, [rbp + 0x10]
nop dword [rax + rax]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140004200
mov edi, 0x104
lea rdx, [rbp + 0x430]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor r13d, r13d
lea rdx, [rbp + 0x10]
cmp eax, edi
lea r9, str.redirect.ini
mov r12d, eax
lea rdx, [rdx + rsi*2]
cmovae r12d, r13d
lea ebx, [r13 + 0xc]
nop dword [rax]
cmp word [r9], 0x2e
jne 0x140004312
cmp word [r9 + 2], 0x2e
jne 0x140004312
cmp rbx, 2
je 0x140004269
cmp word [r9 + 4], 0x5c
jne 0x140004312
lea rax, [rbp + 0x10]
mov rcx, rdx
sub rcx, rax
sar rcx, 1
cmp rcx, 2
jl 0x140004312
cmp word [rdx - 2], 0x5c
lea rax, [rdx - 2]
jne 0x140004312
movzx r8d, word [rdx - 4]
cmp r8w, 0x5c
je 0x140004312
cmp r8w, 0x3a
je 0x140004312
cmp r8w, 0x2e
jne 0x1400042cf
cmp rcx, 3
jl 0x140004312
movzx r8d, word [rdx - 6]
cmp r8w, 0x5c
je 0x140004312
cmp r8w, 0x2e
jne 0x1400042cf
cmp rcx, 4
jl 0x140004312
cmp word [rdx - 8], 0x5c
je 0x140004312
lea rcx, [rbp + 0x10]
cmp rax, rcx
je 0x140004312
cmp word [rax - 2], 0x5c
je 0x1400042ee
add rax, 0xfffffffffffffffe
lea rcx, [rbp + 0x10]
cmp rax, rcx
jne 0x1400042d8
jmp 0x140004312
mov rdx, rax
cmp rbx, 2
je 0x14000430b
add r9, 6
sub rbx, 3
cmp rbx, 2
jae 0x140004240
jmp 0x140004312
add r9, 4
mov rbx, r13
lea rcx, [rbp + 0x10]
mov rax, rdx
sub rax, rcx
sar rax, 1
sub rdi, rax
cmp rbx, rdi
jae 0x14000439b
lea rax, [rbp + 0x10]
lea rdi, [rbp + 0x220]
cmp rax, rdx
je 0x140004353
lea rcx, [rbp + 0x10]
nop dword [rax + rax]
movzx eax, word [rcx]
add rcx, 2
mov word [rdi], ax
add rdi, 2
cmp rcx, rdx
jne 0x140004340
test rbx, rbx
je 0x14000436d
mov r8, rbx
mov rdx, r9
add r8, r8
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
lea rdi, [rdi + rbx*2]
lea rdx, [rsp + 0x54]
mov word [rdi], r13w
lea rcx, [rbp + 0x220]
call qword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
jne 0x140004392
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1400043a6
add rsi, 0x48
mov r15b, 1
jmp 0x1400043ae
mov ecx, 0xce
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x12
xor r15b, r15b
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdi, rax
mov rdx, r14
nop word [rax + rax]
cmp word [rdi + rdx*2 + 2], r13w
lea rdx, [rdx + 1]
jne 0x1400043c0
lea rax, [rsi + rdx]
lea ecx, [r12*4]
add rcx, rax
mov eax, 2
mul rcx
cmovo rax, r14
mov rcx, rax
call fcn.140015720
mov rsi, rax
mov rbx, r14
nop word [rax + rax]
cmp word [rdi + rbx*2 + 2], r13w
lea rbx, [rbx + 1]
jne 0x140004400
lea r8, [rbx + 1]
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rbx, [rsi + rbx*2]
test r15b, r15b
je 0x14000447e
mov r8d, 0x2a
lea rdx, str.___env:INIFILENAMEvnd.sun.star.pathname:
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add rbx, 0x52
lea rax, [rbp + 0x10]
cmp word [rax + r14*2 + 2], r13w
lea r14, [r14 + 1]
jne 0x140004443
lea r8, [r14 + 1]
mov rcx, rbx
lea rdx, [rbp + 0x10]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rbx, [rbx + r14*2]
mov r8d, 0xe
mov rcx, rbx
lea rdx, str.redirect.ini_
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add rbx, 0x1a
mov r8d, 0x10
lea rdx, str.___env:OOO_CWD
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rdi, [rbx + 0x20]
mov r8d, 2
lea rcx, [rbx + 0x1e]
test r12d, r12d
jne 0x1400044b6
lea rdx, [0x1400198f0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
jmp 0x1400044d5
lea rdx, [0x1400198f4]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rdx, [rbp + 0x430]
mov rcx, rdi
call fcn.1400010e0
mov rdi, rax
mov r8d, 2
lea rdx, [0x140019834]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rcx, [rbp + 0x640]
lea rax, [rsp + 0x70]
xor r8d, r8d
mov qword [rsp + 0x40], rax
mov rdx, rsi
lea rax, [rbp + 0x10]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 8
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov rcx, rsi
mov ebx, eax
call fcn.1400156d4
test ebx, ebx
je 0x1400045a9
xor r8d, r8d
mov dword [rsp + 0x20], 0x4bf
mov r9d, 0xffffffff
lea rdx, [rsp + 0x58]
lea ecx, [r8 + 1]
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, 1
jne 0x14000457e
xor r9d, r9d
mov dword [rsp + 0x20], eax
xor r8d, r8d
lea rcx, [rbp - 0x20]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
jmp 0x140004541
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x50], r13d
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x50]
mov rcx, qword [rbp + 0x850]
xor rcx, rsp
call fcn.1400153b0
lea r11, [rsp + 0x960]
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