Function at 0x4a8070
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, eax
sub esp, 0x7c
test edx, edx
mov dword [ebp - 0x5c], edx
sete dl
test ecx, ecx
mov dword [ebp - 0x60], ecx
sete al
or dl, al
jne 0x4a8530
test esi, esi
je 0x4a8530
mov dword [esp], esi
call fcn.004a7db0
cmp esi, eax
je 0x4a83a1
mov dword [ebp - 0x68], 0
mov ebx, dword [ebp + 8]
mov dword [esp], esi
test ebx, ebx
jne 0x4a8190
call sub.msvcrt.dll__strdup
mov ebx, eax
test ebx, ebx
je 0x4a819f
lea edx, [ebp - 0x50]
mov eax, ebx
call fcn.004a7ec0
mov dword [esp], ebx
mov esi, eax
call fcn.004abfa8
test esi, esi
mov dword [ebp - 0x64], esi
je 0x4a819f
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x4c]
call fcn.004a7ec0
test eax, eax
mov esi, eax
je 0x4a8213
mov ecx, dword [ebp - 0x50]
lea ebx, [ecx - 1]
cmp ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], ebx
je 0x4a81e0
mov eax, dword [ebp - 0x60]
lea edx, [ebp - 0x48]
call fcn.004a7ec0
test eax, eax
mov edi, eax
je 0x4a8505
mov eax, dword [ebp - 0x4c]
mov ecx, eax
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x48]
cmp ecx, eax
mov dword [ebp - 0x70], eax
cmovle eax, ecx
test eax, eax
mov dword [ebp - 0x5c], eax
jle 0x4a8505
mov eax, edi
xor ebx, ebx
mov edi, esi
mov esi, eax
jmp 0x4a815e
add ebx, 1
cmp dword [ebp - 0x5c], ebx
je 0x4a8220
mov eax, dword [esi + ebx*4]
mov dword [esp + 4], eax
mov eax, dword [edi + ebx*4]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a8152
mov eax, esi
test ebx, ebx
mov esi, edi
mov dword [ebp - 0x60], 0
mov edi, eax
je 0x4a81b1
mov dword [ebp - 0x5c], ebx
jmp 0x4a8226
call fcn.004a7dc0
mov ebx, eax
test ebx, ebx
jne 0x4a80cf
mov dword [ebp - 0x60], 0
xor edi, edi
xor esi, esi
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x64]
call fcn.004a7e80
mov eax, esi
call fcn.004a7e80
mov eax, edi
call fcn.004a7e80
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call fcn.004abfa8
mov eax, dword [ebp - 0x60]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test ebx, ebx
jle 0x4a8213
mov dword [ebp - 0x5c], ebx
xor edi, edi
mov ebx, dword [ebp - 0x64]
jmp 0x4a81f8
add edi, 1
cmp edi, dword [ebp - 0x5c]
je 0x4a8213
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 0x4a81f0
jmp 0x4a8115
mov dword [ebp - 0x60], 0
xor edi, edi
jmp 0x4a81b1
mov eax, esi
mov esi, edi
mov edi, eax
mov eax, dword [ebp - 0x50]
test eax, eax
jle 0x4a8567
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x74], edi
lea eax, [ecx + eax*4]
mov ebx, ecx
xor ecx, ecx
mov edi, ebx
mov esi, ecx
mov ebx, eax
mov esi, esi
lea edi, [edi]
mov eax, dword [edi]
add edi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add eax, esi
cmp edi, ebx
mov esi, eax
jne 0x4a8250
mov esi, dword [ebp - 0x60]
mov edi, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x6c]
sub edx, ecx
lea ebx, [edx + edx*2]
mov edx, dword [ebp - 0x70]
add eax, ebx
cmp edx, ecx
jle 0x4a82ac
lea ebx, [edi + ecx*4]
lea ecx, [edi + edx*4]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x6c], edi
mov esi, eax
mov edi, ebx
mov ebx, ecx
mov eax, dword [edi]
add edi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add esi, eax
cmp edi, ebx
jne 0x4a8291
mov eax, esi
mov edi, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x60]
mov ebx, eax
add ebx, 1
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x60], eax
je 0x4a81b1
mov byte [eax], 0
mov eax, dword [ebp - 0x50]
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x6c], eax
jle 0x4a82fd
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], edi
mov esi, dword [ebp - 0x64]
mov edi, dword [ebp - 0x60]
nop
mov eax, dword [esi + ebx*4]
mov dword [esp], edi
add ebx, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
cmp ebx, dword [ebp - 0x6c]
jne 0x4a82e0
mov esi, dword [ebp - 0x70]
mov edi, dword [ebp - 0x74]
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
add eax, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x4a8300
mov ecx, edx
shr ecx, 0x10
test edx, 0x8080
cmove edx, ecx
lea ecx, [eax + 2]
cmove eax, ecx
mov ecx, edx
add cl, dl
mov edx, dword [ebp - 0x4c]
sbb eax, 3
cmp edx, dword [ebp - 0x5c]
jle 0x4a856e
sub edx, dword [ebp - 0x5c]
lea edx, [edx + edx*2]
add edx, eax
lea esi, [esi]
lea edi, [edi]
mov ecx, 0x2e2e
mov byte [eax + 2], 0
add eax, 3
mov word [eax - 3], cx
cmp eax, edx
mov byte [eax - 1], 0x2f
jne 0x4a8350
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x5c]
mov byte [edx], 0
cmp ebx, eax
jle 0x4a81b1
mov dword [ebp - 0x5c], esi
mov esi, ebx
mov ebx, eax
mov eax, dword [edi + ebx*4]
add ebx, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
cmp ebx, esi
jne 0x4a8380
mov esi, dword [ebp - 0x5c]
jmp 0x4a81b1
mov dword [esp], 0x4e22c0
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a80ab
mov dword [esp], eax
mov dword [ebp - 0x64], eax
call sub.msvcrt.dll_strlen
lea ebx, [eax + 1]
mov eax, 2
mov dword [esp], esi
cmp ebx, 1
cmovbe ebx, eax
call sub.msvcrt.dll_strlen
add eax, ebx
mov edx, dword [ebp - 0x64]
lea ecx, [eax + 5]
cmp ecx, 0xfbf
ja 0x4a8548
add eax, 0x23
shr eax, 4
shl eax, 4
call fcn.004aa7b0
sub esp, eax
mov dword [ebp - 0x68], 0
lea edi, [esp + 0x1b]
and edi, 0xfffffff0
mov ebx, edx
mov dword [ebp - 0x64], esi
movzx eax, byte [ebx]
cmp al, 0x3b
je 0x4a8424
test al, al
lea ecx, [ebx + 1]
je 0x4a8424
mov ebx, ecx
movzx eax, byte [ebx]
cmp al, 0x3b
jne 0x4a8414
cmp edx, ebx
je 0x4a8520
mov esi, ebx
mov dword [esp + 4], edx
mov dword [esp], edi
sub esi, edx
mov dword [esp + 8], esi
call sub.msvcrt.dll_memcpy
movzx eax, byte [ebx - 1]
cmp al, 0x2f
je 0x4a8511
cmp al, 0x5c
je 0x4a8511
mov byte [edi + esi], 0x2f
mov byte [edi + esi + 1], 0
mov eax, dword [ebp - 0x64]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__access]
test eax, eax
je 0x4a84d2
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x4a8483
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
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 dword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x4a84f4
lea eax, [ebp - 0x48]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
js 0x4a84f4
movzx eax, word [ebp - 0x42]
and ax, 0xf000
cmp ax, 0x8000
je 0x4a8560
cmp byte [ebx], 0
je 0x4a8540
lea ecx, [ebx + 1]
mov edx, ecx
mov ebx, ecx
jmp 0x4a841d
mov dword [ebp - 0x60], 0
jmp 0x4a81b1
mov byte [edi + esi], 0
jmp 0x4a845d
mov byte [edi], 0x2e
mov byte [edi + 1], 0x2f
mov byte [edi + 2], 0
jmp 0x4a845d
xor eax, eax
jmp 0x4a81d5
mov esi, dword [ebp - 0x64]
jmp 0x4a80b2
mov dword [esp], ecx
mov dword [ebp - 0x64], edx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], eax
mov edi, eax
jmp 0x4a8408
mov esi, edi
jmp 0x4a80b2
xor eax, eax
jmp 0x4a826b
mov edx, eax
jmp 0x4a8368