Function at 0x140051780
Capabilities:
Check if file exists
Read file via mapping

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov edi, r9d
mov r14, r8
mov rbx, rdx
mov rsi, rcx
mov rax, qword [0x140287028]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0x10], 0
mov rcx, qword [rcx]
je 0x140051bfa
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r8, [rsp + 0x40]
mov dword [r8], 0
lea r15, [rsp + 0x48]
mov qword [r15], rax
mov qword [rsp + 0x20], r15
lea rdx, str.DNASYXOB
mov r9d, 4
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ebp, 0x42
test eax, eax
je 0x140051b9b
cmp qword [rsp + 0x48], 4
jne 0x140051c14
mov eax, dword [rsp + 0x40]
cmp eax, dword [str.DNASYXOB]
jne 0x140051c1b
mov rcx, qword [rsi]
mov qword [rsp + 0x20], r15
lea rdx, [0x140296a98]
lea r8, [rsp + 0x40]
mov r9d, 4
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x140051b9b
cmp qword [rsp + 0x48], 4
mov ebp, 0x43
jne 0x140051b9b
mov eax, dword [rsp + 0x40]
mov ebp, 0x44
cmp eax, dword [0x140296a98]
jne 0x140051b9b
mov r13d, dword [rsp + 0xc0]
lea eax, [rdi + r13]
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8d, 0x8000004
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
cmp qword [rsi + 0x28], rax
je 0x1400518d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov rax, qword [rsi + 0x28]
inc rax
cmp rax, 2
jae 0x140051bdf
mov rax, r15
inc rax
cmp rax, 2
jb 0x1400518cd
mov qword [rsi + 0x28], r15
call fcn.1400f24d0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, qword [rsi + 0x28]
mov r12, qword [rsp + 0xc8]
lea rax, [r15 + 1]
cmp rax, 1
jbe 0x140051c2f
mov qword [rsp + 0x20], 0
mov rcx, r15
mov edx, 6
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
je 0x140051c43
mov r15, rax
mov ebp, edi
mov r12d, r13d
test r14, r14
je 0x14005199d
test r13d, r13d
je 0x14005199d
lea r13, [r15 + rbp]
mov rcx, r13
mov rdx, r14
mov r8, r12
call fcn.140177150
xor eax, eax
pxor xmm0, xmm0
pcmpeqd xmm1, xmm1
movdqu xmm2, xmmword [r13 + rax*8]
movdqa xmm4, xmm2
pcmpeqd xmm4, xmm0
pshufd xmm3, xmm4, 0xb1
pand xmm3, xmm4
movd ecx, xmm3
not ecx
test cl, 1
je 0x140051973
movq rcx, xmm2
sub rcx, r14
mov qword [r13 + rax*8], rcx
pxor xmm3, xmm1
pextrw ecx, xmm3, 4
test cl, 1
je 0x140051993
pshufd xmm2, xmm2, 0xee
movq rcx, xmm2
sub rcx, r14
mov qword [r13 + rax*8 + 8], rcx
add rax, 2
cmp rax, 0x40
jne 0x140051943
mov qword [0x1402a2b78], rbp
cmp dword [rsi + 0x10], 0
mov rcx, qword [rsi]
je 0x140051c5d
movabs r13, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x48], r13
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea rdx, [0x1402a2b78]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140051b7b
cmp qword [rsp + 0x48], 8
mov qword [0x1402a2b78], 0
jne 0x140051c25
mov qword [0x1402a2b80], r12
cmp dword [rsi + 0x10], 0
mov rcx, qword [rsi]
je 0x140051c81
lea rax, [rsp + 0x48]
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x20], rax
lea rdx, [0x1402a2b80]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140051bbb
cmp qword [rsp + 0x48], 8
mov qword [0x1402a2b80], 0
jne 0x140051c25
mov ebp, dword [rsi + 0x10]
mov r12, qword [rsi]
mov ecx, 0x40
call fcn.140172a4c
mov r14, rax
mov r9, qword [rsi + 0x40]
mov qword [rsp + 0x20], rbx
mov rcx, rax
mov rdx, r12
mov r8d, ebp
call fcn.140051d60
mov rbx, qword [rsi + 0x38]
mov qword [rsi + 0x38], r14
test rbx, rbx
jne 0x140051caa
mov rcx, r14
mov rdx, r15
mov r8d, edi
mov r9d, 0x400
call fcn.1400539b0
test al, al
je 0x140051cc3
lea rdi, [rsp + 0x40]
mov qword [rdi], r13
mov rbx, qword [rsi]
mov r14, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor ecx, ecx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 7
mov rcx, rax
mov rdx, r14
mov r8, rbx
mov r9, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
lea rdx, [rsp + 0x48]
je 0x140051ccd
mov rax, qword [rsp + 0x40]
mov qword [0x1402a27b8], rax
cmp dword [rsi + 0x10], 0
mov rcx, qword [rsi]
je 0x140051ce7
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x20], rdx
lea rdx, [0x1402a27b8]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140051bcd
cmp qword [rsp + 0x48], 8
mov qword [0x1402a27b8], 0
jne 0x140051c25
mov dword [rsi + 0x14], 0
mov rdi, qword [rsi + 8]
mov qword [rsi + 8], 0
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140051b6e
call fcn.1400f24d0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
jmp 0x140051b9b
mov ebp, 0x39
mov qword [0x1402a2b78], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1401756e0
mov eax, ebp
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, 0x39
mov qword [0x1402a2b80], 0
jmp 0x140051b8b
mov ebp, 0x39
mov qword [0x1402a27b8], 0
jmp 0x140051b8b
call fcn.1400f24d0
mov rcx, qword [rsi + 0x28]
call fcn.1401571e0
mov qword [rsi + 0x28], 0
jmp 0x1400518b8
test rcx, rcx
jne 0x1400517b8
cmp dword [rsi + 0x14], 0
je 0x140051d0c
xor ecx, ecx
jmp 0x1400517b8
mov ebp, 0x43
jmp 0x140051b9b
mov ebp, 0x44
jmp 0x140051b9b
mov ebp, 0x3a
jmp 0x140051b8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r12], eax
mov ebp, 0x19
jmp 0x140051b9b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov ebp, 0x1b
jmp 0x140051b9b
test rcx, rcx
movabs r13, 0xaaaaaaaaaaaaaaaa
jne 0x1400519bb
cmp dword [rsi + 0x14], 0
je 0x140051d21
xor ecx, ecx
jmp 0x1400519b1
test rcx, rcx
lea rax, [rsp + 0x48]
jne 0x140051a18
cmp dword [rsi + 0x14], 0
je 0x140051d36
xor ecx, ecx
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x140051a13
mov rcx, rbx
call fcn.140079f90
mov rcx, rbx
call fcn.140172a44
mov r14, qword [rsi + 0x38]
jmp 0x140051a92
mov ebp, 4
jmp 0x140051b9b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov ebp, 0x1a
jmp 0x140051b9b
test rcx, rcx
jne 0x140051b0d
cmp dword [rsi + 0x14], 0
je 0x140051d4b
xor ecx, ecx
movabs r13, 0xaaaaaaaaaaaaaaaa
lea rdx, [rsp + 0x48]
jmp 0x140051b0d
mov ebp, 8
cmp qword [rsi + 8], 0
je 0x140051b9b
jmp 0x140051c0d
mov ebp, 8
cmp qword [rsi + 8], 0
je 0x140051b80
jmp 0x140051c7a
mov ebp, 8
cmp qword [rsi + 8], 0
je 0x140051bc0
jmp 0x140051c99
mov ebp, 8
cmp qword [rsi + 8], 0
je 0x140051bd2
jmp 0x140051cf6