Function at 0x10049dd0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x68
push 0xffffffffffffffff
push 0x10091138
push 0x10055d18
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 ecx, eax, 0
mov edx, 0x3f
mov eax, dword [ebp + 0x74]
mov word [eax + ecx], dx
mov ecx, 2
shl ecx, 0
xor edx, edx
mov eax, dword [ebp + 0x74]
mov word [eax + ecx], dx
cmp dword [ebp + 0x70], 0
je 0x1004a379
movzx ecx, byte [0x100e0dc0]
test ecx, ecx
jne 0x10049e60
push 0
push 0x1007d3c8
call fcn.1004b930
mov dword [0x100e0dbc], eax
mov byte [0x100e0dc0], 1
cmp dword [0x100e0dbc], 0
je 0x10049ec9
mov edx, dword [ebp + 0x70]
push edx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x3c], eax
cmp dword [ebp + 0x3c], 0
jne 0x10049e97
mov eax, dword [ebp + 0x70]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x3c], eax
cmp dword [ebp + 0x3c], 0
je 0x10049ec4
mov ecx, dword [ebp + 0x78]
mov dword [ebp - 0x2c], ecx
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp + 0x74]
push eax
push 0
mov ecx, dword [ebp + 0x3c]
push ecx
call dword [0x100e0dbc]
mov dword [ebp + 0x2c], eax
mov edx, dword [ebp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004a379
mov eax, dword [ebp + 0x70]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x58], eax
cmp dword [ebp + 0x58], 0
je 0x1004a379
mov ecx, dword [ebp + 0x58]
push ecx
call fcn.1003b930
mov dword [ebp - 0x28], eax
xorpd xmm0, xmm0
movlpd qword [ebp + 0x10], xmm0
call fcn.1003ccd0
test eax, eax
je 0x10049f14
mov edx, dword [ebp + 0x58]
push edx
call fcn.1003b8d0
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], edx
cmp dword [ebp - 0x28], 0
jne 0x10049f26
mov eax, dword [ebp + 0x10]
or eax, dword [ebp + 0x14]
je 0x1004a36f
mov byte [ebp + 0x63], 0
xor ecx, ecx
mov word [ebp + 0x64], cx
mov edx, dword [ebp + 0x10]
or edx, dword [ebp + 0x14]
je 0x1004a0cf
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 + 0x58]
push ecx
call fcn.1003c9f0
test eax, eax
je 0x1004a0ca
cmp dword [ebp + 0x34], 8
jne 0x1004a0ca
cmp dword [ebp + 0x38], 0
jne 0x1004a0ca
mov edx, dword [ebp + 8]
or edx, dword [ebp + 0xc]
je 0x1004a0ca
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 + 0x58]
push ecx
call fcn.1003c9f0
test eax, eax
je 0x1004a0ca
cmp dword [ebp + 0x34], 4
jne 0x1004a0ca
cmp dword [ebp + 0x38], 0
jne 0x1004a0ca
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 + 0x58]
push eax
call fcn.1003c9f0
test eax, eax
je 0x1004a0ca
cmp dword [ebp + 0x34], 0x10
jne 0x1004a0ca
cmp dword [ebp + 0x38], 0
jne 0x1004a0ca
movzx ecx, word [ebp + 0x1c]
test ecx, ecx
je 0x1004a0ca
mov edx, dword [ebp + 0x24]
or edx, dword [ebp + 0x28]
je 0x1004a0ca
movzx eax, word [ebp + 0x1c]
mov ecx, dword [ebp + 0x78]
shl ecx, 1
cmp eax, ecx
jb 0x1004a053
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 0x1004a06d
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 + 0x58]
push edx
call fcn.1003c9f0
test eax, eax
je 0x1004a0b5
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 0x1004a0b5
mov ecx, dword [ebp + 0x38]
cmp ecx, dword [ebp - 0x30]
jne 0x1004a0b5
mov dword [ebp - 0x20], 1
jmp 0x1004a0bc
mov dword [ebp - 0x20], 0
mov dl, byte [ebp - 0x20]
mov byte [ebp + 0x63], dl
mov ax, word [ebp + 0x1c]
mov word [ebp + 0x64], ax
jmp 0x1004a1f8
lea ecx, [ebp + 0x54]
push ecx
push 4
lea edx, [ebp + 0x30]
push edx
mov eax, dword [ebp - 0x28]
add eax, 0x10
push eax
mov ecx, dword [ebp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1004a1f8
cmp dword [ebp + 0x54], 4
jne 0x1004a1f8
cmp dword [ebp + 0x30], 0
je 0x1004a1f8
lea edx, [ebp + 0x54]
push edx
push 4
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 0x30]
add ecx, 8
push ecx
mov edx, dword [ebp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1004a1f8
cmp dword [ebp + 0x54], 4
jne 0x1004a1f8
lea eax, [ebp + 0x54]
push eax
push 8
lea ecx, [ebp + 0x40]
push ecx
mov edx, dword [ebp + 0x30]
add edx, 0x38
push edx
mov eax, dword [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1004a1f8
cmp dword [ebp + 0x54], 8
jne 0x1004a1f8
movzx ecx, word [ebp + 0x40]
test ecx, ecx
je 0x1004a1f8
cmp dword [ebp + 0x44], 0
je 0x1004a1f8
movzx edx, word [ebp + 0x40]
mov eax, dword [ebp + 0x78]
shl eax, 1
cmp edx, eax
jb 0x1004a1a1
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 0x1004a1b2
mov ecx, dword [ebp + 0x44]
add ecx, dword [ebp + 0x30]
mov dword [ebp + 0x44], ecx
lea edx, [ebp + 0x54]
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 + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1004a1e3
movzx ecx, word [ebp + 0x40]
cmp dword [ebp + 0x54], ecx
jne 0x1004a1e3
mov dword [ebp - 0x24], 1
jmp 0x1004a1ea
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 0x1004a36f
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 + 0x48], 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 0x1007d3e4
call fcn.100513c3
add esp, 8
mov dword [ebp], eax
mov eax, 2
shl eax, 2
mov ecx, dword [ebp + 0x74]
mov dx, word [ebp + 0x48]
mov word [ecx + eax], dx
cmp dword [ebp], 0
jne 0x1004a28c
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 fcn.10051540
add esp, 0xc
jmp 0x1004a368
mov eax, 2
imul ecx, eax, 0xc
mov edx, dword [ebp + 0x74]
mov ax, word [edx + ecx]
mov word [ebp + 0x48], ax
mov ecx, 2
imul edx, ecx, 0xc
xor eax, eax
mov ecx, dword [ebp + 0x74]
mov word [ecx + edx], ax
mov edx, dword [ebp + 0x74]
push edx
push str.SystemRoot_
call fcn.100513c3
add esp, 8
mov dword [ebp], eax
mov eax, 2
imul ecx, eax, 0xc
mov edx, dword [ebp + 0x74]
mov ax, word [ebp + 0x48]
mov word [edx + ecx], ax
cmp dword [ebp], 0
jne 0x1004a368
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 0x1004a329
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 edx, ecx, 0xb
add edx, dword [ebp + 0x74]
push edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x74]
lea edx, [ecx + eax*2]
push edx
call fcn.10051540
add esp, 0xc
mov eax, dword [ebp + 0x18]
shl eax, 1
push eax
lea ecx, [ebp - 0x248]
push ecx
mov edx, dword [ebp + 0x74]
push edx
call fcn.10051540
add esp, 0xc
mov dword [ebp + 0x2c], 1
mov eax, dword [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x2c], 0
jne 0x1004a4d9
movzx ecx, byte [ebp + 0x7c]
test ecx, ecx
je 0x1004a4d9
mov dword [ebp - 4], 0
push 0
push 0x1007d3ac
call fcn.1004ba60
mov dword [ebp - 0x1c], eax
mov dword [ebp + 0x5c], 0
lea edx, [ebp + 0x5c]
push edx
push 0
push 0
push 5
call dword [ebp - 0x1c]
mov dword [ebp + 0x4c], 0
cmp dword [ebp + 0x5c], 0
jne 0x1004a411
mov dword [ebp + 0x5c], 0x10000
mov eax, dword [ebp + 0x5c]
shl eax, 1
mov dword [ebp + 0x5c], eax
mov ecx, dword [ebp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp + 0x5c]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0x4c], eax
push 0
mov eax, dword [ebp + 0x5c]
push eax
mov ecx, dword [ebp + 0x4c]
push ecx
push 5
call dword [ebp - 0x1c]
mov dword [ebp + 4], eax
cmp dword [ebp + 4], 0
je 0x1004a40f
cmp dword [ebp + 0x5c], 0x400000
jne 0x1004a3cd
jmp 0x1004a43a
mov edx, dword [ebp + 0x5c]
shl edx, 1
mov dword [ebp + 0x5c], edx
mov eax, dword [ebp + 0x5c]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0x4c], eax
push 0
mov ecx, dword [ebp + 0x5c]
push ecx
mov edx, dword [ebp + 0x4c]
push edx
push 5
call dword [ebp - 0x1c]
mov dword [ebp + 4], eax
cmp dword [ebp + 4], 0
jne 0x1004a4aa
mov eax, dword [ebp + 0x4c]
mov dword [ebp + 0x50], eax
mov ecx, 1
test ecx, ecx
je 0x1004a4aa
mov edx, dword [ebp + 0x50]
mov eax, dword [edx + 0x44]
cmp eax, dword [ebp + 0x70]
jne 0x1004a493
mov ecx, dword [ebp + 0x50]
cmp dword [ecx + 0x3c], 0
je 0x1004a47c
mov edx, dword [ebp + 0x50]
mov eax, dword [edx + 0x3c]
push eax
mov ecx, dword [ebp + 0x78]
push ecx
mov edx, dword [ebp + 0x74]
push edx
call fcn.10053320
add esp, 0xc
jmp 0x1004a491
push str._System_Process_
mov eax, dword [ebp + 0x78]
push eax
mov ecx, dword [ebp + 0x74]
push ecx
call fcn.10053320
add esp, 0xc
jmp 0x1004a4aa
mov edx, dword [ebp + 0x50]
cmp dword [edx], 0
jne 0x1004a49d
jmp 0x1004a4aa
mov eax, dword [ebp + 0x50]
mov ecx, dword [ebp + 0x50]
add ecx, dword [eax]
mov dword [ebp + 0x50], ecx
jmp 0x1004a446
mov edx, dword [ebp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 4], 0xffffffff
jmp 0x1004a4d9
mov ecx, dword [ebp - 0x38]
push ecx
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