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

Disassembly:
mov eax, 0x2008
call fcn.004a0d60
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 0x41137c
push edi
call fcn.00410fd0
test eax, eax
je 0x411088
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esp + 0x2020]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00404a20
test eax, eax
je 0x411076
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x411069
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.00410fd0
mov ebx, dword [esp + 0x2020]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x41117f
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4c0a54
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 0x4110cf
lea eax, [esp + 0x18]
test eax, eax
jne 0x411113
xor esi, esi
jmp 0x411120
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
mov ecx, ebx
call fcn.00404a20
test eax, eax
je 0x411152
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.004039f0
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 0x41117b
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.00411390
add esp, 0xc
lea eax, [esp + 0x1018]
mov ecx, esi
push eax
call fcn.00410fd0
test eax, eax
je 0x411271
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1018]
push ecx
push 0
push 0x4c0a54
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 0x4111ad
lea edx, [esp + 0x18]
test edx, edx
jne 0x4111f5
xor edi, edi
mov dword [esp + 0x10], edi
jmp 0x411206
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.00404a20
test eax, eax
je 0x411248
lea eax, [edi + edi]
lea ecx, [edi + edi + 2]
cmp ecx, eax
jb 0x41123b
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 0x411271
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.00410fd0
test eax, eax
je 0x41137c
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 0x4c0a54
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 0x4112b3
lea eax, [esp + 0x18]
test eax, eax
jne 0x4112f7
xor ebp, ebp
jmp 0x411304
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 0x411311
cmp ebp, dword [eax - 4]
jle 0x411324
mov ecx, ebx
call fcn.00404ac0
push ebp
mov ecx, ebx
call fcn.00404720
test eax, eax
je 0x411353
lea eax, [ebp + ebp]
lea edx, [ebp + ebp + 2]
cmp edx, eax
jb 0x411346
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 0x41137c
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