Function at 0x4a1b90
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, eax
sub esp, 0x6c
test edx, edx
mov dword [ebp - 0x4c], edx
sete dl
test ecx, ecx
mov dword [ebp - 0x54], ecx
sete al
or dl, al
jne 0x4a2080
test esi, esi
je 0x4a2080
mov dword [esp], esi
call fcn.004a18d0
cmp esi, eax
je 0x4a1ed3
mov dword [ebp - 0x58], 0
mov ecx, dword [ebp + 8]
mov dword [esp], esi
test ecx, ecx
jne 0x4a1e10
call fcn.004b3fe8
mov ebx, eax
test ebx, ebx
je 0x4a1e1f
lea edx, [ebp - 0x44]
mov eax, ebx
call fcn.004a19e0
mov dword [esp], ebx
mov edi, eax
call sub.msvcrt.dll_free
test edi, edi
mov dword [ebp - 0x50], edi
je 0x4a1e1f
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x40]
call fcn.004a19e0
test eax, eax
mov ebx, eax
je 0x4a1ec0
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
lea esi, [edx - 1]
mov dword [ebp - 0x5c], ecx
cmp esi, ecx
mov dword [ebp - 0x44], esi
je 0x4a1e63
mov eax, dword [ebp - 0x54]
lea edx, [ebp - 0x3c]
call fcn.004a19e0
test eax, eax
mov dword [ebp - 0x54], eax
je 0x4a2050
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
cmp eax, ecx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], ecx
mov edi, eax
jg 0x4a1eb0
test edi, edi
jle 0x4a2050
mov dword [ebp - 0x4c], edi
xor esi, esi
mov edi, dword [ebp - 0x54]
jmp 0x4a1c88
add esi, 1
cmp dword [ebp - 0x4c], esi
je 0x4a1cb0
mov eax, dword [edi + esi*4]
mov dword [esp + 4], eax
mov eax, dword [ebx + esi*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a1c80
test esi, esi
mov dword [ebp - 0x4c], 0
je 0x4a1e36
lea esi, [esi]
mov eax, dword [ebp - 0x44]
test eax, eax
jle 0x4a20b7
mov edx, dword [ebp - 0x50]
xor ecx, ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x64], esi
mov ebx, ecx
lea eax, [edx + eax*4]
mov esi, edx
mov edi, eax
nop
mov eax, dword [esi]
add esi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add eax, ebx
cmp edi, esi
mov ebx, eax
jne 0x4a1cd0
mov ebx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x5c]
sub ecx, esi
lea edi, [ecx + ecx*2]
mov ecx, dword [ebp - 0x60]
add eax, edi
cmp ecx, esi
jle 0x4a1d2c
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], ebx
mov ebx, eax
mov dword [ebp - 0x5c], esi
lea edi, [edx + esi*4]
lea ecx, [edx + ecx*4]
mov esi, edi
mov edi, ecx
mov eax, dword [esi]
add esi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add ebx, eax
cmp edi, esi
jne 0x4a1d11
mov eax, ebx
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x4c]
mov edi, eax
add edi, 1
mov dword [esp], edi
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x4c], eax
je 0x4a1e36
mov byte [eax], 0
mov eax, dword [ebp - 0x44]
xor edi, edi
test eax, eax
mov dword [ebp - 0x5c], eax
jle 0x4a1d7e
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x64], esi
mov esi, edi
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebx + esi*4]
mov dword [esp], edi
add esi, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp esi, dword [ebp - 0x5c]
jne 0x4a1d61
mov ebx, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
mov edi, dword [ebp - 0x4c]
mov edx, dword [edi]
add edi, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x4a1d81
test eax, 0x8080
jne 0x4a1da4
shr eax, 0x10
add edi, 2
mov ecx, eax
add cl, al
mov eax, dword [ebp - 0x40]
sbb edi, 3
cmp eax, esi
jle 0x4a1dd8
sub eax, esi
lea eax, [eax + eax*2]
add eax, edi
lea esi, [esi]
mov edx, 0x2e2e
mov byte [edi + 2], 0
add edi, 3
mov word [edi - 3], dx
cmp edi, eax
mov byte [edi - 1], 0x2f
jne 0x4a1dc0
mov byte [edi], 0
mov edi, dword [ebp - 0x3c]
cmp edi, esi
jle 0x4a1e36
mov dword [ebp - 0x5c], ebx
mov ebx, dword [ebp - 0x54]
nop
lea esi, [esi]
mov eax, dword [ebx + esi*4]
add esi, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
cmp esi, edi
jne 0x4a1df0
mov ebx, dword [ebp - 0x5c]
jmp 0x4a1e36
call fcn.004a18e0
mov ebx, eax
test ebx, ebx
jne 0x4a1bef
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], 0
xor ebx, ebx
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x50]
call fcn.004a19a0
mov eax, ebx
call fcn.004a19a0
mov eax, dword [ebp - 0x54]
call fcn.004a19a0
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x4c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
jle 0x4a1e9e
mov dword [ebp - 0x4c], esi
xor edi, edi
mov esi, dword [ebp - 0x50]
jmp 0x4a1e7d
add edi, 1
cmp edi, dword [ebp - 0x4c]
je 0x4a2030
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 0x4a1e71
mov esi, dword [ebp - 0x4c]
test esi, esi
jg 0x4a1c3a
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], 0
jmp 0x4a1e36
mov edi, ecx
jmp 0x4a1c66
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x4c], 0
jmp 0x4a1e36
mov dword [esp], 0x4ea900
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a1bcb
mov dword [esp], eax
mov dword [ebp - 0x50], eax
call sub.msvcrt.dll_strlen
lea ebx, [eax + 1]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
cmp ebx, 2
mov edx, dword [ebp - 0x50]
jae 0x4a1f0a
mov ebx, 2
lea eax, [eax + ebx + 5]
cmp eax, 0xfbf
ja 0x4a2098
add eax, 0x1e
shr eax, 4
shl eax, 4
call fcn.004b3a40
sub esp, eax
mov dword [ebp - 0x58], 0
lea edi, [esp + 0x1b]
and edi, 0xfffffff0
mov ebx, edx
mov dword [ebp - 0x50], esi
movzx eax, byte [ebx]
cmp al, 0x3b
je 0x4a1f53
test al, al
lea ecx, [ebx + 1]
je 0x4a1f53
mov ebx, ecx
movzx eax, byte [ebx]
cmp al, 0x3b
jne 0x4a1f43
cmp edx, ebx
je 0x4a2070
mov esi, ebx
mov dword [esp + 4], edx
mov dword [esp], edi
sub esi, edx
mov dword [esp + 8], esi
call fcn.004bc590
movzx eax, byte [ebx - 1]
cmp al, 0x2f
je 0x4a2060
cmp al, 0x5c
je 0x4a2060
mov byte [edi + esi], 0x2f
mov byte [edi + esi + 1], 0
mov eax, dword [ebp - 0x50]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.msvcrt.dll__access
test eax, eax
je 0x4a1ff9
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4a1fb1
test eax, 0x8080
jne 0x4a1fd4
shr eax, 0x10
add edx, 2
mov ecx, eax
add cl, al
sbb edx, 3
mov dword [edx], 0x6578652e
mov byte [edx + 4], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.msvcrt.dll__access
test eax, eax
jne 0x4a201e
lea eax, [ebp - 0x3c]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll__stat
test eax, eax
js 0x4a201e
movzx eax, word [ebp - 0x36]
and ax, 0xf000
cmp ax, 0x8000
je 0x4a20b0
cmp byte [ebx], 0
je 0x4a2090
lea ecx, [ebx + 1]
mov edx, ecx
mov ebx, ecx
jmp 0x4a1f4c
cmp dword [ebp - 0x5c], edi
je 0x4a1e9e
test edi, edi
jg 0x4a1c3a
jmp 0x4a1e9e
mov dword [ebp - 0x4c], 0
jmp 0x4a1e36
mov byte [edi + esi], 0
jmp 0x4a1f8c
mov byte [edi], 0x2e
mov byte [edi + 1], 0x2f
mov byte [edi + 2], 0
jmp 0x4a1f8c
mov dword [ebp - 0x4c], 0
jmp 0x4a1e58
mov esi, dword [ebp - 0x50]
jmp 0x4a1bd2
mov dword [esp], eax
mov dword [ebp - 0x50], edx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov edi, eax
jmp 0x4a1f37
mov esi, edi
jmp 0x4a1bd2
xor eax, eax
jmp 0x4a1ceb