Function at 0x422200
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 0x48637e
mov eax, dword fs:[0]
push eax
mov eax, 0x22f8
call fcn.00459bd0
mov eax, dword [0x4ab4ec]
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 - 0x2294], 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 - 0x2270], ebx
mov word [ebp - 0x218], cx
call fcn.004578d0
mov eax, dword [ebp + 0x1c]
add esp, 0xc
push 1
push 0x48e874
push eax
push ebx
lea ecx, [ebp + 8]
call fcn.0040df90
test eax, eax
je 0x4222ab
lea ecx, [ebp - 0x218]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [ebp + 0xc]
mov edi, 8
cmp dword [ebp + 0x20], edi
jae 0x4222a2
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x4222b0
mov edi, 8
push 0x1ffe
lea eax, [ebp - 0x2216]
xor edx, edx
push ebx
push eax
mov dword [ebp - 0x2274], ebx
mov dword [ebp - 0x22a4], ebx
mov dword [ebp - 0x22a0], ebx
mov dword [ebp - 0x229c], ebx
mov dword [ebp - 0x2298], ebx
mov word [ebp - 0x2218], dx
call fcn.004578d0
mov esi, 7
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x2238], esi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], cx
mov byte [ebp - 4], 3
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x422358
push 1
push 0x48e874
push eax
push ebx
lea ecx, [ebp + 8]
call fcn.0040df90
test eax, eax
je 0x422358
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 8]
push edx
lea ecx, [ebp - 0x2250]
call fcn.00404f40
lea eax, [ebp - 0x2250]
push eax
call fcn.0047a790
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 0x24]
push ecx
lea ecx, [ebp - 0x2250]
call fcn.00403d40
jmp 0x42236a
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0x24]
push edx
lea ecx, [ebp - 0x2250]
call fcn.00404f40
mov ecx, dword [ebp - 0x224c]
cmp dword [ebp - 0x2238], edi
jae 0x42237e
lea ecx, [ebp - 0x224c]
lea edx, [ebp - 0x2218]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x422384
push ebx
lea eax, [ebp - 0x2218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindOnPathW]
test eax, eax
jne 0x4224a3
lea ecx, [ebp - 0x2218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4224a3
push str.SYSTEMACTION
lea ecx, [ebp - 0x2234]
call fcn.00405d80
mov byte [ebp - 4], 0xe
push 0x48f898
lea ecx, [ebp - 0x226c]
call fcn.00405d80
mov byte [ebp - 4], 0xf
lea edx, [ebp - 0x2218]
push edx
push eax
lea eax, [ebp - 0x2290]
push eax
call fcn.004059f0
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x2234]
push ecx
push eax
call fcn.0041d4f0
add esp, 0x14
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0x2278], edi
jb 0x42242b
mov edx, dword [ebp - 0x228c]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov dword [ebp - 0x2278], esi
mov dword [ebp - 0x227c], ebx
mov word [ebp - 0x228c], ax
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x2254], edi
jb 0x42245b
mov ecx, dword [ebp - 0x2268]
push ecx
call fcn.00456b63
add esp, 4
xor edx, edx
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], dx
mov byte [ebp - 4], 3
cmp dword [ebp - 0x221c], edi
jb 0x42248b
mov eax, dword [ebp - 0x2230]
push eax
call fcn.00456b63
add esp, 4
xor ecx, ecx
mov word [ebp - 0x2230], cx
mov dword [ebp - 0x2270], 0xffffffff
jmp 0x4227c5
push 1
xor edx, edx
push 0x48f894
lea ecx, [ebp - 0x226c]
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], dx
call fcn.00405130
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2218]
push eax
lea ecx, [ebp - 0x226c]
push ecx
lea edx, [ebp - 0x22c0]
push edx
call fcn.004059f0
mov byte [ebp - 4], 5
push 0x48f88c
push eax
lea eax, [ebp - 0x2290]
push eax
call fcn.004059f0
mov byte [ebp - 4], 6
lea ecx, [ebp + 0x40]
push ecx
push eax
lea edx, [ebp - 0x2234]
push edx
call fcn.00406120
add esp, 0x24
mov byte [ebp - 4], 8
cmp dword [ebp - 0x2278], edi
jb 0x422531
mov eax, dword [ebp - 0x228c]
push eax
call fcn.00456b63
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x2278], esi
mov dword [ebp - 0x227c], ebx
mov word [ebp - 0x228c], cx
mov byte [ebp - 4], 9
cmp dword [ebp - 0x22a8], edi
jb 0x422561
mov edx, dword [ebp - 0x22bc]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov dword [ebp - 0x22a8], esi
mov dword [ebp - 0x22ac], ebx
mov word [ebp - 0x22bc], ax
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x2254], edi
jb 0x422591
mov ecx, dword [ebp - 0x2268]
push ecx
call fcn.00456b63
add esp, 4
mov ecx, dword [ebp - 0x2230]
xor edx, edx
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], dx
cmp dword [ebp - 0x221c], edi
jae 0x4225ba
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 0x4225c0
push 0xc
xor eax, eax
push str.SYSTEMACTION
lea ecx, [ebp - 0x226c]
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], ax
call fcn.00405130
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x226c]
push ecx
lea edx, [ebp - 0x2234]
push edx
call fcn.0041d4f0
add esp, 8
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x2254], edi
jb 0x42262d
mov eax, dword [ebp - 0x2268]
push eax
call fcn.00456b63
add esp, 4
push 0x40
lea edx, [ebp - 0x2300]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], cx
call fcn.004578d0
mov eax, 2
add esp, 0xc
mov dword [ebp - 0x2304], 0x44
mov dword [ebp - 0x22d8], 1
cmp dword [ebp + 0x60], eax
jne 0x42267d
xor ecx, ecx
mov word [ebp - 0x22d4], cx
jmp 0x422689
mov edx, 5
mov word [ebp - 0x22d4], dx
cmp dword [ebp + 0x64], eax
jne 0x422698
mov dword [ebp - 0x22fc], str.cp_install
lea eax, [ebp - 0x22a4]
push eax
lea ecx, [ebp - 0x2304]
push ecx
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
lea edx, [ebp - 0x2218]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4227a1
push 0xc
push str.SYSTEMACTION
lea ecx, [ebp - 0x2290]
mov dword [ebp - 0x2278], esi
mov dword [ebp - 0x227c], ebx
mov word [ebp - 0x228c], ax
call fcn.00405130
mov byte [ebp - 4], 0xc
xor ecx, ecx
push 0xd
mov word [ebp - 0x2268], cx
push str.CreateProcess
lea ecx, [ebp - 0x226c]
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
call fcn.00405130
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x2290]
push edx
lea eax, [ebp - 0x226c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041d9d0
add esp, 0xc
mov byte [ebp - 4], 0xc
cmp dword [ebp - 0x2254], edi
jb 0x422752
mov ecx, dword [ebp - 0x2268]
push ecx
call fcn.00456b63
add esp, 4
xor edx, edx
mov dword [ebp - 0x2254], esi
mov dword [ebp - 0x2258], ebx
mov word [ebp - 0x2268], dx
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x2278], edi
jb 0x422782
mov eax, dword [ebp - 0x228c]
push eax
call fcn.00456b63
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x2278], esi
mov dword [ebp - 0x227c], ebx
mov word [ebp - 0x228c], cx
mov dword [ebp - 0x2270], 0xfffffffe
mov byte [ebp - 4], 3
cmp dword [ebp - 0x221c], edi
jb 0x4227bc
mov edx, dword [ebp - 0x2230]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov word [ebp - 0x2230], ax
mov ecx, dword [ebp - 0x229c]
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x2294]
push 1
push 0x48e874
push eax
mov dword [edx], ecx
push ebx
lea ecx, [ebp + 8]
mov dword [ebp - 0x2220], ebx
mov dword [ebp - 0x221c], esi
call fcn.0040df90
test eax, eax
je 0x422804
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x2270], ebx
je 0x4228aa
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2238], edi
jb 0x42282b
mov edx, dword [ebp - 0x224c]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov dword [ebp - 0x2238], esi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], ax
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], edi
jb 0x422855
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00456b63
add esp, 4
xor edx, edx
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], dx
mov byte [ebp - 4], bl
cmp dword [ebp + 0x3c], edi
jb 0x422875
mov eax, dword [ebp + 0x28]
push eax
call fcn.00456b63
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], cx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x58], edi
jb 0x422899
mov edx, dword [ebp + 0x44]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov word [ebp + 0x44], ax
mov eax, dword [ebp - 0x2270]
jmp 0x4229d8
mov ecx, dword [ebp - 0x2294]
cmp dword [ecx], ebx
je 0x422946
mov eax, dword [ebp + 0x5c]
cmp eax, ebx
je 0x422b1f
mov edx, dword [ebp - 0x22a4]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4229fa
mov eax, dword [ebp - 0x22a4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str.SYSTEMACTION
lea ecx, [ebp - 0x2234]
call fcn.00405d80
mov byte [ebp - 4], 0x11
push str.Command_timed_out.
lea ecx, [ebp - 0x22c0]
call fcn.00405d80
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x2234]
push ecx
lea edx, [ebp - 0x22c0]
push edx
call fcn.0041d4f0
add esp, 8
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x22c0]
call fcn.00403ac0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2234]
call fcn.00403ac0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2238], edi
jb 0x422961
mov edx, dword [ebp - 0x224c]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov dword [ebp - 0x2238], esi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], ax
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], edi
jb 0x42298b
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00456b63
add esp, 4
xor edx, edx
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], dx
mov byte [ebp - 4], bl
cmp dword [ebp + 0x3c], edi
jb 0x4229ab
mov eax, dword [ebp + 0x28]
push eax
call fcn.00456b63
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], cx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x58], edi
jb 0x4229cf
mov edx, dword [ebp + 0x44]
push edx
call fcn.00456b63
add esp, 4
xor eax, eax
mov word [ebp + 0x44], ax
or eax, 0xffffffff
mov dword [ebp + 0x54], ebx
mov dword [ebp + 0x58], esi
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.0045718a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x22a4]
lea eax, [ebp - 0x2274]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push str.SYSTEMACTION
test eax, eax
je 0x422ad6
lea ecx, [ebp - 0x22c0]
call fcn.00405d80
mov byte [ebp - 4], 0x13
lea edx, [ebp - 0x2274]
push edx
lea eax, [ebp - 0x2290]
push eax
call fcn.0041c690
mov byte [ebp - 4], 0x14
push eax
lea ecx, [ebp - 0x2234]
push str.Command_finished._Exit_code:
push ecx
call fcn.00406340
mov byte [ebp - 4], 0x15
lea edx, [ebp - 0x22c0]
push edx
push eax
call fcn.0041d4f0
add esp, 0x1c
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x2234]
call fcn.00403ac0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x2290]
call fcn.00403ac0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x22c0]
call fcn.00403ac0
mov esi, dword [ebp - 0x2274]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2250]
call fcn.00403ac0
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.00403ac0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.00403ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x40]
call fcn.00403ac0
mov eax, esi
jmp 0x4229de
lea ecx, [ebp - 0x2234]
call fcn.00405d80
mov byte [ebp - 4], 0x16
push 0x48f7e4
lea ecx, [ebp - 0x22c0]
call fcn.00405d80
mov byte [ebp - 4], 0x17
lea eax, [ebp - 0x2234]
push eax
lea ecx, [ebp - 0x22c0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041d9d0
add esp, 0xc
mov byte [ebp - 4], 0x16
jmp 0x42292c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2250]
call fcn.00403ac0
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.00403ac0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.00403ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x40]
call fcn.00403ac0
xor eax, eax
jmp 0x4229de