Function at 0x401000
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Set file attributes
Set registry value

Disassembly:
sub esp, 0x148
mov ecx, 0xffffffff
sub eax, eax
nop
push ebx
push esi
push edi
push ebp
mov edi, 0x4076e0
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + 0x4076de]
cmp al, 0x5c
je 0x401058
mov edi, 0x4060ec
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
mov edi, 0x4076e0
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Loader.exe_U
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
mov edi, 0x4076e0
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x10]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionUninstallPuzzle_Bobble
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov ecx, dword [esp + 0x10]
push 0x29
push str.Puzzle_Bobble__Remove_only__requires_CD_
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
mov edi, 0x4076e0
push 0
push str.DisplayName
push ecx
call esi
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x4076e0
mov ecx, dword [esp + 0x18]
push 1
push 0
push str.UninstallString
push ecx
call esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x407310
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40111d
push 0x407310
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401160
push 0x104
mov edi, 0x4060ec
push 0x407310
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
mov edi, 0x407310
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.PB.exe
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
mov edi, 0x407310
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push pe_nt_image_headers32
and ecx, 3
push 0x407310
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call esi
push 0
push 0x407310
push str.PB.exe
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push pe_nt_image_headers32
push 0x407310
call esi
lea eax, [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
push 0x407310
call ebp
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x401202
push 0x30
push str.Puzzle_Bobble
push 0x407420
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x148
ret
lea eax, [esp + 0x14]
mov edi, 0x407310
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x4078f0
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x148
ret