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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6ae3d8
mov eax, dword fs:[0]
push eax
sub esp, 0x8c0
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x90], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
push 0x758d34
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0xffffffff
mov byte [ebp - 0x39], 1
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 1
push 0
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x51d0a1
xor eax, eax
jmp 0x51d433
push 0x44
push 0
lea edx, [ebp - 0x8c]
push edx
call fcn.006665c0
add esp, 0xc
push 0
push 1
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov dword [ebp - 0x8c], 0x44
lea ecx, [ebp - 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x60], 0x100
xor ecx, ecx
mov word [ebp - 0x5c], cx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x8c]
push eax
push 0
push 0
push 0x8000000
push 1
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x51d189
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8a4], eax
push 0
push 0
lea edx, [ebp - 0x8a0]
push edx
push 0x400
mov eax, dword [ebp - 0x8a4]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [ebp - 0x8a0]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x758d58
call fcn.0066610b
add esp, 0xc
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, dword [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x51d433
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x24]
push edx
push 0x758da8
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov dword [ebp - 0x14], 0x801
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x19], 0
push 1
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ecx, ecx
cmp eax, 0x102
sete cl
mov byte [ebp - 0x19], cl
push 0
lea edx, [ebp - 0x40]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
movzx ecx, byte [ebp - 0x19]
test ecx, ecx
jne 0x51d210
cmp dword [ebp - 0x40], 0
ja 0x51d210
mov dword [ebp - 0x8cc], 0
jmp 0x51d21a
mov dword [ebp - 0x8cc], 1
cmp dword [ebp - 0x8cc], 0
je 0x51d40c
push 0x7553bf
lea ecx, [ebp - 0x8c0]
call fcn.00404630
mov dword [ebp - 4], 0
cmp dword [ebp - 0x40], 0
jbe 0x51d2b2
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x8c4], edx
cmp dword [ebp - 0x8c4], 0x800
jbe 0x51d263
mov dword [ebp - 0x8c4], 0x800
push 0
lea eax, [ebp - 0x8c4]
push eax
mov ecx, dword [ebp - 0x8c4]
push ecx
lea edx, [ebp - 0x89c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x8c4]
mov byte [ebp + ecx - 0x89c], 0
lea edx, [ebp - 0x89c]
push edx
lea ecx, [ebp - 0x8c0]
call fcn.004138a0
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x8c4]
mov dword [ebp - 0x40], eax
jmp 0x51d23e
lea ecx, [ebp - 0x8c0]
call fcn.00405300
movzx ecx, al
test ecx, ecx
jne 0x51d3ed
lea ecx, [ebp - 0x8c0]
call fcn.00404810
push eax
push 0x758dbc
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
push 0
push str.fail
lea ecx, [ebp - 0x8c0]
call fcn.004138c0
cmp eax, 0xffffffff
jne 0x51d320
push 0
push str.error
lea ecx, [ebp - 0x8c0]
call fcn.004138c0
cmp eax, 0xffffffff
je 0x51d337
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c0]
call fcn.00404770
jmp 0x51d40c
cmp dword [0x7c39ec], 0x70
jne 0x51d3eb
movzx edx, byte [ebp - 0x39]
test edx, edx
je 0x51d3eb
push 0
push str.mh.wr50_
lea ecx, [ebp - 0x8c0]
call fcn.004138c0
cmp eax, 0xffffffff
je 0x51d3eb
mov byte [ebp - 0x39], 0
mov eax, dword [0x7dde08]
push eax
push 0x758ddc
call fcn.005128e0
add esp, 8
mov dword [ebp - 0x8c8], eax
mov ecx, dword [ebp - 0x8c8]
push ecx
call fcn.004a0040
add esp, 4
movzx edx, al
test edx, edx
jne 0x51d3d7
mov byte [0x7e46d3], 0
push str.check_Qualcomm_failed_r_n
call fcn.0066610b
add esp, 4
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c0]
call fcn.00404770
jmp 0x51d40c
mov byte [0x7e46d3], 1
push str.check_Qualcomm_success_r_n
call fcn.0066610b
add esp, 4
jmp 0x51d3f5
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c0]
call fcn.00404770
jmp 0x51d1c7
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x90]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret