Function at 0x451e50
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
push edi
mov edi, ecx
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x451e60
mov dword [ebp - 4], 0
sub edi, edx
je 0x451e9a
cmp byte [edi + ecx - 1], 0x2e
jne 0x451e9a
push ecx
call fcn.004513d0
mov ecx, dword [ebp + 0x10]
mov edx, eax
add esp, 4
mov eax, 0xf
mov dword [ecx], edx
xor ecx, ecx
test edx, edx
pop edi
cmovne eax, ecx
mov esp, ebp
pop ebp
ret
push ebx
push esi
mov esi, dword [ebp + 8]
test byte [esi], 0x40
jne 0x45204e
push 0x2e
push ecx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
jne 0x45204b
push str.HOSTALIASES
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x45204b
push 0x4e7b9c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x452023
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
call fcn.00453fa0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x452002
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
nop
push edi
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00452da0
add esp, 0xc
test eax, eax
jne 0x451f5a
mov eax, dword [ebp - 4]
movzx eax, byte [eax + edi]
push eax
call ebx
add esp, 4
test eax, eax
je 0x451f5a
mov esi, dword [ebp - 4]
add esi, edi
movzx eax, byte [esi]
push eax
call ebx
add esp, 4
test eax, eax
je 0x451f55
movzx eax, byte [esi + 1]
inc esi
push eax
call ebx
add esp, 4
test eax, eax
jne 0x451f46
cmp byte [esi], 0
jne 0x451f84
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
call fcn.00453fa0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x451f10
push dword [ebp - 4]
call dword [0x50113c]
push dword [ebp - 8]
jmp 0x45200c
mov al, byte [esi + 1]
lea edi, [esi + 1]
test al, al
je 0x451fa5
nop
movzx eax, al
push eax
call ebx
add esp, 4
test eax, eax
jne 0x451fa5
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x451f90
mov ebx, edi
sub ebx, esi
lea eax, [ebx + 1]
push eax
call dword [0x501134]
mov ecx, eax
add esp, 4
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
test ecx, ecx
je 0x451fd7
push ebx
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov eax, dword [eax]
sub eax, esi
mov byte [eax + edi], 0
push dword [ebp - 4]
call dword [0x50113c]
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp + 0x10]
add esp, 8
xor edx, edx
mov eax, 0xf
cmp dword [ecx], edx
pop esi
pop ebx
cmovne eax, edx
pop edi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [0x50113c]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 8
cmp esi, 0xd
je 0x452048
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x45204b
sub eax, 1
je 0x45204b
mov eax, dword [ebp + 0x10]
pop esi
pop ebx
pop edi
mov dword [eax], 0
mov eax, 0xe
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
test byte [esi], 0x20
jne 0x45206b
cmp dword [esi + 0x28], 0
je 0x45206b
mov eax, dword [ebp + 0x10]
pop esi
pop ebx
pop edi
mov dword [eax], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
push ecx
call fcn.004513d0
mov ecx, dword [ebp + 0x10]
add esp, 4
mov edx, eax
mov eax, 0xf
mov dword [ecx], edx
xor ecx, ecx
pop esi
test edx, edx
pop ebx
cmovne eax, ecx
pop edi
mov esp, ebp
pop ebp
ret