Function at 0x1400128c0
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x128
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0x88], 0xfffffffffffffffe
mov rbx, rdx
mov rsi, rcx
mov rcx, qword [rdx + 0x10]
cmp qword [rdx + 8], 0
mov qword [rdx + 8], 0
je 0x14001290c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14002f3a0]
mov qword [rbp + 0x68], rax
xorps xmm0, xmm0
movups xmmword [rbp + 0x70], xmm0
mov qword [rbp + 0x50], rax
movups xmmword [rbp + 0x58], xmm0
mov rcx, qword [rbx + 0x18]
mov rdi, qword [rbx + 0x20]
mov qword [rbx + 0x18], 0
mov rax, qword [rbx + 0x28]
mov rdx, qword [rbx + 0x30]
mov qword [rbp + 0x80], rdx
mov qword [rbx + 0x28], 0
cmp rcx, 1
mov qword [rbp - 0x40], rsi
jne 0x140012bd5
test rax, rax
mov qword [rbp - 0x30], rbx
je 0x140012e1f
xor ecx, ecx
mov edx, 1
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
test rax, rax
je 0x1400133b5
mov r14, rax
mov ecx, 0x20
mov edx, 8
call fcn.140007450
test rax, rax
je 0x1400133a4
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], r14
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x68]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 0
xor ecx, ecx
mov edx, 1
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
test rax, rax
je 0x140013070
mov rdi, rax
mov ecx, 0x20
mov edx, 8
call fcn.140007450
test rax, rax
je 0x1400133a4
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], rdi
mov qword [rbp + 0x28], rdi
mov rcx, qword [rbp + 0x80]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x30], rax
lea rax, [rbp + 0x50]
mov qword [rbp + 0x38], rax
mov qword [rbp + 0x40], 0
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], rdi
lea r14, [rbp - 0x50]
mov rsi, qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
lea rdi, [rbp + 8]
lea r15, [rbp + 0x20]
mov rbx, qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
lea r12, [rbp - 0x28]
nop word cs:[rax + rax]
nop
mov ecx, 2
mov rdx, r14
xor r8d, r8d
mov r9d, 0xffffffff
call rsi
cmp eax, 1
je 0x140012ad0
test eax, eax
jne 0x1400130b9
mov rax, qword [rbp - 8]
test rax, rax
je 0x140012b63
cmp eax, 1
jne 0x140012b46
mov rcx, qword [rbp - 0x28]
mov rdx, qword [rbp - 0x18]
mov dword [rbp + 8], 0
mov r8, rdi
mov r9d, 1
call rbx
test eax, eax
je 0x140012ba9
mov eax, dword [rbp + 8]
jmp 0x140012b4a
mov rax, qword [rbp + 0x40]
test rax, rax
je 0x140012b22
cmp eax, 1
jne 0x140012b05
mov rcx, qword [rbp + 0x20]
mov rdx, qword [rbp + 0x30]
mov dword [rbp + 8], 0
mov r8, rdi
mov r9d, 1
call rbx
test eax, eax
je 0x140012b87
mov eax, dword [rbp + 8]
jmp 0x140012b09
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0x40], 0
mov rcx, qword [rbp + 0x38]
add qword [rcx + 0x10], rax
test rax, rax
je 0x14001309d
mov rcx, rdi
mov rdx, r15
call fcn.140018990
cmp byte [rbp + 8], 1
je 0x140013093
cmp byte [rbp + 9], 1
je 0x140012a70
jmp 0x14001309d
mov rax, qword [rbp]
mov qword [rbp - 8], 0
mov rcx, qword [rbp - 0x10]
add qword [rcx + 0x10], rax
test rax, rax
je 0x1400130a8
mov rcx, rdi
mov rdx, r12
call fcn.140018990
cmp byte [rbp + 8], 1
je 0x140013093
cmp byte [rbp + 9], 1
je 0x140012a70
jmp 0x1400130a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x140012bc7
mov r13d, eax
mov eax, 0
cmp r13d, 0x6d
je 0x140012b09
jmp 0x1400130c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x140012bce
mov r13d, eax
mov eax, 0
cmp r13d, 0x6d
je 0x140012b4a
jmp 0x1400130c2
xor eax, eax
jmp 0x140012b09
xor eax, eax
jmp 0x140012b4a
test rax, rax
je 0x140013143
mov qword [rbp - 0x30], rbx
mov rdx, qword [rbp + 0x58]
mov rdi, qword [rbp + 0x60]
lea rax, [rbp + 0x50]
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rdi
lea r13, [rbp + 0x20]
mov r15, qword [sym.imp.KERNEL32.dll_ReadFile]
mov r14, qword [sym.imp.KERNEL32.dll_GetLastError]
xorps xmm6, xmm6
lea r12, [rbp + 8]
mov qword [rbp - 0x38], rdx
cmp rdi, rdx
jne 0x140012c5a
jmp 0x140012c31
cmp al, 0x23
jne 0x140013260
mov rdx, qword [rbp + 0x58]
cmp rdi, rdx
jne 0x140012c5a
mov rax, qword [rbp + 0x60]
mov rcx, rdi
sub rcx, rax
mov rdx, rdi
cmp rcx, 0x1f
ja 0x140012c5a
mov r8d, 0x20
lea rcx, [rbp + 0x50]
mov rdx, rax
call fcn.14002c630
mov rdx, qword [rbp + 0x58]
mov rax, qword [rbp + 0x60]
cmp rax, rdx
jae 0x140012c73
mov qword [rbp + 0x60], rdx
cmp rdx, rdi
jb 0x14001332d
mov rax, rdx
mov rsi, rax
sub rsi, rdi
jb 0x1400132e2
mov rdx, qword [rbp + 0x50]
add rdx, rdi
mov dword [rbp + 0x20], 0
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8d, esi
mov qword [rsp + 0x20], 0
mov rcx, qword [rbp + 0x80]
mov r9, r13
call r15
test eax, eax
je 0x140012cd0
mov eax, dword [rbp + 0x20]
mov rdx, rax
shr rdx, 8
mov ecx, eax
and ecx, 0xffff0000
jmp 0x140012cea
call r14
mov ebx, eax
mov ecx, eax
call fcn.14001d160
cmp al, 0xb
jne 0x140012c20
xor eax, eax
xor edx, edx
xor ecx, ecx
shl edx, 8
movzx edx, dx
movzx eax, al
or rax, rcx
or rax, rdx
je 0x140012e16
cmp rax, rsi
ja 0x1400132f9
add rdi, rax
mov qword [rbp - 0x20], rdi
mov rax, qword [rbp + 0x58]
cmp rdi, rax
jne 0x140012c28
cmp rax, qword [rbp - 0x38]
jne 0x140012c28
movaps xmmword [rbp + 0x30], xmm6
movaps xmmword [rbp + 0x20], xmm6
nop
mov dword [rbp + 8], 0
mov qword [rsp + 0x20], 0
mov rcx, qword [rbp + 0x80]
mov rdx, r13
mov r8d, 0x20
mov r9, r12
call r15
test eax, eax
jne 0x140012d80
call r14
mov ebx, eax
mov ecx, eax
call fcn.14001d160
cmp al, 0xb
je 0x140012da0
cmp al, 0x23
je 0x140012d30
jmp 0x140013260
mov eax, dword [rbp + 8]
mov rdx, rax
shr rdx, 8
mov ecx, eax
and ecx, 0xffff0000
jmp 0x140012da6
xor ecx, ecx
xor edx, edx
xor eax, eax
shl edx, 8
movzx edx, dx
or rdx, rcx
movzx ebx, al
or rbx, rdx
je 0x140012e16
cmp rbx, 0x21
jae 0x14001335e
mov rax, qword [rbp + 0x58]
mov rsi, qword [rbp + 0x60]
sub rax, rsi
cmp rax, rbx
jae 0x140012de4
lea rcx, [rbp + 0x50]
mov rdx, rsi
mov r8, rbx
call fcn.14002c630
mov rsi, qword [rbp + 0x60]
mov rcx, qword [rbp + 0x50]
add rcx, rsi
mov rdx, r13
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
add rsi, rbx
mov qword [rbp + 0x60], rsi
add rdi, rbx
mov qword [rbp - 0x20], rdi
mov rdx, qword [rbp + 0x58]
cmp rdi, rdx
je 0x140012c31
jmp 0x140012c5a
mov qword [rbp + 0x60], rdi
jmp 0x14001305a
mov qword [rbp + 0x80], rdi
mov rdx, qword [rbp + 0x70]
mov rdi, qword [rbp + 0x78]
lea rax, [rbp + 0x68]
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rdi
lea r13, [rbp + 0x20]
mov r14, qword [sym.imp.KERNEL32.dll_ReadFile]
mov r15, qword [sym.imp.KERNEL32.dll_GetLastError]
xorps xmm6, xmm6
lea r12, [rbp + 8]
mov qword [rbp - 0x38], rdx
cmp rdi, rdx
jne 0x140012e9a
jmp 0x140012e71
cmp al, 0x23
jne 0x1400132a1
mov rdx, qword [rbp + 0x70]
cmp rdi, rdx
jne 0x140012e9a
mov rax, qword [rbp + 0x78]
mov rcx, rdi
sub rcx, rax
mov rdx, rdi
cmp rcx, 0x1f
ja 0x140012e9a
mov r8d, 0x20
lea rcx, [rbp + 0x68]
mov rdx, rax
call fcn.14002c630
mov rdx, qword [rbp + 0x70]
mov rax, qword [rbp + 0x78]
cmp rax, rdx
jae 0x140012eb3
mov qword [rbp + 0x78], rdx
cmp rdx, rdi
jb 0x140013377
mov rax, rdx
mov rsi, rax
sub rsi, rdi
jb 0x140013316
mov rdx, qword [rbp + 0x68]
add rdx, rdi
mov dword [rbp + 0x20], 0
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8d, esi
mov qword [rsp + 0x20], 0
mov rcx, qword [rbp + 0x80]
mov r9, r13
call r14
test eax, eax
je 0x140012f10
mov eax, dword [rbp + 0x20]
mov rdx, rax
shr rdx, 8
mov ecx, eax
and ecx, 0xffff0000
jmp 0x140012f2a
call r15
mov ebx, eax
mov ecx, eax
call fcn.14001d160
cmp al, 0xb
jne 0x140012e60
xor eax, eax
xor edx, edx
xor ecx, ecx
shl edx, 8
movzx edx, dx
movzx eax, al
or rax, rcx
or rax, rdx
je 0x140013056
cmp rax, rsi
ja 0x140013341
add rdi, rax
mov qword [rbp - 0x20], rdi
mov rax, qword [rbp + 0x70]
cmp rdi, rax
jne 0x140012e68
cmp rax, qword [rbp - 0x38]
jne 0x140012e68
movaps xmmword [rbp + 0x30], xmm6
movaps xmmword [rbp + 0x20], xmm6
nop
mov dword [rbp + 8], 0
mov qword [rsp + 0x20], 0
mov rcx, qword [rbp + 0x80]
mov rdx, r13
mov r8d, 0x20
mov r9, r12
call r14
test eax, eax
jne 0x140012fc0
call r15
mov ebx, eax
mov ecx, eax
call fcn.14001d160
cmp al, 0xb
je 0x140012fe0
cmp al, 0x23
je 0x140012f70
jmp 0x1400132a1
mov eax, dword [rbp + 8]
mov rdx, rax
shr rdx, 8
mov ecx, eax
and ecx, 0xffff0000
jmp 0x140012fe6
xor ecx, ecx
xor edx, edx
xor eax, eax
shl edx, 8
movzx edx, dx
or rdx, rcx
movzx ebx, al
or rbx, rdx
je 0x140013056
cmp rbx, 0x21
jae 0x14001338b
mov rax, qword [rbp + 0x70]
mov rsi, qword [rbp + 0x78]
sub rax, rsi
cmp rax, rbx
jae 0x140013024
lea rcx, [rbp + 0x68]
mov rdx, rsi
mov r8, rbx
call fcn.14002c630
mov rsi, qword [rbp + 0x78]
mov rcx, qword [rbp + 0x68]
add rcx, rsi
mov rdx, r13
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
add rsi, rbx
mov qword [rbp + 0x78], rsi
add rdi, rbx
mov qword [rbp - 0x20], rdi
mov rdx, qword [rbp + 0x70]
cmp rdi, rdx
je 0x140012e71
jmp 0x140012e9a
mov qword [rbp + 0x78], rdi
mov rcx, qword [rbp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rbp - 0x30]
jmp 0x140013143
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [rbp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, esi
shl rdi, 0x18
xor r13d, r13d
xor r14d, r14d
jmp 0x140013105
mov r13, qword [rbp + 0x10]
mov r14, qword [rbp + 0x18]
jmp 0x1400130c9
lea rcx, [rbp - 0x28]
call fcn.140018ad0
jmp 0x1400130b1
lea rcx, [rbp + 0x20]
call fcn.140018ad0
mov r13, rax
mov r14, rdx
jmp 0x1400130c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
shl r13, 0x20
xor r14d, r14d
lea rcx, [rbp + 0x20]
call fcn.140018bc0
mov rcx, qword [rbp + 0x20]
mov rdi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rdi
mov rcx, qword [rbp + 0x28]
call rdi
mov rcx, qword [rbp + 0x30]
mov edx, 0x20
mov r8d, 8
call fcn.140007460
mov rdi, r13
shrd rdi, r14, 8
shr r14, 8
lea rcx, [rbp - 0x28]
call fcn.140018bc0
mov rcx, qword [rbp - 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbp - 0x20]
call rsi
mov rcx, qword [rbp - 0x18]
mov edx, 0x20
mov r8d, 8
call fcn.140007460
cmp r13b, 4
mov rbx, qword [rbp - 0x30]
jne 0x1400133e0
mov qword [rbx + 8], 0
mov rsi, qword [rbx]
mov rcx, rsi
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400131c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdi, qword [rbp - 0x40]
shl rax, 0x20
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], 0
mov qword [rdi], 1
mov rdx, qword [rbp + 0x58]
test rdx, rdx
je 0x14001319e
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14001319e
mov r8d, 1
call fcn.140007460
mov rdx, qword [rbp + 0x70]
test rdx, rdx
je 0x14001322e
mov rcx, qword [rbp + 0x68]
test rcx, rcx
je 0x14001322e
mov r8d, 1
call fcn.140007460
jmp 0x14001322e
mov dword [rbp + 0x20], 0
lea rdx, [rbp + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
mov rdi, qword [rbp - 0x40]
je 0x140013255
mov eax, dword [rbp + 0x20]
mov rcx, qword [rbp + 0x78]
mov qword [rbp + 0x30], rcx
movups xmm0, xmmword [rbp + 0x68]
movaps xmmword [rbp + 0x20], xmm0
mov rcx, qword [rbp + 0x60]
mov qword [rbp + 0x48], rcx
movups xmm1, xmmword [rbp + 0x50]
movups xmmword [rbp + 0x38], xmm1
movups xmmword [rdi + 8], xmm0
mov rcx, qword [rbp + 0x40]
mov qword [rdi + 0x28], rcx
mov rcx, qword [rbp + 0x48]
mov qword [rdi + 0x30], rcx
mov rcx, qword [rbp + 0x30]
mov qword [rdi + 0x18], rcx
mov rcx, qword [rbp + 0x38]
mov qword [rdi + 0x20], rcx
mov dword [rdi + 0x38], eax
mov qword [rdi], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rdi
movaps xmm6, xmmword [rbp + 0x90]
add rsp, 0x128
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14001316a
mov qword [rbp + 0x60], rdi
shl rbx, 0x20
mov qword [rbp + 0x20], rbx
mov qword [rbp + 0x28], 0
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x14002ed28]
lea r9, fcn.140008120
lea r8, [rbp + 0x20]
mov edx, 0x2b
call fcn.14002ce00
jmp 0x140013427
mov qword [rbp + 0x78], rdi
shl rbx, 0x20
mov qword [rbp + 0x20], rbx
mov qword [rbp + 0x28], 0
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x14002ed28]
lea r9, fcn.140008120
lea r8, [rbp + 0x20]
mov edx, 0x2b
call fcn.14002ce00
jmp 0x140013427
lea r8, [0x14002fc40]
mov rcx, rdi
mov rdx, rax
call fcn.14002cea0
jmp 0x140013427
lea rcx, str.assertion_failed:_n___buf.len__
lea r8, [0x14002fc78]
mov edx, 0x20
call fcn.14002ccf0
jmp 0x140013427
lea r8, [0x14002fc40]
mov rcx, rdi
mov rdx, rax
call fcn.14002cea0
jmp 0x140013427
lea r8, [0x14002fc28]
mov rcx, rdi
call fcn.14002cea0
jmp 0x140013427
lea rcx, str.assertion_failed:_n___buf.len__
lea r8, [0x14002fc78]
mov edx, 0x20
call fcn.14002ccf0
jmp 0x140013427
lea r8, [0x14002fc90]
mov edx, 0x20
mov rcx, rbx
call fcn.14002cf20
jmp 0x140013427
lea r8, [0x14002fc28]
mov rcx, rdi
call fcn.14002cea0
jmp 0x140013427
lea r8, [0x14002fc90]
mov edx, 0x20
mov rcx, rbx
call fcn.14002cf20
jmp 0x140013427
mov ecx, 0x20
mov edx, 8
call fcn.14002cc20
ud2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov r14, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call r14
mov rcx, qword [rbp + 0x80]
call r14
mov edi, esi
shl rdi, 0x18
xor r14d, r14d
xor r13d, r13d
mov byte [rbp + 0x20], r13b
mov qword [rbp + 0x21], rdi
mov dword [rbp + 0x29], r14d
mov rax, r14
shr rax, 0x30
mov byte [rbp + 0x2f], al
shr r14, 0x20
mov word [rbp + 0x2d], r14w
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x14002ed28]
lea r9, fcn.140008120
lea r8, [rbp + 0x20]
mov edx, 0x2b
call fcn.14002ce00
ud2