Function at 0x40be20
Capabilities:
Create pipe
Create process on windows
Create process suspended
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1fc
lea eax, [ebp - 0x1bc]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c4]
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c8]
mov dword [ebp - 0x1bc], 0xc
mov dword [ebp - 0x1b8], 0
mov dword [ebp - 0x1b4], 1
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
sub esp, 0x10
test eax, eax
je 0x40c105
mov eax, dword [ebp - 0x1c8]
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
sub esp, 0xc
mov dword [esp], 0xfffffff5
call ebx
sub esp, 4
mov dword [ebp - 0x1dc], eax
mov dword [esp], 0xfffffff4
call ebx
mov edx, dword [ebp - 0x1dc]
sub esp, 4
cmp edx, 0xffffffff
mov edi, eax
je 0x40beed
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edx
call esi
sub esp, 0xc
cmp edi, 0xffffffff
je 0x40bf0a
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edi
call esi
sub esp, 0xc
lea esi, [ebp - 0x160]
xor eax, eax
mov edi, esi
mov ecx, 0x11
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x1a0]
mov dword [ebp - 0x160], 0x44
mov dword [esp], 0xfffffff6
call ebx
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x1c4]
sub esp, 4
mov dword [esp], 0xfffffff4
mov dword [ebp - 0x124], eax
call ebx
lea edx, [ebp - 0x1b0]
lea ebx, [ebp - 0x11c]
mov dword [ebp - 0x1dc], edx
mov dword [ebp - 0x134], 0x100
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1ac], 0
sub esp, 4
mov dword [esp + 4], ebx
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0
mov dword [esp + 8], 0x104
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov eax, dword [ebp + 8]
sub esp, 0xc
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.adb__P__d_fork_server_server
mov dword [esp + 4], 0x40
mov dword [esp], edi
call fcn.0049e4c0
mov edx, dword [ebp - 0x1dc]
mov dword [esp + 0x20], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 8
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov eax, dword [ebp - 0x1c4]
sub esp, 0x28
mov dword [esp], eax
call ebx
sub esp, 4
test esi, esi
je 0x40c130
mov eax, dword [ebp - 0x1b0]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1ac]
sub esp, 4
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x1c0]
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1cb]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c8]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 3
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov eax, dword [ebp - 0x1c8]
sub esp, 0x14
mov dword [esp], eax
call ebx
sub esp, 4
test esi, esi
je 0x40c170
cmp dword [ebp - 0x1c0], 3
jne 0x40c0e0
cmp byte [ebp - 0x1cb], 0x4f
jne 0x40c0e0
cmp byte [ebp - 0x1ca], 0x4b
jne 0x40c0e0
xor eax, eax
cmp byte [ebp - 0x1c9], 0xa
jne 0x40c0e0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.ADB_server_didnt_ACK_n
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
lea esp, [ebp - 0xc]
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.CreatePipe___failure__error__ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, 0xffffffff
jmp 0x40c0d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.CreateProcess_failure__error__ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [ebp - 0x1c8]
mov dword [esp], eax
call ebx
mov eax, 0xffffffff
sub esp, 4
jmp 0x40c0d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.could_not_read_ok_from_ADB_Server__error___ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
jmp 0x40c0f8