Function at 0x140012130
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r14, rcx
mov rax, qword [0x14005e018]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rsi, qword [r8 + 0x18]
mov eax, dword [rsi + 0x84]
cmp eax, 0x10
mov ecx, 0x10
cmovb ecx, eax
add rsi, 0x90
mov eax, dword [r8 + 0x10]
mov ebp, esi
sub ebp, eax
xor edi, edi
cmp ecx, 2
cmovb ebp, edi
cmovae rdi, rsi
jb 0x1400123a8
mov rbx, r8
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov rcx, rdx
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400123c7
xorps xmm0, xmm0
lea rax, [rsp + 0x40]
movaps xmmword [rax + 0x10], xmm0
movaps xmmword [rax], xmm0
mov dword [rax + 0x10], ebp
lea rdx, [rsp + 0x68]
mov qword [rdx], 0
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
mov rcx, r15
mov r8d, 8
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140012377
cmp dword [rsp + 0x38], 8
jne 0x140012377
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140011fe0
mov rcx, qword [rbx]
mov rax, qword [rbx + 0x30]
mov rdx, rsi
test rax, rax
je 0x14001225d
mov rdx, rsi
cmp qword [rbx + 0x10], rdi
ja 0x14001225d
mov rdx, rsi
cmp qword [rbx + 0x20], rdi
jb 0x14001225d
mov rdx, rdi
sub rdx, qword [rbx + 8]
add rax, rdx
mov rdx, rax
lea r13, [rsp + 0x58]
mov qword [r13 - 0x18], rdx
mov qword [r13 - 0x10], 8
mov qword [r13 - 8], rcx
mov qword [r13], 0
mov qword [rsp + 0x20], r13
mov r8d, 8
mov r9d, 4
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1400123f4
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
js 0x140012411
lea r12, [rsp + 0x68]
mov rcx, rbx
mov rdx, r12
call fcn.140011fe0
cmp byte [r12 + 0x10], 0
jne 0x14001242a
mov rax, qword [rbx + 0x30]
test rax, rax
je 0x1400122e0
cmp qword [rbx + 0x10], rdi
ja 0x1400122e0
cmp qword [rbx + 0x20], rdi
jb 0x1400122e0
sub rdi, qword [rbx + 8]
add rax, rdi
mov rsi, rax
mov rcx, qword [rbx]
mov qword [rsp + 0x20], 0
lea r8, [rsp + 0x38]
mov r9d, 8
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140012439
mov sil, 1
cmp dword [rsp + 0x5c], 0
js 0x140012331
mov r9d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test sil, sil
je 0x14001233b
mov byte [r14 + 0x10], 0
mov rax, r15
inc rax
cmp rax, 2
jb 0x140012350
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14002c730
mov rax, r14
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov byte [r14 + 0x10], 1
lea rax, str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov qword [r14], rax
mov dword [r14 + 8], 0x16
mov dword [r14 + 0xc], ecx
jmp 0x14001233b
mov byte [r14 + 0x10], 1
lea rax, str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov qword [r14], rax
movabs rax, 0x800700c100000035
mov qword [r14 + 8], rax
jmp 0x140012350
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov byte [r14 + 0x10], 1
lea rax, str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov qword [r14], rax
mov dword [r14 + 8], 0x3c
jmp 0x1400123a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov dword [rsp + 0x5c], ecx
jmp 0x14001229d
mov byte [r14 + 0x10], 1
lea rax, str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov qword [r14], rax
mov dword [r14 + 8], 0x51
jmp 0x140012465
mov rax, qword [rsp + 0x68]
mov edx, dword [rsp + 0x70]
mov ecx, dword [rsp + 0x74]
jmp 0x140012459
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
lea rax, str._builds_worker_workspace_obj_build_dist_include_mozilla_NativeNt.h
mov edx, 0x5cf
mov byte [r14 + 0x10], 1
mov qword [r14], rax
mov dword [r14 + 8], edx
mov dword [r14 + 0xc], ecx
xor esi, esi
jmp 0x14001230b