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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
lea eax, [ebp - 0x13c]
push eax
lea ecx, [ebp - 0x11c]
push ecx
lea edx, [ebp - 0x118]
push edx
mov dword [ebp - 0x13c], 0xc
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4029e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreatePipe___failure__error__ld_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x118]
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x44
lea ecx, [ebp - 0x188]
push 0
push ecx
call sub.MSVCR100.dll_memset
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0xc
push 0xfffffffffffffff6
mov dword [ebp - 0x188], 0x44
call esi
mov edx, dword [ebp - 0x11c]
push 0xfffffffffffffff4
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], edx
call esi
mov dword [ebp - 0x148], eax
xor eax, eax
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], eax
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
mov dword [ebp - 0x15c], 0x100
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x130]
push ecx
lea edx, [ebp - 0x188]
push edx
push 0
push 0
push 8
push 1
push 0
push 0
push str.adb_fork_server_server
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [ebp - 0x11c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov edi, eax
call esi
test edi, edi
jne 0x402aee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateProcess_failure__error__ld_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
mov edx, dword [ebp - 0x118]
add esp, 0xc
push edx
call esi
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x130]
push eax
call esi
mov ecx, dword [ebp - 0x12c]
push ecx
call esi
mov ecx, dword [ebp - 0x118]
push 0
lea edx, [ebp - 0x120]
push edx
push 3
lea eax, [ebp - 0x114]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x118]
push edx
mov edi, eax
call esi
test edi, edi
jne 0x402b3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.could_not_read_ok_from_ADB_Server__error___ld_n
jmp 0x4029c0
cmp dword [ebp - 0x120], 3
jne 0x402b75
cmp byte [ebp - 0x114], 0x4f
jne 0x402b75
cmp byte [ebp - 0x113], 0x4b
jne 0x402b75
cmp byte [ebp - 0x112], 0xa
jne 0x402b75
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push str.ADB_server_didnt_ACK_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
xor ecx, ebp
or eax, 0xffffffff
pop esi
call fcn.00459ce1
mov esp, ebp
pop ebp
ret