Function at 0x407060
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x80c
mov eax, dword [0x423640]
xor eax, esp
mov dword [esp + 0x808], eax
mov eax, dword [esp + 0x810]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x2e
xor ebx, ebx
push esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
mov ebp, esi
call fcn.00409290
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x4070f4
push str..lnk
push edi
call fcn.00409600
add esp, 8
test eax, eax
je 0x4070e3
push str..pif
push edi
call fcn.00409600
add esp, 8
test eax, eax
je 0x4070e3
push str..job
push edi
call fcn.00409600
add esp, 8
test eax, eax
jne 0x4070f4
lea ebx, [esp + 0x18]
mov edi, esi
call fcn.00406900
xor ebx, ebx
jmp 0x4070ec
lea edi, [esp + 0x18]
call fcn.00406820
test eax, eax
je 0x4070f4
lea ebp, [esp + 0x18]
mov eax, ebp
call fcn.00406800
test eax, eax
je 0x40712b
mov esi, dword [esp + 0x10]
mov edx, esi
mov eax, ebp
sub edx, ebp
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x407110
push esi
call dword [sym.imp.USER32.dll_CharLowerA]
mov eax, 1
jmp 0x407359
mov eax, 0xc
mov ecx, str.SystemRoot_
mov edx, ebp
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x40714d
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x407137
jmp 0x407183
movzx eax, byte [edx]
movzx esi, byte [ecx]
sub eax, esi
jne 0x407179
movzx eax, byte [edx + 1]
movzx esi, byte [ecx + 1]
sub eax, esi
jne 0x407179
movzx eax, byte [edx + 2]
movzx esi, byte [ecx + 2]
sub eax, esi
jne 0x407179
movzx eax, byte [edx + 3]
movzx ecx, byte [ecx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
cmp eax, ebx
jne 0x4071a1
add ebp, 0xc
push ebp
push str._SystemRoot_
lea edx, [esp + 0x20]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x4071fe
cmp dword [ebp], 0x5c3f3f5c
je 0x4071d6
movzx eax, byte [ebp]
sub eax, 0x5c
jne 0x4071ce
movzx eax, byte [ebp + 1]
sub eax, 0x3f
jne 0x4071ce
movzx eax, byte [ebp + 2]
sub eax, 0x3f
jne 0x4071ce
movzx eax, byte [ebp + 3]
sub eax, 0x5c
je 0x4071d6
sar eax, 0x1f
or eax, 1
jne 0x4071ec
lea eax, [ebp + 4]
lea edx, [esp + 0x18]
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4071e0
jmp 0x4071fe
lea edx, [esp + 0x18]
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4071f4
push 0x400
lea eax, [esp + 0x41c]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edi, dword [sym.imp.USER32.dll_CharLowerA]
lea edx, [esp + 0x418]
push edx
call edi
lea eax, [esp + 0x418]
push str.rundll32
push eax
call fcn.004092c0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x40727e
push str..exe
add esi, 8
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x407257
add esi, 4
mov al, byte [esi]
cmp al, 0x22
je 0x407261
cmp al, 0x20
jne 0x407264
inc esi
jmp 0x407257
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40727e
push esi
lea ecx, [esp + 0x41c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov al, byte [esp + 0x418]
cmp al, 0x22
jne 0x4072ba
mov al, byte [esp + 0x419]
mov ecx, 1
cmp al, 0x22
je 0x4072b4
lea esp, [esp]
cmp al, bl
je 0x4072b4
mov byte [esp + ecx + 0x17], al
mov al, byte [esp + ecx + 0x419]
inc ecx
cmp al, 0x22
jne 0x4072a0
mov byte [esp + ecx + 0x17], bl
jmp 0x4072d8
xor ecx, ecx
cmp al, 0x20
je 0x4072d4
cmp al, bl
je 0x4072d4
mov byte [esp + ecx + 0x18], al
mov al, byte [esp + ecx + 0x419]
inc ecx
cmp al, 0x20
jne 0x4072c0
mov byte [esp + ecx + 0x18], bl
lea eax, [esp + 0x18]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4072e0
sub eax, edx
cmp byte [esp + eax + 0x17], 0x2c
jne 0x407304
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4072f7
sub eax, edx
mov byte [esp + eax + 0x17], bl
lea eax, [esp + 0x18]
call fcn.00406800
mov esi, dword [esp + 0x10]
test eax, eax
lea eax, [esp + 0x18]
je 0x407334
mov edx, esi
mov ecx, eax
sub edx, ecx
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x407320
push esi
call edi
mov eax, 1
jmp 0x407359
lea edx, [esp + 0x14]
push edx
push esi
push 0x400
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x407357
mov eax, esi
call fcn.00406800
test eax, eax
jne 0x40732a
xor eax, eax
mov ecx, dword [esp + 0x818]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00409279
add esp, 0x80c
ret