Function at 0x415490
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
test byte [0x4f3061], 4
jne 0x4154d8
mov dword [0x4f3200], 0x4f3200
mov dword [0x4f3204], 0x4f3200
call fcn.00414c70
test eax, eax
jne 0x415570
test byte [0x4f3061], 4
jne 0x415713
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.adb_auth_init
mov dword [esp + 4], 0x4b6c8c
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
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.0049fc30
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
jmp 0x4154a2
mov dword [esp], str.ADB_VENDOR_KEYS
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x4154d0
lea eax, [ebp - 0x2f]
lea esi, [ebp - 0x2c]
mov dword [esp + 4], eax
mov ecx, esi
mov dword [esp], 0x4b6f62
lea edi, [ebp - 0x28]
call fcn.004a6f90
lea eax, [ebp - 0x2e]
lea ecx, [ebp - 0x28]
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a6f90
lea eax, [ebp - 0x24]
sub esp, 8
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call fcn.00421430
mov eax, dword [ebp - 0x28]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b0f44
jne 0x4157e4
mov eax, dword [ebp - 0x2c]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b0f44
jne 0x415814
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov esi, ecx
cmp ecx, ebx
jne 0x41560c
jmp 0x4156fb
add esi, 4
cmp ebx, esi
je 0x4156d0
mov eax, dword [esi]
mov edx, 0x4f3200
call fcn.00413810
test eax, eax
jne 0x415601
test byte [0x4f3061], 4
je 0x415601
call dword [sym.imp.msvcrt.dll__errno]
add esi, 4
mov edi, dword [eax]
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x3c], eax
call sub.msvcrt.dll__getpid
mov edx, dword [ebp - 0x3c]
mov dword [esp + 8], str.get_vendor_keys
mov dword [esp + 4], 0x4b6c8c
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
mov eax, dword [esi - 4]
mov dword [esp + 4], str.Failed_to_read__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
cmp ebx, esi
mov dword [eax], edi
jne 0x41560c
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
cmp esi, ebx
je 0x4156fb
lea esi, [esi]
mov eax, dword [ebx]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b0f44
jne 0x4157aa
add ebx, 4
cmp esi, ebx
jne 0x4156e0
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x4154d0
mov dword [esp], esi
call fcn.004a9620
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.adb_auth_init
mov dword [esp + 4], 0x4b6c8c
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
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.0049fc30
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x4ac46c]
test edx, edx
jne 0x4157d8
mov edx, dword [eax - 4]
lea edi, [edx - 1]
mov dword [eax - 4], edi
mov eax, edx
test eax, eax
jg 0x4156f1
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.004a5860
push eax
jmp 0x4156f1
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
mov eax, edx
jmp 0x4157bf
cmp dword [0x4ac46c], 0
lea edx, [eax - 4]
jne 0x415844
mov edx, dword [eax - 4]
lea ebx, [edx - 1]
mov dword [eax - 4], ebx
mov eax, edx
test eax, eax
jg 0x4155de
lea eax, [ebp - 0x2d]
mov dword [esp], eax
call fcn.004a5860
push ebx
jmp 0x4155de
cmp dword [0x4ac46c], 0
lea edx, [eax - 4]
jne 0x41584d
mov edx, dword [eax - 4]
lea ebx, [edx - 1]
mov dword [eax - 4], ebx
mov eax, edx
test eax, eax
jg 0x4155f0
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.004a5860
push ecx
jmp 0x4155f0
or eax, 0xffffffff
lock xadd dword [edx], eax
jmp 0x4157fb
or eax, 0xffffffff
lock xadd dword [edx], eax
jmp 0x41582b