Function at 0x40cfa0
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, 0x33c
lea eax, [ebp - 0x300]
mov dword [esp + 8], eax
lea eax, [ebp - 0x308]
mov dword [esp + 4], eax
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x300], 0xc
mov dword [ebp - 0x2fc], 0
mov dword [ebp - 0x2f8], 1
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
sub esp, 0x10
test eax, eax
je 0x40d285
mov eax, dword [ebp - 0x30c]
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 - 0x31c], eax
mov dword [esp], 0xfffffff4
call ebx
mov edx, dword [ebp - 0x31c]
sub esp, 4
cmp edx, 0xffffffff
mov edi, eax
je 0x40d06d
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edx
call esi
sub esp, 0xc
cmp edi, 0xffffffff
je 0x40d08a
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edi
call esi
sub esp, 0xc
lea esi, [ebp - 0x2e4]
xor eax, eax
mov edi, esi
mov ecx, 0x11
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x2a0]
mov dword [ebp - 0x2e4], 0x44
mov dword [esp], 0xfffffff6
call ebx
mov dword [ebp - 0x2ac], eax
mov eax, dword [ebp - 0x308]
sub esp, 4
mov dword [esp], 0xfffffff4
mov dword [ebp - 0x2a8], eax
call ebx
lea edx, [ebp - 0x2f4]
lea ebx, [ebp - 0x220]
mov dword [ebp - 0x31c], edx
mov dword [ebp - 0x2b8], 0x100
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x2f0], 0
sub esp, 4
mov dword [esp + 4], ebx
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2ec], 0
mov dword [ebp - 0x2e8], 0
mov dword [esp + 8], 0x208
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
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], pe_nt_image_headers32
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__snwprintf]
mov edx, dword [ebp - 0x31c]
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_CreateProcessW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov eax, dword [ebp - 0x308]
sub esp, 0x28
mov dword [esp], eax
call ebx
sub esp, 4
test esi, esi
je 0x40d2b0
mov eax, dword [ebp - 0x2f4]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x2f0]
sub esp, 4
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x304]
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x30f]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30c]
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 - 0x30c]
sub esp, 0x14
mov dword [esp], eax
call ebx
sub esp, 4
test esi, esi
je 0x40d2f0
cmp dword [ebp - 0x304], 3
jne 0x40d260
cmp byte [ebp - 0x30f], 0x4f
jne 0x40d260
cmp byte [ebp - 0x30e], 0x4b
jne 0x40d260
xor eax, eax
cmp byte [ebp - 0x30d], 0xa
jne 0x40d260
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.0049fc30
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.0049fc30
mov eax, 0xffffffff
jmp 0x40d257
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.0049fc30
mov eax, dword [ebp - 0x30c]
mov dword [esp], eax
call ebx
mov eax, 0xffffffff
sub esp, 4
jmp 0x40d257
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.0049fc30
jmp 0x40d278