Function at 0x40fec0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0x106c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004b12b0
sub esp, eax
mov dword [esp], str.ADB_VENDOR_KEYS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40edf2
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], 0x4c53b4
call fcn.0041bee0
test eax, eax
mov ebx, eax
jne 0x40ec2f
jmp 0x40edf2
lea eax, [ebp - 0x1048]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
je 0x40ecd0
test byte [0x504121], 4
jne 0x40ed52
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4c53b4
mov dword [esp], 0
call fcn.0041bee0
test eax, eax
mov ebx, eax
je 0x40edf2
test byte [0x504121], 4
je 0x40ebe5
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], 0x4c5318
mov dword [esp], eax
call fcn.0040e5a0
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.0040e5a0
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 0x40ebe5
mov edx, 0x4ef3a0
mov eax, ebx
call fcn.0040e850
test eax, eax
jne 0x40ec0d
test byte [0x504121], 4
je 0x40ec0d
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], 0x4c5318
mov dword [esp], eax
call fcn.0040e5a0
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 0x40edb1
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], 0x4c5318
mov dword [esp], eax
call fcn.0040e5a0
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.0040e5a0
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 0x40ec0d
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 0x40ff06
mov dword [0x4ef3a0], 0x4ef3a0
mov dword [0x4ef3a4], 0x4ef3a0
call fcn.0040f8b0
test eax, eax
jne 0x40ff90
test byte [0x504121], 4
jne 0x40ffa0
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], 0x4c5318
mov dword [esp], eax
call fcn.0040e5a0
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.0040e5a0
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 0x40fed1
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
jmp 0x40eb80
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], 0x4c5318
mov dword [esp], eax
call fcn.0040e5a0
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.0040e5a0
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