Function at 0x414c90
Capabilities:
Check if file exists
Copy file
Get common file path

Disassembly:
mov eax, 0x2008
call fcn.004a2ae0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x201c]
mov esi, ecx
test edi, edi
mov dword [esp + 0x14], esi
je 0x41500c
push edi
call fcn.00414c60
test eax, eax
je 0x414d18
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esp + 0x2020]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.004059f0
test eax, eax
je 0x414d06
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x414cf9
mov ecx, eax
mov esi, edi
mov edi, dword [ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [eax + edx], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1018]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1018]
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x1018]
push ecx
mov ecx, esi
call fcn.00414c60
mov ebx, dword [esp + 0x2020]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x414e0f
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4c2e04
push eax
call ebp
lea ecx, [esp + 0x18]
push str..exe
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x414d5f
lea eax, [esp + 0x18]
test eax, eax
jne 0x414da3
xor esi, esi
jmp 0x414db0
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
mov ecx, ebx
call fcn.004059f0
test eax, eax
je 0x414de2
mov ecx, dword [ebx]
lea edi, [esi + esi]
lea edx, [esp + 0x18]
push edi
lea eax, [esi + esi + 2]
push edx
push eax
push ecx
call fcn.00404a40
mov edx, dword [ebx]
add esp, 0x10
mov dword [edx - 8], esi
mov eax, dword [ebx]
mov word [edi + eax], 0
mov eax, dword [ebx]
mov ecx, dword [esp + 0x201c]
push 1
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x414e0b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x1018]
push 0x800
push edx
push 0x23
call fcn.00415020
add esp, 0xc
lea eax, [esp + 0x1018]
mov ecx, esi
push eax
call fcn.00414c60
test eax, eax
je 0x414f01
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1018]
push ecx
push 0
push 0x4c2e04
push edx
call ebp
lea eax, [esp + 0x18]
push str..exe
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x414e3d
lea edx, [esp + 0x18]
test edx, edx
jne 0x414e85
xor edi, edi
mov dword [esp + 0x10], edi
jmp 0x414e96
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x10], eax
mov edi, eax
push edi
mov ecx, ebx
call fcn.004059f0
test eax, eax
je 0x414ed8
lea eax, [edi + edi]
lea ecx, [edi + edi + 2]
cmp ecx, eax
jb 0x414ecb
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov ecx, dword [ebx]
mov dword [ecx - 8], edi
mov edx, dword [ebx]
mov word [eax + edx], 0
mov eax, dword [ebx]
push 1
push eax
mov eax, dword [esp + 0x2024]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x414f01
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
lea ecx, [esp + 0x18]
push 0x800
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esp + 0x1018]
mov ecx, esi
push edx
call fcn.00414c60
test eax, eax
je 0x41500c
lea eax, [esp + 0x1018]
push str.TEMP
lea ecx, [esp + 0x101c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4c2e04
push eax
call ebp
lea ecx, [esp + 0x18]
push str..exe
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x414f43
lea eax, [esp + 0x18]
test eax, eax
jne 0x414f87
xor ebp, ebp
jmp 0x414f94
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x414fa1
cmp ebp, dword [eax - 4]
jle 0x414fb4
mov ecx, ebx
call fcn.00405a90
push ebp
mov ecx, ebx
call fcn.004056f0
test eax, eax
je 0x414fe3
lea eax, [ebp + ebp]
lea edx, [ebp + ebp + 2]
cmp edx, eax
jb 0x414fd6
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [eax + edx], 0
mov ebx, dword [ebx]
mov eax, dword [esp + 0x201c]
push 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x41500c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2008
ret 8