Function at 0x140037ff0
Capabilities:
Read file on windows
Read pipe

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x180
mov qword [rsp + 0x110], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x140126108]
xor rax, rsp
mov qword [rsp + 0x178], rax
lea r9, str.CWindowManagerClient::Run
mov r8d, 0x99
lea rdx, str..WindowManagerClient.cpp
lea rcx, [rsp + 0x40]
call fcn.1400583e0
nop
mov qword [rsp + 0x170], 7
xor r13d, r13d
mov qword [rsp + 0x168], r13
mov word [rsp + 0x158], r13w
mov word [rsp + 0x30], r13w
xor eax, eax
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x6c], eax
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x74], eax
xor r12b, r12b
mov dword [rsp + 0x34], r13d
mov dword [rsp + 0x38], r13d
mov rax, qword [0x14013c010]
mov qword [rsp + 0x68], rax
mov rax, qword [0x14013c008]
mov qword [rsp + 0x70], rax
lea r15, [0x1400eb208]
lea rbx, [0x140131500]
movabs r14, 0x7ffffffffffffffe
mov r9d, 1
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea ecx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0x81
ja 0x140038155
cmp eax, 0x80
jae 0x140038134
test eax, eax
je 0x140038113
cmp eax, 1
jne 0x14003818f
lea r9, str.m_hWindowManagerHost_is_signaled.
lea edx, [rax + 5]
mov r8d, 0xba
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
jmp 0x14003818f
lea r9, str.m_hStopEvent_is_signaled.
mov edx, 6
mov r8d, UnRegisterTypeLib
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
jmp 0x14003818f
lea r9, str.Process_and_Event_objects_should_not_enter_WAIT_ABANDONED.
mov edx, 6
mov r8d, 0xae
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
jmp 0x14003818f
cmp eax, 0x102
je 0x14003818c
cmp eax, 0xffffffff
jne 0x14003818f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.WaitForMultipleObjects_GetLastError:__u_
mov edx, 6
mov r8d, 0xc5
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
jmp 0x14003818f
xor r12b, r12b
mov qword [rsp + 0xe0], r15
mov qword [rsp + 0xe8], rbx
lea rcx, [0x140131508]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [rsp + 0xf0], r13d
cmp byte [0x14013bfb0], 0
jne 0x140038652
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x14003861c
mov ebp, dword [rsp + 0x34]
shr ebp, 1
mov esi, r13d
je 0x140038604
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x38]
mov r8d, 2
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400385d4
cmp dword [rsp + 0x38], 0
je 0x1400385ac
movzx edi, word [rsp + 0x30]
test di, di
jne 0x1400384c1
mov byte [rsp + 0x90], dil
mov qword [rsp + 0x98], r13
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x78], 1
lea rcx, [rsp + 0x78]
call qword [0x1400d8118]
test eax, eax
js 0x1400382e5
mov byte [rsp + 0x90], 1
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x78]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
lea rdx, [rsp + 0x158]
cmp qword [rsp + 0x170], 8
cmovae rdx, qword [rsp + 0x158]
lea rcx, [rsp + 0x120]
call qword [0x1400d8180]
mov dword [rsp + 0xa0], eax
lea rcx, [rsp + 0x78]
call fcn.140037120
mov edi, eax
cmp byte [rsp + 0x90], 1
jne 0x140038306
lea rcx, [rsp + 0x78]
call qword [0x1400d8130]
mov rbx, qword [rsp + 0x98]
test rbx, rbx
je 0x140038323
mov rcx, rbx
call fcn.140050a90
mov rcx, rbx
call fcn.14006b8a0
test edi, edi
jns 0x140038347
mov dword [rsp + 0x20], edi
lea r9, str.WindowManagerClient::ExecCommand_eStatus:__d_
mov edx, 6
mov r8d, 0xf6
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov rcx, qword [0x14013c018]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x14003837e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.SetEvent___failed._dwErr:__u_
mov edx, 6
mov r8d, 0xfc
lea rcx, [rsp + 0x40]
call fcn.1400585b0
lea rax, [rsp + 0x158]
mov rcx, qword [rsp + 0x158]
mov rdx, qword [rsp + 0x170]
cmp rdx, 8
cmovae rax, rcx
mov r8, qword [rsp + 0x168]
lea rbx, [rax + r8*2]
test rbx, rbx
je 0x1400383dd
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, rcx
cmp rax, rbx
ja 0x1400383dd
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + r8*2]
cmp rbx, rax
jbe 0x1400383fa
call fcn.14009d0b0
mov rdx, qword [rsp + 0x170]
mov r8, qword [rsp + 0x168]
mov rcx, qword [rsp + 0x158]
lea rax, [rsp + 0x150]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], rbx
movaps xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0xd0], xmm0
cmp rdx, 8
jb 0x140038433
mov rbx, rcx
test rcx, rcx
je 0x140038469
jmp 0x14003843b
lea rbx, [rsp + 0x158]
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, rcx
cmp rax, rbx
ja 0x140038469
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + r8*2]
cmp rbx, rax
jbe 0x14003846e
call fcn.14009d0b0
lea rax, [rsp + 0x150]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rbx
movaps xmm0, xmmword [rsp + 0xb0]
movdqa xmmword [rsp + 0x100], xmm0
lea r9, [rsp + 0xd0]
lea r8, [rsp + 0x100]
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0x150]
call fcn.140038950
jmp 0x140038598
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x168]
sub rax, rcx
cmp rax, 1
ja 0x1400384e3
call fcn.1400cbc00
mov rcx, qword [rsp + 0x168]
lea rbx, [rcx + 1]
cmp rbx, r14
jbe 0x1400384f9
call fcn.1400cbc00
mov rcx, qword [rsp + 0x168]
mov rdx, qword [rsp + 0x170]
cmp rdx, rbx
jae 0x14003852b
mov r8, rcx
mov rdx, rbx
lea rcx, [rsp + 0x150]
call fcn.14000f350
mov rdx, qword [rsp + 0x170]
mov rcx, qword [rsp + 0x168]
jmp 0x140038552
test rbx, rbx
jne 0x140038552
mov qword [rsp + 0x168], r13
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, qword [rsp + 0x158]
mov word [rax], bx
jmp 0x140038598
test rbx, rbx
je 0x140038598
lea rax, [rsp + 0x158]
cmp rdx, 8
cmovae rax, qword [rsp + 0x158]
mov word [rax + rcx*2], di
mov qword [rsp + 0x168], rbx
lea rax, [rsp + 0x158]
cmp qword [rsp + 0x170], 8
cmovae rax, qword [rsp + 0x158]
mov word [rax + rbx*2], 0
add esi, 1
cmp esi, ebp
jb 0x140038203
lea rbx, [0x140131500]
jmp 0x140038604
lea r9, str.ReadFile_returns_EOF.
mov edx, 6
mov r8d, 0xea
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
lea rbx, [0x140131500]
jmp 0x140038604
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.ReadFile_GetLastError:__u_
mov edx, 6
mov r8d, 0xe3
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov r12b, 1
lea rbx, [0x140131500]
lea rcx, [0x140131508]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r12b, r12b
je 0x1400380c1
jmp 0x14003867c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.PeekNamedPipe_GetLastError:__u_
mov edx, 6
mov r8d, 0xd7
lea rcx, [rsp + 0x40]
call fcn.1400585b0
nop
lea rcx, [0x140131508]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14003867c
lea r9, str.thread_manager_refuses_to_process_any_command__so_gives_up_reading_from_pipe.
mov edx, 6
mov r8d, 0xcf
lea rcx, [rsp + 0x40]
call fcn.1400585b0
nop
lea rcx, [0x140131508]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rsp + 0x168], 0
jbe 0x1400386c2
lea rax, [rsp + 0x158]
cmp qword [rsp + 0x170], 8
cmovae rax, qword [rsp + 0x158]
mov qword [rsp + 0x20], rax
lea r9, str.Pending_Request._wstrBuffer:__s_
mov edx, 6
mov r8d, 0x10b
lea rcx, [rsp + 0x40]
call fcn.1400585b0
mov dword [rsp + 0x4c], 0x10d
mov dword [rsp + 0x48], 1
cmp qword [rsp + 0x170], 8
jb 0x1400386ea
mov rcx, qword [rsp + 0x158]
call fcn.14006b8a0
mov qword [rsp + 0x170], 7
mov qword [rsp + 0x168], r13
mov word [rsp + 0x158], 0
lea rax, [0x1400d8790]
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
call fcn.140058360
nop
mov rcx, qword [rsp + 0x60]
call fcn.14006b8a0
nop
mov rcx, qword [rsp + 0x58]
call fcn.14006b8a0
nop
mov rcx, qword [rsp + 0x178]
xor rcx, rsp
call fcn.14009cca0
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret