Function at 0x417410
Capabilities:
Create process on windows
Create thread
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x36c
lea ebx, [ebp - 0x300]
mov dword [ebp - 0x300], 0xc
mov dword [ebp - 0x2fc], 0
mov dword [ebp - 0x2f8], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x5318d8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [ebp - 0x338], eax
je 0x417756
mov ecx, ebx
mov esi, 0xffffffff
lea edx, [ebp - 0x330]
lea eax, [ebp - 0x334]
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
call fcn.00415fd0
test al, al
jne 0x417530
mov eax, dword [ebp - 0x330]
test eax, eax
je 0x4174d6
mov dword [esp], eax
lea ecx, [ebp - 0x330]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x334]
mov dword [ebp - 0x330], 0
test eax, eax
je 0x4174fb
mov dword [esp], eax
lea ecx, [ebp - 0x334]
call fcn.0042c4c0
sub esp, 4
mov dword [ebp - 0x334], 0
mov eax, dword [ebp - 0x338]
test eax, eax
je 0x417520
mov dword [esp], eax
lea ecx, [ebp - 0x338]
call fcn.0042c4c0
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebx
lea edx, [ebp - 0x328]
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
call fcn.00415fd0
test al, al
jne 0x4175b0
mov eax, dword [ebp - 0x328]
test eax, eax
je 0x417576
mov dword [esp], eax
lea ecx, [ebp - 0x328]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x32c]
mov dword [ebp - 0x328], 0
test eax, eax
je 0x41759b
mov dword [esp], eax
lea ecx, [ebp - 0x32c]
call fcn.0042c4c0
sub esp, 4
mov dword [ebp - 0x32c], 0
jmp 0x4174bb
mov ecx, ebx
lea edx, [ebp - 0x320]
lea eax, [ebp - 0x324]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x320], 0
call fcn.00415fd0
test al, al
jne 0x417630
mov eax, dword [ebp - 0x320]
test eax, eax
je 0x4175f6
mov dword [esp], eax
lea ecx, [ebp - 0x320]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x320], 0
test eax, eax
je 0x41761b
mov dword [esp], eax
lea ecx, [ebp - 0x324]
call fcn.0042c4c0
sub esp, 4
mov dword [ebp - 0x324], 0
jmp 0x41755b
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call ebx
lea edx, [eax - 1]
sub esp, 4
cmp edx, 0xfffffffd
jbe 0x4177ca
mov dword [esp], 0xfffffff5
call ebx
lea edx, [eax - 1]
sub esp, 4
cmp edx, 0xfffffffd
jbe 0x4177b9
mov dword [esp], 0xfffffff4
call ebx
lea edx, [eax - 1]
sub esp, 4
cmp edx, 0xfffffffd
jbe 0x4177af
lea ebx, [ebp - 0x2e4]
xor eax, eax
mov ecx, 0x11
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x338]
lea esi, [ebp - 0x220]
mov dword [ebp - 0x2e4], 0x44
mov edi, dword [ebp - 0x330]
mov dword [ebp - 0x2b8], 0x100
mov dword [esp + 8], 0x104
mov dword [ebp - 0x2ac], eax
mov eax, dword [ebp - 0x328]
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x320]
mov dword [ebp - 0x2a4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
sub esp, 0xc
cmp eax, 0x102
jbe 0x4177da
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x2a0]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00435f00
mov eax, dword [ebp - 0x2a0]
mov dword [esp + 4], str.Cannot_get_executable_path:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x2a0]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
jne 0x417d9e
mov esi, 0xffffffff
jmp 0x4175db
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x220]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00435f00
mov eax, dword [ebp - 0x220]
mov dword [esp + 4], str.Cannot_open_nul:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x220]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
jne 0x417dc2
mov esi, 0xffffffff
jmp 0x417505
call fcn.00415e10
jmp 0x41767e
lea esi, [esi]
call fcn.00415e10
jmp 0x417666
lea esi, [esi]
call fcn.00415e10
jmp 0x41764e
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], edi
lea edi, [ebp - 0x2a0]
mov eax, dword [eax]
mov dword [esp + 8], str.adb__L__s_fork_server_server___reply_fd__d
mov dword [esp + 4], 0x40
mov dword [esp], edi
mov dword [esp + 0xc], eax
call fcn.00415f00
lea eax, [ebp - 0x2f4]
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x2f0], 0
mov dword [ebp - 0x2ec], 0
mov dword [ebp - 0x2e8], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 8
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x4178f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x308]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00435f00
mov eax, dword [ebp - 0x308]
mov dword [esp + 4], str.Cannot_create_process:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x308]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
je 0x41774c
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41774c
lea eax, [ebp - 0x30c]
mov dword [esp], eax
call fcn.004ede40
push edi
jmp 0x41774c
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x2f0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x2f0], 0
mov dword [ebp - 0x338], 0
sub esp, 4
test eax, eax
je 0x417949
mov dword [esp], eax
lea ecx, [ebp - 0x338]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x330]
mov dword [ebp - 0x330], 0
test eax, eax
je 0x41796e
mov dword [esp], eax
lea ecx, [ebp - 0x330]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x328]
mov dword [ebp - 0x328], 0
test eax, eax
je 0x417993
mov dword [esp], eax
lea ecx, [ebp - 0x328]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x320]
mov dword [ebp - 0x320], 0
test eax, eax
je 0x4179b8
mov dword [esp], eax
lea ecx, [ebp - 0x320]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x32c]
mov ebx, dword [sym.imp.msvcrt.dll__beginthreadex]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4165b0
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
test eax, eax
mov dword [ebp - 0x318], eax
je 0x417c4b
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x32c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x416550
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
test eax, eax
mov dword [ebp - 0x314], eax
je 0x417c7f
mov eax, dword [ebp - 0x334]
lea edi, [ebp - 0x310]
lea esi, [ebp - 0x33b]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x310], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x417c0f
cmp dword [ebp - 0x310], 3
mov dword [ebp - 0x308], 0xa4b4f
lea ebx, [ebp - 0x308]
jne 0x417ad2
mov dword [esp], esi
mov esi, 1
mov dword [esp + 8], 3
mov dword [esp + 4], ebx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x417aec
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor esi, esi
mov dword [esp + 4], str.ADB_server_didnt_ACK_n
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x318]
mov dword [esp + 4], ebx
mov dword [esp + 0xc], 0x3a98
mov dword [esp + 8], 1
mov dword [ebp - 0x308], eax
mov eax, dword [ebp - 0x314]
mov dword [esp], 2
mov dword [ebp - 0x304], eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub esp, 0x10
cmp eax, 0x102
mov ebx, eax
je 0x417d38
test eax, eax
jne 0x417bb7
mov eax, esi
xor eax, 1
movzx esi, al
neg esi
mov eax, dword [ebp - 0x314]
test eax, eax
je 0x417b5e
mov dword [esp], eax
lea ecx, [ebp - 0x314]
call fcn.0042c4c0
sub esp, 4
mov dword [ebp - 0x314], 0
mov eax, dword [ebp - 0x318]
test eax, eax
je 0x417b83
mov dword [esp], eax
lea ecx, [ebp - 0x318]
call fcn.0042c4c0
sub esp, 4
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x318], 0
test eax, eax
je 0x417ba8
mov dword [esp], eax
lea ecx, [ebp - 0x31c]
call fcn.0042c4c0
sub esp, 4
mov dword [ebp - 0x31c], 0
jmp 0x4175db
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x30c]
or esi, 0xffffffff
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00435f00
mov eax, dword [ebp - 0x30c]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Unexpected_result_waiting_for_threads:__lu:__s_n
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x30c]
mov dword [esp], edi
lea ecx, [eax - 0xc]
call fcn.004ede60
push eax
jmp 0x417b43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x417cb3
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor esi, esi
mov dword [esp + 8], 0x531798
lea ebx, [ebp - 0x308]
mov dword [esp + 4], str.could_not_read_ok_from_ADB_Server_s_n
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
jmp 0x417aec
call dword [sym.imp.msvcrt.dll__errno]
or esi, 0xffffffff
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp + 4], str.Cannot_create_thread:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
jmp 0x417b68
call dword [sym.imp.msvcrt.dll__errno]
or esi, 0xffffffff
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp + 4], str.Cannot_create_thread:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
jmp 0x417b43
lea edx, [ebp - 0x30c]
mov dword [esp], edx
lea ebx, [ebp - 0x308]
mov dword [esp + 4], eax
call fcn.00435f00
mov eax, dword [ebp - 0x30c]
mov dword [esp + 4], str.:__s
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00435b60
mov eax, dword [ebp - 0x308]
mov dword [esp + 4], str.could_not_read_ok_from_ADB_Server_s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x308]
lea ecx, [eax - 0xc]
lea eax, [ebp - 0x33c]
mov dword [esp], eax
call fcn.004ede60
mov eax, dword [ebp - 0x30c]
push ecx
lea ecx, [eax - 0xc]
mov dword [esp], ebx
call fcn.004ede60
push esi
xor esi, esi
jmp 0x417aec
mov eax, dword [sym.imp.msvcrt.dll__iob]
or esi, 0xffffffff
mov dword [esp + 4], str.Timed_out_waiting_for_threads_to_finish_reading_from_ADB_Server_n
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
mov eax, dword [ebp - 0x31c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
push edx
push edx
jne 0x417b43
mov eax, dword [ebp - 0x2ec]
mov dword [esp + 4], str.ADB_Server_is_running:_process_id__lu_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431480
jmp 0x417b43
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41774c
lea eax, [ebp - 0x2f4]
mov dword [esp], eax
call fcn.004ede40
push eax
jmp 0x41774c
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4177a5
lea eax, [ebp - 0x2a0]
mov dword [esp], eax
call fcn.004ede40
push eax
jmp 0x4177a5