Function at 0x40e360
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x3c
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.004264d0
test eax, eax
jne 0x40e457
test byte [0x551031], 2
jne 0x40e51b
mov dword [esp], 0xc
call sub.msvcrt.dll_malloc
test eax, eax
mov edi, eax
je 0x40e50f
mov dword [eax], esi
mov dword [eax + 8], ebx
mov eax, dword [ebp - 0x1c]
mov dword [edi + 4], eax
mov dword [esp], 8
call fcn.00510970
mov dword [eax], 0x40e5d0
mov dword [eax + 4], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40e330
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
je 0x40e420
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
test byte [0x551031], 2
jne 0x40e46a
mov eax, dword [ebp - 0x20]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call fcn.004b0fa0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00423ee0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00423ee0
mov dword [esp], str.cannot_create_service_thread_n
call fcn.00428c00
lea esp, [ebp - 0xc]
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.cannot_create_service_socket_pair_n
call fcn.00428c00
mov eax, 0xffffffff
jmp 0x40e414
call fcn.0042bec0
cmp eax, 2
jg 0x40e411
mov esi, dword [sym.imp.msvcrt.dll__errno]
lea ebx, [ebp - 0x28]
call esi
mov edx, dword [ebp - 0x1c]
mov edi, dword [eax]
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 4], str.service_thread_started___d:_d
mov dword [esp + 8], edx
call fcn.0042cf00
mov ecx, ebx
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x10b
mov dword [esp], str.system_core_adb_services.cpp
call fcn.0042bf90
mov ecx, ebx
sub esp, 0x14
call fcn.0042c110
mov edx, dword [ebp - 0x24]
mov ecx, dword [edx - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.0050a5a0
mov ecx, ebx
call fcn.0042c1a0
mov eax, dword [ebp - 0x24]
mov dword [esp], ebx
lea ecx, [eax - 0xc]
call fcn.004df670
push eax
call esi
mov dword [eax], edi
jmp 0x40e411
mov dword [esp], str.cannot_allocate_stinfo
call fcn.00410010
call fcn.0042bec0
cmp eax, 2
jg 0x40e38d
mov edx, dword [sym.imp.msvcrt.dll__errno]
lea edi, [ebp - 0x28]
mov dword [ebp - 0x30], edx
call edx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [esp + 4], 0x520dc3
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.0042cf00
mov ecx, edi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0xf9
mov dword [esp], str.system_core_adb_services.cpp
call fcn.0042bf90
mov ecx, edi
sub esp, 0x14
call fcn.0042c110
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.0050a5a0
mov ecx, edi
call fcn.0042c1a0
mov edx, dword [ebp - 0x24]
mov dword [esp], edi
lea ecx, [edx - 0xc]
call fcn.004df670
push edx
mov edx, dword [ebp - 0x30]
call edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
jmp 0x40e38d