Function at 0x140012838
Capabilities:
Copy file
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xf0
mov rdi, r8
mov r12, rdx
mov r14, rcx
xor r8d, r8d
mov r15d, r8d
cmp dword [rcx + 0x1c], 0xa0000003
jne 0x140012879
cmp dword [0x140024670], r8d
je 0x140012d1d
mov eax, dword [0x140024568]
and eax, dword [0x140024560]
bt eax, 0x12
jae 0x140012d1d
mov ebx, 0x40000000
mov r13d, 1
mov dword [rbp + 0x67], r13d
cmp dword [rdi + 8], r8d
je 0x140012ab1
lea ecx, [r13 + 0x7f]
cmp dword [0x140024680], r8d
je 0x1400128c5
mov eax, 0x880
cmp dword [r14 + 0x1c], 0xa000000c
cmove ecx, eax
mov eax, ecx
bts eax, 0x15
cmp dword [r14 + 0x1c], 0xa0000003
cmovne eax, ecx
mov r13d, eax
bts r13d, 0xf
cmp dword [rdi + 0xc], r8d
cmove r13d, eax
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rbp - 0x41]
call sub.msvcrt.dll_memset
mov ecx, dword [0x1400243d4]
mov eax, dword [0x1400243d0]
xor r8d, r8d
jmp 0x14001290b
mov ebx, 0x40000000
test eax, eax
jne 0x140012913
test ecx, ecx
je 0x14001294b
cmp dword [rdi + 0xc], r8d
jne 0x14001294b
cmp qword [0x1400243d8], r8
jne 0x14001294b
test eax, eax
je 0x140012939
cmp eax, 0x1000
jae 0x140012934
mov eax, 0x1000
jmp 0x140012939
cmp eax, ebx
cmova eax, ebx
mov dword [rbp - 0x49], WSACleanup
mov dword [rbp - 0x25], eax
mov dword [rbp - 0x21], ecx
mov sil, 1
jmp 0x140012955
mov dword [rbp - 0x49], 0x20
mov sil, r8b
mov dword [rbp - 0x45], r13d
lea rdx, [rbp - 0x71]
mov rcx, r12
call fcn.1400160ec
nop
mov rbx, qword [rax]
lea rdx, [rbp - 0x79]
mov rcx, r14
call fcn.1400160ec
lea r8, [rbp - 0x49]
mov rdx, rbx
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CopyFile2]
nop dword [rax + rax]
mov ebx, eax
mov rdx, qword [rbp - 0x79]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
xor r8d, r8d
sub eax, 1
jg 0x1400129c2
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x14001d898]
xor r8d, r8d
mov rdx, qword [rbp - 0x71]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400129f4
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x14001d898]
xor r8d, r8d
mov edx, 0x80070057
cmp ebx, edx
jne 0x140012a16
test sil, sil
je 0x140012a33
mov ecx, r8d
mov dword [0x1400243d4], ecx
mov eax, r8d
mov dword [0x1400243d0], eax
jmp 0x140012a27
test sil, sil
je 0x140012a2f
mov ecx, dword [0x1400243d4]
mov eax, dword [0x1400243d0]
cmp ebx, edx
je 0x140012906
test ebx, ebx
jns 0x140012aad
mov r13d, r8d
mov eax, ebx
and eax, 0x1fff0000
movzx ebx, bx
cmp eax, 0x70000
cmovne ebx, r8d
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
cmp ebx, 0x7b
je 0x140012a81
cmp ebx, 2
je 0x140012a81
inc r15d
mov r9d, r15d
mov r8d, dword [rdi + 4]
mov edx, dword [rdi]
mov rcx, r12
call fcn.14000a814
xor r8d, r8d
test eax, eax
je 0x140012a92
jmp 0x14001288f
lea r9d, [r15 + 1]
xor r8d, r8d
mov edx, dword [rdi]
mov rcx, r14
call fcn.14000a814
test ebx, ebx
je 0x140012d18
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140012d18
mov r13d, dword [rbp + 0x67]
or rsi, 0xffffffffffffffff
mov rbx, r8
cmp dword [0x140024684], r8d
je 0x140012d18
lea rdx, [rbp - 0x69]
mov rcx, r14
call fcn.1400160ec
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2200080
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea edi, [rsi + 8]
mov r8d, edi
lea edx, [rsi + 9]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov r15, rax
mov rdx, qword [rbp - 0x69]
add rdx, 0xffffffffffffffe8
or eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140012b33
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x14001d898]
cmp r15, 0xffffffffffffffff
jne 0x140012b4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
jmp 0x140012cad
lea rdx, [rbp - 0x61]
mov rcx, r12
call fcn.1400160ec
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2200080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, edi
lea edx, [r9 + 0x10]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rsi, rax
mov rdx, qword [rbp - 0x61]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140012bb7
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x14001d898]
cmp rsi, 0xffffffffffffffff
jne 0x140012bd1
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r14, r12
jmp 0x140012cad
mov dword [rsp + 0x20], edi
mov r9d, 4
lea r8, [rbp + 0x7f]
lea rdx, [rbp - 0x59]
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtQueryInformationFile]
nop dword [rax + rax]
test eax, eax
js 0x140012ce0
mov eax, dword [rbp + 0x7f]
test eax, eax
je 0x140012ce0
lea edi, [rax + 0x80]
mov ecx, edi
call qword [sym.imp.msvcrt.dll_malloc]
nop dword [rax + rax]
mov rbx, rax
xor eax, eax
test rbx, rbx
je 0x140012c9a
mov byte [rsp + 0x40], 1
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x20], al
mov r9d, edi
mov r8, rbx
lea rdx, [rbp - 0x59]
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtQueryEaFile]
nop dword [rax + rax]
test eax, eax
jns 0x140012c78
cmp eax, 0x80000005
je 0x140012c65
cmp eax, 0xc0000023
jne 0x140012c9f
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
add edi, edi
jmp 0x140012c0b
mov r9d, edi
mov r8, rbx
lea rdx, [rbp - 0x59]
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtSetEaFile]
nop dword [rax + rax]
test eax, eax
jns 0x140012ce0
mov r14, r12
jmp 0x140012c9f
mov eax, 0xc0000017
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosErrorNoTeb]
nop dword [rax + rax]
test eax, eax
je 0x140012cda
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rdx, r14
mov ecx, 0x23a9
call fcn.140011974
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
cmp r15, 0xffffffffffffffff
je 0x140012cef
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
cmp rsi, 0xffffffffffffffff
je 0x140012d04
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test rbx, rbx
je 0x140012d18
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop dword [rax + rax]
mov eax, r13d
jmp 0x140012d22
mov eax, 1
mov rbx, qword [rsp + 0x138]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret