Function at 0x401000
Capabilities:
Check os version
Copy file

Disassembly:
mov eax, 0x2588
call fcn.004024a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2570], rax
lea rcx, [rsp + 0x2171]
xor edx, edx
mov r8d, 0x3ff
mov qword [rsp + 0x25a0], rbx
mov byte [rsp + 0x2170], 0
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x1971]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1970], 0
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x2170]
mov edx, 0x400
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
xor ebx, ebx
mov rcx, rbx
nop
nop
movzx eax, byte [rsp + rcx + 0x2170]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0x196f], al
jne 0x401080
lea rcx, [rsp + 0x971]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x970], bl
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x1d71]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1d70], bl
call sub.MSVCR80.dll_memset
lea rdx, [rsp + 0x1d70]
mov r8d, 0x400
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rsp + 0x1d70]
mov edx, 0x5c
call qword [sym.imp.MSVCR80.dll_strrchr]
test rax, rax
je 0x4010ff
mov byte [rax], bl
mov rcx, rbx
movzx eax, byte [rsp + rcx + 0x1d70]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0x96f], al
jne 0x401102
lea rcx, [rsp + 0x171]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x170], bl
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x571]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x570], bl
call sub.MSVCR80.dll_memset
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.GetNativeSystemInfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x401183
lea rcx, [rsp + 0x20]
call rax
cmp word [rsp + 0x20], 9
sete bl
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x114
mov qword [rsp + 0x25a8], rdi
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x54], 6
jb 0x4013cc
test ebx, ebx
je 0x4012c7
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x970]
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4011e0
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlh_amd64_fre_ampa.sys]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x00403220]
lea rdx, [rsp + 0x970]
mov qword [rdi + 7], rax
mov rax, qword [0x00403228]
mov qword [rdi + 0xf], rax
mov eax, dword [0x00403230]
mov dword [rdi + 0x17], eax
movzx eax, word [0x00403234]
mov word [rdi + 0x1b], ax
movzx eax, byte [0x00403236]
mov byte [rdi + 0x1d], al
xor eax, eax
lea rdi, [rsp + 0x570]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401260
xor eax, eax
lea rdi, [rsp + 0x570]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlh_amd64_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x00403240]
mov qword [rdi + 7], rax
mov rax, qword [0x00403248]
mov qword [rdi + 0xf], rax
mov eax, dword [0x00403250]
mov dword [rdi + 0x17], eax
movzx eax, word [0x00403254]
mov word [rdi + 0x1b], ax
movzx eax, byte [0x00403256]
mov byte [rdi + 0x1d], al
jmp 0x4015c7
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x970]
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4012f0
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlhx86_fre_ampa.sys]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x00403260]
lea rdx, [rsp + 0x970]
mov qword [rdi + 7], rax
mov rax, qword [0x00403268]
mov qword [rdi + 0xf], rax
mov eax, dword [0x00403270]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x00403274]
mov byte [rdi + 0x1b], al
xor eax, eax
lea rdi, [rsp + 0x570]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401370
xor eax, eax
lea rdi, [rsp + 0x570]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlhx86_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x00403280]
mov qword [rdi + 7], rax
mov rax, qword [0x00403288]
mov qword [rdi + 0xf], rax
mov eax, dword [0x00403290]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x00403294]
mov byte [rdi + 0x1b], al
jmp 0x4015c7
test ebx, ebx
je 0x4014c4
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x970]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401400
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewnet_amd64_fre_ampa.sys]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x004032a0]
lea rdx, [rsp + 0x970]
mov qword [rdi + 7], rax
mov rax, qword [0x004032a8]
mov qword [rdi + 0xf], rax
mov rax, qword [0x004032b0]
mov qword [rdi + 0x17], rax
xor eax, eax
lea rdi, [rsp + 0x570]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401470
xor eax, eax
lea rdi, [rsp + 0x570]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewnet_amd64_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x004032c0]
mov qword [rdi + 7], rax
mov rax, qword [0x004032c8]
mov qword [rdi + 0xf], rax
mov rax, qword [0x004032d0]
mov qword [rdi + 0x17], rax
jmp 0x4015c7
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x970]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4014f0
xor eax, eax
lea rdi, [rsp + 0x170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativew2kx86_fre_ampa.sys]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x004032e0]
lea rdx, [rsp + 0x970]
mov qword [rdi + 7], rax
mov rax, qword [0x004032e8]
mov qword [rdi + 0xf], rax
mov eax, dword [0x004032f0]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x004032f4]
mov byte [rdi + 0x1b], al
xor eax, eax
lea rdi, [rsp + 0x570]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401570
xor eax, eax
lea rdi, [rsp + 0x570]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativew2kx86_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x00403300]
mov qword [rdi + 7], rax
mov rax, qword [0x00403308]
mov qword [rdi + 0xf], rax
mov eax, dword [0x00403310]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x00403314]
mov byte [rdi + 0x1b], al
lea rcx, [rsp + 0xd71]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0xd70], 0
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x1171]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1170], 0
call sub.MSVCR80.dll_memset
lea rcx, [rsp + 0x1571]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1570], 0
call sub.MSVCR80.dll_memset
xor eax, eax
lea rdi, [rsp + 0xd70]
mov rcx, 0xffffffffffffffff
lea rdx, [rsp + 0x1970]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x401640
xor eax, eax
lea rdi, [rsp + 0xd70]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._ampa.exe]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
movzx eax, word [0x00403320]
lea rdx, [rsp + 0x1970]
mov word [rdi + 7], ax
xor eax, eax
lea rdi, [rsp + 0x1170]
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4016a0
xor eax, eax
lea rdi, [rsp + 0x1170]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._system32_ampa.sys]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x00403330]
mov qword [rdi + 7], rax
movzx eax, word [0x00403338]
mov word [rdi + 0xf], ax
movzx eax, byte [0x0040333a]
mov byte [rdi + 0x11], al
xor eax, eax
lea rdi, [rsp + 0x1570]
repne scasb al, byte [rdi]
lea rcx, [rsp + 0x1970]
xor edx, edx
nop
nop
movzx eax, byte [rcx + rdx]
add rdx, 1
test al, al
mov byte [rdi + rdx - 2], al
jne 0x401710
xor eax, eax
lea rdi, [rsp + 0x1570]
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str.SysWOW64_ampa.sys]
lea rdx, [rsp + 0xd70]
mov qword [rdi - 1], rax
mov rax, qword [0x00403348]
lea rcx, [rsp + 0x570]
mov qword [rdi + 7], rax
movzx eax, word [0x00403350]
xor r8d, r8d
mov word [rdi + 0xf], ax
movzx eax, byte [0x00403352]
mov byte [rdi + 0x11], al
call qword [sym.imp.KERNEL32.dll_CopyFileA]
mov rdi, qword [rsp + 0x25a8]
test eax, eax
jne 0x4017a2
lea r8, [rsp + 0xd70]
lea rdx, [rsp + 0x570]
lea rcx, str.Failed_to_copy_file_from__s_to__s._n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4017bf
lea r8, [rsp + 0xd70]
lea rdx, [rsp + 0x570]
lea rcx, str.Successfully_copy_file_from__s_to__s._n
call qword [sym.imp.MSVCR80.dll_printf]
lea rdx, [rsp + 0x1170]
lea rcx, [rsp + 0x170]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4017fb
lea r8, [rsp + 0x1170]
lea rdx, [rsp + 0x170]
lea rcx, str.Failed_to_copy_file_from__s_to__s._n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x401818
lea r8, [rsp + 0x1170]
lea rdx, [rsp + 0x170]
lea rcx, str.Successfully_copy_file_from__s_to__s._n
call qword [sym.imp.MSVCR80.dll_printf]
test ebx, ebx
mov rbx, qword [rsp + 0x25a0]
je 0x401867
lea rdx, [rsp + 0x1570]
lea rcx, [rsp + 0x170]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40184a
lea rcx, str.Failed_to_copy_file_from__s_to__s._n
jmp 0x401851
lea rcx, str.Successfully_copy_file_from__s_to__s._n
lea r8, [rsp + 0x1570]
lea rdx, [rsp + 0x170]
call qword [sym.imp.MSVCR80.dll_printf]
mov eax, 1
mov rcx, qword [rsp + 0x2570]
xor rcx, rsp
call fcn.00401bf0
add rsp, 0x2588
ret