Function at 0x140003970
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x268]
sub rsp, 0x350
mov qword [rbp + 0x220], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1400fde48]
xor rax, rsp
mov qword [rbp + 0x248], rax
mov rsi, rcx
xor r15d, r15d
nop word [rax + rax]
prefetchw byte [rsi + 0x5b8]
mov eax, dword [rsi + 0x5b8]
nop dword [rax]
mov ecx, eax
lock cmpxchg dword [rsi + 0x5b8], ecx
jne 0x1400039d0
test eax, eax
jne 0x140004628
mov edi, r15d
lea rdx, [rsi + 0x30]
or r9d, 0xffffffff
xor r8d, r8d
lea ecx, [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
movsxd r14, eax
cmp r14d, 0x10
jb 0x140003ae6
mov qword [rbp + 0x58], 0xf
mov qword [rbp + 0x50], r15
mov byte [rbp + 0x40], dil
mov r8d, 0x19
lea rdx, str.Event_object_out_of_range
lea rcx, [rbp + 0x40]
call fcn.140002640
nop
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], r15
mov byte [rbp - 0x20], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rbp - 0x20]
call fcn.140002640
nop
cmp qword [0x140101918], 0
jne 0x140003a97
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140003a88
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140003a8b
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140003aab
lea r9, [rbp + 0x40]
mov r8d, 1
lea rdx, [rbp - 0x20]
call fcn.14000c130
nop
cmp qword [rbp - 8], 0x10
jb 0x140003abc
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], r15
mov byte [rbp - 0x20], 0
cmp qword [rbp + 0x58], 0x10
jb 0x1400039c0
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
jmp 0x1400039c0
mov dword [rbp + 0x228], r15d
mov eax, r14d
lea rbx, [rax + rax*4]
shl rbx, 4
cmp byte [rbx + rsi + 0xdc], dil
je 0x140003ca1
lea rdx, [rsi + 0xb8]
add rdx, rbx
xor r9d, r9d
lea r8, [rbp + 0x228]
mov rcx, qword [rbx + rsi + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x140003c79
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x140003b40
cmp eax, 0x26
jne 0x140003b5c
mov rax, qword [rbx + rsi + 0xe0]
cmp dword [rax], edi
je 0x140003b5c
mov dword [rbx + rsi + 0xfc], 0x112
jmp 0x140003c79
mov qword [rbp + 0x38], 0xf
mov qword [rbp + 0x30], r15
mov byte [rbp + 0x20], dil
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rbp + 0x20]
call fcn.140002640
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0xc0]
call fcn.1400032d0
nop
mov r8, rax
lea rdx, str.unknown_error_getting_result_:
lea rcx, [rbp + 0x1a0]
call fcn.140002c80
mov rdi, rax
cmp qword [0x140101918], 0
jne 0x140003bf2
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140003be3
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140003be6
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140003c05
mov r9, rdi
mov r8d, 1
lea rdx, [rbp + 0x20]
call fcn.14000c130
nop
cmp qword [rbp + 0x1b8], 0x10
jb 0x140003c1c
mov rcx, qword [rbp + 0x1a0]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x1b8], 0xf
mov qword [rbp + 0x1b0], r15
mov byte [rbp + 0x1a0], 0
cmp qword [rbp + 0xd8], 0x10
jb 0x140003c4c
mov rcx, qword [rbp + 0xc0]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0xd8], 0xf
mov qword [rbp + 0xd0], r15
mov byte [rbp + 0xc0], 0
cmp qword [rbp + 0x38], 0x10
jb 0x1400045fc
mov rcx, qword [rbp + 0x20]
jmp 0x1400045f6
cmp dword [rbx + rsi + 0xd8], edi
jne 0x140003ca1
mov dword [rbx + rsi + 0xd8], 1
mov byte [rbx + rsi + 0xdc], dil
cmp dword [rbp + 0x228], edi
je 0x1400039c0
mov edx, dword [rbx + rsi + 0xfc]
lea rax, [rsi + 0xb8]
add rax, rbx
lea r9, [rbp + 0x228]
cmp byte [rbx + rsi + 0xdc], dil
cmovne r9, r15
mov r8d, 0x400
sub r8d, edx
add rdx, qword [rbx + rsi + 0xe0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbx + rsi + 0xb0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003e5d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x26
je 0x140003e56
cmp eax, 0x6d
je 0x140003e56
cmp eax, 0x3e5
je 0x140003e49
mov qword [rsp + 0x58], 0xf
mov qword [rsp + 0x50], r15
mov byte [rsp + 0x40], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rsp + 0x40]
call fcn.140002640
nop
mov edx, edi
lea rcx, [rbp + 0x1e0]
call fcn.1400032d0
nop
mov r8, rax
lea rdx, str.error_reading_pipe_:
lea rcx, [rbp + 0x160]
call fcn.140002c80
mov rdi, rax
cmp qword [0x140101918], 0
jne 0x140003daa
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140003d9b
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140003d9e
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140003dbe
mov r9, rdi
mov r8d, 1
lea rdx, [rsp + 0x40]
call fcn.14000c130
nop
cmp qword [rbp + 0x178], 0x10
jb 0x140003dd5
mov rcx, qword [rbp + 0x160]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x178], 0xf
mov qword [rbp + 0x170], r15
mov byte [rbp + 0x160], 0
cmp qword [rbp + 0x1f8], 0x10
jb 0x140003e05
mov rcx, qword [rbp + 0x1e0]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x1f8], 0xf
mov qword [rbp + 0x1f0], r15
mov byte [rbp + 0x1e0], 0
cmp qword [rsp + 0x58], 0x10
jb 0x140003e31
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rsp + 0x58], 0xf
mov qword [rsp + 0x50], r15
mov byte [rsp + 0x40], 0
jmp 0x1400045fc
mov byte [rbx + rsi + 0xdc], 1
jmp 0x1400039c0
mov edi, 1
jmp 0x140003e65
mov byte [rbx + rsi + 0xdc], dil
mov eax, dword [rbp + 0x228]
add dword [rbx + rsi + 0xfc], eax
mov edx, dword [rbx + rsi + 0xfc]
mov ecx, dword [rbx + rsi + 0xd8]
dec ecx
je 0x140003e91
dec ecx
je 0x1400040fe
jmp 0x140004215
cmp edx, 4
jb 0x140004215
mov rcx, qword [rbx + rsi + 0xe0]
mov eax, dword [rcx]
mov dword [rbx + rsi + 0xf8], eax
test eax, eax
jne 0x140003fa4
mov qword [rbp - 0x68], 0xf
mov qword [rbp - 0x70], r15
mov byte [rbp - 0x80], al
lea r8d, [rax + 0x11]
lea rdx, str.payload_size_is_0
lea rcx, [rbp - 0x80]
call fcn.140002640
nop
mov qword [rsp + 0x78], 0xf
mov qword [rsp + 0x70], r15
mov byte [rsp + 0x60], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rsp + 0x60]
call fcn.140002640
nop
cmp qword [0x140101918], 0
jne 0x140003f43
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140003f34
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140003f37
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140003f58
lea r9, [rbp - 0x80]
mov r8d, 1
lea rdx, [rsp + 0x60]
call fcn.14000c130
nop
cmp qword [rsp + 0x78], 0x10
jb 0x140003f6b
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rsp + 0x78], 0xf
mov qword [rsp + 0x70], r15
mov byte [rsp + 0x60], 0
cmp qword [rbp - 0x68], 0x10
jb 0x140003f8f
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 0x68], 0xf
mov qword [rbp - 0x70], r15
mov byte [rbp - 0x80], 0
jmp 0x1400045fc
cmp eax, 0x10e
jbe 0x1400040dd
mov qword [rbp - 0x28], 0xf
mov qword [rbp - 0x30], r15
mov byte [rbp - 0x40], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rbp - 0x40]
call fcn.140002640
nop
mov edx, dword [rbx + rsi + 0xf8]
lea rcx, [rbp + 0x140]
call fcn.1400032d0
nop
mov r8, rax
lea rdx, str.payload_size_too_large:
lea rcx, [rbp + 0xe0]
call fcn.140002c80
mov rdi, rax
cmp qword [0x140101918], 0
jne 0x140004044
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140004035
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140004038
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140004057
mov r9, rdi
mov r8d, 1
lea rdx, [rbp - 0x40]
call fcn.14000c130
nop
cmp qword [rbp + 0xf8], 0x10
jb 0x14000406e
mov rcx, qword [rbp + 0xe0]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0xf8], 0xf
mov qword [rbp + 0xf0], r15
mov byte [rbp + 0xe0], 0
cmp qword [rbp + 0x158], 0x10
jb 0x14000409e
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x158], 0xf
mov qword [rbp + 0x150], r15
mov byte [rbp + 0x140], 0
cmp qword [rbp - 0x28], 0x10
jb 0x1400040c8
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 0x28], 0xf
mov qword [rbp - 0x30], r15
mov byte [rbp - 0x40], 0
jmp 0x1400045fc
mov dword [rbx + rsi + 0xd8], 2
lea r8d, [rdx - 4]
lea rdx, [rcx + 4]
call qword [sym.imp.MSVCR110.dll_memmove]
add dword [rbx + rsi + 0xfc], 0xfffffffc
mov eax, dword [rbx + rsi + 0xf8]
cmp dword [rbx + rsi + 0xfc], eax
jb 0x140004215
mov rdx, qword [rbx + rsi + 0xe0]
lea r8, [rdx + rax]
mov qword [rbp + 0x230], r15
mov qword [rbp + 0x238], r15
mov qword [rbp + 0x240], r15
lea rcx, [rbp + 0x230]
call fcn.140004d70
nop
or edx, 0xffffffff
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [rsi + 0x20]
inc rax
cmp qword [rsi + 0x10], rax
ja 0x140004162
mov rcx, rsi
call fcn.140004b30
mov r8, qword [rsi + 0x10]
dec r8
and qword [rsi + 0x18], r8
mov rdx, qword [rsi + 0x18]
add rdx, qword [rsi + 0x20]
and r8, rdx
lea rbx, [r8*8]
mov rax, qword [rsi + 8]
cmp qword [rbx + rax], 0
jne 0x1400041a7
mov ecx, 0x18
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
test rax, rax
je 0x140004621
mov rcx, qword [rsi + 8]
mov qword [rbx + rcx], rax
mov rax, qword [rsi + 8]
mov rcx, qword [rbx + rax]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rcx
test rcx, rcx
je 0x1400041cb
lea rdx, [rbp + 0x230]
call fcn.140004da0
nop
inc qword [rsi + 0x20]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rcx, [r14 + r14*4]
add rcx, rcx
mov rcx, qword [rsi + rcx*8 + 0xb0]
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov edx, r14d
mov rcx, rsi
call fcn.1400036e0
nop
mov rcx, qword [rbp + 0x230]
test rcx, rcx
je 0x1400039c0
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
jmp 0x1400039c0
test edi, edi
je 0x1400039c0
mov ecx, dword [rbx + rsi + 0xd8]
test ecx, ecx
je 0x140004512
dec ecx
je 0x140004425
dec ecx
jne 0x1400045fc
mov qword [rbp + 0x78], 0xf
mov qword [rbp + 0x70], r15
mov byte [rbp + 0x60], cl
lea r8d, [rcx + 0xf]
lea rdx, str.NamedPipeServer
lea rcx, [rbp + 0x60]
call fcn.140002640
nop
mov edx, dword [rbx + rsi + 0xf8]
lea rcx, [rbp + 0x100]
call fcn.1400032d0
mov rdi, rax
mov edx, dword [rbx + rsi + 0xfc]
lea rcx, [rbp + 0x120]
call fcn.1400032d0
nop
mov r8, rax
lea rdx, str.pipe_closed_before_payload_finished__got
lea rcx, [rbp + 0x200]
call fcn.140002c80
nop
lea r8, str.__expected
mov rdx, rax
lea rcx, [rbp + 0x1c0]
call fcn.140002cd0
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp + 0x180]
call fcn.140002d20
mov rdi, rax
cmp qword [0x140101918], 0
jne 0x14000430e
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x1400042ff
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x140004302
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x140004321
mov r9, rdi
mov r8d, 1
lea rdx, [rbp + 0x60]
call fcn.14000c130
nop
cmp qword [rbp + 0x198], 0x10
jb 0x140004338
mov rcx, qword [rbp + 0x180]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x198], 0xf
mov qword [rbp + 0x190], r15
mov byte [rbp + 0x180], 0
cmp qword [rbp + 0x1d8], 0x10
jb 0x140004368
mov rcx, qword [rbp + 0x1c0]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x1d8], 0xf
mov qword [rbp + 0x1d0], r15
mov byte [rbp + 0x1c0], 0
cmp qword [rbp + 0x218], 0x10
jb 0x140004398
mov rcx, qword [rbp + 0x200]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x218], 0xf
mov qword [rbp + 0x210], r15
mov byte [rbp + 0x200], 0
cmp qword [rbp + 0x138], 0x10
jb 0x1400043c8
mov rcx, qword [rbp + 0x120]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x138], 0xf
mov qword [rbp + 0x130], r15
mov byte [rbp + 0x120], 0
cmp qword [rbp + 0x118], 0x10
jb 0x1400043f8
mov rcx, qword [rbp + 0x100]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x118], 0xf
mov qword [rbp + 0x110], r15
mov byte [rbp + 0x100], 0
cmp qword [rbp + 0x78], 0x10
jb 0x1400045fc
mov rcx, qword [rbp + 0x60]
jmp 0x1400045f6
mov qword [rbp + 0xb8], 0xf
mov qword [rbp + 0xb0], r15
mov byte [rbp + 0xa0], 0
mov r8d, 0x23
lea rdx, str.pipe_closed_before_payload_finished
lea rcx, [rbp + 0xa0]
call fcn.140002640
nop
mov qword [rbp + 0x18], 0xf
mov qword [rbp + 0x10], r15
mov byte [rbp], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rbp]
call fcn.140002640
nop
cmp qword [0x140101918], 0
jne 0x1400044c0
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x1400044b1
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x1400044b4
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x1400044d7
lea r9, [rbp + 0xa0]
mov r8d, 1
lea rdx, [rbp]
call fcn.14000c130
nop
cmp qword [rbp + 0x18], 0x10
jb 0x1400044e8
mov rcx, qword [rbp]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp + 0x18], 0xf
mov qword [rbp + 0x10], r15
mov byte [rbp], 0
cmp qword [rbp + 0xb8], 0x10
jb 0x1400045fc
mov rcx, qword [rbp + 0xa0]
jmp 0x1400045f6
mov qword [rbp + 0x98], 0xf
mov qword [rbp + 0x90], r15
mov byte [rbp + 0x80], 0
mov r8d, 0x1d
lea rdx, str.pipe_closed_before_connected_
lea rcx, [rbp + 0x80]
call fcn.140002640
nop
mov qword [rbp - 0x48], 0xf
mov qword [rbp - 0x50], r15
mov byte [rbp - 0x60], 0
mov r8d, 0xf
lea rdx, str.NamedPipeServer
lea rcx, [rbp - 0x60]
call fcn.140002640
nop
cmp qword [0x140101918], 0
jne 0x1400045ad
mov ecx, 1
call qword [sym.imp.MSVCR110.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x14000459e
call fcn.14000c070
test eax, eax
sete byte [0x1401018ec]
jmp 0x1400045a1
mov rbx, r15
mov qword [0x140101918], rbx
test rbx, rbx
je 0x1400045c4
lea r9, [rbp + 0x80]
mov r8d, 1
lea rdx, [rbp - 0x60]
call fcn.14000c130
nop
cmp qword [rbp - 0x48], 0x10
jb 0x1400045d5
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rbp - 0x48], 0xf
mov qword [rbp - 0x50], r15
mov byte [rbp - 0x60], 0
cmp qword [rbp + 0x98], 0x10
jb 0x1400045fc
mov rcx, qword [rbp + 0x80]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
lea rcx, [r14 + r14*4]
add rcx, rcx
mov rcx, qword [rsi + rcx*8 + 0xb0]
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov edx, r14d
mov rcx, rsi
call fcn.1400036e0
jmp 0x1400039c0
call qword [sym.imp.MSVCP110.dll_void___cdecl_std::_Xbad_alloc_void_]
nop
mov rcx, qword [rbp + 0x248]
xor rcx, rsp
call fcn.1400cc100
lea r11, [rsp + 0x350]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret