Function at 0x415060
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x456d10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x45a954]
push ebx
push esi
mov dword [ebp - 0x58], eax
mov ebx, 1
mov eax, dword [0x45a944]
push edi
mov edi, dword [0x45a92c]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x45aa84]
mov dword [ebp - 0x18], eax
mov eax, dword [0x45af8c]
push str.Entering_ReadScreenSimpleMode_n
push ebx
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call fcn.0041a380
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 8
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x3c], xmm0
push 0
push 0
push ebx
push 0
movq qword [ebp - 0x2c], xmm0
movdqu xmmword [ebp - 0x54], xmm0
movq qword [ebp - 0x44], xmm0
call esi
push 0
push 0
push ebx
push 0
mov dword [ebp - 0x2c], eax
call esi
push 0x4000
push 0
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
push 0x800
push 0
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x4000
push dword [ebp - 0x28]
push dword [ebp - 0x58]
call esi
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x800
push dword [ebp - 0x40]
push edi
call esi
mov eax, dword [ebp - 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0xc], eax
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x415170
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
push 5
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, eax
cmp ecx, 3
ja 0x4153b2
je 0x415265
sub eax, 0
je 0x4153c0
dec eax
je 0x4153c7
dec eax
jne 0x415170
push str.Got_hBeepEvent_first_wait_n
push 2
call fcn.0041a380
add esp, 8
cmp dword [0x457ea0], 0
je 0x415254
cmp byte [0x45a54d], 0
mov ecx, dword [0x45a96c]
mov dword [ebp - 0x24], 0
jne 0x415254
cmp ecx, dword [0x45a938]
mov esi, ecx
cmove esi, dword [0x45a938]
cmp dword [0x45aa80], 0
je 0x415206
cmp esi, ecx
jne 0x415206
push 1
push 0x45005c
push 0x45a828
call fcn.0041c5b0
add esp, 0xc
push 0
push dword [0x45af78]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x415247
push 0
lea eax, [ebp - 0x24]
push eax
push 1
push 0x45005c
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [0x45a958]
test ecx, ecx
je 0x41524e
push 1
mov edx, 0x45005c
call fcn.00404560
add esp, 4
jmp 0x41524e
mov dword [ebp - 0x24], 1
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [0x45af8c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x415170
push 1
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4153a0
push dword [ebp - 0x20]
push str._d_BytesRead_from_pipe_n
push 2
call fcn.0041a380
add esp, 0xc
cmp dword [0x45a94c], 3
jne 0x4152a6
mov ecx, dword [ebp - 0x28]
lea edx, [ebp - 0x20]
call fcn.004144d0
cmp dword [0x45af90], 0
je 0x4152e7
push 0xffffffffffffffff
push str.Waiting_on_Output_Lock_timeout___d_n
push 7
call fcn.0041a380
add esp, 0xc
push 0xffffffffffffffff
push dword [0x45af90]
call esi
cmp eax, 0x102
jne 0x4152d8
push str.Continuing_after_timeout_n
jmp 0x4152dd
push str.Got_Output_Lock_n
push 7
call fcn.0041a380
add esp, 8
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x28]
push dword [0x45a96c]
call fcn.004045f0
mov esi, eax
add esp, 0x10
mov eax, dword [0x45af90]
test eax, eax
je 0x41533e
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
je 0x41532b
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.Released_Output_Lock_n
push 7
call fcn.0041a380
add esp, 0xc
jmp 0x41533e
call edi
push eax
push eax
push str.Failed_to_release_lock_rc___d__0x_0x__n
push 7
call fcn.0041a380
add esp, 0x10
push esi
push str._d_Bytes_sent_in_filter_send_n
push 2
call fcn.0041a380
add esp, 0xc
test esi, esi
je 0x41552b
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x4000
push dword [ebp - 0x28]
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x415170
call edi
cmp eax, 0x3e5
je 0x415165
push eax
push eax
push str.Error_reading_shell_output_pipe_rc___d__0x_0x__n
push 0
call fcn.0041a380
add esp, 0x10
jmp 0x41552d
xor ebx, ebx
call edi
cmp eax, 0x6d
je 0x415170
jmp 0x41552d
cmp ecx, 4
je 0x4153e9
cmp ecx, 0xffffffff
jne 0x415170
mov byte [0x45a54d], 1
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x415505
call edi
push eax
push str.ReadScreenSimpleMode_exit_WAIT_FAILED_error___d__n
push 1
call fcn.0041a380
add esp, 0xc
jmp 0x41552d
push 1
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4153a0
push dword [ebp - 0x20]
push str._d_BytesRead_from_pipe_n
push 2
call fcn.0041a380
add esp, 0xc
cmp dword [0x45af90], 0
je 0x415453
push 0xffffffffffffffff
push str.Waiting_on_Output_Lock_timeout___d_n
push 7
call fcn.0041a380
add esp, 0xc
push 0xffffffffffffffff
push dword [0x45af90]
call esi
cmp eax, 0x102
jne 0x415444
push str.Continuing_after_timeout_n
jmp 0x415449
push str.Got_Output_Lock_n
push 7
call fcn.0041a380
add esp, 8
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x40]
push dword [0x45a938]
call fcn.004045f0
mov esi, eax
add esp, 0x10
mov eax, dword [0x45af90]
test eax, eax
je 0x4154aa
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
je 0x415497
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.Released_Output_Lock_n
push 7
call fcn.0041a380
add esp, 0xc
jmp 0x4154aa
call edi
push eax
push eax
push str.Failed_to_release_lock_rc___d__0x_0x__n
push 7
call fcn.0041a380
add esp, 0x10
push esi
push str._d_Bytes_sent_in_filter_send_n
push 2
call fcn.0041a380
add esp, 0xc
test esi, esi
je 0x41552b
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x800
push dword [ebp - 0x40]
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x415170
call edi
cmp eax, 0x3e5
je 0x415165
push eax
push eax
push str.Error_reading_shell_error_pipe_rc___d__0x_0x__n
push 0
call fcn.0041a380
add esp, 0x10
jmp 0x41552d
test ecx, ecx
jne 0x41551a
push str.ReadScreenSimpleMode_exit_TerminateEvent_n
push 4
call fcn.0041a380
add esp, 8
jmp 0x41552d
push str.ReadScreenSimpleMode_exit_command_shell_exit_n
push 4
call fcn.0041a380
add esp, 8
jmp 0x41552d
xor ebx, ebx
push dword [ebp - 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_CancelIo]
call esi
mov edi, dword [ebp - 0x5c]
push edi
call esi
push dword [ebp - 0x40]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
push dword [ebp - 0x28]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
push dword [ebp - 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x2c]
call esi
push dword [ebp - 0x58]
call esi
push edi
call esi
push 0
push 0
push 0x464
push dword [0x45a534]
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push str.Exit_ReadScreenSimpleMode_n
push 1
call fcn.0041a380
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004265fb
mov esp, ebp
pop ebp
ret