Function at 0x180019910
Capabilities:
Get common file path

Disassembly:
mov byte [rsp + 0x20], r9b
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x2e8
mov dword [rsp + 0x44], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xa0], eax
mov eax, 2
imul rax, rax, 0
mov ecx, 0x3f
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax], cx
mov eax, 2
imul rax, rax, 1
xor ecx, ecx
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax], cx
cmp dword [rsp + 0x2f0], 0
je 0x180019e99
movzx eax, byte [0x18004cd60]
test eax, eax
jne 0x1800199a5
xor edx, edx
lea rcx, [0x1800330f0]
call fcn.18000c280
mov qword [0x18004cd58], rax
mov byte [0x18004cd60], 1
cmp qword [0x18004cd58], 0
je 0x180019a48
mov r8d, dword [rsp + 0x2f0]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x1800199f8
mov r8d, dword [rsp + 0x2f0]
xor edx, edx
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
je 0x180019a43
mov eax, dword [rsp + 0x300]
mov dword [rsp + 0xb0], eax
lea r9, [rsp + 0xb0]
mov r8, qword [rsp + 0x2f8]
xor edx, edx
mov rcx, qword [rsp + 0x88]
call qword [0x18004cd58]
mov dword [rsp + 0x44], eax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180019e99
mov r8d, dword [rsp + 0x2f0]
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180019e99
mov rcx, qword [rsp + 0x50]
call fcn.18000cc40
mov qword [rsp + 0xb8], rax
cmp qword [rsp + 0xb8], 0
je 0x180019e8e
mov byte [rsp + 0x38], 0
xor eax, eax
mov word [rsp + 0x30], ax
mov rax, qword [rsp + 0xb8]
add rax, 0x20
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, 8
lea r8, [rsp + 0x98]
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180019c79
cmp qword [rsp + 0x60], 8
jne 0x180019c79
cmp qword [rsp + 0x98], 0
je 0x180019c79
mov rax, qword [rsp + 0x98]
add rax, 8
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, 4
lea r8, [rsp + 0xb4]
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180019c79
cmp qword [rsp + 0x60], 4
jne 0x180019c79
mov rax, qword [rsp + 0x98]
add rax, 0x60
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, 0x10
lea r8, [rsp + 0x78]
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180019c79
cmp qword [rsp + 0x60], 0x10
jne 0x180019c79
movzx eax, word [rsp + 0x78]
test eax, eax
je 0x180019c79
cmp qword [rsp + 0x80], 0
je 0x180019c79
movzx eax, word [rsp + 0x78]
mov ecx, dword [rsp + 0x300]
add ecx, ecx
cmp eax, ecx
jb 0x180019be2
movzx eax, word [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x300]
lea ecx, [rcx + rcx - 2]
mov ecx, ecx
sub rax, rcx
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x300]
lea eax, [rax + rax - 2]
mov word [rsp + 0x78], ax
mov eax, dword [rsp + 0xb4]
and eax, 1
test eax, eax
jne 0x180019c0e
mov rax, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
movzx eax, word [rsp + 0x78]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, eax
mov r8, qword [rsp + 0x2f8]
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180019c58
movzx eax, word [rsp + 0x78]
cmp qword [rsp + 0x60], rax
jne 0x180019c58
mov dword [rsp + 0x90], 1
jmp 0x180019c63
mov dword [rsp + 0x90], 0
movzx eax, byte [rsp + 0x90]
mov byte [rsp + 0x38], al
movzx eax, word [rsp + 0x78]
mov word [rsp + 0x30], ax
movzx eax, byte [rsp + 0x38]
test eax, eax
je 0x180019e8e
movzx eax, word [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax*2], cx
mov eax, 2
imul rax, rax, 4
mov rcx, qword [rsp + 0x2f8]
movzx eax, word [rcx + rax]
mov word [rsp + 0x3c], ax
mov eax, 2
imul rax, rax, 4
xor ecx, ecx
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax], cx
mov rdx, qword [rsp + 0x2f8]
lea rcx, str.___
call fcn.180022d10
mov dword [rsp + 0x58], eax
mov eax, 2
imul rax, rax, 4
mov rcx, qword [rsp + 0x2f8]
movzx edx, word [rsp + 0x3c]
mov word [rcx + rax], dx
cmp dword [rsp + 0x58], 0
jne 0x180019d43
movzx eax, word [rsp + 0x30]
sub eax, 6
cdqe
mov ecx, 2
imul rcx, rcx, 4
mov rdx, qword [rsp + 0x2f8]
add rdx, rcx
mov rcx, rdx
mov r8, rax
mov rdx, rcx
mov rcx, qword [rsp + 0x2f8]
call fcn.180023200
jmp 0x180019e86
mov eax, 2
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x2f8]
movzx eax, word [rcx + rax]
mov word [rsp + 0x3c], ax
mov eax, 2
imul rax, rax, 0xc
xor ecx, ecx
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax], cx
mov rdx, qword [rsp + 0x2f8]
lea rcx, str.SystemRoot_
call fcn.180022d10
mov dword [rsp + 0x58], eax
mov eax, 2
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x2f8]
movzx edx, word [rsp + 0x3c]
mov word [rcx + rax], dx
cmp dword [rsp + 0x58], 0
jne 0x180019e86
mov edx, 0x104
lea rcx, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [rsp + 0x40], eax
movzx eax, word [rsp + 0x30]
xor edx, edx
mov ecx, 2
div ecx
mov ecx, dword [rsp + 0x40]
lea eax, [rax + rcx - 0xa]
cmp eax, dword [rsp + 0x300]
jb 0x180019e16
mov eax, dword [rsp + 0x300]
add eax, 0xa
sub eax, dword [rsp + 0x40]
shl eax, 1
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0x2f8]
mov word [rdx + rax*2], cx
movzx eax, word [rsp + 0x30]
sub eax, 0x14
cdqe
mov ecx, 2
imul rcx, rcx, 0xb
mov rdx, qword [rsp + 0x2f8]
add rdx, rcx
mov rcx, rdx
movsxd rdx, dword [rsp + 0x40]
mov r8, qword [rsp + 0x2f8]
lea rdx, [r8 + rdx*2]
mov qword [rsp + 0xc0], rdx
mov r8, rax
mov rdx, rcx
mov rax, qword [rsp + 0xc0]
mov rcx, rax
call fcn.180023200
mov eax, dword [rsp + 0x40]
shl eax, 1
cdqe
mov r8, rax
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsp + 0x2f8]
call fcn.180023200
mov dword [rsp + 0x44], 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x44], 0
jne 0x18001a04a
movzx eax, byte [rsp + 0x308]
test eax, eax
je 0x18001a04a
xor edx, edx
lea rcx, [0x180033110]
call fcn.18000c340
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x34], 0
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov ecx, 5
call qword [rsp + 0xa8]
mov qword [rsp + 0x68], 0
cmp dword [rsp + 0x34], 0
jne 0x180019f5b
mov dword [rsp + 0x34], 0x10000
mov eax, dword [rsp + 0x34]
shl eax, 1
mov dword [rsp + 0x34], eax
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x34]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x68], rax
xor r9d, r9d
mov r8d, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x68]
mov ecx, 5
call qword [rsp + 0xa8]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x180019f59
cmp dword [rsp + 0x34], 0x400000
jne 0x180019f00
jmp 0x180019f98
mov eax, dword [rsp + 0x34]
shl eax, 1
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x68], rax
xor r9d, r9d
mov r8d, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x68]
mov ecx, 5
call qword [rsp + 0xa8]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
jne 0x18001a03d
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
xor eax, eax
cmp eax, 1
je 0x18001a03d
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x2f0]
cmp dword [rax + 0x50], ecx
jne 0x18001a015
mov rax, qword [rsp + 0x70]
cmp qword [rax + 0x40], 0
je 0x180019ff6
mov eax, dword [rsp + 0x300]
mov rcx, qword [rsp + 0x70]
mov r8, qword [rcx + 0x40]
mov edx, eax
mov rcx, qword [rsp + 0x2f8]
call fcn.180024964
jmp 0x18001a013
mov eax, dword [rsp + 0x300]
lea r8, str._System_Process_
mov edx, eax
mov rcx, qword [rsp + 0x2f8]
call fcn.180024964
jmp 0x18001a03d
mov rax, qword [rsp + 0x70]
cmp dword [rax], 0
jne 0x18001a021
jmp 0x18001a03d
mov rax, qword [rsp + 0x70]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x70], rax
jmp 0x180019fad
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18001a04a
mov ecx, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rsp + 0x44]
add rsp, 0x2e8
ret