Function at 0x4a9f20
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x7c
test edx, edx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], 0
je 0x4aa097
test eax, eax
je 0x4aa097
test ecx, ecx
je 0x4aa097
mov dword [esp], eax
call fcn.004a2a60
cmp eax, ebx
mov edi, eax
je 0x4aa230
mov eax, dword [ebp + 8]
mov dword [esp], ebx
test eax, eax
jne 0x4aa0a2
call sub.msvcrt.dll__strdup
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x60], 0
je 0x4aa097
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.004a9d70
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
je 0x4aa097
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x20]
call fcn.004a9d70
mov dword [ebp - 0x6c], 0
test eax, eax
mov ebx, eax
je 0x4aa081
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x5c], eax
mov dword [ebp - 0x68], eax
jne 0x4aa015
mov edi, dword [ebp - 0x5c]
test edi, edi
jle 0x4aa081
xor edi, edi
jmp 0x4a9fec
add edi, 1
cmp dword [ebp - 0x5c], edi
jle 0x4aa002
mov eax, dword [ebx + edi*4]
mov dword [esp + 4], eax
mov eax, dword [esi + edi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a9fe4
cmp edi, dword [ebp - 0x68]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x6c], 0
je 0x4aa081
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x1c]
call fcn.004a9d70
mov dword [ebp - 0x60], 0
test eax, eax
mov dword [ebp - 0x6c], eax
je 0x4aa081
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x64], eax
cmovle eax, dword [ebp - 0x64]
test eax, eax
mov dword [ebp - 0x5c], eax
jle 0x4aa081
mov dword [ebp - 0x60], esi
xor edi, edi
mov esi, dword [ebp - 0x6c]
jmp 0x4aa05d
add edi, 1
cmp edi, dword [ebp - 0x5c]
je 0x4aa0b0
mov eax, dword [esi + edi*4]
mov dword [esp + 4], eax
mov eax, dword [ebx + edi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4aa055
test edi, edi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x60], 0
jne 0x4aa0b3
mov eax, esi
call fcn.004a9ce0
mov eax, ebx
call fcn.004a9ce0
mov eax, dword [ebp - 0x6c]
call fcn.004a9ce0
mov eax, dword [ebp - 0x60]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004a8850
mov ebx, eax
jmp 0x4a9f77
mov esi, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x24]
xor edx, edx
test ecx, ecx
jle 0x4aa0f6
xor eax, eax
mov dword [ebp - 0x5c], edi
mov edi, eax
mov dword [ebp - 0x60], ebx
mov ebx, edx
mov edx, esi
mov esi, ecx
lea esi, [esi]
mov eax, dword [edx + ebx*4]
add ebx, 1
mov dword [ebp - 0x70], edx
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, dword [ebp - 0x70]
add edi, eax
cmp ebx, esi
jne 0x4aa0d0
mov eax, edi
mov ebx, dword [ebp - 0x60]
mov esi, edx
mov edi, dword [ebp - 0x5c]
mov edx, eax
mov eax, dword [ebp - 0x68]
sub eax, edi
lea eax, [eax + eax*2]
add eax, edx
cmp dword [ebp - 0x64], edi
jle 0x4aa137
mov edx, edi
mov dword [ebp - 0x5c], edi
mov edi, dword [ebp - 0x6c]
mov dword [ebp - 0x60], esi
mov esi, eax
mov dword [ebp - 0x68], ebx
mov ebx, edx
mov eax, dword [edi + ebx*4]
add ebx, 1
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add esi, eax
cmp ebx, dword [ebp - 0x64]
jne 0x4aa117
mov eax, esi
mov edi, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x68]
add eax, 1
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x60], eax
je 0x4aa081
mov byte [eax], 0
mov eax, dword [ebp - 0x24]
test eax, eax
mov dword [ebp - 0x5c], eax
jle 0x4aa184
mov dword [ebp - 0x64], edi
mov edi, dword [ebp - 0x60]
xor edx, edx
mov dword [ebp - 0x68], ebx
mov ebx, edx
mov eax, dword [esi + ebx*4]
add ebx, 1
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp ebx, dword [ebp - 0x5c]
jne 0x4aa167
mov edi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x60]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x4aa187
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea eax, [ecx + 2]
cmove ecx, eax
mov eax, dword [ebp - 0x20]
add dl, dl
sbb ecx, 3
cmp eax, edi
mov dword [ebp - 0x5c], eax
jle 0x4aa1ea
sub eax, edi
lea edx, [eax + eax*2]
mov eax, ecx
add edx, ecx
lea esi, [esi]
mov word [eax], 0x2e2e
mov byte [eax + 2], 0x2f
add eax, 3
cmp edx, eax
jne 0x4aa1d0
mov eax, dword [ebp - 0x5c]
sub eax, edi
lea eax, [eax + eax*2]
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov byte [ecx], 0
cmp eax, edi
mov dword [ebp - 0x5c], eax
jle 0x4aa081
mov dword [ebp - 0x64], esi
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x6c]
mov eax, dword [ebx + edi*4]
add edi, 1
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp edi, dword [ebp - 0x5c]
jne 0x4aa207
mov esi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x68]
jmp 0x4aa081
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
mov esi, eax
je 0x4a9f62
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp], edi
lea ebx, [eax + 1]
mov eax, 2
cmp ebx, 1
cmovbe ebx, eax
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax + 0x23]
and eax, 0xfffffff0
call fcn.004bcdb0
sub esp, eax
mov ecx, esi
lea ebx, [esp + 0x1b]
and ebx, 0xfffffff0
mov dword [ebp - 0x60], edi
nop
movzx eax, byte [esi]
test al, al
je 0x4aa292
cmp al, 0x3b
lea edx, [esi + 1]
jne 0x4aa370
cmp esi, ecx
je 0x4aa380
mov edi, esi
sub edi, ecx
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
movzx eax, byte [esi - 1]
cmp al, 0x5c
je 0x4aa377
cmp al, 0x2f
je 0x4aa377
mov byte [ebx + edi], 0x2f
mov byte [ebx + edi + 1], 0
mov eax, dword [ebp - 0x60]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__access]
test eax, eax
je 0x4aa33e
mov edx, ebx
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4aa2f1
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
add al, al
sbb edx, 3
mov dword [edx], 0x6578652e
mov byte [edx + 4], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x4aa366
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
js 0x4aa366
movzx eax, word [ebp - 0x52]
and eax, 0xf000
cmp eax, 0x8000
je 0x4a9f62
cmp byte [esi], 0
je 0x4aa390
lea edx, [esi + 1]
mov ecx, edx
mov esi, edx
jmp 0x4aa280
mov byte [ebx + edi], 0
jmp 0x4aa2cb
mov byte [ebx], 0x2e
mov byte [ebx + 1], 0x2f
mov byte [ebx + 2], 0
jmp 0x4aa2cb
mov edi, dword [ebp - 0x60]
mov ebx, edi
jmp 0x4a9f62