Function at 0x46a7c0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x68
push 0xffffffffffffffff
push 0x4a8440
push 0x47d4e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffdc8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
mov eax, 2
imul eax, eax, 0
mov ecx, 0x3f
mov edx, dword [ebp + 0x74]
mov word [edx + eax], cx
mov eax, 2
shl eax, 0
xor ecx, ecx
mov edx, dword [ebp + 0x74]
mov word [edx + eax], cx
cmp dword [ebp + 0x70], 0
je 0x46ad73
movzx eax, byte [0x4c8e4c]
test eax, eax
jne 0x46a850
push 0
push 0x48bdb8
call fcn.0046d200
mov dword [0x4c8e48], eax
mov byte [0x4c8e4c], 1
cmp dword [0x4c8e48], 0
je 0x46a8b9
mov ecx, dword [ebp + 0x70]
push ecx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x3c], eax
cmp dword [ebp + 0x3c], 0
jne 0x46a887
mov edx, dword [ebp + 0x70]
push edx
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x3c], eax
cmp dword [ebp + 0x3c], 0
je 0x46a8b4
mov eax, dword [ebp + 0x78]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp + 0x74]
push edx
push 0
mov eax, dword [ebp + 0x3c]
push eax
call dword [0x4c8e48]
mov dword [ebp + 0x2c], eax
mov ecx, dword [ebp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46ad73
mov edx, dword [ebp + 0x70]
push edx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x5c], eax
cmp dword [ebp + 0x5c], 0
je 0x46ad73
mov eax, dword [ebp + 0x5c]
push eax
call fcn.0046eee0
mov dword [ebp], eax
xorpd xmm0, xmm0
movlpd qword [ebp + 0x10], xmm0
cmp dword [ebp], 0
jne 0x46a90e
mov ecx, dword [ebp + 0x5c]
push ecx
call fcn.0046f580
test eax, eax
je 0x46a90e
mov edx, dword [ebp + 0x5c]
push edx
call fcn.0046ef70
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], edx
cmp dword [ebp], 0
jne 0x46a920
mov eax, dword [ebp + 0x10]
or eax, dword [ebp + 0x14]
je 0x46ad69
mov byte [ebp + 0x63], 0
xor ecx, ecx
mov word [ebp + 0x64], cx
mov edx, dword [ebp + 0x10]
or edx, dword [ebp + 0x14]
je 0x46aac9
lea eax, [ebp + 0x34]
push eax
push 0
push 8
lea ecx, [ebp + 8]
push ecx
mov edx, dword [ebp + 0x10]
add edx, 0x20
mov eax, dword [ebp + 0x14]
adc eax, 0
push eax
push edx
mov ecx, dword [ebp + 0x5c]
push ecx
call fcn.0046efd0
test eax, eax
je 0x46aac4
cmp dword [ebp + 0x34], 8
jne 0x46aac4
cmp dword [ebp + 0x38], 0
jne 0x46aac4
mov edx, dword [ebp + 8]
or edx, dword [ebp + 0xc]
je 0x46aac4
lea eax, [ebp + 0x34]
push eax
push 0
push 4
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
add edx, 8
mov eax, dword [ebp + 0xc]
adc eax, 0
push eax
push edx
mov ecx, dword [ebp + 0x5c]
push ecx
call fcn.0046efd0
test eax, eax
je 0x46aac4
cmp dword [ebp + 0x34], 4
jne 0x46aac4
cmp dword [ebp + 0x38], 0
jne 0x46aac4
lea edx, [ebp + 0x34]
push edx
push 0
push 0x10
lea eax, [ebp + 0x1c]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x60
mov edx, dword [ebp + 0xc]
adc edx, 0
push edx
push ecx
mov eax, dword [ebp + 0x5c]
push eax
call fcn.0046efd0
test eax, eax
je 0x46aac4
cmp dword [ebp + 0x34], 0x10
jne 0x46aac4
cmp dword [ebp + 0x38], 0
jne 0x46aac4
movzx ecx, word [ebp + 0x1c]
test ecx, ecx
je 0x46aac4
mov edx, dword [ebp + 0x24]
or edx, dword [ebp + 0x28]
je 0x46aac4
movzx eax, word [ebp + 0x1c]
mov ecx, dword [ebp + 0x78]
shl ecx, 1
cmp eax, ecx
jb 0x46aa4d
movzx eax, word [ebp + 0x1c]
cdq
add eax, dword [ebp + 0x24]
adc edx, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x78]
lea ecx, [ecx + ecx - 2]
xor esi, esi
sub eax, ecx
sbb edx, esi
mov dword [ebp + 0x24], eax
mov dword [ebp + 0x28], edx
mov edx, dword [ebp + 0x78]
lea eax, [edx + edx - 2]
mov word [ebp + 0x1c], ax
mov ecx, dword [ebp - 0x3c]
and ecx, 1
jne 0x46aa67
mov edx, dword [ebp + 0x24]
add edx, dword [ebp + 8]
mov eax, dword [ebp + 0x28]
adc eax, dword [ebp + 0xc]
mov dword [ebp + 0x24], edx
mov dword [ebp + 0x28], eax
lea ecx, [ebp + 0x34]
push ecx
movzx eax, word [ebp + 0x1c]
cdq
push edx
push eax
mov edx, dword [ebp + 0x74]
push edx
mov eax, dword [ebp + 0x28]
push eax
mov ecx, dword [ebp + 0x24]
push ecx
mov edx, dword [ebp + 0x5c]
push edx
call fcn.0046efd0
test eax, eax
je 0x46aaaf
movzx eax, word [ebp + 0x1c]
cdq
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 0x34]
cmp eax, dword [ebp - 0x34]
jne 0x46aaaf
mov ecx, dword [ebp + 0x38]
cmp ecx, dword [ebp - 0x30]
jne 0x46aaaf
mov dword [ebp - 0x28], 1
jmp 0x46aab6
mov dword [ebp - 0x28], 0
mov dl, byte [ebp - 0x28]
mov byte [ebp + 0x63], dl
mov ax, word [ebp + 0x1c]
mov word [ebp + 0x64], ax
jmp 0x46abf2
lea ecx, [ebp + 0x50]
push ecx
push 4
lea edx, [ebp + 0x30]
push edx
mov eax, dword [ebp]
add eax, 0x10
push eax
mov ecx, dword [ebp + 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x46abf2
cmp dword [ebp + 0x50], 4
jne 0x46abf2
cmp dword [ebp + 0x30], 0
je 0x46abf2
lea edx, [ebp + 0x50]
push edx
push 4
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 0x30]
add ecx, 8
push ecx
mov edx, dword [ebp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x46abf2
cmp dword [ebp + 0x50], 4
jne 0x46abf2
lea eax, [ebp + 0x50]
push eax
push 8
lea ecx, [ebp + 0x40]
push ecx
mov edx, dword [ebp + 0x30]
add edx, 0x38
push edx
mov eax, dword [ebp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x46abf2
cmp dword [ebp + 0x50], 8
jne 0x46abf2
movzx ecx, word [ebp + 0x40]
test ecx, ecx
je 0x46abf2
cmp dword [ebp + 0x44], 0
je 0x46abf2
movzx edx, word [ebp + 0x40]
mov eax, dword [ebp + 0x78]
shl eax, 1
cmp edx, eax
jb 0x46ab9b
movzx ecx, word [ebp + 0x40]
add ecx, dword [ebp + 0x44]
mov edx, dword [ebp + 0x78]
lea eax, [edx + edx - 2]
sub ecx, eax
mov dword [ebp + 0x44], ecx
mov ecx, dword [ebp + 0x78]
lea edx, [ecx + ecx - 2]
mov word [ebp + 0x40], dx
mov eax, dword [ebp - 0x40]
and eax, 1
jne 0x46abac
mov ecx, dword [ebp + 0x44]
add ecx, dword [ebp + 0x30]
mov dword [ebp + 0x44], ecx
lea edx, [ebp + 0x50]
push edx
movzx eax, word [ebp + 0x40]
push eax
mov ecx, dword [ebp + 0x74]
push ecx
mov edx, dword [ebp + 0x44]
push edx
mov eax, dword [ebp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x46abdd
movzx ecx, word [ebp + 0x40]
cmp dword [ebp + 0x50], ecx
jne 0x46abdd
mov dword [ebp - 0x24], 1
jmp 0x46abe4
mov dword [ebp - 0x24], 0
mov dl, byte [ebp - 0x24]
mov byte [ebp + 0x63], dl
mov ax, word [ebp + 0x40]
mov word [ebp + 0x64], ax
movzx ecx, byte [ebp + 0x63]
test ecx, ecx
je 0x46ad69
movzx eax, word [ebp + 0x64]
cdq
sub eax, edx
sar eax, 1
xor edx, edx
mov ecx, dword [ebp + 0x74]
mov word [ecx + eax*2], dx
mov edx, 2
shl edx, 2
mov eax, dword [ebp + 0x74]
mov cx, word [eax + edx]
mov word [ebp + 0x4c], cx
mov edx, 2
shl edx, 2
xor eax, eax
mov ecx, dword [ebp + 0x74]
mov word [ecx + edx], ax
mov edx, dword [ebp + 0x74]
push edx
push str.___
call sub.MSVCR110.dll__wcsicmp
add esp, 8
mov dword [ebp - 0x1c], eax
mov eax, 2
shl eax, 2
mov ecx, dword [ebp + 0x74]
mov dx, word [ebp + 0x4c]
mov word [ecx + eax], dx
cmp dword [ebp - 0x1c], 0
jne 0x46ac86
movzx eax, word [ebp + 0x64]
sub eax, 6
push eax
mov ecx, 2
shl ecx, 2
add ecx, dword [ebp + 0x74]
push ecx
mov edx, dword [ebp + 0x74]
push edx
call sub.MSVCR110.dll_memmove
add esp, 0xc
jmp 0x46ad62
mov eax, 2
imul eax, eax, 0xc
mov ecx, dword [ebp + 0x74]
mov dx, word [ecx + eax]
mov word [ebp + 0x4c], dx
mov eax, 2
imul eax, eax, 0xc
xor ecx, ecx
mov edx, dword [ebp + 0x74]
mov word [edx + eax], cx
mov eax, dword [ebp + 0x74]
push eax
push str.SystemRoot_
call sub.MSVCR110.dll__wcsicmp
add esp, 8
mov dword [ebp - 0x1c], eax
mov ecx, 2
imul ecx, ecx, 0xc
mov edx, dword [ebp + 0x74]
mov ax, word [ebp + 0x4c]
mov word [edx + ecx], ax
cmp dword [ebp - 0x1c], 0
jne 0x46ad62
push 0x104
lea ecx, [ebp - 0x248]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [ebp + 0x18], eax
movzx edx, word [ebp + 0x64]
shr edx, 1
mov eax, dword [ebp + 0x18]
lea ecx, [edx + eax - 0xa]
cmp ecx, dword [ebp + 0x78]
jb 0x46ad23
mov edx, dword [ebp + 0x78]
add edx, 0xa
sub edx, dword [ebp + 0x18]
shl edx, 1
mov word [ebp + 0x64], dx
movzx eax, word [ebp + 0x64]
cdq
sub eax, edx
sar eax, 1
xor ecx, ecx
mov edx, dword [ebp + 0x74]
mov word [edx + eax*2], cx
movzx eax, word [ebp + 0x64]
sub eax, 0x14
push eax
mov ecx, 2
imul ecx, ecx, 0xb
add ecx, dword [ebp + 0x74]
push ecx
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x74]
lea ecx, [eax + edx*2]
push ecx
call sub.MSVCR110.dll_memmove
add esp, 0xc
mov edx, dword [ebp + 0x18]
shl edx, 1
push edx
lea eax, [ebp - 0x248]
push eax
mov ecx, dword [ebp + 0x74]
push ecx
call sub.MSVCR110.dll_memmove
add esp, 0xc
mov dword [ebp + 0x2c], 1
mov edx, dword [ebp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x2c], 0
jne 0x46aed3
movzx eax, byte [ebp + 0x7c]
test eax, eax
je 0x46aed3
mov dword [ebp - 4], 0
push 0
push 0x48bd9c
call fcn.0046d270
mov dword [ebp + 4], eax
mov dword [ebp + 0x58], 0
lea ecx, [ebp + 0x58]
push ecx
push 0
push 0
push 5
call dword [ebp + 4]
mov dword [ebp + 0x48], 0
cmp dword [ebp + 0x58], 0
jne 0x46ae0b
mov dword [ebp + 0x58], 0x10000
mov edx, dword [ebp + 0x58]
shl edx, 1
mov dword [ebp + 0x58], edx
mov eax, dword [ebp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp + 0x58]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0x48], eax
push 0
mov edx, dword [ebp + 0x58]
push edx
mov eax, dword [ebp + 0x48]
push eax
push 5
call dword [ebp + 4]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x46ae09
cmp dword [ebp + 0x58], 0x400000
jne 0x46adc7
jmp 0x46ae34
mov ecx, dword [ebp + 0x58]
shl ecx, 1
mov dword [ebp + 0x58], ecx
mov edx, dword [ebp + 0x58]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0x48], eax
push 0
mov eax, dword [ebp + 0x58]
push eax
mov ecx, dword [ebp + 0x48]
push ecx
push 5
call dword [ebp + 4]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x46aea4
mov edx, dword [ebp + 0x48]
mov dword [ebp + 0x54], edx
mov eax, 1
test eax, eax
je 0x46aea4
mov ecx, dword [ebp + 0x54]
mov edx, dword [ecx + 0x44]
cmp edx, dword [ebp + 0x70]
jne 0x46ae8d
mov eax, dword [ebp + 0x54]
cmp dword [eax + 0x3c], 0
je 0x46ae76
mov ecx, dword [ebp + 0x54]
mov edx, dword [ecx + 0x3c]
push edx
mov eax, dword [ebp + 0x78]
push eax
mov ecx, dword [ebp + 0x74]
push ecx
call sub.MSVCR110.dll_wcscpy_s
add esp, 0xc
jmp 0x46ae8b
push 0x48bdd4
mov edx, dword [ebp + 0x78]
push edx
mov eax, dword [ebp + 0x74]
push eax
call sub.MSVCR110.dll_wcscpy_s
add esp, 0xc
jmp 0x46aea4
mov ecx, dword [ebp + 0x54]
cmp dword [ecx], 0
jne 0x46ae97
jmp 0x46aea4
mov edx, dword [ebp + 0x54]
mov eax, dword [ebp + 0x54]
add eax, dword [edx]
mov dword [ebp + 0x54], eax
jmp 0x46ae40
mov ecx, dword [ebp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 4], 0xffffffff
jmp 0x46aed3
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add ebp, 0x68
mov esp, ebp
pop ebp
ret 0x10