Function at 0x4151d0
Capabilities:
Create process on windows
Create thread
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x380
lea edi, [esp + 0xa4]
mov dword [esp + 0xa4], 0xc
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 1
push 0
push pe_nt_image_headers32
push 3
push edi
push 3
push 0x80000000
push 0x586080
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
je 0x415429
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
lea ecx, [esp + 0x34]
lea edx, [esp + 0x20]
push edi
call fcn.00415d80
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x415d0e
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 0
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1c]
push edi
call fcn.00415d80
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x415cda
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], 0
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push edi
call fcn.00415d80
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x415ca6
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x4152d5
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x4152f0
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x41530b
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov eax, dword [esp + 0x24]
mov dword [esp + 0xb8], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc8], 0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xd4], 0
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0
mov dword [esp + 0xb0], 0x44
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x174]
mov dword [esp + 0xe8], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xec], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xf0], eax
mov dword [esp + 0xdc], 0x100
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
dec eax
cmp eax, 0x103
jb 0x415499
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xf4]
push eax
push ecx
call fcn.004df0f0
add esp, 8
test byte [esp + 0xf4], 1
je 0x4154a6
mov eax, dword [esp + 0xfc]
jmp 0x4154ad
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x174]
push eax
push ecx
call fcn.004df0f0
add esp, 8
test byte [esp + 0x174], 1
je 0x415460
mov eax, dword [esp + 0x17c]
jmp 0x415467
lea eax, [esp + 0x175]
push eax
push str.adb:_CreateFileW_nul_failed:__s_n
push esi
call fcn.00438580
add esp, 0xc
test byte [esp + 0x174], 1
je 0x41548f
push dword [esp + 0x17c]
call fcn.004fc300
add esp, 4
mov esi, 0xffffffff
jmp 0x415d42
mov eax, dword [ebp + 8]
test byte [eax], 1
je 0x4154d6
mov eax, dword [eax + 8]
jmp 0x4154d7
lea eax, [esp + 0xf5]
push eax
push str.adb:_cannot_get_executable_path:__s_n
push esi
call fcn.00438580
add esp, 0xc
test byte [esp + 0xf4], 1
je 0x41573e
push dword [esp + 0xfc]
jmp 0x415736
inc eax
sub esp, 0x14
mov dword [esp + 0x10], edi
lea edi, [esp + 0x108]
mov dword [esp + 0xc], eax
mov dword [esp], edi
call fcn.00415f20
add esp, 0x14
xorps xmm0, xmm0
lea eax, [esp + 0x80]
lea ecx, [esp + 0xb0]
movaps xmmword [esp + 0x80], xmm0
push eax
push ecx
push 0
push 0
push 8
push 1
push 0
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4156b4
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x80], 0
mov dword [esp + 0x50], eax
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x84], 0
mov dword [esp + 0x24], 0
test eax, eax
je 0x415574
lea ecx, [esp + 0x24]
push eax
call fcn.00432940
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], 0
test eax, eax
je 0x41558e
lea ecx, [esp + 0x20]
push eax
call fcn.00432940
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], 0
test eax, eax
je 0x4155a8
lea ecx, [esp + 0x1c]
push eax
call fcn.00432940
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], 0
test eax, eax
je 0x4155c2
lea ecx, [esp + 0x18]
push eax
call fcn.00432940
push 0
push 0
push dword [esp + 0x34]
push 0x415f40
push 0
push 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x4c], eax
je 0x4156e2
mov dword [esp + 0x2c], 0
push 0
push 0
push dword [esp + 0x30]
push 0x415fc0
push 0
push 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x48], eax
je 0x415748
mov dword [esp + 0x28], 0
mov dword [esp + 0x64], 0
lea eax, [esp + 0x64]
lea ecx, [esp + 0x59]
push 0
push eax
push 3
push ecx
push dword [esp + 0x44]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x415779
cmp dword [esp + 0x64], 3
jne 0x415668
movzx eax, word [esp + 0x59]
movzx ecx, byte [esp + 0x5b]
xor eax, 0x4b4f
xor ecx, 0xa
or cx, ax
je 0x415a1e
mov ebx, dword [esp + 0x88]
mov esi, dword [fcn.005379b0]
push 2
call esi
add esp, 4
push str.ADB_server_didnt_ACK_n
push eax
call fcn.00438580
add esp, 8
push 2
call esi
add esp, 4
mov esi, eax
lea edi, [esp + 8]
push edi
call fcn.0041aed0
add esp, 4
test byte [esp + 8], 1
je 0x4157af
mov eax, dword [esp + 0x10]
jmp 0x4157b3
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 8]
push eax
push ecx
call fcn.004df0f0
add esp, 8
test byte [esp + 8], 1
je 0x415718
mov eax, dword [esp + 0x10]
jmp 0x41571c
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
call fcn.00439f20
add esp, 4
push eax
push str.adb:_cannot_create_thread:__s_n
push esi
call fcn.00438580
add esp, 0xc
mov esi, 0xffffffff
jmp 0x415c72
lea eax, [esp + 9]
push eax
push str.adb:_CreateProcessW_failed:__s_n
push esi
call fcn.00438580
add esp, 0xc
test byte [esp + 8], 1
je 0x41573e
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
mov esi, 0xffffffff
jmp 0x415ca6
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
call fcn.00439f20
add esp, 4
push eax
push str.adb:_cannot_create_thread:__s_n
push esi
call fcn.00438580
add esp, 0xc
jmp 0x415c53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
cmp edi, 0x6d
jne 0x415a03
push 0x585e2c
push str.could_not_read_ok_from_ADB_Server_s_n
push esi
call fcn.00438580
add esp, 0xc
jmp 0x415a7f
lea eax, [esp + 9]
push eax
push str.Full_server_startup_log:__s_n
push esi
call fcn.00438580
add esp, 0xc
test byte [esp + 8], 1
je 0x4157d5
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
push 2
call dword [0x58040c]
add esp, 4
push ebx
push str.Server_had_pid:__d_n
push eax
call fcn.00438580
add esp, 0xc
push edi
call fcn.0041aed0
add esp, 4
movzx eax, byte [esp + 8]
mov dword [esp + 0x44], ebx
test al, 1
je 0x41580f
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
jmp 0x415815
shr eax, 1
lea ecx, [esp + 9]
mov dword [esp + 0x9c], eax
mov dword [esp + 0x98], ecx
sub esp, 0xc
movsd xmm0, qword [esp + 0xa4]
movsd qword [esp], xmm0
mov dword [esp + 8], 0
call fcn.00437fb0
add esp, 0xc
mov esi, dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x60], eax
call esi
mov ebx, dword [eax]
call esi
mov dword [eax], ebx
test byte [esp + 8], 1
je 0x415869
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
mov ebx, dword [esp + 0x60]
cmp ebx, 0xffffffff
je 0x4159f6
push 2
push 0xffffffffffffffff
push 0xfffe0000
push ebx
call fcn.00529660
add esp, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
push edi
push ebx
call fcn.004dc870
add esp, 8
test al, al
je 0x415c27
lea eax, [esp + 0x38]
push dword [esp + 0x44]
push str.____adb_starting__pid__d_____
push eax
call fcn.004deac0
add esp, 0xc
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov word [esp + 0x68], 0xa02
mov byte [esp + 0x6a], 0
lea ecx, [esp + 0x74]
push eax
push edi
push ecx
call fcn.004deb20
add esp, 0xc
test byte [esp + 0x68], 1
je 0x415912
push dword [esp + 0x70]
call fcn.004fc300
add esp, 4
mov esi, dword [esp + 0x78]
mov ebx, dword [esp + 0x74]
mov eax, esi
sub eax, ebx
mov ecx, eax
sar ecx, 2
imul edx, ecx, 0xaaaaaaab
test eax, eax
lea ecx, [edx - 1]
mov dword [esp + 0x94], edx
jle 0x415b75
movzx eax, byte [esp + 0x38]
mov edi, eax
shr edi, 1
test al, 1
lea eax, [edx + edx*2]
cmovne edi, dword [esp + 0x3c]
lea eax, [ebx + eax*4 - 0xb]
mov dword [esp + 0x44], eax
mov dword [esp + 0x54], edi
lea edi, [esp + 0x39]
cmovne edi, dword [esp + 0x40]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x30], ecx
lea ecx, [ecx + ecx*2]
movzx edx, byte [ebx + ecx*4]
mov eax, edx
shr eax, 1
test dl, 1
mov edi, eax
je 0x415981
mov edi, dword [ebx + ecx*4 + 4]
cmp edi, dword [esp + 0x54]
jne 0x4159e1
lea edi, [ebx + ecx*4]
inc edi
test dl, 1
je 0x415994
mov edi, dword [ebx + ecx*4 + 8]
jne 0x4159be
cmp dword [esp + 0x54], 0
je 0x415d66
mov edi, dword [esp + 0x5c]
xor ecx, ecx
mov edx, dword [esp + 0x44]
movzx edx, byte [edx + ecx]
cmp dl, byte [edi + ecx]
jne 0x4159e1
inc ecx
cmp eax, ecx
jne 0x4159a7
jmp 0x415b71
mov eax, dword [esp + 0x54]
test eax, eax
je 0x415d66
push eax
mov eax, dword [esp + 0x60]
push eax
push edi
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x415d66
mov ecx, dword [esp + 0x30]
add dword [esp + 0x44], 0xfffffff4
dec ecx
jns 0x415967
jmp 0x415b75
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
jmp 0x415c4b
lea eax, [esp + 0x38]
push edi
push eax
call fcn.004df0f0
add esp, 8
test byte [esp + 0x38], 1
je 0x415a22
mov eax, dword [esp + 0x40]
jmp 0x415a26
xor esi, esi
jmp 0x415a84
lea eax, [esp + 0x39]
lea ecx, [esp + 8]
push eax
push 0x58618e
push ecx
call fcn.004deac0
add esp, 0xc
test byte [esp + 8], 1
je 0x415a46
mov eax, dword [esp + 0x10]
jmp 0x415a4a
lea eax, [esp + 9]
push eax
push str.could_not_read_ok_from_ADB_Server_s_n
push esi
call fcn.00438580
add esp, 0xc
test byte [esp + 8], 1
je 0x415a6c
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
test byte [esp + 0x38], 1
je 0x415a7f
push dword [esp + 0x40]
call fcn.004fc300
add esp, 4
mov esi, 0xffffffff
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
push 0x3a98
push 1
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x415c58
mov edi, eax
cmp eax, 0x102
jne 0x415b13
push 2
call dword [0x58040c]
add esp, 4
push str.adb:_timed_out_waiting_for_threads_to_finish_reading_from_ADB_server_n
push eax
call fcn.00438580
add esp, 8
push 0
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, 0xffffffff
cmp eax, 0x102
jne 0x415c58
push 2
call dword [0x58040c]
add esp, 4
push dword [esp + 0x88]
push str.adb:_server_is_running_with_process_id__lu_n
push eax
call fcn.00438580
add esp, 0xc
jmp 0x415c58
push 2
call dword [0x58040c]
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 8]
push eax
push ecx
call fcn.004df0f0
add esp, 8
test byte [esp + 8], 1
je 0x415b41
mov eax, dword [esp + 0x10]
jmp 0x415b45
lea eax, [esp + 9]
push eax
push edi
push str.adb:_unexpected_result_waiting_for_threads:__lu:__s_n
push esi
call fcn.00438580
add esp, 0x10
test byte [esp + 8], 1
je 0x415c53
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
jmp 0x415c53
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x94]
jae 0x415bd9
lea eax, [ecx + ecx*2]
lea edi, [eax*4 + 8]
push 2
mov ebx, ecx
call dword [0x58040c]
add esp, 4
mov ecx, dword [esp + 0x74]
inc ebx
test byte [ecx + edi - 8], 1
jne 0x415ba7
lea ecx, [ecx + edi - 7]
jmp 0x415baa
mov ecx, dword [ecx + edi]
push ecx
push 0x5866fe
push eax
call fcn.00438580
add esp, 0xc
mov esi, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
add edi, 0xc
mov ecx, ebx
mov eax, esi
sub eax, edx
sar eax, 2
imul eax, eax, 0xaaaaaaab
cmp ebx, eax
jb 0x415b88
mov ebx, edx
test ebx, ebx
je 0x415c10
cmp ebx, esi
je 0x415c01
test byte [esi - 0xc], 1
lea edi, [esi - 0xc]
je 0x415bf5
push dword [esi - 4]
call fcn.004fc300
add esp, 4
cmp ebx, edi
mov esi, edi
jne 0x415be1
mov eax, dword [esp + 0x74]
jmp 0x415c03
mov eax, ebx
mov dword [esp + 0x78], ebx
push eax
call fcn.004fc300
add esp, 4
test byte [esp + 0x38], 1
je 0x415c23
push dword [esp + 0x40]
call fcn.004fc300
add esp, 4
mov ebx, dword [esp + 0x60]
test byte [esp + 8], 1
je 0x415c3a
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
push ebx
call sub.msvcrt.dll__close
add esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov esi, 0xffffffff
mov eax, dword [esp + 0x48]
mov dword [esp + 0x48], 0
test eax, eax
je 0x415c72
lea ecx, [esp + 0x48]
push eax
call fcn.00432940
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x415c8c
lea ecx, [esp + 0x4c]
push eax
call fcn.00432940
mov eax, dword [esp + 0x50]
mov dword [esp + 0x50], 0
test eax, eax
je 0x415ca6
lea ecx, [esp + 0x50]
push eax
call fcn.00432940
mov eax, dword [esp + 0x18]
mov dword [esp + 0x18], 0
test eax, eax
je 0x415cc0
lea ecx, [esp + 0x18]
push eax
call fcn.00432940
mov eax, dword [esp + 0x28]
mov dword [esp + 0x28], 0
test eax, eax
je 0x415cda
lea ecx, [esp + 0x28]
push eax
call fcn.00432940
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], 0
test eax, eax
je 0x415cf4
lea ecx, [esp + 0x1c]
push eax
call fcn.00432940
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x2c], 0
test eax, eax
je 0x415d0e
lea ecx, [esp + 0x2c]
push eax
call fcn.00432940
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], 0
test eax, eax
je 0x415d28
lea ecx, [esp + 0x20]
push eax
call fcn.00432940
mov eax, dword [esp + 0x34]
mov dword [esp + 0x34], 0
test eax, eax
je 0x415d42
lea ecx, [esp + 0x34]
push eax
call fcn.00432940
mov eax, dword [esp + 0x24]
mov dword [esp + 0x24], 0
test eax, eax
je 0x415d5c
lea ecx, [esp + 0x24]
push eax
call fcn.00432940
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x94]
jb 0x415b7e
jmp 0x415bd9