Function at 0x1003d810
Capabilities:
Check if file exists
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes
Delete file
Set environment variable
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6a8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0x206
push eax
mov word [ebp - 0x624], ax
lea eax, [ebp - 0x622]
push eax
mov dword [ebp - 0x6a8], ebx
mov dword [esi], 0
mov dword [ebp - 0x6a0], 0
call fcn.100567e0
add esp, 0xc
lea eax, [ebp - 0x624]
push dword [0x1017b860]
push 0x104
push eax
call fcn.10055fa4
mov edi, dword [sym.imp.KERNEL32.dll_CreatePipe]
lea eax, [ebp - 0x644]
add esp, 0xc
mov dword [ebp - 0x644], 0xc
mov dword [ebp - 0x640], 0
mov dword [ebp - 0x63c], 1
push 0
push eax
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x62c]
push eax
call edi
test eax, eax
jne 0x1003d8d6
mov dword [esi], 0x3e9
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.10056351
mov esp, ebp
pop ebp
ret 0xc
push 0
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x634]
push eax
call edi
test eax, eax
je 0x1003d8bb
push 0x44
lea eax, [ebp - 0x69c]
push 0
push eax
call fcn.100567e0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x66c], eax
add esp, 0xc
cmp dword [0x1017b864], 0
mov dword [ebp - 0x668], eax
mov eax, dword [ebp - 0x634]
mov dword [ebp - 0x664], eax
mov eax, dword [ebp - 0x630]
mov dword [ebp - 0x69c], 0x44
mov dword [ebp - 0x698], 0
mov dword [ebp - 0x694], 0x100e3908
mov dword [ebp - 0x690], 0
mov dword [ebp - 0x670], 0x101
mov dword [ebp - 0x65c], eax
mov dword [ebp - 0x660], eax
je 0x1003db4b
push dword [0x1017b860]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1003db3b
push 0x206
xor ebx, ebx
mov word [ebp - 0x41c], ax
lea eax, [ebp - 0x41a]
push ebx
push eax
call fcn.100567e0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x214], ax
push 0x206
push eax
lea eax, [ebp - 0x212]
push eax
call fcn.100567e0
add esp, 0xc
lea eax, [ebp - 0x214]
push dword [0x1017b860]
push 0x104
push eax
call fcn.10055fa4
add esp, 0xc
lea eax, [ebp - 0x214]
push 0x100e89b0
push 0x104
push eax
call fcn.10055f38
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1003da18
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0
push 2
push 0
push 7
push 0x40000000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x6a4], eax
cmp eax, 0xffffffff
je 0x1003daaf
push 0
lea ecx, [ebp - 0x628]
mov dword [ebp - 0x628], ebx
push ecx
push 0x55f43
push 0x1011f340
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x214]
call fcn.100422d0
mov ebx, eax
test ebx, ebx
je 0x1003daa5
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push 0x104
push eax
call fcn.10055fa4
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0x5c
push eax
call fcn.10056bd6
add esp, 8
test eax, eax
je 0x1003daa5
xor ecx, ecx
mov word [eax], cx
push dword [ebp - 0x6a4]
call edi
jmp 0x1003dab5
mov dword [esi], 0x3ea
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1003db22
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1003dae2
lea ecx, [ebp - 0x214]
call fcn.1003e080
test ebx, ebx
je 0x1003db1a
lea ecx, [ebp - 0x41c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1003daf0
sub ecx, edx
sar ecx, 1
je 0x1003db1a
lea edx, [ebp - 0x41c]
mov ecx, ebx
call fcn.10042b00
test eax, eax
jne 0x1003db28
mov dword [esi], 0x3eb
jmp 0x1003db28
mov dword [esi], 0x3ec
jmp 0x1003db28
mov dword [esi], 0x3ed
test ebx, ebx
je 0x1003db35
push ebx
call fcn.10055d78
add esp, 4
mov ebx, dword [ebp - 0x6a8]
push str.18963
push str.ANDROID_ADB_SERVER_PORT
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x654]
push eax
lea eax, [ebp - 0x69c]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push ebx
lea eax, [ebp - 0x624]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1003dbd6
push 0x1d4c0
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
push ecx
push dword [ebp - 0x62c]
call fcn.1003d740
cmp dword [esi], 0x7d3
mov dword [ebp - 0x6a0], eax
jne 0x1003dbc4
push 0
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
push ecx
push dword [ebp - 0x62c]
call fcn.1003d740
mov dword [ebp - 0x6a0], eax
push dword [ebp - 0x650]
call edi
push dword [ebp - 0x654]
call edi
jmp 0x1003dbdc
mov dword [esi], 0x3ee
mov eax, dword [ebp - 0x62c]
test eax, eax
je 0x1003dbe9
push eax
call edi
mov eax, dword [ebp - 0x630]
test eax, eax
je 0x1003dbf6
push eax
call edi
mov eax, dword [ebp - 0x634]
test eax, eax
je 0x1003dc03
push eax
call edi
mov eax, dword [ebp - 0x638]
test eax, eax
je 0x1003dc10
push eax
call edi
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x6a0]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10056351
mov esp, ebp
pop ebp
ret 0xc