Function at 0x40a760
Capabilities:
Copy file
Get common file path

Disassembly:
mov eax, 0x2004
call fcn.0044c0a0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2014]
mov ebp, ecx
push edi
test esi, esi
mov dword [esp + 0x10], ebp
je 0x40aac5
push esi
call fcn.0040a730
test eax, eax
je 0x40a7e6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esp + 0x201c]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00403900
test eax, eax
je 0x40a7d4
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x40a7c7
mov edi, dword [ebx]
mov ecx, eax
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, 0x2004
ret 8
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1014]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1014]
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x1014]
push ecx
mov ecx, ebp
call fcn.0040a730
mov ebx, dword [esp + 0x201c]
test eax, eax
je 0x40a8d3
mov eax, dword [0x4886f4]
lea edx, [esp + 0x14]
mov ecx, eax
inc eax
mov dword [0x4886f4], eax
push edx
push ecx
lea eax, [esp + 0x101c]
push 0x488798
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [esp + 0x14]
push str..exe
push ecx
call fcn.0044b60a
lea edx, [esp + 0x1c]
add esp, 8
test edx, edx
jne 0x40a86b
xor esi, esi
jmp 0x40a878
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push esi
mov ecx, ebx
call fcn.00403900
test eax, eax
je 0x40a8aa
mov eax, dword [ebx]
lea edi, [esi + esi]
lea ecx, [esp + 0x14]
push edi
lea edx, [esi + esi + 2]
push ecx
push edx
push eax
call fcn.004029e0
mov ecx, dword [ebx]
add esp, 0x10
mov dword [ecx - 8], esi
mov edx, dword [ebx]
mov word [edi + edx], 0
mov eax, dword [ebx]
push 1
push eax
mov eax, dword [esp + 0x2020]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40a8d3
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2004
ret 8
lea ecx, [esp + 0x1014]
push 0x800
push ecx
push 0x23
call fcn.0040aae0
add esp, 0xc
lea edx, [esp + 0x1014]
mov ecx, ebp
push edx
call fcn.0040a730
test eax, eax
je 0x40a9ba
mov eax, dword [0x4886f4]
mov ecx, eax
inc eax
mov dword [0x4886f4], eax
lea eax, [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x101c]
push 0x488798
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea edx, [esp + 0x14]
push str..exe
push edx
call fcn.0044b60a
lea eax, [esp + 0x1c]
add esp, 8
test eax, eax
jne 0x40a945
xor ebp, ebp
jmp 0x40a952
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00403900
test eax, eax
je 0x40a98d
lea eax, [ebp + ebp]
lea edx, [ebp + ebp + 2]
cmp edx, eax
jb 0x40a980
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x14]
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 eax, dword [ebx]
push 1
push eax
mov eax, dword [esp + 0x2020]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40a9b6
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2004
ret 8
mov ebp, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 0x800
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esp + 0x1014]
mov ecx, ebp
push edx
call fcn.0040a730
test eax, eax
je 0x40aac5
lea eax, [esp + 0x1014]
push str.TEMP
lea ecx, [esp + 0x1018]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov eax, dword [0x4886f4]
lea edx, [esp + 0x14]
mov ecx, eax
inc eax
mov dword [0x4886f4], eax
push edx
push ecx
lea eax, [esp + 0x101c]
push 0x488798
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [esp + 0x14]
push str..exe
push ecx
call fcn.0044b60a
lea edx, [esp + 0x1c]
add esp, 8
test edx, edx
jne 0x40aa40
xor ebp, ebp
jmp 0x40aa4d
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x40aa5a
cmp ebp, dword [eax - 4]
jle 0x40aa6d
mov ecx, ebx
call fcn.004039a0
push ebp
mov ecx, ebx
call fcn.004036b0
test eax, eax
je 0x40aa9c
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x40aa8f
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x14]
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 + 0x2018]
push 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40aac5
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2004
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2004
ret 8