Function at 0x412f60
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, 0x350
lea edi, [esp + 0x74]
mov dword [esp + 0x74], 0xc
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 1
push 0
push pe_nt_image_headers32
push 3
push edi
push 3
push 0x80000000
push 0x573a7a
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x4131d5
mov dword [esp + 0x34], 0
mov dword [esp + 0x10], 0
lea ecx, [esp + 0x34]
lea edx, [esp + 0x10]
push edi
call fcn.004139f0
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x41389d
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 0
lea ecx, [esp + 0x28]
lea edx, [esp + 0xc]
push edi
call fcn.004139f0
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x413879
mov dword [esp + 0x24], 0
mov dword [esp + 8], 0
lea ecx, [esp + 0x24]
lea edx, [esp + 8]
push edi
call fcn.004139f0
add esp, 4
mov esi, 0xffffffff
test al, al
je 0x413855
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x413059
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 0x413074
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 0x41308f
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0x80], 0x44
mov edi, dword [esp + 0x10]
lea esi, [esp + 0x144]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc0], eax
mov dword [esp + 0xac], 0x100
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
dec eax
cmp eax, 0x103
jb 0x41322a
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xc4]
push eax
push ecx
call fcn.004cfe30
add esp, 8
push dword [esp + 0xc4]
push str.adb:_cannot_get_executable_path:__s_n
push esi
call fcn.00439e80
add esp, 0xc
mov eax, dword [esp + 0xc4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
je 0x41359f
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41359f
lea eax, [esp + 0x50]
jmp 0x4138f3
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x144]
push eax
push ecx
call fcn.004cfe30
add esp, 8
push dword [esp + 0x144]
push str.adb:_CreateFileW_nul_failed:__s_n
push esi
call fcn.00439e80
add esp, 0xc
mov eax, dword [esp + 0x144]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x413781
mov esi, 0xffffffff
jmp 0x4138c1
mov eax, dword [ebp + 8]
mov eax, dword [eax]
sub esp, 0x14
mov dword [esp + 0x10], edi
lea edi, [esp + 0xd8]
mov dword [esp + 0xc], eax
mov dword [esp], edi
call fcn.00413b90
add esp, 0x14
xorps xmm0, xmm0
lea eax, [esp + 0x50]
lea ecx, [esp + 0x80]
movaps xmmword [esp + 0x50], 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 0x41355d
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x50], 0
mov dword [esp + 0x30], eax
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x54], 0
mov dword [esp + 0x14], 0
test eax, eax
je 0x4132ba
lea ecx, [esp + 0x14]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], 0
test eax, eax
je 0x4132d4
lea ecx, [esp + 0x10]
push eax
call fcn.004342c0
mov eax, dword [esp + 0xc]
mov dword [esp + 0xc], 0
test eax, eax
je 0x4132ee
lea ecx, [esp + 0xc]
push eax
call fcn.004342c0
mov eax, dword [esp + 8]
mov dword [esp + 8], 0
test eax, eax
je 0x413308
lea ecx, [esp + 8]
push eax
call fcn.004342c0
push 0
push 0
push dword [esp + 0x30]
push 0x413bb0
push 0
push 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x3c], eax
je 0x4135a9
mov dword [esp + 0x28], 0
push 0
push 0
push dword [esp + 0x2c]
push 0x413c10
push 0
push 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x38], eax
je 0x4135db
mov dword [esp + 0x24], 0
mov dword [esp + 0x48], 0
lea eax, [esp + 0x48]
lea ecx, [esp + 0x45]
push 0
push eax
push 3
push ecx
push dword [esp + 0x44]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413608
cmp dword [esp + 0x48], 3
jne 0x4133ae
movzx eax, word [esp + 0x45]
movzx ecx, byte [esp + 0x47]
xor eax, 0x4b4f
xor ecx, 0xa
or cx, ax
je 0x413694
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_GetProcessId]
mov edi, eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push str.ADB_server_didnt_ACK_n
push eax
call fcn.00439e80
add esp, 8
mov esi, dword [sym.imp.msvcrt.dll__iob]
lea ebx, [esp + 0x18]
add esi, 0x40
push ebx
call fcn.00418950
add esp, 4
push dword [esp + 0x18]
push str.Full_server_startup_log:__s_n
push esi
call fcn.00439e80
add esp, 0xc
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4138fe
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push edi
push str.Server_had_pid:__d_n
push eax
call fcn.00439e80
add esp, 0xc
push ebx
call fcn.00418950
add esp, 4
push 0
push dword [esp + 0x1c]
call fcn.004343d0
add esp, 8
mov esi, eax
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x41391f
cmp esi, 0xffffffff
je 0x41381a
push 2
push 0xfffe0000
push esi
call fcn.00435410
add esp, 0xc
mov eax, esi
lea esi, [esp + 4]
mov dword [esp + 4], 0x56dffc
push esi
mov dword [esp + 0x6c], eax
push eax
call fcn.004cd330
add esp, 8
test al, al
je 0x4137fb
lea eax, [esp + 0x2c]
push edi
push str.____adb_starting__pid__d_____
push eax
call fcn.004cf170
add esp, 0xc
lea edi, [esp + 0x4c]
lea eax, [esp + 0x40]
mov ecx, edi
push eax
push 0x5740ef
call fcn.005350b0
push edi
push esi
push ebx
call fcn.004cf1c0
add esp, 0xc
mov eax, dword [esp + 0x4c]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4139a8
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, ebx
sub eax, edi
mov ecx, eax
sar ecx, 2
test eax, eax
lea esi, [ecx - 1]
mov dword [esp + 0x64], ecx
jle 0x41351d
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax - 0xc]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ecx
mov eax, dword [edi + esi*4]
cmp dword [eax - 0xc], ecx
jne 0x41351a
push ecx
push dword [esp + 0x74]
push eax
call sub.msvcrt.dll_memcmp
mov ecx, dword [esp + 0x78]
add esp, 0xc
test eax, eax
je 0x41351d
dec esi
jns 0x4134fc
cmp esi, dword [esp + 0x64]
jae 0x413550
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push dword [edi + esi*4]
inc esi
push 0x5740f1
push eax
call fcn.00439e80
add esp, 0xc
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, ebx
sub eax, edi
sar eax, 2
cmp esi, eax
jb 0x413523
cmp edi, ebx
jne 0x4137bf
jmp 0x4137d7
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.004cfe30
add esp, 8
push dword [esp + 0x18]
push str.adb:_CreateProcessW_failed:__s_n
push esi
call fcn.00439e80
add esp, 0xc
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4138dd
mov esi, 0xffffffff
jmp 0x413855
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
call fcn.0043bb30
add esp, 4
push eax
push str.adb:_cannot_create_thread:__s_n
push esi
call fcn.00439e80
add esp, 0xc
mov esi, 0xffffffff
jmp 0x413831
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
call fcn.0043bb30
add esp, 4
push eax
push str.adb:_cannot_create_thread:__s_n
push esi
call fcn.00439e80
add esp, 0xc
jmp 0x41381a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
cmp eax, 0x6d
jne 0x413631
push 0x573822
push str.could_not_read_ok_from_ADB_Server_s_n
push esi
call fcn.00439e80
add esp, 0xc
jmp 0x41368d
lea ecx, [esp + 4]
push eax
push ecx
call fcn.004cfe30
add esp, 8
lea eax, [esp + 0x18]
push dword [esp + 4]
push str.:__s
push eax
call fcn.004cf170
add esp, 0xc
push dword [esp + 0x18]
push str.could_not_read_ok_from_ADB_Server_s_n
push esi
call fcn.00439e80
add esp, 0xc
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x413966
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x413987
mov esi, 0xffffffff
jmp 0x413696
xor esi, esi
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push 0x3a98
push 1
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
test eax, eax
je 0x41381f
cmp edi, 0x102
jne 0x41371d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push str.adb:_timed_out_waiting_for_threads_to_finish_reading_from_ADB_server_n
push eax
call fcn.00439e80
add esp, 8
push 0
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, 0xffffffff
cmp eax, 0x102
jne 0x41381f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push dword [esp + 0x58]
push str.adb:_server_is_running_with_process_id__lu_n
push eax
call fcn.00439e80
add esp, 0xc
jmp 0x41381f
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 4]
push eax
push ecx
call fcn.004cfe30
add esp, 8
push dword [esp + 4]
push edi
push str.adb:_unexpected_result_waiting_for_threads:__lu:__s_n
push esi
call fcn.00439e80
add esp, 0x10
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
je 0x41381a
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41381a
lea eax, [esp + 0x2c]
push eax
call fcn.00533980
jmp 0x41381a
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x413220
lea eax, [esp + 0xc4]
push eax
call fcn.00533980
jmp 0x413220
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4137cc
lea eax, [esp + 0x4c]
push eax
call fcn.00533980
jmp 0x4137cc
mov eax, dword [edi]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4137a5
add edi, 4
cmp ebx, edi
jne 0x4137bf
mov edi, dword [esp + 0x18]
test edi, edi
lea ebx, [esp + 0x18]
je 0x4137e8
push edi
call fcn.00563f90
add esp, 4
mov eax, dword [esp + 0x2c]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4139c9
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x413949
push dword [esp + 0x68]
call fcn.00417f60
add esp, 4
mov esi, 0xffffffff
mov eax, dword [esp + 0x38]
test eax, eax
je 0x413831
lea ecx, [esp + 0x38]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x413843
lea ecx, [esp + 0x3c]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x413855
lea ecx, [esp + 0x30]
push eax
call fcn.004342c0
mov eax, dword [esp + 8]
test eax, eax
je 0x413867
lea ecx, [esp + 8]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x413879
lea ecx, [esp + 0x24]
push eax
call fcn.004342c0
mov eax, dword [esp + 0xc]
test eax, eax
je 0x41388b
lea ecx, [esp + 0xc]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41389d
lea ecx, [esp + 0x28]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4138af
lea ecx, [esp + 0x10]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4138c1
lea ecx, [esp + 0x34]
push eax
call fcn.004342c0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4138d3
lea ecx, [esp + 0x14]
push eax
call fcn.004342c0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41359f
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x41359f
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41340b
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x41340b
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41344e
lea eax, [esp + 4]
push eax
call fcn.00533980
cmp esi, 0xffffffff
jne 0x413457
jmp 0x41381a
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41380e
push ebx
call fcn.00533980
jmp 0x41380e
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41367a
lea eax, [esp + 0x2c]
push eax
call fcn.00533980
jmp 0x41367a
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41368d
lea eax, [esp + 0x2c]
push eax
call fcn.00533980
jmp 0x41368d
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4134d1
lea eax, [esp + 0x44]
push eax
call fcn.00533980
jmp 0x4134d1
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4137fb
push ebx
call fcn.00533980
jmp 0x4137fb