Function at 0x40ee40
Capabilities:
Check if file exists
Create process on windows
Delete file
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46be2c
mov eax, dword fs:[0]
push eax
sub esp, 0x884
mov eax, dword [0x4846a0]
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 [0x484034]
mov edx, dword [eax + 0xc]
mov edi, ecx
xor ebx, ebx
mov ecx, 0x484034
mov dword [ebp - 0x818], edi
mov byte [ebp - 0x811], bl
call edx
add eax, 0x10
mov dword [ebp - 0x820], eax
mov dword [ebp - 4], ebx
mov eax, dword [0x484034]
mov edx, dword [eax + 0xc]
mov ecx, 0x484034
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x828], esi
mov byte [ebp - 4], 1
mov eax, dword [0x484034]
mov edx, dword [eax + 0xc]
mov ecx, 0x484034
call edx
add eax, 0x10
mov dword [ebp - 0x81c], eax
push 0x7fe
lea ecx, [ebp - 0x80e]
xor eax, eax
push ebx
mov byte [ebp - 4], 2
push ecx
mov word [ebp - 0x810], ax
call fcn.004534e0
add esp, 0xc
xor eax, eax
push 0x44
lea edx, [ebp - 0x890]
push ebx
push edx
mov dword [ebp - 0x838], eax
mov dword [ebp - 0x834], eax
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x82c], eax
call fcn.004534e0
mov eax, dword [0x484034]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, 0x484034
call edx
add eax, 0x10
mov dword [ebp - 0x844], eax
mov byte [ebp - 4], 3
mov eax, dword [edi + 0x90]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x820]
call fcn.00424980
mov eax, dword [edi + 0xcc]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call fcn.00424980
mov ecx, dword [ebp - 0x820]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov dword [ebp - 0x840], eax
cmp eax, esi
je 0x40efc4
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40efb4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40efb4
call fcn.004267f0
mov dword [ebp - 0x824], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40efa3
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x824]
add ecx, 0x10
mov dword [ebp - 0x828], ecx
jmp 0x40efc4
mov ebx, dword [ecx - 0xc]
push ecx
lea edx, [ebp - 0x828]
push edx
call fcn.00401320
push 0xa
push str._setup.exe
lea ebx, [ebp - 0x828]
call fcn.00424980
mov esi, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x840]
add esi, 0xfffffff0
cmp eax, esi
je 0x40f040
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40f02a
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x40f02a
call fcn.004267f0
mov dword [ebp - 0x824], eax
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x40f019
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [ebp - 0x824]
add eax, 0x10
mov dword [ebp - 0x81c], eax
jmp 0x40f040
mov eax, dword [ebp - 0x820]
mov ebx, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x81c]
push ecx
call fcn.00401320
push 7
push str._sc.exe
lea ebx, [ebp - 0x81c]
call fcn.00424980
mov ebx, dword [ebp - 0x828]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f088
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [edi + 0x120], eax
push str.Failed_to_install_prerequisites._The__s_file_doesnt_exists.
add edi, 0x118
call fcn.00428bb0
add esp, 8
jmp 0x40f318
mov esi, dword [ebp - 0x81c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f0a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
jmp 0x40f06a
mov esi, edi
call fcn.00411030
test al, al
je 0x40f318
xor eax, eax
push 0x44
push eax
lea edx, [ebp - 0x890]
push edx
mov dword [ebp - 0x838], eax
mov dword [ebp - 0x834], eax
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x82c], eax
call fcn.004534e0
add esp, 0xc
push ebx
lea eax, [ebp - 0x810]
push 0x400
push eax
call fcn.0044fc40
mov edx, dword [esi + 0x10c]
mov eax, dword [esi + 0x108]
add esp, 0xc
push 1
push edx
push eax
push 0
push 0
push 0
mov ecx, 6
push 0
push ecx
lea eax, [ebx - 0x10]
mov dword [ebp - 0x890], 0x44
mov dword [ebp - 0x864], 1
mov word [ebp - 0x860], cx
mov dword [ebp - 0x824], esp
mov edi, esp
call fcn.004267f0
push 0x1003
add eax, 0x10
push esi
mov dword [edi], eax
call fcn.0040e360
test al, al
je 0x40f318
lea ecx, [ebp - 0x838]
push ecx
xor esi, esi
lea edx, [ebp - 0x890]
push edx
push esi
push esi
push 0x20
push esi
push esi
push esi
lea eax, [ebp - 0x810]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40f1b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x818]
mov dword [ecx + 0x120], eax
lea edi, [ecx + 0x118]
cmp eax, esi
je 0x40f1ab
push eax
push str.Failed_to_run_setup.exe._Error:__d.
call fcn.00428bb0
add esp, 8
jmp 0x40f318
mov edx, str.Failed_to_run_setup.exe.
jmp 0x40f313
mov ecx, dword [ebp - 0x838]
mov edi, dword [ebp - 0x830]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f207
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x818]
mov dword [ecx + 0x120], eax
lea edi, [ecx + 0x118]
cmp eax, esi
je 0x40f1fd
push eax
push str.Failed_to_wait_for_setup.exe_process_to_complete._Error:__d.
call fcn.00428bb0
add esp, 8
jmp 0x40f318
mov edx, str.Failed_to_wait_for_setup.exe_process_to_complete.
jmp 0x40f313
mov eax, dword [ebp - 0x838]
lea edx, [ebp - 0x83c]
push edx
push eax
mov dword [ebp - 0x83c], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x40f25e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x818]
mov dword [ecx + 0x120], eax
lea edi, [ecx + 0x118]
cmp eax, esi
je 0x40f254
push eax
push str.Failed_to_get_setup.exe_return_code._Error:__d.
call fcn.00428bb0
add esp, 8
jmp 0x40f318
mov edx, str.Failed_to_get_setup.exe_return_code.
jmp 0x40f313
mov eax, dword [ebp - 0x83c]
cmp eax, esi
je 0x40f299
cmp eax, 0x642
mov eax, dword [ebp - 0x818]
mov dword [eax + 0x120], esi
lea esi, [eax + 0x118]
je 0x40f28b
call fcn.004013d0
jmp 0x40f318
mov byte [eax + 0x125], 1
call fcn.004013d0
jmp 0x40f318
push esi
mov esi, dword [ebp - 0x818]
mov ecx, dword [esi + 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40f2ba
mov byte [ebp - 0x811], 1
jmp 0x40f318
cmp eax, 0x102
jne 0x40f2e1
push edi
call fcn.0040f5e0
test al, al
je 0x40f2b1
push edi
call fcn.0040f450
push 0
mov ecx, esi
call fcn.0040f840
call fcn.00409df0
jmp 0x40f318
cmp eax, 0xffffffff
jne 0x40f318
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
mov dword [ecx + 0x120], eax
lea edi, [ecx + 0x118]
test eax, eax
je 0x40f30e
push eax
push str.Failed_to_wait_the_setup.exe_return_code._Error:__d.
call fcn.00428bb0
add esp, 8
jmp 0x40f318
mov edx, str.Failed_to_wait_the_setup.exe_return_code.
call fcn.004011b0
mov eax, dword [ebp - 0x838]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40f32b
push eax
call edi
mov eax, dword [ebp - 0x834]
test eax, eax
je 0x40f338
push eax
call edi
mov esi, dword [ebp - 0x81c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f350
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.004116c0
mov esi, dword [ebp - 0x818]
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x40f393
push 0x4e20
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi + 0x16c]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x16c]
push eax
call edi
mov dword [esi + 0x16c], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x844]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f3b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x81c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f3df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f3ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x840]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f425
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x811]
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.0044ee97
mov esp, ebp
pop ebp
ret