Function at 0x14002a24c
Capabilities:
Accept command line arguments
Get common file path
Query environment variable

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0x130], rax
mov qword [rsp + 0x40], r8
mov rdi, rdx
mov qword [rsp + 0x28], rcx
xor r13d, r13d
mov qword [rdx], r13
mov qword [r8], r13
xor edx, edx
lea r8d, [r13 + 0x64]
lea rcx, [rsp + 0x74]
call fcn.14013b230
mov dword [rsp + 0x70], 0x68
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xor edx, edx
mov r8d, 0x118
lea rcx, [rbp - 0x1c]
call fcn.14013b230
mov dword [rbp - 0x20], 0x11c
lea rcx, [rbp - 0x20]
call fcn.1401229cc
mov ecx, 0x800
call fcn.140120104
mov rsi, rax
test rax, rax
je 0x14002a340
mov ebx, 0x400
mov r8d, ebx
mov rdx, rax
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, eax
cmp eax, ebx
jb 0x14002a333
lea ebx, [rax + 1]
mov edx, ebx
add rdx, rdx
mov rcx, rsi
call fcn.14012012c
mov rsi, rax
test rax, rax
je 0x14002a340
mov r8d, ebx
mov rdx, rax
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, eax
lea eax, [rbx - 1]
cmp eax, edx
cmovb edx, eax
mov word [rsi + rdx*2], r13w
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rbx, rax
mov qword [rsp + 0x58], rax
mov r15d, 2
mov edx, r15d
mov r12d, 0x208
mov ecx, r12d
call fcn.14012005c
mov r14, rax
test rax, rax
je 0x14002a37b
mov r8d, r12d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rdx, r15
mov rcx, r12
call fcn.14012005c
mov r15, rax
test rax, rax
je 0x14002a39a
mov rdx, rax
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r12d, 1
test rsi, rsi
je 0x14002a3b3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, r12d
jmp 0x14002a3b6
mov eax, r13d
movsxd r13, eax
xor r8d, r8d
test r14, r14
je 0x14002a3d2
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, r12d
xor r8d, r8d
jmp 0x14002a3d5
mov eax, r8d
cdqe
mov qword [rsp + 0x20], rax
test rbx, rbx
je 0x14002a3f2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, r12d
xor r8d, r8d
jmp 0x14002a3f5
mov eax, r8d
movsxd rcx, eax
mov qword [rsp + 0x30], rcx
mov rbx, qword [rsp + 0x20]
add rbx, r13
add rbx, rcx
test r15, r15
je 0x14002a41e
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, r12d
xor r8d, r8d
jmp 0x14002a421
mov eax, r8d
cdqe
mov qword [rsp + 0x38], rax
add rbx, rax
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x14002a43f
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, r12d
jmp 0x14002a442
mov eax, r8d
cdqe
mov qword [rsp + 0x60], rax
add rax, rbx
mov rcx, qword [rsp + 0x28]
add rcx, 0xb50
lea rbx, [rcx + rax*2]
mov rdx, r12
mov rcx, rbx
call fcn.14012005c
mov qword [rdi], rax
test rax, rax
je 0x14002a84b
mov qword [rax], rbx
call fcn.140123504
neg al
sbb ecx, ecx
and ecx, 0x20
add ecx, 0x20
mov rax, qword [rdi]
mov dword [rax + 0x78], ecx
call fcn.140126e38
mov rcx, qword [rdi]
mov qword [rcx + 0x80], rax
mov rax, qword [rdi]
movaps xmm0, xmmword [rsp + 0x70]
movups xmmword [rax + 8], xmm0
movaps xmm1, xmmword [rbp - 0x80]
movups xmmword [rax + 0x18], xmm1
movaps xmm0, xmmword [rbp - 0x70]
movups xmmword [rax + 0x28], xmm0
movaps xmm1, xmmword [rbp - 0x60]
movups xmmword [rax + 0x38], xmm1
movaps xmm0, xmmword [rbp - 0x50]
movups xmmword [rax + 0x48], xmm0
movaps xmm1, xmmword [rbp - 0x40]
movups xmmword [rax + 0x58], xmm1
movsd xmm0, qword [rbp - 0x30]
movsd qword [rax + 0x68], xmm0
mov rcx, qword [rdi]
add rcx, 0x88
lea rdx, [rbp - 0x20]
mov ebx, 2
mov eax, ebx
lea r8d, [rbx + 0x7e]
movups xmm0, xmmword [rdx]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rdx + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rdx + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rdx + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rdx + 0x50]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [rdx + 0x60]
movups xmmword [rcx + 0x60], xmm0
add rcx, r8
movups xmm1, xmmword [rdx + 0x70]
movups xmmword [rcx - 0x10], xmm1
add rdx, r8
sub rax, r12
jne 0x14002a4f1
movups xmm0, xmmword [rdx]
movups xmmword [rcx], xmm0
mov rax, qword [rdx + 0x10]
mov qword [rcx + 0x10], rax
mov eax, dword [rdx + 0x18]
mov dword [rcx + 0x18], eax
test dword [rbp - 0x54], 0x100
mov rcx, qword [rbp - 0x38]
mov eax, 0
cmovne rcx, rax
mov rax, qword [rdi]
mov qword [rax + 0x70], rcx
mov ecx, 0x1000
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov rcx, qword [rdi]
mov dword [rcx + 0x210], eax
call fcn.140123210
movzx ecx, al
mov rax, qword [rdi]
mov dword [rax + 0x228], ecx
mov ecx, 0x52
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov rcx, qword [rdi]
mov dword [rcx + 0x22c], eax
mov rax, qword [rdi]
mov dword [rax + 0x218], ebx
mov rax, qword [rdi]
mov dword [rax + 0x21c], ebx
mov rax, qword [rdi]
mov dword [rax + 0x220], ebx
lea rcx, str.ReactOS
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rbx, eax
lea rcx, [rbp - 0xc]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
lea rax, [rbp - 0xa]
lea rcx, [rax + rcx*2]
xor eax, eax
cmp word [rcx], ax
je 0x14002a626
mov r8, rbx
lea rax, [rbx + 1]
lea rax, [rcx + rax*2]
lea r9, [rbp + 0xf4]
xor ebx, ebx
cmp rax, r9
jae 0x14002a628
mov word [rcx + r8*2], bx
lea rdx, str.ReactOS
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ecx, ebx
test eax, eax
sete cl
mov rax, qword [rdi]
mov dword [rax + 0x224], ecx
jmp 0x14002a628
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetACP]
mov rcx, qword [rdi]
mov dword [rcx + 0x230], eax
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov rcx, qword [rdi]
mov dword [rcx + 0x234], eax
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.1401238c8
nop
lea rcx, [rsp + 0x48]
call fcn.14012395c
test al, al
je 0x14002a6cb
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14002a6c1
lea rdx, str.GetConsoleHistoryInfo
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14002a6c1
mov dword [rsp + 0x54], ebx
mov rcx, qword [rdi]
mov dword [rcx + 0x1a4], 0x10
mov rcx, qword [rdi]
add rcx, 0x1a4
call rax
test eax, eax
jne 0x14002a6cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
bts eax, 0x1f
mov rcx, qword [rdi]
mov dword [rcx + 0x1a4], eax
jmp 0x14002a6cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
mov rcx, qword [rdi]
lea rax, [rcx + 0x1b8]
mov qword [rbp + 0x100], rax
mov dword [rbp + 0x108], 0xfffffff6
lea rax, [rcx + 0x1c8]
mov qword [rbp + 0x110], rax
mov dword [rbp + 0x118], 0xfffffff5
lea rax, [rcx + 0x1d8]
mov qword [rbp + 0x120], rax
mov dword [rbp + 0x128], 0xfffffff4
lea rbx, [rbp + 0x100]
mov ecx, dword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [rbx]
mov qword [rcx], rax
add rcx, 8
mov qword [rsp + 0x28], rcx
mov rdx, rcx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x14002a74d
mov rax, qword [rsp + 0x28]
or dword [rax], 0xffffffff
add rbx, 0x10
lea rax, [rbp + 0x130]
cmp rbx, rax
jne 0x14002a71d
mov rbx, qword [rdi]
add rbx, 0xb50
mov r8, qword [rsp + 0x58]
test r8, r8
mov r12d, 1
je 0x14002a797
mov rdx, qword [rsp + 0x30]
mov rcx, rbx
call fcn.14000ab94
mov rax, qword [rdi]
mov qword [rax + 0x1e8], rbx
mov rax, qword [rsp + 0x30]
lea rbx, [rbx + rax*2]
test r14, r14
je 0x14002a7bf
mov r8, r14
mov rdx, qword [rsp + 0x20]
mov rcx, rbx
call fcn.14000ab94
mov rax, qword [rdi]
mov qword [rax + 0x1f0], rbx
mov rax, qword [rsp + 0x20]
lea rbx, [rbx + rax*2]
test r15, r15
je 0x14002a7e7
mov r8, r15
mov rdx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.14000ab94
mov rax, qword [rdi]
mov qword [rax + 0x1f8], rbx
mov rax, qword [rsp + 0x38]
lea rbx, [rbx + rax*2]
test rsi, rsi
je 0x14002a812
mov r8, rsi
mov rdx, r13
mov rcx, rbx
call fcn.14000ab94
mov rax, qword [rdi]
mov qword [rax + 0x200], rbx
mov rax, qword [rdi]
mov qword [rax + 0x208], r13
lea rbx, [rbx + r13*2]
mov r8, qword [rbp - 0x78]
test r8, r8
je 0x14002a836
mov r13, qword [rsp + 0x60]
mov rdx, r13
mov rcx, rbx
call fcn.14000ab94
mov rax, qword [rdi]
mov qword [rax + 0x20], rbx
lea rbx, [rbx + r13*2]
mov r13, qword [rsp + 0x40]
mov qword [r13], rbx
lea rcx, [rsp + 0x48]
call fcn.14012390c
jmp 0x14002a850
mov r13, qword [rsp + 0x40]
xor ebx, ebx
test rsi, rsi
je 0x14002a85f
mov rcx, rsi
call fcn.14012008c
test r14, r14
je 0x14002a86c
mov rcx, r14
call fcn.14012008c
test r15, r15
je 0x14002a879
mov rcx, r15
call fcn.14012008c
cmp qword [rdi], rbx
je 0x14002a884
cmp qword [r13], rbx
jne 0x14002a887
mov r12b, bl
mov al, r12b
mov rcx, qword [rbp + 0x130]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x298]
add rsp, 0x240
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret