Function at 0x140254630
Capabilities:
Check os version
Copy file

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x2160
call sub.ntdll.dll___chkstk
sub rsp, rax
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x2150], rax
lea rcx, [rsp + 0x1d51]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1d50], 0
call sub.ntdll.dll_memset
lea rcx, [rsp + 0xd51]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0xd50], 0
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x1d50]
mov edx, 0x400
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
xor esi, esi
mov rcx, rsi
nop
movzx eax, byte [rsp + rcx + 0x1d50]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0xd4f], al
jne 0x1402546b0
lea rcx, [rsp + 0x951]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x950], sil
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x1951]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1950], sil
call sub.ntdll.dll_memset
lea rdx, [rsp + 0x1950]
mov r8d, 0x400
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rsp + 0x1950]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
je 0x140254732
mov byte [rax], sil
mov rcx, rsi
nop
nop
nop
movzx eax, byte [rsp + rcx + 0x1950]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0x94f], al
jne 0x140254740
lea rcx, [rsp + 0x151]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + reloc.MFC80U.DLL_Ordinal_336], sil
call sub.ntdll.dll_memset
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_1361]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + Ordinal_1362], sil
call sub.ntdll.dll_memset
call fcn.140225970
lea rcx, [rsp + 0x20]
xor edx, edx
mov r8d, Ordinal_280
mov edi, eax
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], Ordinal_280
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x24], 6
jb 0x1402549b9
test edi, edi
je 0x1402548d4
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x950]
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x1402547f0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlh_amd64_fre_ampa.sys]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x140376388]
lea rdx, [rsp + 0x950]
mov qword [rdi + 7], rax
mov rax, qword [0x140376390]
mov qword [rdi + 0xf], rax
mov eax, dword [0x140376398]
mov dword [rdi + 0x17], eax
movzx eax, word [0x14037639c]
mov word [rdi + 0x1b], ax
movzx eax, byte [0x14037639e]
mov byte [rdi + 0x1d], al
xor eax, eax
lea rdi, [rsp + 0x550]
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 0x140254870
xor eax, eax
lea rdi, [rsp + 0x550]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlh_amd64_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x1403763a8]
mov qword [rdi + 7], rax
mov rax, qword [0x1403763b0]
mov qword [rdi + 0xf], rax
mov eax, dword [0x1403763b8]
mov dword [rdi + 0x17], eax
movzx eax, word [0x1403763bc]
mov word [rdi + 0x1b], ax
movzx eax, byte [0x1403763be]
mov byte [rdi + 0x1d], al
jmp 0x140254b84
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x950]
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x1402548f0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlhx86_fre_ampa.sys]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x1403763c8]
lea rdx, [rsp + 0x950]
mov qword [rdi + 7], rax
mov rax, qword [0x1403763d0]
mov qword [rdi + 0xf], rax
mov eax, dword [0x1403763d8]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x1403763dc]
mov byte [rdi + 0x1b], al
xor eax, eax
lea rdi, [rsp + 0x550]
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 0x140254960
xor eax, eax
lea rdi, [rsp + 0x550]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewlhx86_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x1403763e8]
mov qword [rdi + 7], rax
mov rax, qword [0x1403763f0]
mov qword [rdi + 0xf], rax
mov eax, dword [0x1403763f8]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x1403763fc]
mov byte [rdi + 0x1b], al
jmp 0x140254b84
test edi, edi
je 0x140254aa1
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x950]
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x1402549e0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
mov rax, qword [str._nativewnet_amd64_fre_ampa.sys]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x140376408]
lea rdx, [rsp + 0x950]
mov qword [rdi + 7], rax
mov rax, qword [0x140376410]
mov qword [rdi + 0xf], rax
mov rax, qword [0x140376418]
mov qword [rdi + 0x17], rax
xor eax, eax
lea rdi, [rsp + 0x550]
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 0x140254a50
xor eax, eax
lea rdi, [rsp + 0x550]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativewnet_amd64_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x140376428]
mov qword [rdi + 7], rax
mov rax, qword [0x140376430]
mov qword [rdi + 0xf], rax
mov rax, qword [0x140376438]
mov qword [rdi + 0x17], rax
jmp 0x140254b84
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x950]
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140254ac0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_336]
repne scasb al, byte [rdi]
mov rax, qword [str._nativew2kx86_fre_ampa.sys]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
mov rax, qword [0x140376448]
lea rdx, [rsp + 0x950]
mov qword [rdi + 7], rax
mov rax, qword [0x140376450]
mov qword [rdi + 0xf], rax
mov eax, dword [0x140376458]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x14037645c]
mov byte [rdi + 0x1b], al
xor eax, eax
lea rdi, [rsp + 0x550]
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 0x140254b30
xor eax, eax
lea rdi, [rsp + 0x550]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, qword [str._nativew2kx86_fre_ampa.exe]
mov qword [rdi - 1], rax
mov rax, qword [0x140376468]
mov qword [rdi + 7], rax
mov rax, qword [0x140376470]
mov qword [rdi + 0xf], rax
mov eax, dword [0x140376478]
mov dword [rdi + 0x17], eax
movzx eax, byte [0x14037647c]
mov byte [rdi + 0x1b], al
lea rcx, [rsp + 0x1151]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + reloc.MFC80U.DLL_Ordinal_4432], sil
call sub.ntdll.dll_memset
lea rcx, [rsp + 0x1551]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x1550], sil
call sub.ntdll.dll_memset
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_4432]
lea rdx, [rsp + 0xd50]
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 0x140254be0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + reloc.MFC80U.DLL_Ordinal_4432]
repne scasb al, byte [rdi]
mov rax, qword [str._ampa.exe]
or rcx, 0xffffffffffffffff
mov qword [rdi - 1], rax
movzx eax, word [0x140376488]
lea rdx, [rsp + 0xd50]
mov word [rdi + 7], ax
xor eax, eax
lea rdi, [rsp + 0x1550]
repne scasb al, byte [rdi]
xor ecx, ecx
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140254c30
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x1550]
repne scasb al, byte [rdi]
mov rax, qword [str._system32_ampa.sys]
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_4432]
mov qword [rdi - 1], rax
mov rax, qword [0x140376498]
lea rcx, [rsp + 0x550]
mov qword [rdi + 7], rax
movzx eax, word [0x1403764a0]
xor r8d, r8d
mov word [rdi + 0xf], ax
movzx eax, byte [0x1403764a2]
mov qword [rsp + 0x2170], rbx
mov byte [rdi + 0x11], al
call qword [sym.imp.KERNEL32.dll_CopyFileA]
lea rbp, [0x140c490d0]
test eax, eax
jne 0x140254d83
call fcn.140049470
xor edx, edx
mov r8d, 0x80
mov rcx, rbp
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, [0x1403764a8]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
jne 0x140254ce5
mov r8, rsi
jmp 0x140254d73
xor eax, eax
lea rdx, [0x140376694]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_320]
mov r8d, 0x482
mov byte [rsp + reloc.MFC80U.DLL_Ordinal_320], sil
mov qword [rsp + 0x141], rax
mov word [rsp + 0x149], ax
mov byte [rsp + 0x14b], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbp
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140254d30
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_320]
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140254d60
mov r8, rbp
mov rax, qword [rbx]
lea rdx, str._s:_Failed_to_copy_ampa.exe.
mov rcx, rbx
call qword [rax + 0x10]
lea rdx, [rsp + 0x1550]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_336]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140254e76
call fcn.140049470
xor edx, edx
mov r8d, 0x80
mov rcx, rbp
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, [0x1403764d8]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
je 0x140254e63
xor eax, eax
lea rdx, [0x140376694]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_320]
mov r8d, 0x486
mov byte [rsp + reloc.MFC80U.DLL_Ordinal_320], sil
mov qword [rsp + 0x141], rax
mov word [rsp + 0x149], ax
mov byte [rsp + 0x14b], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbp
sub rcx, rdx
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140254e20
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_320]
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140254e50
mov rsi, rbp
mov rax, qword [rbx]
lea rdx, str._s:_Failed_to_copy_ampa.sys.
mov r8, rsi
mov rcx, rbx
call qword [rax + 0x10]
mov eax, 1
mov rbx, qword [rsp + 0x2170]
mov rcx, qword [rsp + 0x2150]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + 0x2160]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret