Function at 0x40ed50
Capabilities:
Check if file exists
Create a process with modified i/o handles and window
Create process on windows
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x457f5a
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x4749e0]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push esi
push edi
mov eax, dword [0x4749e0]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
xor ebx, ebx
mov edi, ecx
mov eax, 7
mov dword [esp + 0x14], edi
mov dword [esp + 0x140], eax
mov dword [esp + 0x13c], ebx
mov word [esp + 0x12c], bx
mov dword [esp + 0x170], ebx
push ebx
push 0x460c30
lea esi, [esp + 0xf8]
mov dword [esp + 0x110], eax
mov dword [esp + 0x10c], ebx
mov word [esp + 0xfc], bx
call fcn.00403640
mov byte [esp + 0x170], 1
mov eax, dword [edi + 0xac]
cmp eax, 2
je 0x40edfa
cmp eax, 1
jne 0x40ee4c
mov esi, 8
cmp dword [esp + 0x108], esi
jb 0x40ee18
mov eax, dword [esp + 0xf4]
push eax
call fcn.00416414
add esp, 4
cmp dword [esp + 0x140], esi
mov dword [esp + 0x108], 7
mov dword [esp + 0x104], ebx
mov word [esp + 0xf4], bx
jb 0x40f624
mov ecx, dword [esp + 0x12c]
push ecx
jmp 0x40f61c
mov ecx, dword [edi + 0x20]
mov eax, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x124], 7
mov dword [esp + 0x120], ebx
mov word [esp + 0x110], bx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x40ee72
sub eax, esi
sar eax, 1
push eax
push ecx
lea esi, [esp + 0x114]
call fcn.00403640
push 0xe
push str.DWASetup.exe
mov ecx, esi
mov byte [esp + 0x178], 2
call fcn.00408f70
push 1
mov edi, 7
push 0x4650ec
lea esi, [esp + 0x74]
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], bx
call fcn.00403640
mov byte [esp + 0x170], 3
push 1
push 0x4650ec
lea esi, [esp + 0x28]
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ebx
mov word [esp + 0x2c], bx
call fcn.00403640
lea edx, [esp + 0x10c]
push edx
mov eax, esi
push eax
lea edi, [esp + 0x54]
mov byte [esp + 0x178], 4
call fcn.004133f0
lea ecx, [esp + 0x74]
push ecx
push eax
lea edi, [esp + 0x98]
mov byte [esp + 0x180], 5
call fcn.004133f0
add esp, 0x10
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x130]
mov byte [esp + 0x178], 6
call fcn.004016d0
cmp dword [esp + 0xa0], 8
jb 0x40ef5c
mov edx, dword [esp + 0x8c]
push edx
call fcn.00416414
add esp, 4
mov esi, 8
cmp dword [esp + 0x64], esi
mov edi, 7
mov dword [esp + 0xa0], edi
mov dword [esp + 0x9c], ebx
mov word [esp + 0x8c], bx
jb 0x40ef8f
mov eax, dword [esp + 0x50]
push eax
call fcn.00416414
add esp, 4
cmp dword [esp + 0x38], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], bx
jb 0x40efaf
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00416414
add esp, 4
mov byte [esp + 0x170], 2
cmp dword [esp + 0x84], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov word [esp + 0x24], bx
jb 0x40efda
mov edx, dword [esp + 0x70]
push edx
call fcn.00416414
add esp, 4
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x88]
add esi, 0x74
push 0x460c30
xor edi, edi
mov ecx, esi
call fcn.00412960
test eax, eax
je 0x40f588
push 1
push 0x46564c
lea ecx, [esp + 0x130]
call fcn.00408f70
mov edi, 8
cmp dword [esi + 0x18], edi
jb 0x40f01f
mov esi, dword [esi + 4]
jmp 0x40f022
add esi, 4
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f027
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x130]
call fcn.00408f70
cmp dword [esp + 0x124], edi
mov eax, dword [esp + 0x110]
jae 0x40f05b
lea eax, [esp + 0x110]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f123
cmp dword [esp + 0x124], edi
mov eax, dword [esp + 0x110]
jae 0x40f081
lea eax, [esp + 0x110]
push eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x50]
push str.Deployment_Engine_executable_does_not_exist_at_the_location:__s
mov ebx, 0x461120
call fcn.00415ed0
add esp, 8
cmp dword [esp + 0x124], edi
jb 0x40f0b4
mov ecx, dword [esp + 0x110]
push ecx
call fcn.00416414
add esp, 4
xor esi, esi
cmp dword [esp + 0x108], edi
mov ebx, 7
mov dword [esp + 0x124], ebx
mov dword [esp + 0x120], esi
mov word [esp + 0x110], si
jb 0x40f0ea
mov edx, dword [esp + 0xf4]
push edx
call fcn.00416414
add esp, 4
cmp dword [esp + 0x140], edi
mov dword [esp + 0x108], ebx
mov dword [esp + 0x104], esi
mov word [esp + 0xf4], si
jb 0x40f119
mov eax, dword [esp + 0x12c]
push eax
call fcn.00416414
add esp, 4
mov eax, 0xfffffff7
jmp 0x40f626
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x6c]
add esi, 0x58
push 0x460c30
xor edi, edi
mov ecx, esi
call fcn.00412960
test eax, eax
je 0x40f1e2
push 0x11
push str.___overrideFile_
lea ecx, [esp + 0x130]
call fcn.00408f70
cmp dword [esi + 0x18], 8
lea ecx, [esp + 0x18]
push ecx
jb 0x40f166
mov edx, dword [esi + 4]
jmp 0x40f169
lea edx, [esi + 4]
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x88], esp
call fcn.00403070
lea ebx, [esp + 0x6c]
call fcn.0040e950
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0xf8]
mov byte [esp + 0x178], 7
call fcn.004016d0
mov esi, ebx
mov byte [esp + 0x170], 2
call fcn.004016a0
cmp dword [esp + 0x108], 8
mov edx, dword [esp + 0xf4]
jae 0x40f1c2
lea edx, [esp + 0xf4]
lea eax, [esp + 0x128]
push eax
call fcn.00408e80
push 1
push 0x4650ec
lea ecx, [esp + 0x130]
call fcn.00408f70
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0xa4]
add esi, 0x90
push 0x460c30
xor edi, edi
mov ecx, esi
call fcn.00412960
test eax, eax
je 0x40f229
push 1
push 0x46564c
lea ecx, [esp + 0x130]
call fcn.00408f70
cmp dword [esi + 0x18], 8
jb 0x40f2ff
mov edx, dword [esi + 4]
jmp 0x40f302
cmp dword [esi + 0x18], 8
jb 0x40f234
mov eax, dword [esi + 4]
jmp 0x40f237
lea eax, [esi + 4]
mov edi, dword [esp + 0x14]
push eax
mov eax, dword [edi + 0x50]
push str.Install_Source_Path_not_specified._Searching_for_payloads_at_the_launch_path.
mov ebx, 0x461120
call fcn.00415e70
mov edx, dword [edi + 0x2c]
add esp, 8
push esi
call fcn.004030b0
push esi
mov edx, str.payloads
call fcn.00408e80
mov ebx, 8
cmp dword [esi + 0x18], ebx
jb 0x40f274
mov eax, dword [esi + 4]
jmp 0x40f277
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f2a7
cmp dword [esi + 0x18], ebx
jb 0x40f28c
mov esi, dword [esi + 4]
jmp 0x40f28f
add esi, 4
mov eax, dword [edi + 0x50]
push esi
push str.Payloads_does_not_exist_at_current_launch_path:__s
mov ebx, 0x461120
call fcn.00415e70
add esp, 8
jmp 0x40f30f
mov edx, dword [edi + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
test eax, eax
push esi
jne 0x40f2d0
mov edx, str.__installSourcePath_
call fcn.004030b0
mov edx, dword [edi + 0x2c]
push esi
call fcn.00408e80
mov edx, 0x4650ec
jmp 0x40f2dd
mov edx, 0x46521c
call fcn.004030b0
mov edx, dword [edi + 0x2c]
push esi
call fcn.00408e80
lea eax, [esp + 0x128]
push eax
mov edx, 0x46564c
call fcn.00408e80
cmp dword [esi + 0x18], ebx
jb 0x40f2ff
mov edx, dword [esi + 4]
jmp 0x40f302
lea edx, [esi + 4]
lea ecx, [esp + 0x128]
push ecx
call fcn.00408e80
cmp dword [esp + 0x140], 8
mov eax, dword [esp + 0x12c]
jae 0x40f327
lea eax, [esp + 0x12c]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [edx + 0x50]
push str.Deployment_Engine_launched_with_command_:__s
mov ebx, 0x461120
call fcn.00415e40
xor ebx, ebx
add esp, 8
mov dword [esp + 0x15c], 7
mov dword [esp + 0x158], ebx
mov word [esp + 0x148], bx
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x114]
lea ecx, [esp + 0x14c]
mov byte [esp + 0x178], 8
call fcn.004016d0
mov eax, dword [esp + 0x148]
mov edi, 8
cmp dword [esp + 0x15c], edi
jae 0x40f397
lea eax, [esp + 0x148]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [esp + 0x15c], edi
mov ecx, dword [esp + 0x148]
mov dword [esp + 0xa4], 0x44
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
mov word [esp + 0xd6], bx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xd0], 0x101
mov word [esp + 0xd4], 1
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe4], ebx
mov dword [esp + 0xe0], ebx
jae 0x40f40e
lea ecx, [esp + 0x148]
cmp dword [esp + 0x140], edi
mov eax, dword [esp + 0x12c]
jae 0x40f425
lea eax, [esp + 0x12c]
lea edx, [esp + 0x3c]
push edx
lea edx, [esp + 0xa8]
push edx
push ecx
push ebx
push 0x10
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne al
cmp al, bl
mov dword [esp + 0x1c], 0xffffffff
je 0x40f488
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x40f488
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x40]
push eax
call esi
cmp dword [esp + 0x18], ebx
je 0x40f4cb
cmp dword [esp + 0x108], edi
mov eax, dword [esp + 0xf4]
jae 0x40f4a5
lea eax, [esp + 0xf4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x108], edi
mov eax, dword [esp + 0xf4]
jae 0x40f4c4
lea eax, [esp + 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x15c], edi
mov esi, dword [esp + 0x1c]
jb 0x40f4e8
mov ecx, dword [esp + 0x148]
push ecx
call fcn.00416414
add esp, 4
cmp dword [esp + 0x124], edi
mov dword [esp + 0x15c], 7
mov dword [esp + 0x158], ebx
mov word [esp + 0x148], bx
jb 0x40f51b
mov edx, dword [esp + 0x110]
push edx
call fcn.00416414
add esp, 4
cmp dword [esp + 0x108], edi
mov dword [esp + 0x124], 7
mov dword [esp + 0x120], ebx
mov word [esp + 0x110], bx
jb 0x40f54e
mov eax, dword [esp + 0xf4]
push eax
call fcn.00416414
add esp, 4
cmp dword [esp + 0x140], edi
mov dword [esp + 0x108], 7
mov dword [esp + 0x104], ebx
mov word [esp + 0xf4], bx
jb 0x40f581
mov ecx, dword [esp + 0x12c]
push ecx
call fcn.00416414
add esp, 4
mov eax, esi
jmp 0x40f626
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x50]
push 0x465650
mov ebx, 0x461120
call fcn.00415e40
mov edi, 8
add esp, 4
cmp dword [esp + 0x124], edi
jb 0x40f5bf
mov eax, dword [esp + 0x110]
push eax
call fcn.00416414
add esp, 4
xor esi, esi
cmp dword [esp + 0x108], edi
mov ebx, 7
mov dword [esp + 0x124], ebx
mov dword [esp + 0x120], esi
mov word [esp + 0x110], si
jb 0x40f5f5
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.00416414
add esp, 4
cmp dword [esp + 0x140], edi
mov dword [esp + 0x108], ebx
mov dword [esp + 0x104], esi
mov word [esp + 0xf4], si
jb 0x40f624
mov edx, dword [esp + 0x12c]
push edx
call fcn.00416414
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.004321fe
mov esp, ebp
pop ebp
ret