Function at 0x414140
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
test byte [0x4ee061], 4
jne 0x414188
mov dword [0x4ee200], 0x4ee200
mov dword [0x4ee204], 0x4ee200
call fcn.004139c0
test eax, eax
jne 0x414220
test byte [0x4ee061], 4
jne 0x4143c3
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], 0x4ee068
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], 0x4b1b4c
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
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.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
jmp 0x414152
mov dword [esp], str.ADB_VENDOR_KEYS
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x414180
lea eax, [ebp - 0x2f]
lea esi, [ebp - 0x2c]
mov dword [esp + 4], eax
mov ecx, esi
mov dword [esp], 0x4b1e22
call fcn.004a2280
lea eax, [ebp - 0x2e]
lea ecx, [ebp - 0x28]
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a2280
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x28]
sub esp, 8
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
call fcn.0041fb80
mov eax, dword [ebp - 0x28]
lea ebx, [eax - 0xc]
cmp ebx, 0x4abf34
jne 0x414484
mov eax, dword [ebp - 0x2c]
lea ebx, [eax - 0xc]
cmp ebx, 0x4abf34
jne 0x4144a9
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
cmp ecx, ebx
je 0x41445a
mov esi, ecx
jmp 0x4142bd
add esi, 4
cmp ebx, esi
je 0x414381
mov eax, dword [esi]
mov edx, 0x4ee200
call fcn.004126b0
test eax, eax
jne 0x4142b2
test byte [0x4ee061], 4
je 0x4142b2
call dword [sym.imp.msvcrt.dll__errno]
add esi, 4
mov edi, dword [eax]
mov dword [esp], 0x4ee068
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], 0x4b1b4c
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.0049e490
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.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
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 0x4142bd
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
cmp edi, ebx
je 0x4143ab
nop
lea esi, [esi]
mov eax, dword [ebx]
lea esi, [eax - 0xc]
cmp esi, 0x4abf34
jne 0x414461
add ebx, 4
cmp edi, ebx
jne 0x414390
mov edi, dword [ebp - 0x24]
test edi, edi
je 0x414180
mov dword [esp], edi
call fcn.004a4670
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], 0x4ee068
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], 0x4b1b4c
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
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.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
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 edi, ecx
jmp 0x4143ab
sub eax, 4
call fcn.004a6590
test eax, eax
jg 0x4143a1
lea eax, [ebp - 0x28]
mov ecx, esi
mov dword [esp], eax
call fcn.004a0b50
push eax
jmp 0x4143a1
sub eax, 4
call fcn.004a6590
test eax, eax
nop
jg 0x41428e
lea eax, [ebp - 0x2d]
mov ecx, ebx
mov dword [esp], eax
call fcn.004a0b50
push ecx
jmp 0x41428e
sub eax, 4
call fcn.004a6590
test eax, eax
jg 0x4142a0
lea eax, [ebp - 0x28]
mov ecx, ebx
mov dword [esp], eax
call fcn.004a0b50
push edx
jmp 0x4142a0