Function at 0x4215d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x4713e0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 7
jne 0x42164f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp + 0x10]
cmp dword [ebp - 0x48], ecx
jae 0x421627
mov edx, dword [ebp - 0x48]
movzx eax, byte [edx]
test eax, eax
jne 0x42161c
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0x48]
movzx eax, byte [edx + ecx]
test eax, eax
jne 0x421616
jmp 0x421627
mov ecx, dword [ebp - 0x48]
mov byte [ecx], 0xa
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x48], edx
jmp 0x4215ec
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x14]
push edx
call fcn.00414070
add esp, 0xc
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x4217b8
cmp dword [ebp + 8], 1
jne 0x42167d
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.00414070
add esp, 0xc
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x4217b8
cmp dword [ebp + 8], 4
jne 0x4216c4
cmp dword [ebp + 0x10], 4
jb 0x4216c4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
push 0x46ad50
lea ecx, [ebp - 0x44]
push ecx
call fcn.00439aa0
add esp, 0xc
mov dword [ebp - 0x68], eax
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00414070
add esp, 0xc
mov eax, dword [ebp - 0x68]
jmp 0x4217b8
cmp dword [ebp + 8], 2
jne 0x4216f0
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edx, dword [ebp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x4217b8
cmp dword [ebp + 8], 3
jne 0x42176e
mov eax, dword [ebp + 0x18]
shr eax, 1
sub eax, 1
cmp dword [ebp + 0x10], eax
jae 0x42170b
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x58], ecx
jmp 0x421716
mov edx, dword [ebp + 0x18]
shr edx, 1
sub edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x54]
sub ecx, 1
mov dword [ebp - 0x54], ecx
cmp dword [ebp - 0x60], 0
je 0x42176c
mov edx, dword [ebp - 0x50]
movzx eax, byte [edx]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
push ecx
push 0x46ad54
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00439aa0
add esp, 0xc
add eax, dword [ebp - 0x4c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x50]
add eax, 1
mov dword [ebp - 0x50], eax
jmp 0x421728
jmp 0x4217b6
mov ecx, dword [ebp + 0x18]
push ecx
push 0
mov edx, dword [ebp + 0x14]
push edx
call fcn.0043a830
add esp, 0xc
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 0x18]
jge 0x421790
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x5c], ecx
jmp 0x421796
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x14]
push edx
call fcn.0043a1e0
add esp, 0xc
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x4217b8
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439b24
mov esp, ebp
pop ebp
ret