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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4da910
push eax
mov dword fs:[0], esp
sub esp, 0x8d4
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x4a0ac8
lea eax, [ebp - 0x50]
push eax
push 0x4e147c
push edi
call fcn.004a8e3b
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a0ac8
push 2
push 0x104
call fcn.004accc4
add esp, 8
lea ecx, [ebp - 0x34]
mov esi, eax
push edi
call fcn.00406df0
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
push 0x4e1208
call fcn.00406df0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004a1b30
add esp, 0x20
cmp dword [ebp - 0x20], 8
mov byte [ebp - 4], 2
jb 0x4a078c
push dword [ebp - 0x34]
call fcn.004a46e7
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 0x4a0aa2
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
push 0x4ec5a4
cmovae eax, dword [ebp - 0x4c]
push eax
push 0x104
push esi
call fcn.004a0380
add esp, 0x10
test eax, eax
je 0x4a0a99
lea eax, [ebp - 0x2d8]
mov dword [ebp - 0x18], 1
push 0x2e
xor ebx, ebx
mov dword [ebp + 8], eax
push esi
mov dword [ebp - 0x14], ebx
call fcn.004a6a41
add esp, 8
test eax, eax
je 0x4a083d
push str..lnk
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4a083d
push 1
lea eax, [ebp - 0x18]
push eax
push 0x104
lea eax, [ebp - 0x4e0]
push eax
push 0x104
lea eax, [ebp - 0x2d8]
push eax
push 0x200
push esi
push esi
call fcn.0049d880
add esp, 0x24
mov ecx, 1
test eax, eax
cmovne ebx, ecx
mov dword [ebp - 0x14], ebx
push 0x22
push esi
xor ebx, ebx
call fcn.004a6a41
add esp, 8
mov dword [ebp - 0x10], eax
lea edi, [ebp - 0x8e0]
test eax, eax
je 0x4a08b3
xor edx, edx
mov ecx, esi
cmp word [esi], dx
je 0x4a0888
test dl, 1
jne 0x4a086b
cmp word [ecx], 0x20
je 0x4a0886
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x4a0876
inc edx
jmp 0x4a087c
mov word [edi], ax
add edi, 2
add ecx, 2
cmp word [ecx], bx
jne 0x4a0860
jmp 0x4a0888
mov ebx, ecx
xor eax, eax
mov word [edi], ax
lea eax, [ebp - 0x8e0]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x4a08b6
xor eax, eax
push 0x5c
push esi
mov word [ebx], ax
call fcn.004a6ae7
mov edi, eax
mov eax, 0x20
mov word [ebx], ax
jmp 0x4a08c0
mov dword [ebp - 0x1c], esi
push 0x5c
push esi
call fcn.004a6ae7
mov edi, eax
add esp, 8
test edi, edi
je 0x4a0901
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4a08e0
cmp eax, edi
jae 0x4a08e0
sub edi, eax
sub edi, 2
sar edi, 1
add eax, 2
push edi
push eax
jmp 0x4a08e6
sub edi, esi
sar edi, 1
push edi
push esi
lea eax, [ebp - 0x2d8]
push eax
call fcn.004a6cd4
add esp, 0xc
xor eax, eax
mov word [ebp + edi*2 - 0x2d8], ax
jmp 0x4a0929
lea eax, [ebp - 0x2d8]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4a0922
xor eax, eax
mov word [ebp - 0x2d2], ax
jmp 0x4a0929
mov dword [ebp + 8], 0
mov dword [ebp - 0x10], 0
test ebx, ebx
je 0x4a0939
lea edi, [ebx + 2]
jmp 0x4a093b
xor edi, edi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4a0950
push 0
push eax
call fcn.0049de70
add esp, 8
mov dword [ebp - 0x10], eax
push 0x3c
lea eax, [ebp - 0x8c]
push 0
push eax
call fcn.004a4860
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
mov dword [ebp - 0x8c], 0x3c
cmovne edi, eax
mov dword [ebp - 0x88], 0x440
mov eax, dword [ebp + 8]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x8c]
push eax
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], str.open
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x70], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov edi, eax
test edi, edi
je 0x4a09c1
mov ebx, dword [ebp - 0x54]
jmp 0x4a0a57
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x4c7
je 0x4a0a7c
push 0x44
lea eax, [ebp - 0xd0]
push 0
push eax
call fcn.004a4860
add esp, 0xc
mov dword [ebp - 0xd0], 0x44
cmp dword [ebp - 0x14], 0
je 0x4a0a07
mov ax, word [ebp - 0x18]
or dword [ebp - 0xa4], 1
mov word [ebp - 0xa0], ax
lea eax, [ebp - 0x2d8]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4a0a2b
xor eax, eax
mov word [ebp - 0x2d2], ax
mov eax, dword [ebp + 8]
jmp 0x4a0a2d
xor eax, eax
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xd0]
push ecx
push eax
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 - 0x2c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x4a0a78
cmp dword [ebp + 0xc], 0
je 0x4a0a71
test edi, edi
je 0x4a0a71
push 0x1388
push ebx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4a0a8e
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4a0a8e
push 0
push eax
call fcn.0049de70
add esp, 8
push esi
call fcn.004a8ef0
add esp, 4
jmp 0x4a0aa4
push esi
call fcn.004a8ef0
add esp, 4
xor edi, edi
cmp dword [ebp - 0x38], 8
jb 0x4a0ab5
push dword [ebp - 0x4c]
call fcn.004a46e7
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
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