Function at 0x1006a640
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x102353f1
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x102c6474]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ecx, edi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], 0
call fcn.10005e30
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x1006a68f
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x1006a6a6
mov eax, edx
cmp word [eax], 0x25
je 0x1006a6dc
add eax, 2
sub ecx, 1
jne 0x1006a698
push edi
mov ecx, esi
call fcn.10007fe7
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], 1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101e48f0
mov esp, ebp
pop ebp
ret 8
test eax, eax
je 0x1006a6a6
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x1006a6a6
push edi
lea ecx, [ebp - 0x28]
call fcn.10007fe7
mov dword [ebp - 4], 1
mov ecx, edi
push 0
push 0
call fcn.10007f54
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
test ebx, ebx
jne 0x1006a72e
push edi
mov ecx, esi
call fcn.10007fe7
mov dword [ebp - 0x38], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10005e05
jmp 0x1006a6bc
xor ecx, ecx
lea eax, [ebx + 2]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.101e4dd6
add esp, 4
mov dword [ebp - 0x30], eax
lea edx, [ebx + 1]
mov ecx, edi
push edx
push eax
call fcn.10007f54
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, eax
test ecx, ecx
je 0x1006a908
cmp ecx, ebx
ja 0x1006a908
mov eax, dword [ebp - 0x30]
xor edx, edx
push eax
mov word [eax + ecx*2], dx
call fcn.10005f42
add esp, 4
lea ecx, [ebp - 0x28]
mov ebx, eax
call fcn.10005e30
mov edi, eax
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x48], ecx
cmp ebx, ecx
ja 0x1006a7d3
mov dword [ebp - 0x2c], edi
cmp ecx, 8
jb 0x1006a7a7
mov eax, dword [edi]
mov dword [ebp - 0x2c], eax
push ebx
push dword [ebp - 0x30]
mov dword [edi + 0x10], ebx
push eax
call fcn.10005f10
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
mov eax, dword [ebp - 0x2c]
lea eax, [eax + ebx*2]
push eax
call fcn.10005eff
add esp, 0x14
jmp 0x1006a908
lea ecx, [ebp - 0x28]
call fcn.1000608d
cmp ebx, eax
ja 0x1006a923
lea ecx, [ebp - 0x28]
call fcn.1000608d
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.10005e30
mov ecx, ebx
or ecx, 7
mov dword [ebp - 0x40], ecx
cmp ecx, esi
ja 0x1006a828
mov edx, dword [eax + 0x14]
mov ecx, edx
shr ecx, 1
mov eax, esi
sub eax, ecx
cmp edx, eax
ja 0x1006a828
lea eax, [ecx + edx]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.10005ed6
add esp, 8
mov esi, dword [eax]
lea eax, [esi + 1]
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x1006a83a
or ecx, 0xffffffff
jmp 0x1006a842
cmp ecx, 0x1000
jb 0x1006a86b
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.101e4da1
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1006a928
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1006a87c
test ecx, ecx
je 0x1006a87a
push ecx
call fcn.101e4da1
add esp, 4
jmp 0x1006a87c
xor eax, eax
mov dword [ebp - 0x2c], eax
push ebx
push dword [ebp - 0x30]
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], esi
mov esi, dword [ebp - 0x2c]
push esi
call fcn.10005f29
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
lea eax, [esi + ebx*2]
push eax
call fcn.10005eff
mov ecx, dword [ebp - 0x48]
add esp, 0x14
cmp ecx, 8
jb 0x1006a8e5
mov eax, dword [edi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x1006a8d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1006a928
mov eax, edx
push ecx
push eax
call fcn.101e4d70
mov eax, dword [ebp - 0x2c]
add esp, 8
mov dword [edi], eax
jmp 0x1006a905
push edi
call fcn.10005f6e
push eax
push 4
call fcn.10005b84
mov esi, eax
lea eax, [ebp - 0x2c]
push eax
call fcn.10005f6e
add esp, 0x10
mov ecx, dword [eax]
mov dword [esi], ecx
mov esi, dword [ebp - 0x34]
push dword [ebp - 0x30]
call fcn.101e4dd1
add esp, 4
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.100085c3
jmp 0x1006a719
call fcn.1000604b
call fcn.10205f6e
int3