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

Disassembly:
mov eax, 0x2008
call fcn.004999f0
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 0x41425c
push edi
call fcn.00413eb0
test eax, eax
je 0x413f68
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esp + 0x2020]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00410320
test eax, eax
je 0x413f56
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x413f49
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.00413eb0
mov ebx, dword [esp + 0x2020]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x41405f
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4b8aac
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 0x413faf
lea eax, [esp + 0x18]
test eax, eax
jne 0x413ff3
xor esi, esi
jmp 0x414000
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
mov ecx, ebx
call fcn.00410320
test eax, eax
je 0x414032
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.00405800
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 0x41405b
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.00414270
add esp, 0xc
lea eax, [esp + 0x1018]
mov ecx, esi
push eax
call fcn.00413eb0
test eax, eax
je 0x414151
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1018]
push ecx
push 0
push 0x4b8aac
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 0x41408d
lea edx, [esp + 0x18]
test edx, edx
jne 0x4140d5
xor edi, edi
mov dword [esp + 0x10], edi
jmp 0x4140e6
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.00410320
test eax, eax
je 0x414128
lea eax, [edi + edi]
lea ecx, [edi + edi + 2]
cmp ecx, eax
jb 0x41411b
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 0x414151
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.00413eb0
test eax, eax
je 0x41425c
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 0x4b8aac
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 0x414193
lea eax, [esp + 0x18]
test eax, eax
jne 0x4141d7
xor ebp, ebp
jmp 0x4141e4
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 0x4141f1
cmp ebp, dword [eax - 4]
jle 0x414204
mov ecx, ebx
call fcn.00406f50
push ebp
mov ecx, ebx
call fcn.00406c50
test eax, eax
je 0x414233
lea eax, [ebp + ebp]
lea edx, [ebp + ebp + 2]
cmp edx, eax
jb 0x414226
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 0x41425c
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