Function at 0x40fe30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0x106c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004b0d60
sub esp, eax
mov dword [esp], str.ADB_VENDOR_KEYS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40edd2
lea ebx, [ebp - 0x1018]
mov dword [esp], ebx
lea esi, [ebp - 0x104c]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
call sub.msvcrt.dll_strncpy
mov dword [esp], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4c5250
call fcn.0041be50
test eax, eax
mov ebx, eax
jne 0x40ec0f
jmp 0x40edd2
lea eax, [ebp - 0x1048]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
je 0x40ecb0
test byte [0x504121], 4
jne 0x40ed32
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4c5250
mov dword [esp], 0
call fcn.0041be50
test eax, eax
mov ebx, eax
je 0x40edd2
test byte [0x504121], 4
je 0x40ebc5
call dword [sym.imp.msvcrt.dll__errno]
mov edi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.get_vendor_keys
mov dword [esp + 8], str.system_core_adb_adb_auth_host.c
mov dword [esp + 4], 0x4c51b4
mov dword [esp], eax
call fcn.0040e580
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Reading:__s_n
add eax, 0x40
mov dword [esp], eax
call fcn.0040e580
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
jmp 0x40ebc5
mov edx, 0x4ef3a0
mov eax, ebx
call fcn.0040e830
test eax, eax
jne 0x40ebed
test byte [0x504121], 4
je 0x40ebed
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov eax, dword [eax]
mov dword [esp], 0x504108
mov dword [ebp - 0x105c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
sub esp, 4
mov dword [esp + 0xc], str.get_vendor_keys
mov dword [esp + 8], str.system_core_adb_adb_auth_host.c
mov dword [esp + 4], 0x4c51b4
mov dword [esp], eax
call fcn.0040e580
call edi
mov ecx, dword [ebp - 0x105c]
mov dword [eax], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Failed_to_read__s_n
jmp 0x40ed91
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov eax, dword [eax]
mov dword [esp], 0x504108
mov dword [ebp - 0x105c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
sub esp, 4
mov dword [esp + 0xc], str.get_vendor_keys
mov dword [esp + 8], str.system_core_adb_adb_auth_host.c
mov dword [esp + 4], 0x4c51b4
mov dword [esp], eax
call fcn.0040e580
call edi
mov ecx, dword [ebp - 0x105c]
mov dword [eax], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Cant_read__s_n
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
mov dword [esp], eax
call fcn.0040e580
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call edi
mov ecx, dword [ebp - 0x105c]
mov dword [eax], ecx
jmp 0x40ebed
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
test byte [0x504121], 4
jne 0x40fe76
mov dword [0x4ef3a0], 0x4ef3a0
mov dword [0x4ef3a4], 0x4ef3a0
call fcn.0040f3b0
test eax, eax
jne 0x40ff00
test byte [0x504121], 4
jne 0x40ff10
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_auth_init
mov dword [esp + 8], str.system_core_adb_adb_auth_host.c
mov dword [esp + 4], 0x4c51b4
mov dword [esp], eax
call fcn.0040e580
call ebx
mov dword [eax], esi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.adb_auth_init_n
add eax, 0x40
mov dword [esp], eax
call fcn.0040e580
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
jmp 0x40fe41
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
jmp 0x40eb60
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_auth_init
mov dword [esp + 8], str.system_core_adb_adb_auth_host.c
mov dword [esp + 4], 0x4c51b4
mov dword [esp], eax
call fcn.0040e580
call ebx
mov dword [eax], esi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Failed_to_get_user_key_n
add eax, 0x40
mov dword [esp], eax
call fcn.0040e580
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret