Function at 0x4a1a90
Capabilities:
Query environment variable

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
push edi
mov edi, ebx
lea ecx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x4a1aa0
mov dword [esp + 8], 0
sub edi, ecx
je 0x4a1add
cmp byte [edi + ebx - 1], 0x2e
jne 0x4a1add
push ebx
call fcn.0049f990
mov ecx, dword [esp + 0x24]
mov edx, eax
add esp, 4
mov eax, 0xf
mov dword [ecx], edx
xor ecx, ecx
test edx, edx
pop edi
cmovne eax, ecx
pop ebx
add esp, 0xc
ret
push ebp
push esi
mov esi, dword [esp + 0x20]
test byte [esi], 0x40
jne 0x4a1c91
push 0x2e
push ebx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
jne 0x4a1c91
push str.HOSTALIASES
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x4a1c91
push 0x5ec364
push eax
call fcn.0049a181
mov ebp, eax
add esp, 8
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x4a1c66
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.004a2fc0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4a1bc0
nop dword [eax]
push edi
push ebx
push dword [esp + 0x18]
call fcn.004a0d90
add esp, 0xc
test eax, eax
jne 0x4a1ba7
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + edi]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_isspace
add esp, 4
test eax, eax
je 0x4a1ba7
mov esi, dword [esp + 0x10]
add esi, edi
movzx eax, byte [esi]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_isspace
add esp, 4
test eax, eax
je 0x4a1ba2
nop dword [eax]
movzx eax, byte [esi + 1]
inc esi
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_isspace
add esp, 4
test eax, eax
jne 0x4a1b90
cmp byte [esi], 0
jne 0x4a1be9
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.004a2fc0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4a1b50
push dword [esp + 0x10]
call dword [0x6127bc]
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
cmp esi, 0xd
je 0x4a1c8d
mov eax, esi
pop esi
pop ebp
pop edi
pop ebx
add esp, 0xc
ret
mov al, byte [esi + 1]
lea edi, [esi + 1]
test al, al
je 0x4a1c0b
movzx eax, al
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_isspace
add esp, 4
test eax, eax
jne 0x4a1c0b
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4a1bf3
mov ebx, edi
sub ebx, esi
lea eax, [ebx + 1]
push eax
call dword [0x6127b4]
mov ebp, dword [esp + 0x2c]
add esp, 4
mov dword [ebp], eax
test eax, eax
je 0x4a1c3b
push ebx
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp]
add esp, 0xc
sub eax, esi
mov byte [eax + edi], 0
push dword [esp + 0x10]
call dword [0x6127bc]
push dword [esp + 0x1c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 8
xor ecx, ecx
cmp dword [ebp], ecx
mov eax, 0xf
cmovne eax, ecx
pop esi
pop ebp
pop edi
pop ebx
add esp, 0xc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x4a1c91
sub eax, 1
je 0x4a1c91
mov eax, dword [esp + 0x28]
pop esi
pop ebp
pop edi
mov dword [eax], 0
mov eax, 0xe
pop ebx
add esp, 0xc
ret
mov esi, dword [esp + 0x20]
test byte [esi], 0x20
jne 0x4a1cb0
cmp dword [esi + 0x28], 0
je 0x4a1cb0
mov eax, dword [esp + 0x28]
pop esi
pop ebp
pop edi
mov dword [eax], 0
xor eax, eax
pop ebx
add esp, 0xc
ret
push ebx
call fcn.0049f990
mov ecx, dword [esp + 0x2c]
add esp, 4
mov edx, eax
mov eax, 0xf
pop esi
mov dword [ecx], edx
xor ecx, ecx
pop ebp
test edx, edx
pop edi
cmovne eax, ecx
pop ebx
add esp, 0xc
ret