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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x105d0]
mov eax, 0x106d0
call fcn.1400ed080
sub rsp, rax
xor r12d, r12d
mov byte [rcx + 0xbe2], r9b
mov r14, r8
mov r13, rcx
test r8, r8
jne 0x1400369c9
mov r8d, 0x106
lea rdx, [rbp - 0x80]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x104
ja 0x1400369fc
lea edx, [r14 + 0x5c]
lea rcx, [rbp - 0x80]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov rbx, rax
test rax, rax
je 0x1400369fc
lea edx, [r14 + 0x2e]
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
je 0x1400369fc
cmp qword [0x140127b10], r12
lea r14, [rbp - 0x80]
movsd xmm0, qword [str..ahk]
movsd qword [rax], xmm0
movzx ecx, word [0x140109280]
mov word [rax + 8], cx
jne 0x140036a19
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400369c9
lea rax, [rbp + 0x1b0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea edx, [r12 + 5]
xor ecx, ecx
lea r14, [rbp + 0x3c0]
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x14003688d
mov word [rbp + 0x1b0], r12w
lea rax, [rbp + 0x1b0]
mov rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp word [rax + rcx*2], r12w
jne 0x1400368a0
test rcx, rcx
jne 0x1400368b4
mov rcx, r12
jmp 0x1400368cb
cmp word [rbp + rcx*2 + 0x1ae], 0x5c
jne 0x1400368cb
mov word [rbp + rcx*2 + 0x1ae], r12w
dec rcx
mov rdx, r12
nop
movzx eax, word [rbp + rdx + 0x1b0]
mov word [rbp + rdx + 0x3c0], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x1400368d0
mov rax, 0xffffffffffffffff
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400368f0
inc rax
add rax, rcx
cmp rax, 0x105
ja 0x1400369fc
lea rax, [rcx + rcx]
mov rdx, rbx
sub rax, rbx
lea rcx, [rbp + 0x3c0]
add rcx, rax
movzx eax, word [rdx]
mov word [rcx + rdx], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x140036920
lea rcx, [rbp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400369c9
movups xmm0, xmmword [0x140109288]
lea rcx, [rbp - 0x80]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [0x140109298]
movups xmmword [rbx + 0x10], xmm1
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400369c9
lea r9, [rbp - 0x80]
mov edx, 0x8000
lea r8, str._ms_its:_s::_docs_Welcome.htm_
lea rcx, [rbp + 0x5d0]
call fcn.140031b90
mov qword [rsp + 0x48], r12
lea rax, [0x1401092e8]
mov byte [rsp + 0x40], r12b
lea r9, [rbp - 0x80]
mov byte [rsp + 0x38], r12b
lea r8, [rbp + 0x5d0]
mov qword [rsp + 0x30], r12
lea rdx, str.hh.exe
mov qword [rsp + 0x28], rax
mov rcx, r13
mov byte [rsp + 0x20], r12b
call fcn.1400611f0
test eax, eax
jne 0x1400369fc
cmp qword [0x140127b10], r12
jne 0x140036a19
xor r9d, r9d
lea r8, [rbp + 0x5d0]
mov edx, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov eax, eax
mov qword [rbp + 0x10618], rax
test rax, rax
jne 0x140036bca
xor eax, eax
mov rbx, qword [rsp + 0x10710]
add rsp, 0x106d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r8d, 0x8000
lea rdx, [rbp + 0x5d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140036a47
mov r8d, 0x8000
lea rdx, [rbp + 0x5d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x410
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
lea rcx, str.ntdll.dll
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.NtQueryInformationProcess
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp + 0x10638]
mov r9d, gethostbyname
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x50]
mov rcx, r12
xor edx, edx
call rax
mov rcx, qword [rsp + 0x58]
mov rcx, qword [rcx + 0x20]
cmp word [rcx + 0x70], 0
je 0x140036bbe
mov dword [rbp + 0x10628], 0
lea rdx, [rbp + 0x10628]
mov rcx, qword [rcx + 0x78]
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov r8d, dword [rbp + 0x10628]
mov r15, rax
cmp r8d, 1
jle 0x140036bb5
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rcx + 0x20]
cmp word [rdx + 0x70], 0
je 0x140036bb5
mov ebx, 1
cmp r8d, ebx
jle 0x140036bb5
lea rdi, [rax + 8]
nop dword [rax]
nop dword [rax + rax]
mov rsi, qword [rdi]
lea rdx, [0x140109300]
mov rcx, rsi
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
je 0x140036b47
mov r8d, 1
lea rdx, [0x140109304]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
jne 0x140036b57
inc ebx
add rdi, 8
cmp ebx, dword [rbp + 0x10628]
jl 0x140036b10
jmp 0x140036bb5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140036b95
mov r8d, 0x8000
lea rdx, [rbp + 0x5d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140036bb5
mov r8d, 0x8000
lea rdx, [rbp + 0x5d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x140036bb5
xor r9d, r9d
lea r8, [rbp + 0x5d0]
mov edx, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x1400369fc
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r12d, r12d
cmp word [r14], 0x2a
jne 0x140036bf6
cmp word [r14 + 2], 0
jne 0x140036bf6
mov byte [0x140127b73], 1
mov dword [0x140127a98], 4
mov dword [0x140125c40], 1
jmp 0x140036c1a
cmp qword [0x140127b10], 0
mov byte [0x140127b73], 0
jne 0x140036c1a
lea r8, [rbp + 0x10618]
lea rcx, [rbp + 0x5d0]
call fcn.1400cf810
cmp word [rbp + 0x5d0], 0
lea rdi, [0x1400ef7d4]
je 0x140036d15
lea rax, [rbp + 0x5d0]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140036c40
lea r14, [rbx + rbx]
lea rdi, [r14 + 2]
lea rax, [rdi - 1]
cmp rax, 0xffff
ja 0x140036cef
cmp qword [0x140129f28], 0
jne 0x140036c7d
call fcn.1400cad50
mov qword [0x140129f28], rax
test rax, rax
je 0x140036cef
mov rcx, qword [0x140129f20]
cmp rdi, qword [rcx + 0x10]
jbe 0x140036c9f
call fcn.1400cad50
mov rcx, qword [0x140129f20]
mov qword [rcx + 0x18], rax
test rax, rax
je 0x140036cef
mov rsi, qword [rcx + 8]
mov rax, rdi
mov qword [0x140129f18], rsi
and eax, 7
je 0x140036cb9
sub rdi, rax
add rdi, 8
sub qword [rcx + 0x10], rdi
lea rax, [rsi + rdi]
mov qword [rcx + 8], rax
test rsi, rsi
je 0x140036cef
test rbx, rbx
je 0x140036ce1
mov r8, r14
lea rdx, [rbp + 0x5d0]
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov word [r14 + rsi], r12w
lea rdi, [0x1400ef7d4]
jmp 0x140036d18
lea r8, [rbp + 0x5d0]
lea rdx, str.Out_of_memory.
lea rcx, [0x14012afc0]
call fcn.14005fdd0
mov qword [r13 + 0xbb0], r12
jmp 0x1400369fc
mov rsi, rdi
mov edx, 0x5c
mov qword [r13 + 0xbb0], rsi
lea rcx, [rbp + 0x5d0]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov r14, rax
test rax, rax
je 0x140036e50
mov word [rax], r12w
cmp word [rbp + 0x5d0], 0
je 0x140036e40
lea rax, [rbp + 0x5d0]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140036d60
lea r15, [rbx + rbx]
lea rdi, [r15 + 2]
lea rax, [rdi - 1]
cmp rax, 0xffff
ja 0x140036e1a
cmp qword [0x140129f28], 0
jne 0x140036d9d
call fcn.1400cad50
mov qword [0x140129f28], rax
test rax, rax
je 0x140036e1a
mov rcx, qword [0x140129f20]
cmp rdi, qword [rcx + 0x10]
jbe 0x140036dbf
call fcn.1400cad50
mov rcx, qword [0x140129f20]
mov qword [rcx + 0x18], rax
test rax, rax
je 0x140036e1a
mov rsi, qword [rcx + 8]
mov rax, rdi
mov qword [0x140129f18], rsi
and eax, 7
je 0x140036dd9
sub rdi, rax
add rdi, 8
sub qword [rcx + 0x10], rdi
lea rax, [rsi + rdi]
mov qword [rcx + 8], rax
test rsi, rsi
je 0x140036e1a
test rbx, rbx
je 0x140036e01
mov r8, r15
lea rdx, [rbp + 0x5d0]
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov word [r15 + rsi], r12w
lea rdi, [0x1400ef7d4]
mov qword [r13 + 0xbb8], rsi
add r14, 2
jmp 0x140036e57
lea r8, [rbp + 0x5d0]
lea rdx, str.Out_of_memory.
lea rcx, [0x14012afc0]
call fcn.14005fdd0
mov qword [r13 + 0xbb8], r12
jmp 0x1400369fc
mov rsi, rdi
mov qword [r13 + 0xbb8], rdi
add r14, 2
jmp 0x140036e57
lea r14, [rbp + 0x5d0]
mov rdx, 0xffffffffffffffff
mov rcx, r14
call fcn.1400cac20
mov qword [r13 + 0xbc0], rax
test rax, rax
je 0x1400369fc
mov r9, qword [r13 + 0xbb8]
lea rcx, [0x140109308]
mov qword [rsp + 0x28], rcx
lea r8, str._s_s____s
lea rcx, [rbp + 0x5d0]
mov qword [rsp + 0x20], rax
mov edx, 0x8000
call fcn.1400ce4e0
cmp word [rbp + 0x5d0], 0
je 0x140036f97
lea rax, [rbp + 0x5d0]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140036ec2
lea r14, [rbx + rbx]
lea rdi, [r14 + 2]
lea rax, [rdi - 1]
cmp rax, 0xffff
ja 0x140036f71
cmp qword [0x140129f28], 0
jne 0x140036eff
call fcn.1400cad50
mov qword [0x140129f28], rax
test rax, rax
je 0x140036f71
mov rcx, qword [0x140129f20]
cmp rdi, qword [rcx + 0x10]
jbe 0x140036f21
call fcn.1400cad50
mov rcx, qword [0x140129f20]
mov qword [rcx + 0x18], rax
test rax, rax
je 0x140036f71
mov rsi, qword [rcx + 8]
mov rax, rdi
mov qword [0x140129f18], rsi
and eax, 7
je 0x140036f3b
sub rdi, rax
add rdi, 8
sub qword [rcx + 0x10], rdi
lea rax, [rsi + rdi]
mov qword [rcx + 8], rax
test rsi, rsi
je 0x140036f71
test rbx, rbx
je 0x140036f63
mov r8, r14
lea rdx, [rbp + 0x5d0]
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov word [r14 + rsi], r12w
lea rdi, [0x1400ef7d4]
jmp 0x140036f9a
lea r8, [rbp + 0x5d0]
lea rdx, str.Out_of_memory.
lea rcx, [0x14012afc0]
call fcn.14005fdd0
mov qword [r13 + 0xbd8], r12
jmp 0x1400369fc
mov rsi, rdi
mov qword [r13 + 0xbd8], rsi
lea rdx, [rbp + 0x5d2]
mov ebx, SafeArrayAllocDescriptor
mov r8d, 0x7ffe
xor ecx, ecx
mov word [rbp + 0x5d0], bx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140037134
lea rcx, [rbp + 0x5d0]
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140036fe0
mov dword [rbp + rax*2 + 0x5d0], ebx
cmp word [rbp + 0x5d0], 0
je 0x1400370e5
lea rax, [rbp + 0x5d0]
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140037010
lea r14, [rbx + rbx]
lea rdi, [r14 + 2]
lea rax, [rdi - 1]
cmp rax, 0xffff
ja 0x1400370bf
cmp qword [0x140129f28], 0
jne 0x14003704d
call fcn.1400cad50
mov qword [0x140129f28], rax
test rax, rax
je 0x1400370bf
mov rcx, qword [0x140129f20]
cmp rdi, qword [rcx + 0x10]
jbe 0x14003706f
call fcn.1400cad50
mov rcx, qword [0x140129f20]
mov qword [rcx + 0x18], rax
test rax, rax
je 0x1400370bf
mov rsi, qword [rcx + 8]
mov rax, rdi
mov qword [0x140129f18], rsi
and eax, 7
je 0x140037089
sub rdi, rax
add rdi, 8
sub qword [rcx + 0x10], rdi
lea rax, [rsi + rdi]
mov qword [rcx + 8], rax
test rsi, rsi
je 0x1400370bf
test rbx, rbx
je 0x1400370b1
mov r8, r14
lea rdx, [rbp + 0x5d0]
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov word [r14 + rsi], r12w
lea rdi, [0x1400ef7d4]
jmp 0x1400370e8
lea r8, [rbp + 0x5d0]
lea rdx, str.Out_of_memory.
lea rcx, [0x14012afc0]
call fcn.14005fdd0
mov qword [r13 + 0xbc8], r12
jmp 0x1400369fc
mov rsi, rdi
mov edx, 0x5c
mov qword [r13 + 0xbc8], rsi
lea rcx, [rbp + 0x5d0]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
jne 0x14003710d
mov qword [r13 + 0xbd0], rdi
mov rdx, 0xffffffffffffffff
mov word [rax], r12w
lea rcx, [rbp + 0x5d2]
call fcn.1400cac20
mov qword [r13 + 0xbd0], rax
test rax, rax
je 0x1400369fc
mov eax, 1
jmp 0x1400369fe