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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x4545c0]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x450], edi
cmp dword [edi + 0x48], 0
jne 0x415a8b
mov eax, 0x100
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004243bb
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x48]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x415a93
sub eax, esi
mov esi, eax
lea eax, [edx + 0x20]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x415aa4
sub eax, edx
lea eax, [eax + esi + 8]
cmp eax, 0x40
jae 0x415ebc
push 0x3f
mov byte [ebp - 0x4c], cl
lea ecx, [ebp - 0x4b]
push 0
push ecx
mov dword [ebp - 0x458], 0
call fcn.0042c9e0
mov eax, dword [edi + 0x48]
add esp, 0xc
lea edx, [eax + 0x20]
push edx
push eax
lea eax, [ebp - 0x4c]
push str._spipe_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0x10
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x4c]
push ecx
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x415b60
mov ebx, dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x415eac
push 0x7530
lea edx, [ebp - 0x4c]
push edx
call ebx
test eax, eax
je 0x415eb5
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x4c]
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x415b20
xor ebx, ebx
push ebx
push ebx
lea ecx, [ebp - 0x460]
push ecx
push edi
mov dword [ebp - 0x460], ebx
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x415b9d
push str.Call_API__SetNamedPipeHandleState__to_set_the_pipe_mode_failed.
push 6
lea ebx, [ebp - 0x4c]
call fcn.00417150
add esp, 8
mov dword [ebp - 0x458], 0x100
jmp 0x415ec2
lea edx, [ebp - 0x450]
push edx
call dword [0x457588]
lea eax, [ebp - 0x450]
add esp, 4
push eax
call dword [0x457578]
lea ecx, [ebp - 0x450]
add esp, 4
push ecx
call dword [0x45756c]
mov eax, dword [ebp - 0x450]
add esp, 4
cmp dword [eax + 0x18], ebx
jbe 0x415c75
mov edx, dword [eax + 0x10]
push edx
call fcn.00424a1d
mov esi, eax
mov eax, dword [ebp - 0x450]
mov ecx, dword [eax + 0x10]
add esp, 4
push ecx
push ebx
push esi
call fcn.0042c9e0
mov eax, dword [ebp - 0x450]
mov edx, dword [eax + 0x14]
add esp, 0xc
push edx
push eax
push esi
call fcn.0042ca60
mov eax, dword [ebp - 0x450]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x20]
mov eax, dword [eax + 0x14]
add esp, 0xc
push ecx
push edx
add eax, esi
push eax
call fcn.0042ca60
mov edx, dword [ebp - 0x450]
add esp, 0xc
push ebx
lea ecx, [ebp - 0x454]
push ecx
mov dword [ebp - 0x454], ebx
mov eax, dword [edx + 0x10]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x10]
push edx
push ebx
push esi
call fcn.0042c9e0
add esp, 0xc
push esi
call fcn.00424a28
add esp, 4
jmp 0x415c97
push ebx
lea ecx, [ebp - 0x454]
push ecx
mov dword [ebp - 0x454], ebx
mov edx, dword [eax + 0x10]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x450]
cmp dword [eax + 0x50], ebx
je 0x415ec2
push 8
call fcn.004245a0
add esp, 4
cmp eax, ebx
je 0x415cbf
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov esi, eax
jmp 0x415cc1
xor esi, esi
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
push 0x3ff
lea ecx, [ebp - 0x44b]
push 0
push ecx
mov byte [ebp - 0x44c], 0
call fcn.0042c9e0
add esp, 0xc
push 0
lea edx, [ebp - 0x454]
push edx
push 0x400
lea eax, [ebp - 0x44c]
push eax
push edi
mov dword [ebp - 0x454], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
mov dword [ebp - 0x45c], ebx
test ebx, ebx
jne 0x415d28
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x415e8e
mov eax, dword [esi + 4]
test eax, eax
jne 0x415d91
cmp dword [ebp - 0x454], 0x28
jbe 0x415db5
mov ecx, 0x43c490
lea edx, [ebp - 0x44c]
call fcn.00402fb0
test eax, eax
jne 0x415db5
mov edx, dword [ebp - 0x438]
add edx, dword [ebp - 0x434]
mov eax, dword [ebp - 0x43c]
cmp eax, edx
jb 0x415db5
push eax
call fcn.00424a1d
mov ecx, dword [ebp - 0x43c]
add esp, 4
push ecx
push 0
push eax
mov dword [esi], eax
call fcn.0042c9e0
mov edx, dword [ebp - 0x454]
mov ecx, dword [esi]
add esp, 0xc
push edx
lea eax, [ebp - 0x44c]
push eax
jmp 0x415da3
mov ecx, dword [ebp - 0x454]
push ecx
mov ecx, dword [esi]
lea edx, [ebp - 0x44c]
push edx
add ecx, eax
push ecx
call fcn.0042ca60
mov edx, dword [ebp - 0x454]
add esp, 0xc
add dword [esi + 4], edx
mov eax, dword [esi + 4]
test eax, eax
je 0x415e66
mov ebx, dword [esi]
cmp dword [ebx + 0x10], eax
jne 0x415cc8
mov eax, dword [ebx + 0x8c]
mov ecx, dword [ebp - 0x450]
mov dword [ecx + 0x8c], eax
cmp dword [ebx + 0x18], 0
jbe 0x415e3e
mov edx, dword [ebx + 0x14]
lea eax, [ebp - 0x450]
add edx, ebx
push eax
mov dword [ebx + 0x20], edx
call dword [0x457590]
mov ecx, dword [ebx + 0x18]
add esp, 4
push ecx
lea edx, [ebp - 0x450]
push edx
call dword [0x45758c]
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x20]
mov edx, dword [ebp - 0x450]
push eax
mov eax, dword [edx + 0x20]
push ecx
push eax
call fcn.0042ca60
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebp - 0x450]
mov dword [edx + 0x18], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0x450]
add esp, 0x14
mov dword [ecx + 0x10], eax
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push 0
push eax
call fcn.0042c9e0
mov ecx, dword [esi]
add esp, 0xc
push ecx
call fcn.00424a28
mov ebx, dword [ebp - 0x45c]
add esp, 4
mov dword [esi], 0
test ebx, ebx
je 0x415cc8
xor eax, eax
mov dword [esi], eax
push esi
mov dword [esi + 4], eax
call fcn.004243b0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x415ec2
push str.Call_API__ReadFile__to_read_the_pipe_data_failed.
push 6
lea ebx, [ebp - 0x4c]
call fcn.00417150
add esp, 8
mov dword [ebp - 0x458], 0x100
jmp 0x415ec2
push str.Call_API__CreateFileA__to_open_the_pipe_failed.
push 0
jmp 0x415e95
push str.Call_API__WaitNamedPipeA__to_wait_the_pipe_failed.
jmp 0x415e93
mov edi, dword [ebp - 0x45c]
lea edx, [ebp - 0x450]
push edx
call dword [0x457588]
lea eax, [ebp - 0x450]
add esp, 4
push eax
call dword [0x457578]
lea ecx, [ebp - 0x450]
add esp, 4
push ecx
call dword [0x45756c]
add esp, 4
cmp edi, 0xffffffff
je 0x415efe
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x458]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004243bb
mov esp, ebp
pop ebp
ret