Function at 0x404040
Capabilities:
Check if file exists
Check mutex on windows
Get common file path
Get disk size
Get file attributes
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2a8
mov eax, dword [0x443740]
xor eax, esp
mov dword [esp + 0x2a4], eax
push esi
mov esi, dword [ebp + 0x10]
lea eax, [esp + 0x9c]
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], 0
mov word [esp + 0x70], ax
cmp word [esp + 0xa0], ax
jne 0x40409d
xor ecx, ecx
jmp 0x4040b6
lea ecx, [esp + 0xa0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4040a7
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x78]
call fcn.00406bf0
push 1
push 0
push 0x43b8b4
lea ecx, [esp + 0x7c]
call fcn.00404770
cmp eax, 0xffffffff
jne 0x4040e6
xor esi, esi
jmp 0x40436f
inc eax
lea ecx, [esp + 0x70]
push eax
push 0
lea eax, [esp + 0x60]
push eax
call fcn.00404430
cmp dword [esp + 0x6c], 8
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x28]
lea eax, [esp + 0x60]
cmovae eax, dword [esp + 0x60]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40414e
cmp dword [esp + 0x14], 0
ja 0x40414e
jb 0x404133
cmp dword [esp + 0x10], 0xa000000
jae 0x40414e
push 0x10
push str.Insufficient_Disk_Space
push str.Could_not_install_MoboPlay_due_to_insufficient_storage_in_system_drive_partition__C:_._Please_ensure_the_device_has_at_least_160_MB_of_free_space.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor esi, esi
jmp 0x404345
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x88]
push esi
mov dword [0x447140], eax
call fcn.00406cf0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x90]
mov ecx, 0x444624
push eax
call fcn.00406870
push 0x444624
mov edx, str.Setup.exe_lpCmdLine
lea ecx, [esp + 0x44]
call fcn.004050f0
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esp + 0x44]
add esp, 4
cmp dword [esp + 0x54], 8
cmovae eax, dword [esp + 0x40]
push eax
call esi
call fcn.00402ad0
push str.AssistantSetup_E87811BD_D25F_482B_9669_5ACF6D890CFD
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4041d0
mov ecx, edi
call fcn.00402ff0
lea ecx, [esp + 0x28]
call fcn.00403110
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esp + 0x48]
push eax
call fcn.00406870
call fcn.00403810
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
mov word [ecx], ax
lea eax, [esp + 0x48]
push eax
call fcn.00406870
call fcn.00403da0
add esp, 0x18
mov dword [esp + 8], 0
push 0xffffffffffffffff
push dword [0x44713c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 8]
push eax
push dword [0x44713c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x3c], 8
lea eax, [esp + 0x28]
cmovae eax, dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40429f
test al, 0x10
je 0x40429f
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esp + 0x48]
push eax
call fcn.00406870
call fcn.004101e0
add esp, 0x18
cmp dword [esp + 8], 1
jne 0x4042ad
push str.Setup.exe_main_result_is_1
jmp 0x4042b2
push str.Setup.exe_main_result_is_0
call esi
cmp dword [esp + 0x3c], 8
mov esi, dword [esp + 8]
jb 0x4042cb
push dword [esp + 0x28]
call fcn.0041bbd5
add esp, 4
xor eax, eax
mov dword [esp + 0x3c], 7
cmp dword [esp + 0x54], 8
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
jb 0x4042f5
push dword [esp + 0x40]
call fcn.0041bbd5
add esp, 4
xor eax, eax
mov dword [esp + 0x54], 7
cmp dword [esp + 0x9c], 8
mov dword [esp + 0x50], 0
mov word [esp + 0x40], ax
jb 0x404325
push dword [esp + 0x88]
call fcn.0041bbd5
add esp, 4
xor eax, eax
mov dword [esp + 0x9c], 7
mov dword [esp + 0x98], 0
mov word [esp + 0x88], ax
cmp dword [esp + 0x6c], 8
jb 0x404358
push dword [esp + 0x58]
call fcn.0041bbd5
add esp, 4
xor eax, eax
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], 0
mov word [esp + 0x58], ax
cmp dword [esp + 0x84], 8
jb 0x404385
push dword [esp + 0x70]
call fcn.0041bbd5
add esp, 4
mov ecx, dword [esp + 0x2ac]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.0041bbda
mov esp, ebp
pop ebp
ret 0x10