Function at 0x10020606
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100875b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
movzx eax, byte [ebp + 8]
test eax, eax
je 0x1002063d
push 0x18bc
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x100207f9
mov dword [ebp - 0x14], 0
push 2
lea ecx, [ebp - 0x5c]
call fcn.1001b841
and dword [ebp - 4], 0
mov dword [ebp - 0x44], 0xb0cadfb1
mov dword [ebp - 0x18], 0
jmp 0x10020669
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 2
jge 0x10020682
push dword [ebp - 0x18]
lea ecx, [ebp - 0x5c]
call fcn.1001b8b2
mov dword [eax], 0xffff
jmp 0x10020662
mov dword [ebp - 0x18], 0
jmp 0x10020692
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 3
jge 0x100206a5
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x68], 0xb56cef3c
jmp 0x1002068b
cmp dword [ebp - 0x14], 0
je 0x100207b2
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x14], eax
je 0x100206c0
mov dword [ebp - 0x24], 1
jmp 0x100206c4
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x14], eax
jle 0x100206db
cmp dword [ebp - 0x14], 0
je 0x100206db
mov dword [ebp - 0x20], 1
jmp 0x100206df
and dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x14]
imul eax, dword [ebp - 0x20]
cmp dword [ebp - 0x24], eax
jne 0x100206f4
mov dword [ebp - 0x28], 1
jmp 0x100206f8
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x28], eax
je 0x10020709
mov dword [ebp - 0x2c], 1
jmp 0x1002070d
and dword [ebp - 0x2c], 0
push 0
lea ecx, [ebp - 0x5c]
call fcn.1001b8b2
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x4c]
jge 0x10020744
mov dword [ebp - 0x30], 1
jmp 0x10020748
and dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x30], eax
jle 0x1002075f
cmp dword [ebp - 0x14], 0
je 0x1002075f
mov dword [ebp - 0x34], 1
jmp 0x10020763
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x14]
jne 0x10020777
mov dword [ebp - 0x38], 1
jmp 0x1002077b
and dword [ebp - 0x38], 0
cmp dword [ebp - 0x38], 1
jbe 0x10020790
push 0
lea ecx, [ebp - 0x5c]
call fcn.1001b8b2
cmp dword [eax], 0
jne 0x1002079f
cmp dword [ebp - 0x14], 0
je 0x1002079f
mov dword [ebp - 0x3c], 1
jmp 0x100207a3
and dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0xfffffff6
jl 0x100207b2
mov dword [ebp - 0x40], 1
jmp 0x100207b6
and dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x50], eax
push 4
pop eax
shl eax, 1
mov dword [ebp + eax - 0x68], 0xffffffff
mov byte [ebp - 0xd], 0
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x100207ed
push 0x5f5
push 0x12b4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.1001b8ad
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret