Function at 0x404970
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1044
call fcn.00459eb0
mov eax, dword [0x47f160]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.ADB_VENDOR_KEYS
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
test eax, eax
je 0x404bfc
push 0x1000
push eax
lea eax, [ebp - 0x1008]
push eax
call dword [sym.imp.MSVCR100.dll_strncpy]
add esp, 0xc
lea ebx, [ebp - 0x1044]
lea eax, [ebp - 0x1008]
call fcn.00412840
mov dword [ebp - 0x103c], eax
test eax, eax
je 0x404bfc
mov esi, dword [sym.imp.MSVCR100.dll__errno]
mov ebx, dword [sym.imp.MSVCR100.dll_fprintf]
mov edi, dword [sym.imp.MSVCR100.dll___iob_func]
test dword [0x4805a8], 0x400
je 0x404a64
call esi
mov ecx, dword [eax]
push 0x480590
mov dword [ebp - 0x1040], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.get_vendor_keys
push str.adb_auth_host.cpp
push str._s::_s__:
call edi
add eax, 0x40
push eax
call ebx
add esp, 0x10
call esi
mov edx, dword [ebp - 0x1040]
mov dword [eax], edx
mov eax, dword [ebp - 0x103c]
push eax
push str.Reading:__s_n
call edi
add eax, 0x40
push eax
call ebx
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov ecx, dword [ebp - 0x1040]
mov dword [eax], ecx
mov eax, dword [ebp - 0x103c]
lea edx, [ebp - 0x1038]
push edx
push eax
call dword [sym.imp.MSVCR100.dll__stat64i32]
add esp, 8
test eax, eax
je 0x404ad6
test dword [0x4805a8], 0x400
je 0x404b66
call esi
mov ecx, dword [eax]
push 0x480590
mov dword [ebp - 0x1040], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.get_vendor_keys
push str.adb_auth_host.cpp
push str._s::_s__:
call edi
add eax, 0x40
push eax
call ebx
add esp, 0x10
call esi
mov edx, dword [ebp - 0x1040]
mov dword [eax], edx
mov eax, dword [ebp - 0x103c]
push eax
push str.Cant_read__s_n
jmp 0x404b3a
mov edx, dword [ebp - 0x103c]
push edx
call fcn.00404260
add esp, 4
test eax, eax
jne 0x404b66
test dword [0x4805a8], 0x400
je 0x404b66
call esi
mov eax, dword [eax]
push 0x480590
mov dword [ebp - 0x1040], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.get_vendor_keys
push str.adb_auth_host.cpp
push str._s::_s__:
call edi
add eax, 0x40
push eax
call ebx
add esp, 0x10
call esi
mov edx, dword [ebp - 0x103c]
mov ecx, dword [ebp - 0x1040]
push edx
mov dword [eax], ecx
push str.Failed_to_read__s_n
call edi
add eax, 0x40
push eax
call ebx
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov ecx, dword [ebp - 0x1040]
mov dword [eax], ecx
mov edx, dword [ebp - 0x1044]
test edx, edx
je 0x404bfc
movsx eax, byte [edx]
mov dword [ebp - 0x103c], eax
inc edx
mov ecx, 0x46d508
movsx eax, byte [ecx]
inc ecx
test eax, eax
je 0x404b95
cmp dword [ebp - 0x103c], eax
je 0x404b74
jmp 0x404b83
cmp dword [ebp - 0x103c], 0
je 0x404bfc
lea ecx, [edx - 1]
mov dword [ebp - 0x1040], ecx
jmp 0x404bb0
movsx eax, byte [edx]
mov dword [ebp - 0x103c], eax
inc edx
mov ecx, 0x46d508
movsx eax, byte [ecx]
inc ecx
cmp eax, dword [ebp - 0x103c]
je 0x404bd1
test eax, eax
je 0x404bb0
jmp 0x404bbf
cmp dword [ebp - 0x103c], 0
jne 0x404bde
xor edx, edx
jmp 0x404be2
mov byte [edx - 1], 0
mov eax, dword [ebp - 0x1040]
mov dword [ebp - 0x1044], edx
mov dword [ebp - 0x103c], eax
test eax, eax
jne 0x4049e7
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00459991
mov esp, ebp
pop ebp
ret