Function at 0x4004d0e0
Capabilities:
Check if file exists
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40074310
push eax
mov dword fs:[0], esp
sub esp, 0x48
push esi
push edi
mov edi, edx
test edi, edi
je 0x4004d327
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4004d327
call fcn.40001ce1
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4004d132
push 0x80004005
call fcn.40001ad1
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 1
mov dword [ebp - 0x18], eax
call fcn.40001ce1
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4004d168
push 0x80004005
call fcn.40001ad1
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
test edi, 0xffff0000
jne 0x4004d18f
movzx eax, di
lea ecx, [ebp - 0x10]
push eax
call fcn.40007342
jmp 0x4004d1a2
push edi
call fcn.40054188
add esp, 4
lea ecx, [ebp - 0x10]
push eax
push edi
call fcn.40007835
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x10]
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x4004d1ba
push 0x80070057
call fcn.40001ad1
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x4004d1d7
push esi
lea ecx, [ebp - 0x10]
call fcn.40007396
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [ebp - 0x10]
push dword [eax - 8]
push eax
call fcn.40054e5c
mov edx, eax
add esp, 8
test edx, edx
js 0x4004d1b0
mov ecx, dword [ebp - 0x10]
cmp edx, dword [ecx - 8]
jg 0x4004d1b0
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + edx*2], cx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.400088ff
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], 1
jle 0x4004d22a
push dword [esi - 0xc]
lea ecx, [ebp - 0x14]
call fcn.400078c1
mov esi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
push ebx
or ebx, 0xffffffff
mov eax, ebx
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4004d24e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x38
lea eax, [ebp - 0x50]
mov dword [ebp - 0x54], 0x3c
push 0
push eax
call fcn.40054740
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 0x140
mov dword [ebp - 0x4c], 0
push eax
mov dword [ebp - 0x48], 0x4007e134
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], 5
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x4004d2d7
push edi
lea ecx, [ebp - 0x10]
call fcn.400069d1
push 0x10
push str.ShellExecuteEx___failed.
push dword [eax]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp - 0x10]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4004d2d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp + 0xb], 0
jmp 0x4004d2f3
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
sete byte [ebp + 0xb]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
pop ebx
jg 0x4004d312
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp + 0xb]
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x18
call fcn.40001ce1
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4004d343
push 0x80004005
call fcn.40001ad1
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0
test edi, edi
je 0x4004d37c
test edi, 0xffff0000
jne 0x4004d371
movzx eax, di
lea ecx, [ebp + 8]
push eax
call fcn.40007342
jmp 0x4004d388
push edi
call fcn.40054188
add esp, 4
jmp 0x4004d37e
xor eax, eax
push eax
push edi
lea ecx, [ebp + 8]
call fcn.40007835
push 0x10
push str.File_Not_Found
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4004d3bc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
xor al, al
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x18