Function at 0x429240
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 0x464163
mov eax, dword fs:[0]
push eax
mov eax, 0x22dc
call fcn.004412d0
mov eax, dword [0x47a4a4]
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.00440910
mov eax, dword [ebp + 0x1c]
add esp, 0xc
push 1
push 0x4669d8
push eax
push ebx
lea ecx, [ebp + 8]
call fcn.004027b0
lea esi, [ebx + 8]
test eax, eax
je 0x4292e7
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 0x4292e0
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.00440910
mov ecx, dword [ebp + 0x1c]
add esp, 0xc
push 1
push 0x4669d8
push ecx
push ebx
lea ecx, [ebp + 8]
call fcn.004027b0
test eax, eax
je 0x4293e9
mov edx, dword [ebp + 0x1c]
push ebx
push 0x4669cc
push edx
push ebx
lea ecx, [ebp + 8]
call fcn.004027b0
test eax, eax
je 0x4293e9
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x429365
lea ecx, [ebp + 0xc]
lea edx, [ebp - 0x2218]
jmp 0x429370
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x429370
lea edi, [ebp - 0x2218]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x429390
mov eax, dword [0x466c8c]
mov dword [edi], eax
mov eax, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], esi
jae 0x4293ae
lea eax, [ebp + 0x28]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4293b0
lea edi, [ebp - 0x2218]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4293c6
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 0x429411
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], esi
jae 0x4293f4
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 0x429400
push ebx
lea ecx, [ebp - 0x2218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindOnPathW]
test eax, eax
jne 0x429523
lea edx, [ebp - 0x2218]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x429523
push 0x4678e0
lea ecx, [ebp - 0x2234]
call fcn.00409040
mov byte [ebp - 4], 0xd
push str.Command_not_found:
lea ecx, [ebp - 0x2250]
call fcn.00409040
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x2218]
push ecx
push eax
lea edx, [ebp - 0x2274]
push edx
call fcn.00408820
add esp, 0xc
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x2234]
push ecx
push eax
call fcn.0041ceb0
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x225c], esi
jb 0x4294a7
mov edx, dword [ebp - 0x2270]
push edx
call fcn.0043ff5a
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 0x4294dc
mov ecx, dword [ebp - 0x224c]
push ecx
call fcn.0043ff5a
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 0x42950c
mov eax, dword [ebp - 0x2230]
push eax
call fcn.0043ff5a
add esp, 4
xor ecx, ecx
or esi, 0xffffffff
mov word [ebp - 0x2230], cx
mov dword [ebp - 0x2254], esi
jmp 0x429844
push 1
xor edx, edx
mov edi, 7
push 0x467084
lea ecx, [ebp - 0x2250]
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], dx
call fcn.004073d0
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.00408820
mov byte [ebp - 4], 4
push 0x467088
push eax
lea eax, [ebp - 0x2274]
push eax
call fcn.00408820
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x40]
push ecx
push eax
lea edx, [ebp - 0x2234]
push edx
call fcn.00415120
add esp, 0x24
mov byte [ebp - 4], 7
cmp dword [ebp - 0x225c], esi
jb 0x4295b6
mov eax, dword [ebp - 0x2270]
push eax
call fcn.0043ff5a
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 0x4295e6
mov edx, dword [ebp - 0x22a0]
push edx
call fcn.0043ff5a
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 0x429616
mov ecx, dword [ebp - 0x224c]
push ecx
call fcn.0043ff5a
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 0x42963f
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 0x429645
push 0xc
xor eax, eax
push 0x4678e0
lea ecx, [ebp - 0x2250]
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], ebx
mov word [ebp - 0x224c], ax
call fcn.004073d0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x2250]
push ecx
lea edx, [ebp - 0x2234]
push edx
call fcn.0041ceb0
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2238], esi
jb 0x4296af
mov eax, dword [ebp - 0x224c]
push eax
call fcn.0043ff5a
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.00440910
add esp, 0xc
cmp dword [ebp + 0x60], 2
mov dword [ebp - 0x22e8], 0x44
mov dword [ebp - 0x22bc], 1
jne 0x4296fb
xor eax, eax
mov word [ebp - 0x22b8], ax
jmp 0x429707
mov ecx, 5
mov word [ebp - 0x22b8], cx
cmp dword [ebp + 0x64], 2
jne 0x429717
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 0x42981d
push 0xc
xor edx, edx
push 0x4678e0
lea ecx, [ebp - 0x2274]
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], dx
call fcn.004073d0
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.004073d0
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x2274]
push ecx
lea edx, [ebp - 0x2250]
push edx
call fcn.0041ceb0
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x2238], esi
jb 0x4297c9
mov eax, dword [ebp - 0x224c]
push eax
call fcn.0043ff5a
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 0x4297f9
mov edx, dword [ebp - 0x2270]
push edx
call fcn.0043ff5a
add esp, 4
xor eax, eax
mov dword [ebp - 0x225c], edi
mov dword [ebp - 0x2260], ebx
mov word [ebp - 0x2270], ax
call fcn.0041d8a0
mov dword [ebp - 0x2254], 0xfffffffe
mov byte [ebp - 4], 2
cmp dword [ebp - 0x221c], esi
jb 0x429838
mov ecx, dword [ebp - 0x2230]
push ecx
call fcn.0043ff5a
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 0x4669d8
push edx
mov dword [ecx], eax
push ebx
lea ecx, [ebp + 8]
mov dword [ebp - 0x2220], ebx
mov dword [ebp - 0x221c], edi
call fcn.004027b0
test eax, eax
je 0x429883
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x2254], ebx
je 0x4298f4
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], 8
jb 0x4298a1
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0043ff5a
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 0x4298c2
mov eax, dword [ebp + 0x28]
push eax
call fcn.0043ff5a
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 0x4298e3
mov edx, dword [ebp + 0x44]
push edx
call fcn.0043ff5a
add esp, 4
xor eax, eax
mov word [ebp + 0x44], ax
mov eax, dword [ebp - 0x2254]
jmp 0x4299ed
mov ecx, dword [ebp - 0x2278]
cmp dword [ecx], ebx
je 0x42998d
mov eax, dword [ebp + 0x5c]
cmp eax, ebx
je 0x429b3c
mov edx, dword [ebp - 0x2288]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x429a11
mov eax, dword [ebp - 0x2288]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x4678e0
lea ecx, [ebp - 0x2234]
call fcn.00409040
mov byte [ebp - 4], 0x10
push str.Command_timed_out.
lea ecx, [ebp - 0x22a4]
call fcn.00409040
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x2234]
push ecx
lea edx, [ebp - 0x22a4]
push edx
call fcn.0041ceb0
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x22a4]
call fcn.004052b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2234]
call fcn.004052b0
mov byte [ebp - 4], 1
cmp dword [ebp + 0x20], 8
jb 0x4299a3
mov edx, dword [ebp + 0xc]
push edx
call fcn.0043ff5a
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 0x4299c4
mov ecx, dword [ebp + 0x28]
push ecx
call fcn.0043ff5a
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 0x4299e5
mov eax, dword [ebp + 0x44]
push eax
call fcn.0043ff5a
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.00440721
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 0x4678e0
test eax, eax
je 0x429ade
lea ecx, [ebp - 0x22a4]
call fcn.00409040
mov byte [ebp - 4], 0x12
lea edx, [ebp - 0x2258]
push edx
lea eax, [ebp - 0x2274]
push eax
call fcn.0041cde0
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x2234]
push str.Command_finished._Exit_code:
push ecx
call fcn.00409700
add esp, 0xc
mov byte [ebp - 4], 0x14
lea edx, [ebp - 0x22a4]
push edx
push eax
call fcn.0041ceb0
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x2234]
call fcn.004052b0
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x2274]
call fcn.004052b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x22a4]
call fcn.004052b0
mov esi, dword [ebp - 0x2258]
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.004052b0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.004052b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x40]
call fcn.004052b0
mov eax, esi
jmp 0x4299f3
lea ecx, [ebp - 0x2234]
call fcn.00409040
mov byte [ebp - 4], 0x15
push str.Command_finished._Failed_to_get_exit_code.
lea ecx, [ebp - 0x22a4]
call fcn.00409040
mov byte [ebp - 4], 0x16
lea eax, [ebp - 0x2234]
push eax
lea ecx, [ebp - 0x22a4]
push ecx
call fcn.0041ceb0
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x22a4]
call fcn.004052b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2234]
call fcn.004052b0
call fcn.0041d8a0
jmp 0x42998d
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.004052b0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x24]
call fcn.004052b0
mov dword [ebp - 4], esi
lea ecx, [ebp + 0x40]
call fcn.004052b0
xor eax, eax
jmp 0x4299f3