Function at 0x18004ca90
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 0x18004d019
movzx eax, byte [0x1800a55c8]
test eax, eax
jne 0x18004cb25
xor edx, edx
lea rcx, [0x18007cea0]
call fcn.18004a430
mov qword [0x1800a55c0], rax
mov byte [0x1800a55c8], 1
cmp qword [0x1800a55c0], 0
je 0x18004cbc8
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 0x18004cb78
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 0x18004cbc3
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 [0x1800a55c0]
mov dword [rsp + 0x44], eax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18004d019
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 0x18004d019
mov rcx, qword [rsp + 0x50]
call fcn.18003eff0
mov qword [rsp + 0xb8], rax
cmp qword [rsp + 0xb8], 0
je 0x18004d00e
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 0x18004cdf9
cmp qword [rsp + 0x60], 8
jne 0x18004cdf9
cmp qword [rsp + 0x98], 0
je 0x18004cdf9
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 0x18004cdf9
cmp qword [rsp + 0x60], 4
jne 0x18004cdf9
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 0x18004cdf9
cmp qword [rsp + 0x60], 0x10
jne 0x18004cdf9
movzx eax, word [rsp + 0x78]
test eax, eax
je 0x18004cdf9
cmp qword [rsp + 0x80], 0
je 0x18004cdf9
movzx eax, word [rsp + 0x78]
mov ecx, dword [rsp + 0x300]
add ecx, ecx
cmp eax, ecx
jb 0x18004cd62
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 0x18004cd8e
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 0x18004cdd8
movzx eax, word [rsp + 0x78]
cmp qword [rsp + 0x60], rax
jne 0x18004cdd8
mov dword [rsp + 0x90], 1
jmp 0x18004cde3
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 0x18004d00e
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, [0x18007cec0]
call fcn.180052ca8
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 0x18004cec3
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.180052e30
jmp 0x18004d006
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.180052ca8
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 0x18004d006
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 0x18004cf96
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.180052e30
mov eax, dword [rsp + 0x40]
shl eax, 1
cdqe
mov r8, rax
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsp + 0x2f8]
call fcn.180052e30
mov dword [rsp + 0x44], 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x44], 0
jne 0x18004d1ca
movzx eax, byte [rsp + 0x308]
test eax, eax
je 0x18004d1ca
xor edx, edx
lea rcx, [0x18007ce80]
call fcn.18004a600
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 0x18004d0db
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 0x18004d0d9
cmp dword [rsp + 0x34], 0x400000
jne 0x18004d080
jmp 0x18004d118
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 0x18004d1bd
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
xor eax, eax
cmp eax, 1
je 0x18004d1bd
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x2f0]
cmp dword [rax + 0x50], ecx
jne 0x18004d195
mov rax, qword [rsp + 0x70]
cmp qword [rax + 0x40], 0
je 0x18004d176
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.180054b48
jmp 0x18004d193
mov eax, dword [rsp + 0x300]
lea r8, str._System_Process_
mov edx, eax
mov rcx, qword [rsp + 0x2f8]
call fcn.180054b48
jmp 0x18004d1bd
mov rax, qword [rsp + 0x70]
cmp dword [rax], 0
jne 0x18004d1a1
jmp 0x18004d1bd
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 0x18004d12d
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18004d1ca
mov ecx, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rsp + 0x44]
add rsp, 0x2e8
ret