Function at 0x10021170
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xfffffffffffffffe
push 0x100610b8
push 0x10038620
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x1006500c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, edx
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0
mov dword [edi + 0x10], 0
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x100211d1
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
mov edx, edi
call fcn.100213c0
mov bl, al
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x10021203
test bl, bl
jne 0x1002138e
lea esi, [edi + 0x10]
mov dword [ebp - 0x24], esi
mov dword [esi], 0
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x10021221
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
push 0x410
push ecx
lea eax, [ebp]
push eax
call fcn.10038450
add esp, 0xc
push 0x207
lea eax, [ebp]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp]
push eax
call fcn.1003dd45
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x2c], ecx
cmp eax, ecx
ja 0x1002128a
cmp ecx, 8
jb 0x1002126c
mov edi, dword [edi]
mov dword [esi], eax
lea esi, [eax + eax]
push esi
lea eax, [ebp]
push eax
push edi
call fcn.10037950
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
jmp 0x1002137d
cmp eax, 0x7ffffffe
ja 0x100213b3
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x100212a9
mov esi, 0x7ffffffe
jmp 0x100212c7
mov edx, ecx
shr edx, 1
mov eax, 0x7ffffffe
sub eax, edx
cmp ecx, eax
jbe 0x100212bf
mov esi, 0x7ffffffe
jmp 0x100212c7
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x100212d9
or ecx, 0xffffffff
jmp 0x100212e1
cmp ecx, 0x1000
jb 0x1002130a
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.10036327
add esp, 4
mov ecx, eax
test ecx, ecx
je 0x100213b8
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1002131b
test ecx, ecx
je 0x10021319
push ecx
call fcn.10036327
add esp, 4
jmp 0x1002131b
xor eax, eax
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword [edx], ecx
mov dword [edi + 0x14], esi
lea esi, [ecx + ecx]
push esi
lea ecx, [ebp]
push ecx
push eax
call fcn.10037ed0
add esp, 0xc
xor ecx, ecx
mov eax, dword [ebp - 0x20]
mov word [esi + eax], cx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 8
jb 0x1002137b
lea ecx, [ecx*2 + 2]
mov eax, dword [edi]
cmp ecx, 0x1000
jb 0x1002136e
add ecx, 0x23
mov edx, dword [eax - 4]
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100213b8
mov eax, edx
push ecx
push eax
call fcn.10036357
add esp, 8
mov eax, dword [ebp - 0x20]
mov dword [edi], eax
movzx ebx, bl
mov ecx, 1
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
cmovne ebx, ecx
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.10036316
lea esp, [ebp + 0x414]
pop ebp
ret
call fcn.10002957
call fcn.1003df6b
int3