Function at 0x14003e040
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 r15d, r9d
mov rdi, r8
mov qword [rsp + 0x38], rdx
mov rsi, rcx
mov r14d, dword [rsp + 0xc0]
mov rax, qword [0x140219028]
xor rax, rsp
mov qword [rsp + 0x50], rax
lea eax, [r14 + r15]
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 rbx, rax
cmp qword [rsi + 0x28], rax
je 0x14003e0e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov rax, qword [rsi + 0x28]
inc rax
cmp rax, 2
jae 0x14003e395
mov rax, rbx
inc rax
cmp rax, 2
jb 0x14003e0d5
mov qword [rsi + 0x28], rbx
call fcn.1400d3890
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsi + 0x28]
lea rax, [rbx + 1]
cmp rax, 1
jbe 0x14003e3b7
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov edx, 6
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
je 0x14003e3d1
mov r12, rax
mov ebx, r15d
mov r13d, r14d
test rdi, rdi
je 0x14003e15b
test r14d, r14d
je 0x14003e15b
lea rbp, [r12 + rbx]
mov rcx, rbp
mov rdx, rdi
mov r8, r13
call fcn.140121c40
xor eax, eax
mov rcx, qword [rbp + rax*8]
test rcx, rcx
jne 0x14003e151
inc rax
cmp rax, 0x40
jne 0x14003e13c
jmp 0x14003e15b
sub rcx, rdi
mov qword [rbp + rax*8], rcx
jmp 0x14003e146
mov qword [0x14022b738], rbx
mov rcx, rsi
call fcn.14003d360
test al, al
je 0x14003e3eb
movabs rdi, 0xaaaaaaaaaaaaaaaa
lea r14, [rsp + 0x48]
mov qword [r14], rdi
mov rcx, qword [rsi]
mov qword [rsp + 0x20], r14
lea rdx, [0x14022b738]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14003e329
cmp qword [rsp + 0x48], 8
mov qword [0x14022b738], 0
jne 0x14003e3b0
mov qword [0x14022b740], r13
mov rcx, rsi
call fcn.14003d360
test al, al
je 0x14003e3f5
mov qword [rsp + 0x48], rdi
mov rcx, qword [rsi]
mov qword [rsp + 0x20], r14
lea rdx, [0x14022b740]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14003e369
cmp qword [rsp + 0x48], 8
mov qword [0x14022b740], 0
jne 0x14003e3b0
mov r13, rdi
mov ebx, dword [rsi + 0x10]
mov rbp, qword [rsi]
mov ecx, 0x40
call fcn.14011d790
mov rdi, rax
mov r9, qword [rsi + 0x40]
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, rbp
mov r8d, ebx
call fcn.14003e480
mov rbx, qword [rsi + 0x38]
mov qword [rsi + 0x38], rdi
test rbx, rbx
jne 0x14003e3ff
mov rcx, rdi
mov rdx, r12
mov r8d, r15d
mov r9d, 0x400
call fcn.14003e530
test al, al
je 0x14003e418
lea rdi, [rsp + 0x40]
mov qword [rdi], r13
mov rbx, qword [rsi]
mov rbp, 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, rbp
mov r8, rbx
mov r9, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14003e422
mov rax, qword [rsp + 0x40]
mov qword [0x140229fb8], rax
mov rcx, rsi
call fcn.14003d360
test al, al
je 0x14003e43c
mov qword [rsp + 0x48], r13
mov rcx, qword [rsi]
mov qword [rsp + 0x20], r14
lea rdx, [0x140229fb8]
mov r9d, 8
mov r8, rdx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14003e37b
cmp qword [rsp + 0x48], 8
mov qword [0x140229fb8], 0
jne 0x14003e3b0
mov rcx, rsi
call fcn.14003e450
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x14003e349
mov esi, 0x39
mov qword [0x14022b738], 0
mov rdi, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14011fe20
mov eax, esi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov esi, 0x39
mov qword [0x14022b740], 0
jmp 0x14003e339
mov esi, 0x39
mov rdi, qword [rsp + 0xc8]
mov qword [0x140229fb8], 0
jmp 0x14003e341
call fcn.1400d3890
mov rcx, qword [rsi + 0x28]
call fcn.140101910
mov qword [rsi + 0x28], 0
jmp 0x14003e0c0
mov esi, 0x3a
jmp 0x14003e339
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov esi, 0x19
jmp 0x14003e349
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov esi, 0x1b
jmp 0x14003e349
mov esi, 8
jmp 0x14003e32e
mov esi, 8
jmp 0x14003e36e
mov rcx, rbx
call fcn.140047ab0
mov rcx, rbx
call fcn.14011d780
mov rdi, qword [rsi + 0x38]
jmp 0x14003e25d
mov esi, 4
jmp 0x14003e349
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx], eax
mov esi, 0x1a
jmp 0x14003e349
mov esi, 8
jmp 0x14003e380