Function at 0x453920
Capabilities:
Check if file exists
Create process on windows
Get common file path
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da1a3
mov eax, dword fs:[0]
push eax
mov eax, 0x22dc
call fcn.004b4a40
mov eax, dword [0x50f52c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x68]
mov dword [ebp - 0x2278], eax
mov dword [ebp - 4], 2
xor ebx, ebx
push 0x206
lea edx, [ebp - 0x216]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x2254], ebx
mov word [ebp - 0x218], cx
call fcn.004b32f0
mov eax, dword [ebp + 0x1c]
add esp, 0xc
push 1
push 0x4e253c
push eax
push ebx
lea ecx, [ebp + 8]
call fcn.00401fe0
lea esi, [ebx + 8]
test eax, eax
je 0x4539c7
lea ecx, [ebp - 0x218]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x4539c0
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x1ffe
lea eax, [ebp - 0x2216]
xor edx, edx
push ebx
push eax
mov dword [ebp - 0x2258], ebx
mov dword [ebp - 0x2288], ebx
mov dword [ebp - 0x2284], ebx
mov dword [ebp - 0x2280], ebx
mov dword [ebp - 0x227c], ebx
mov word [ebp - 0x2218], dx
call fcn.004b32f0
mov ecx, dword [ebp + 0x1c]
add esp, 0xc
push 1
push 0x4e253c
push ecx
push ebx
lea ecx, [ebp + 8]
call fcn.00401fe0
test eax, eax
je 0x453ac9
mov edx, dword [ebp + 0x1c]
push ebx
push 0x4e25d8
push edx
push ebx
lea ecx, [ebp + 8]
call fcn.00401fe0
test eax, eax
je 0x453ac9
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x453a45
lea ecx, [ebp + 0xc]
lea edx, [ebp - 0x2218]
jmp 0x453a50
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x453a50
lea edi, [ebp - 0x2218]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x453a70
mov eax, dword [0x4e3448]
mov dword [edi], eax
mov eax, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], esi
jae 0x453a8e
lea eax, [ebp + 0x28]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x453a90
lea edi, [ebp - 0x2218]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x453aa6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 8
jmp 0x453af1
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], esi
jae 0x453ad4
lea ecx, [ebp + 0x28]
lea edx, [ebp - 0x2218]
lea ebx, [ebx]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x453ae0
push ebx
lea ecx, [ebp - 0x2218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindOnPathW]
test eax, eax
jne 0x453c03
lea edx, [ebp - 0x2218]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x453c03
push str.SYSTEMACTION
lea ecx, [ebp - 0x2234]
call fcn.004019e0
mov byte [ebp - 4], 0xd
push str.Command_not_found:
lea ecx, [ebp - 0x2250]
call fcn.004019e0
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x2218]
push ecx
push eax
lea edx, [ebp - 0x2274]
push edx
call fcn.00401b00
add esp, 0xc
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x2234]
push ecx
push eax
call fcn.00419d40
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x225c], esi
jb 0x453b87
mov edx, dword [ebp - 0x2270]
push edx
call fcn.004b29fa
add esp, 4
mov edi, 7
xor eax, eax
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], ax
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x2238], esi
jb 0x453bbc
mov ecx, dword [ebp - 0x224c]
push ecx
call fcn.004b29fa
add esp, 4
xor edx, edx
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], dx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x221c], esi
jb 0x453bec
mov eax, dword [ebp - 0x2230]
push eax
call fcn.004b29fa
add esp, 4
xor ecx, ecx
or esi, 0xffffffff
mov word [ebp - 0x2230], cx
mov dword [ebp - 0x2254], esi
jmp 0x453f24
push 1
xor edx, edx
mov edi, 7
push 0x4e3c1c
lea ecx, [ebp - 0x2250]
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], dx
call fcn.00401860
mov byte [ebp - 4], 3
lea eax, [ebp - 0x2218]
push eax
lea ecx, [ebp - 0x2250]
push ecx
lea edx, [ebp - 0x22a4]
push edx
call fcn.00401b00
mov byte [ebp - 4], 4
push 0x4e3cc0
push eax
lea eax, [ebp - 0x2274]
push eax
call fcn.00401b00
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x40]
push ecx
push eax
lea edx, [ebp - 0x2234]
push edx
call fcn.0040a680
add esp, 0x24
mov byte [ebp - 4], 7
cmp dword [ebp - 0x225c], esi
jb 0x453c96
mov eax, dword [ebp - 0x2270]
push eax
call fcn.004b29fa
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], cx
mov byte [ebp - 4], 8
cmp dword [ebp - 0x228c], esi
jb 0x453cc6
mov edx, dword [ebp - 0x22a0]
push edx
call fcn.004b29fa
add esp, 4
xor eax, eax
mov dword [ebp - 0x228c], edi
mov dword [ebp - 0x2290], ebx
mov word [ebp - 0x22a0], ax
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2238], esi
jb 0x453cf6
mov ecx, dword [ebp - 0x224c]
push ecx
call fcn.004b29fa
add esp, 4
mov ecx, dword [ebp - 0x2230]
xor edx, edx
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], dx
cmp dword [ebp - 0x221c], esi
jae 0x453d1f
lea ecx, [ebp - 0x2230]
lea edx, [ebp - 0x2218]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x453d25
push 0xc
xor eax, eax
push str.SYSTEMACTION
lea ecx, [ebp - 0x2250]
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], ax
call fcn.00401860
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2250]
push ecx
lea edx, [ebp - 0x2234]
push edx
call fcn.00419d40
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2238], esi
jb 0x453d8f
mov eax, dword [ebp - 0x224c]
push eax
call fcn.004b29fa
add esp, 4
push 0x40
lea edx, [ebp - 0x22e4]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], cx
call fcn.004b32f0
add esp, 0xc
cmp dword [ebp + 0x60], 2
mov dword [ebp - 0x22e8], 0x44
mov dword [ebp - 0x22bc], 1
jne 0x453ddb
xor eax, eax
mov word [ebp - 0x22b8], ax
jmp 0x453de7
mov ecx, 5
mov word [ebp - 0x22b8], cx
cmp dword [ebp + 0x64], 2
jne 0x453df7
mov dword [ebp - 0x22e0], str.cp_install
lea edx, [ebp - 0x2288]
push edx
lea eax, [ebp - 0x22e8]
push eax
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x2218]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x453efd
push 0xc
xor edx, edx
push str.SYSTEMACTION
lea ecx, [ebp - 0x2274]
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], dx
call fcn.00401860
mov byte [ebp - 4], 0xb
push 0xf
xor eax, eax
push str.Command_failed.
lea ecx, [ebp - 0x2250]
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], ax
call fcn.00401860
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x2274]
push ecx
lea edx, [ebp - 0x2250]
push edx
call fcn.00419d40
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x2238], esi
jb 0x453ea9
mov eax, dword [ebp - 0x224c]
push eax
call fcn.004b29fa
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], cx
mov byte [ebp - 4], 9
cmp dword [ebp - 0x225c], esi
jb 0x453ed9
mov edx, dword [ebp - 0x2270]
push edx
call fcn.004b29fa
add esp, 4
xor eax, eax
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], ax
call fcn.0041a730
mov dword [ebp - 0x2254], 0xfffffffe
mov byte [ebp - 4], 2
cmp dword [ebp - 0x221c], esi
jb 0x453f18
mov ecx, dword [ebp - 0x2230]
push ecx
call fcn.004b29fa
add esp, 4
xor edx, edx
mov word [ebp - 0x2230], dx
or esi, 0xffffffff
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x2280]
mov ecx, dword [ebp - 0x2278]
push 1
push 0x4e253c
push edx
mov dword [ecx], eax
push ebx
lea ecx, [ebp + 8]
mov dword [ebp - 0x2220], ebx
mov dword [ebp - 0x221c], edi
call fcn.00401fe0
test eax, eax
je 0x453f63
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x2254], ebx
je 0x453fd4
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], 8
jb 0x453f81
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004b29fa
add esp, 4
xor edx, edx
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], dx
mov byte [ebp - 4], bl
cmp dword [ebp + 0x3c], 8
jb 0x453fa2
mov eax, dword [ebp + 0x28]
push eax
call fcn.004b29fa
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], cx
mov dword [ebp - 4], esi
cmp dword [ebp + 0x58], 8
jb 0x453fc3
mov edx, dword [ebp + 0x44]
push edx
call fcn.004b29fa
add esp, 4
xor eax, eax
mov word [ebp + 0x44], ax
mov eax, dword [ebp - 0x2254]
jmp 0x4540cd
mov ecx, dword [ebp - 0x2278]
cmp dword [ecx], ebx
je 0x45406d
mov eax, dword [ebp + 0x5c]
cmp eax, ebx
je 0x45421c
mov edx, dword [ebp - 0x2288]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4540f1
mov eax, dword [ebp - 0x2288]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str.SYSTEMACTION
lea ecx, [ebp - 0x2234]
call fcn.004019e0
mov byte [ebp - 4], 0x10
push str.Command_timed_out.
lea ecx, [ebp - 0x22a4]
call fcn.004019e0
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x2234]
push ecx
lea edx, [ebp - 0x22a4]
push edx
call fcn.00419d40
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x22a4]
call fcn.00490320
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2234]
call fcn.00490320
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], 8
jb 0x454083
mov edx, dword [ebp + 0xc]
push edx
call fcn.004b29fa
add esp, 4
xor eax, eax
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], ax
mov byte [ebp - 4], bl
cmp dword [ebp + 0x3c], 8
jb 0x4540a4
mov ecx, dword [ebp + 0x28]
push ecx
call fcn.004b29fa
add esp, 4
xor edx, edx
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], dx
mov dword [ebp - 4], esi
cmp dword [ebp + 0x58], 8
jb 0x4540c5
mov eax, dword [ebp + 0x44]
push eax
call fcn.004b29fa
add esp, 4
xor ecx, ecx
mov word [ebp + 0x44], cx
mov eax, esi
mov dword [ebp + 0x54], ebx
mov dword [ebp + 0x58], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b3057
mov esp, ebp
pop ebp
ret 0x64
mov ecx, dword [ebp - 0x2288]
lea eax, [ebp - 0x2258]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push str.SYSTEMACTION
test eax, eax
je 0x4541be
lea ecx, [ebp - 0x22a4]
call fcn.004019e0
mov byte [ebp - 4], 0x12
lea edx, [ebp - 0x2258]
push edx
lea eax, [ebp - 0x2274]
push eax
call fcn.00419c10
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x2234]
push str.Command_finished._Exit_code:
push ecx
call fcn.00401a30
add esp, 0xc
mov byte [ebp - 4], 0x14
lea edx, [ebp - 0x22a4]
push edx
push eax
call fcn.00419d40
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x2234]
call fcn.00490320
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x2274]
call fcn.00490320
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x22a4]
call fcn.00490320
mov esi, dword [ebp - 0x2258]
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.00490320
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.00490320
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x40]
call fcn.00490320
mov eax, esi
jmp 0x4540d3
lea ecx, [ebp - 0x2234]
call fcn.004019e0
mov byte [ebp - 4], 0x15
push str.Command_finished._Failed_to_get_exit_code.
lea ecx, [ebp - 0x22a4]
call fcn.004019e0
mov byte [ebp - 4], 0x16
lea eax, [ebp - 0x2234]
push eax
lea ecx, [ebp - 0x22a4]
push ecx
call fcn.00419d40
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x22a4]
call fcn.00490320
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2234]
call fcn.00490320
call fcn.0041a730
jmp 0x45406d
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.00490320
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.00490320
mov dword [ebp - 4], esi
lea ecx, [ebp + 0x40]
call fcn.00490320
xor eax, eax
jmp 0x4540d3