Function at 0x10039ff0
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Terminate process

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007af2b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xcb8
mov eax, dword [0x100a049c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
push 0x400
mov dword [ebp - 0xc64], eax
lea eax, [ebp - 0x440]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x28]
movups xmmword [ebp - 0x28], xmm0
call fcn.1003afa0
push esi
push 0x18
push str.Adbshell::ExecuteAdbCmd
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x440]
push str._s_t__d__d___INFO____s:_d__start_with_cmd___s__n
push eax
call fcn.10007a40
lea ecx, [ebp - 0x440]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003a0a0
sub ecx, edx
lea eax, [ebp - 0x440]
push ecx
push eax
call fcn.1003b0f0
push 0x400
lea eax, [ebp - 0x840]
push 0
push eax
call fcn.10050540
add esp, 0x14
mov dword [ebp - 0xc60], 0
lea ecx, [ebp - 0xc58]
push esi
call fcn.100327f0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc58]
mov dword [ebp - 0xc5c], eax
lea eax, [ebp - 0xc70]
push 0
push eax
lea eax, [ebp - 0xc4c]
mov dword [ebp - 0xc48], 0
push eax
lea eax, [ebp - 0xc48]
mov dword [ebp - 0xc4c], 0
push eax
mov dword [ebp - 0xc70], 0xc
mov dword [ebp - 0xc6c], 0
mov dword [ebp - 0xc68], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
or edi, 0xffffffff
test eax, eax
jne 0x1003a1d2
push 0x400
push eax
lea eax, [ebp - 0x440]
push eax
call fcn.10050540
add esp, 0xc
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x28]
movups xmmword [ebp - 0x28], xmm0
call fcn.1003afa0
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x29
push str.Adbshell::ExecuteAdbCmd
call eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x440]
push str._s_t__d__d___ERROR____s:_d__CreatePipe_Error_n
push eax
call fcn.10007a40
lea ecx, [ebp - 0x440]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003a1b2
sub ecx, edx
lea eax, [ebp - 0x440]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
xor esi, esi
jmp 0x1003a50f
xorps xmm0, xmm0
mov dword [ebp - 0xcc8], 0x44
lea eax, [ebp - 0xcc8]
movlpd qword [ebp - 0xcc4], xmm0
push eax
movlpd qword [ebp - 0xcbc], xmm0
movlpd qword [ebp - 0xcb4], xmm0
movlpd qword [ebp - 0xcac], xmm0
movlpd qword [ebp - 0xca4], xmm0
movlpd qword [ebp - 0xc9c], xmm0
movlpd qword [ebp - 0xc94], xmm0
movlpd qword [ebp - 0xc8c], xmm0
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [ebp - 0xc4c]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0xc88], eax
mov dword [ebp - 0xc8c], eax
xor eax, eax
xor edi, edi
mov word [ebp - 0xc98], ax
mov dword [ebp - 0xc9c], 0x101
mov dword [ebp - 0xc54], edi
nop
lea eax, [ebp - 0xc80]
push eax
lea eax, [ebp - 0xcc8]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push dword [ebp - 0xc5c]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1003a457
push 0x3a98
push dword [ebp - 0xc80]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1003a435
cmp eax, 0xffffffff
je 0x1003a435
push dword [ebp - 0xc4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0xc4c], 0
mov dword [ebp - 0xc50], edi
push 0x400
lea eax, [ebp - 0x840]
push 0
push eax
call fcn.10050540
add esp, 0xc
lea eax, [ebp - 0xc60]
push 0
push eax
push 0x3ff
lea eax, [ebp - 0x840]
push eax
push dword [ebp - 0xc48]
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.10040085
mov ecx, eax
test ecx, ecx
je 0x1003a5a8
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xc44], eax
lea eax, [ebp - 0x840]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xc44]
call fcn.10029df0
test al, al
jne 0x1003a3ce
push 0
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x840]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edi, [eax - 1]
test edi, edi
jle 0x1003a3bd
mov esi, dword [ebp - 0xc44]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x1003a38e
push edi
lea ecx, [ebp - 0xc44]
call fcn.1002a0e0
mov esi, dword [ebp - 0xc44]
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x840]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp edi, dword [esi - 8]
jg 0x1003a5b2
mov dword [esi - 0xc], edi
xor eax, eax
mov word [esi + edi*2], ax
mov edi, dword [ebp - 0xc50]
jmp 0x1003a3d4
lea ecx, [ebp - 0xc44]
call fcn.10029f70
mov edi, dword [ebp - 0xc50]
mov esi, dword [ebp - 0xc44]
mov byte [ebp - 4], 0
cmp dword [esi - 0xc], 0
jne 0x1003a553
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1003a402
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
mov dword [ebp - 0xc50], edi
cmp edi, 3
jl 0x1003a2d3
push 0
push dword [ebp - 0xc80]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xc8
call esi
mov edi, dword [ebp - 0xc54]
jmp 0x1003a447
push 0
push dword [ebp - 0xc80]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x32
call esi
inc edi
mov dword [ebp - 0xc54], edi
cmp edi, 3
jl 0x1003a260
mov eax, dword [ebp - 0xc48]
xor esi, esi
or edi, 0xffffffff
test eax, eax
je 0x1003a477
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc48], 0
mov eax, dword [ebp - 0xc4c]
test eax, eax
je 0x1003a492
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc4c], 0
push 0x400
lea eax, [ebp - 0xc40]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [ebp - 0x2c], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x3c]
movups xmmword [ebp - 0x3c], xmm0
call fcn.1003afa0
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x6b
push str.Adbshell::ExecuteAdbCmd
call eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0xc40]
push str._s_t__d__d___INFO____s:_d__end_of_RunAdbCmd_n
push eax
call fcn.10007a40
lea ecx, [ebp - 0xc40]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003a4f6
sub ecx, edx
lea eax, [ebp - 0xc40]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc58]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x1003a531
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1004cbc7
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
or edi, 0xffffffff
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1003a56d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x3ff
lea eax, [ebp - 0x840]
push eax
push 0x3ff
push dword [ebp - 0xc64]
call fcn.1005d518
add esp, 0x10
push dword [ebp - 0xc48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0xc48], eax
lea esi, [eax + 1]
jmp 0x1003a462
push 0x80004005
call fcn.1002a380
push 0x80070057
call fcn.1002a380
int3