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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48c
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 8]
push eax
push str.in_AndrExecuteCmdLine__cmdline_s_r_n
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 dword [ebp - 0x30], 0xc
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 1
push 0
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x51d4c2
xor eax, eax
jmp 0x51d769
push 0x44
push 0
lea edx, [ebp - 0x78]
push edx
call fcn.006665c0
add esp, 0xc
push 0
push 1
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov dword [ebp - 0x78], 0x44
lea ecx, [ebp - 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 4]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x4c], 0x100
xor ecx, ecx
mov word [ebp - 0x48], cx
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x78]
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 0x51d59e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48c], eax
push 0
push 0
lea edx, [ebp - 0x488]
push edx
push 0x400
mov eax, dword [ebp - 0x48c]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [ebp - 0x488]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.::AndrExecuteCmdLine___failed_at_CreateProcess___nCommand___s_r_nMessage___s_r_n
call fcn.0066610b
add esp, 0xc
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, dword [ebp - 0x488]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x51d769
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
push edx
push 0x758e88
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov dword [ebp - 0xc], 0x400
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 8], 0
mov eax, 1
test eax, eax
je 0x51d69b
push 0
lea ecx, [ebp - 0x484]
push ecx
push 0x3ff
lea edx, [ebp - 0x480]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x51d61d
jmp 0x51d69b
mov ecx, dword [ebp - 0x484]
mov byte [ebp + ecx - 0x480], 0
movzx edx, byte [ebp + 0x10]
test edx, edx
je 0x51d658
lea eax, [ebp - 0x480]
push eax
push 0x758e9c
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
push str.Verify_successful
lea ecx, [ebp - 0x480]
push ecx
call fcn.00404520
add esp, 8
test eax, eax
je 0x51d677
mov dword [ebp - 0x7c], 1
push str.Download_Succeed
lea edx, [ebp - 0x480]
push edx
call fcn.00404520
add esp, 8
test eax, eax
je 0x51d696
mov dword [ebp - 8], 1
jmp 0x51d5e6
push 0x758ec8
call fcn.0066610b
add esp, 4
push 0xffffffffffffffff
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
push str.andr_exitCode_d_r_n
call fcn.0066610b
add esp, 8
push str.JLink.exe
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404520
add esp, 8
test eax, eax
je 0x51d71e
cmp dword [ebp - 0x7c], 0
jne 0x51d71e
push str.JLink.exe_Download_failed_r_n
call fcn.0066610b
add esp, 4
mov edx, dword [ebp + 0xc]
mov dword [edx], 0x703
xor eax, eax
jmp 0x51d769
push str.QFIL.exe
mov eax, dword [ebp + 8]
push eax
call fcn.00404520
add esp, 8
test eax, eax
je 0x51d753
cmp dword [ebp - 8], 0
jne 0x51d753
push str.QFIL.exe_Download_failed_r_n
call fcn.0066610b
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0x704
xor eax, eax
jmp 0x51d769
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0x80]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret