Function at 0x4ca950
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x50c610
push eax
mov dword fs:[0], esp
sub esp, 0x8e4
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x4cade4
lea eax, [ebp - 0x50]
push eax
push 0x51b890
push edi
call fcn.004d4967
add esp, 0xc
cmp eax, 0xffffffff
je 0x4cade4
push 2
push 0x104
call fcn.004d7d24
add esp, 8
lea ecx, [ebp - 0x34]
mov esi, eax
push edi
call fcn.004158d0
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
push 0x51abf0
call fcn.004158d0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004ccb60
add esp, 0x20
cmp dword [ebp - 0x20], 8
mov byte [ebp - 4], 2
jb 0x4ca9ec
push dword [ebp - 0x34]
call fcn.004cf489
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], 7
mov dword [ebp - 0x24], 0
mov word [ebp - 0x34], ax
test esi, esi
je 0x4cada1
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
push 0x5364cc
cmovae eax, dword [ebp - 0x4c]
push eax
push 0x104
push esi
call fcn.004ca590
add esp, 0x10
test eax, eax
je 0x4cad88
lea eax, [ebp - 0x2e8]
mov dword [ebp - 0x1c], 1
push 0x2e
push esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
call fcn.004d28b3
add esp, 8
test eax, eax
je 0x4caabc
push str..lnk
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4caabc
push 1
lea eax, [ebp - 0x1c]
push eax
push 0x104
lea eax, [ebp - 0x4f0]
push eax
push 0x104
lea eax, [ebp - 0x2e8]
push eax
push 0x200
push esi
push esi
call fcn.004c6760
add esp, 0x24
test eax, eax
je 0x4caa9f
mov dword [ebp - 0x18], 1
jmp 0x4caabc
test byte [0x652fc0], 1
je 0x4caabc
push str.cannot_dereference_the_shell_link._n
push 1
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0xc
xor eax, eax
push 0x22
push esi
mov dword [ebp + 8], eax
call fcn.004d28b3
add esp, 8
mov dword [ebp - 0x10], eax
lea edi, [ebp - 0x8f0]
test eax, eax
je 0x4cab39
xor edx, edx
mov ecx, esi
cmp word [esi], dx
je 0x4cab07
test dl, 1
jne 0x4caaed
cmp word [ecx], 0x20
je 0x4cab32
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x4caaf8
inc edx
jmp 0x4caafe
mov word [edi], ax
add edi, 2
add ecx, 2
cmp word [ecx], 0
jne 0x4caae2
xor eax, eax
xor ecx, ecx
lea ebx, [ebp - 0x8f0]
mov word [edi], cx
test eax, eax
je 0x4cab3b
push 0x5c
push esi
mov word [eax], cx
call fcn.004d2686
mov edi, eax
mov ecx, 0x20
mov eax, dword [ebp + 8]
mov word [eax], cx
jmp 0x4cab45
mov eax, ecx
mov dword [ebp + 8], eax
jmp 0x4cab09
mov ebx, esi
push 0x5c
push esi
call fcn.004d2686
mov edi, eax
add esp, 8
test edi, edi
je 0x4cab86
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4cab65
cmp eax, edi
jae 0x4cab65
sub edi, eax
sub edi, 2
sar edi, 1
add eax, 2
push edi
push eax
jmp 0x4cab6b
sub edi, esi
sar edi, 1
push edi
push esi
lea eax, [ebp - 0x2e8]
push eax
call fcn.004d2873
add esp, 0xc
xor eax, eax
mov word [ebp + edi*2 - 0x2e8], ax
jmp 0x4cabae
lea eax, [ebp - 0x2e8]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4caba7
xor eax, eax
mov word [ebp - 0x2e2], ax
jmp 0x4cabae
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], 0
test eax, eax
je 0x4cabc1
lea edi, [eax + 2]
jmp 0x4cabc3
xor edi, edi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4cabd8
push 0
push eax
call fcn.004c7260
add esp, 8
mov dword [ebp - 0x10], eax
push 0x3c
lea eax, [ebp - 0x8c]
push 0
push eax
call fcn.004cf600
mov eax, dword [ebp + 0x14]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x8c], 0x3c
mov dword [ebp - 0x88], 0x440
cmovne edi, eax
mov dword [ebp - 0x84], 0
test byte [0x652fc0], 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x80], str.open
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], 1
je 0x4cac49
push ebx
push str.Trying_to_ShellExecute:__s_n
push 3
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0x10
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov edi, eax
test edi, edi
je 0x4cac64
mov ebx, dword [ebp - 0x54]
jmp 0x4cad46
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x4c7
je 0x4cad6b
push 0x44
lea eax, [ebp - 0xe0]
push 0
push eax
call fcn.004cf600
add esp, 0xc
mov dword [ebp - 0xe0], 0x44
cmp dword [ebp - 0x18], 0
je 0x4cacaa
mov ax, word [ebp - 0x1c]
or dword [ebp - 0xb4], 1
mov word [ebp - 0xb0], ax
lea eax, [ebp - 0x2e8]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4cacce
mov ebx, dword [ebp - 0x14]
xor eax, eax
mov word [ebp - 0x2e2], ax
jmp 0x4cacd0
xor ebx, ebx
test byte [0x652fc0], 4
je 0x4cacee
push esi
push str.Trying_to_CreateProcess_with:__s_n
push 3
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0x10
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0xe0]
push eax
push ebx
push 0
push 0
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, dword [ebp - 0x9c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x4cad46
test byte [0x652fc0], 1
je 0x4cad46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_launch_program__error__0x_08X_n
push 1
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0x10
test ebx, ebx
je 0x4cad67
cmp dword [ebp + 0xc], 0
je 0x4cad60
test edi, edi
je 0x4cad60
push 0x1388
push ebx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4cad7d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4cad7d
push 0
push eax
call fcn.004c7260
add esp, 8
push esi
call fcn.004d17d8
add esp, 4
jmp 0x4cadc0
push esi
call fcn.004d17d8
add esp, 4
test byte [0x652fc0], 1
je 0x4cadbe
push str._Expanded__App_or_URL_string_is_too_long_n
jmp 0x4cadaf
test byte [0x652fc0], 1
je 0x4cadbe
push str.Fail_to_allocate_memory_for_expanded_string_n
push 1
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0xc
xor edi, edi
cmp dword [ebp - 0x38], 8
jb 0x4cadd1
push dword [ebp - 0x4c]
call fcn.004cf489
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [0x652fc0], 1
je 0x4cae01
push str.App_or_URL_not_specified._n
push 1
push str.RunAppOrURL
call fcn.004cb3a0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret