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

Disassembly:
push ebp
lea ebp, [esp - 0x204]
sub esp, 0x204
push 0xffffffffffffffff
push 0x53d7d6
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x58313c]
xor eax, ebp
mov dword [ebp + 0x200], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp + 0x20c]
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x58], eax
push 0x100
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 0
call fcn.0040cf90
mov dword [ebp - 4], 1
mov edi, dword [esi]
test edi, edi
je 0x4222cf
xor ebx, ebx
lea eax, [ebp]
mov esi, 0x200
mov dword [ebp - 0x10], eax
cmp byte [edi], bl
je 0x4222a4
test esi, esi
jle 0x4222a4
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
push 0
push 0
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x4222a4
mov eax, dword [ebp - 0x14]
mov ecx, eax
cmp esi, eax
push 0
cmovl ecx, esi
test eax, eax
jne 0x422275
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4222a4
mov eax, dword [0x589700]
push 1
test eax, eax
jne 0x42226c
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42229b
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x42229b
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push ecx
push dword [ebp - 0x10]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4222a4
mov eax, dword [ebp - 0x18]
add ebx, eax
add dword [ebp - 0x10], eax
sub esi, eax
cmp byte [edi], 0
jne 0x422214
test ebx, ebx
jle 0x4222cf
push ebx
lea ecx, [ebp - 0x48]
call fcn.00421b50
mov esi, dword [ebp - 0x1c]
test eax, eax
je 0x4221f5
push ebx
lea ecx, [ebp]
push ecx
push eax
call fcn.00514850
add esp, 0xc
jmp 0x4221f5
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x2c]
test eax, eax
jne 0x4222de
mov eax, dword [ebp - 0x34]
jmp 0x4222ee
cmp dword [eax + 4], ecx
jbe 0x4222ec
mov eax, dword [eax]
mov byte [eax + ecx], 0
mov eax, dword [ebp - 0x40]
mov eax, dword [eax]
mov ebx, dword [ebp - 0x20]
push ecx
push eax
push ebx
call fcn.004161b0
add esp, 0xc
mov dword [ebp - 0x24], 3
mov esi, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 2
mov dword [ebp - 0x48], vtable.juce::MemoryOutputStream.0
cmp esi, eax
je 0x422366
test esi, esi
je 0x422366
mov edi, dword [ebp - 0x2c]
cmp dword [esi + 4], edi
je 0x422366
test edi, edi
jne 0x42233c
push dword [esi]
call fcn.00518201
mov dword [esi], edi
add esp, 4
mov dword [esi + 4], edi
jmp 0x422366
mov eax, dword [esi]
test eax, eax
je 0x422354
push edi
push eax
call fcn.00518227
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x4223c2
jmp 0x422363
push 0
call fcn.00518201
push edi
call fcn.0051821c
jmp 0x422349
mov dword [esi + 4], edi
push dword [ebp - 0x3c]
call fcn.00518201
mov eax, dword [ebp - 0x44]
add esp, 4
add eax, 0xfffffff8
mov dword [ebp - 0x48], vtable.juce::OutputStream.0
cmp eax, 0x583008
je 0x42239b
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
cmp ecx, 0xffffffff
jne 0x42239b
push eax
call fcn.005128b5
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x200]
xor ecx, ebp
call fcn.00512b0b
lea esp, [ebp + 0x204]
pop ebp
ret 4
lea ecx, [ebp - 0x54]
call fcn.0040e5a0
push 0x57871c
lea eax, [ebp - 0x54]
push eax
call fcn.005143ff
int3