Function at 0x40f9b6
Capabilities:
Set current directory

Disassembly:
mov eax, 0x44c514
call fcn.0042c4cc
sub esp, 0x140
push ebx
push esi
push edi
push str.LaunchIfNoRebootRequired_n
mov ebx, 0x46abb8
mov esi, ecx
push 2
push ebx
mov dword [ebp - 0x24], esi
call fcn.0040121a
mov al, byte [0x46a9b4]
add esp, 0xc
mov byte [ebp - 0x14c], al
xor eax, eax
push 0x40
lea edi, [ebp - 0x14b]
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ax, word [esi + 0x104]
mov edi, str.LaunchIfNotReboot
push eax
lea eax, [ebp - 0x14c]
push 0x104
push eax
push str.launchbase
push edi
push dword [esi + 0xec]
lea ecx, [esi + 0x1fc]
mov dword [ebp - 0x28], ecx
call fcn.0041aa3e
lea eax, [ebp - 0x14c]
push eax
call fcn.0042cc10
test eax, eax
pop ecx
jbe 0x40faeb
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40fb73
lea eax, [ebp - 0x14c]
push eax
push str.Could_not_set_current_directory_to__s_n
push ebx
call fcn.00414d1c
mov al, byte [ebp - 0xd]
add esp, 0xc
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
push 0
call fcn.004151e3
mov esi, str._INSTALLDIR_
push esi
call fcn.0042cc10
pop ecx
push eax
push esi
lea ecx, [ebp - 0x20]
call fcn.00401879
mov ecx, dword [ebp - 0x28]
and dword [ebp - 4], 0
push 0x800
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.0041a897
mov eax, dword [ebp - 0x1c]
mov esi, 0x44f48c
test eax, eax
jne 0x40fabb
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40fadd
cmp dword [ebp - 0x1c], eax
je 0x40face
mov esi, dword [ebp - 0x1c]
push esi
push str.Could_not_set_current_directory_to__s_n
push ebx
call fcn.00414d1c
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x20]
jmp 0x40fb6b
mov al, byte [ebp - 0xd]
push 0
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
call fcn.004151e3
mov esi, str._INSTALLDIR_
push esi
call fcn.0042cc10
pop ecx
push eax
push esi
lea ecx, [ebp - 0x20]
call fcn.00401879
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
push 0x800
mov dword [ebp - 4], 1
push dword [eax + 0xec]
lea eax, [ebp - 0x20]
push eax
call fcn.0041a897
mov eax, dword [ebp - 0x1c]
mov esi, 0x44f48c
test eax, eax
jne 0x40fb40
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40fb62
cmp dword [ebp - 0x1c], eax
je 0x40fb53
mov esi, dword [ebp - 0x1c]
push esi
push str.Could_not_set_current_directory_to__s_n
push ebx
call fcn.00414d1c
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x20]
call fcn.004151e3
mov esi, dword [ebp - 0x24]
mov al, byte [ebp - 0xd]
push 0
lea ecx, [ebp - 0x48]
mov byte [ebp - 0x48], al
call fcn.004151e3
push edi
call fcn.0042cc10
pop ecx
push eax
push edi
lea ecx, [ebp - 0x48]
call fcn.00401879
mov al, byte [ebp - 0xd]
push 0
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 2
mov byte [ebp - 0x38], al
call fcn.004151e3
mov edi, 0x46a9b4
push edi
call fcn.0042cc10
pop ecx
push eax
push edi
lea ecx, [ebp - 0x38]
call fcn.00401879
lea eax, [ebp - 0x38]
push 0
push eax
lea eax, [ebp - 0x48]
push eax
mov ecx, esi
mov byte [ebp - 4], 3
call fcn.0041056f
push 1
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.004151e3
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x48]
call fcn.004151e3
push str.LaunchIfNoRebootRequired_n
push 4
push ebx
call fcn.0040121a
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret