Function at 0x4040fc
Capabilities:
Copy file
Delete directory
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
push edi
call fcn.004063ed
push 0x17
xor esi, esi
mov byte [esp + 0x17], 0
and dword [esp + 0x20], esi
mov ecx, 0x4a3790
pop edx
xor edi, edi
call fcn.00406476
call fcn.00405ec9
mov ebx, eax
test ebx, ebx
jne 0x404144
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
mov esi, str.CouldNotObtainExePath
jmp 0x4042f6
mov ecx, ebx
call fcn.00405f4c
mov edx, eax
mov dword [esp + 0x20], edx
test edx, edx
jne 0x404167
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
mov esi, str.CouldNotObtainDirectory
jmp 0x4042f6
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x18], ecx
test eax, eax
jne 0x40419a
mov ecx, dword [ecx + 0x4a38c0]
call fcn.0040601d
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
add ecx, 4
mov dword [esp + 0x18], ecx
cmp ecx, 0x1c
jb 0x40416f
test eax, eax
je 0x40429f
call fcn.004060d9
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4041b9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
mov esi, str.CreateTempDirFailed
jmp 0x40429f
mov ecx, ebx
call fcn.00405bda
mov dword [esp + 0x24], eax
test eax, eax
je 0x404268
mov ecx, dword [esp + 0x18]
mov edx, eax
call fcn.0040581b
mov dword [esp + 0x14], eax
test eax, eax
je 0x40421b
push str.CopyFile..._n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringW]
push 1
push dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x40421b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
mov ecx, str.CopyFile
call fcn.00405961
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
and dword [esp + 0x14], esi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x404268
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, eax
call fcn.00406213
mov byte [esp + 0x17], al
pop ecx
test al, al
jne 0x404253
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
mov esi, str.CreateProcessFailed
mov ecx, dword [esp + 0x14]
call fcn.0040639f
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
jmp 0x404275
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
mov esi, str.CopyingFileFailed
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
jne 0x404295
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
mov ecx, str.RemoveDirectory
call fcn.00405961
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
test esi, esi
jne 0x4042f6
push ebx
call dword [sym.imp.KERNEL32.DLL_LocalFree]
cmp byte [esp + 0x13], 0
je 0x4042d2
cmp dword [esp + 0x1c], 0x103
jne 0x4042cc
push esi
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push dword [esp + 0x1c]
jmp 0x4042c6
push str.Will_continue_as_Launcher_App_in_this_process._n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringW]
push 0x32
pop edx
mov ecx, 0x4a37f0
call fcn.00406476
call fcn.0046b03b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edx, ebx
mov ecx, esi
call fcn.00405ca0
int3