Function at 0x10081020
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x102ad810
push 0x101fd830
mov eax, dword fs:[0]
push eax
sub esp, 0x448
mov eax, dword [0x102c6474]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], 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 esi, ecx
mov dword [ebp - 0x448], esi
mov dword [ebp - 0x444], edi
mov dword [ebp - 4], 0
mov ecx, edi
call fcn.1000fc76
mov ecx, esi
call fcn.10081360
mov bl, al
mov byte [ebp - 0x435], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x100810b3
test bl, bl
jne 0x10081336
cmp esi, 0x1a
jne 0x10081336
mov ecx, edi
call fcn.1000fc76
push 0x410
push 0
lea eax, [ebp - 0x430]
push eax
call fcn.101fd690
add esp, 0xc
push 0x207
lea eax, [ebp - 0x430]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x430]
push eax
call fcn.10005f42
add esp, 4
mov dword [ebp - 0x440], eax
mov ecx, edi
call fcn.10005e30
mov esi, eax
mov dword [ebp - 0x444], esi
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x454], edx
mov eax, dword [ebp - 0x440]
cmp eax, edx
ja 0x10081183
mov ecx, esi
mov dword [ebp - 0x434], esi
cmp edx, 8
jb 0x10081144
mov ecx, dword [esi]
mov dword [ebp - 0x434], ecx
mov dword [esi + 0x10], eax
push eax
lea eax, [ebp - 0x430]
push eax
push ecx
call fcn.10005f10
add esp, 0xc
mov dword [ebp - 0x444], 0
lea eax, [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x440]
mov eax, dword [ebp - 0x434]
lea eax, [eax + ecx*2]
push eax
call fcn.10005eff
jmp 0x1008131f
mov ecx, edi
call fcn.1000608d
cmp dword [ebp - 0x440], eax
ja 0x10081354
mov ecx, edi
call fcn.1000608d
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x440]
or ecx, 7
mov dword [ebp - 0x450], ecx
cmp ecx, eax
ja 0x1008120b
mov ecx, edi
call fcn.10005e30
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x434], eax
mov edx, eax
shr edx, 1
mov eax, dword [ebp - 0x43c]
sub eax, edx
mov ecx, dword [ebp - 0x434]
cmp ecx, eax
jbe 0x100811e4
mov eax, dword [ebp - 0x43c]
jmp 0x10081205
lea eax, [edx + ecx]
mov dword [ebp - 0x44c], eax
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x450]
push eax
call fcn.10005ed6
add esp, 8
mov eax, dword [eax]
mov dword [ebp - 0x43c], eax
inc eax
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x1008121b
or ecx, 0xffffffff
jmp 0x10081223
cmp ecx, 0x1000
jb 0x1008124c
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.101e4da1
add esp, 4
mov ecx, eax
test ecx, ecx
je 0x10081359
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1008125d
test ecx, ecx
je 0x1008125b
push ecx
call fcn.101e4da1
add esp, 4
jmp 0x1008125d
xor eax, eax
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x440]
mov dword [esi + 0x10], eax
mov ecx, dword [ebp - 0x43c]
mov dword [esi + 0x14], ecx
mov esi, dword [ebp - 0x434]
push eax
lea eax, [ebp - 0x430]
push eax
push esi
call fcn.10005f29
add esp, 0xc
mov dword [ebp - 0x43c], 0
lea eax, [ebp - 0x43c]
push eax
mov eax, dword [ebp - 0x440]
lea eax, [esi + eax*2]
push eax
call fcn.10005eff
add esp, 8
mov ecx, dword [ebp - 0x454]
cmp ecx, 8
jb 0x100812f4
lea ecx, [ecx*2 + 2]
mov esi, dword [ebp - 0x444]
mov eax, dword [esi]
cmp ecx, 0x1000
jb 0x100812e3
add ecx, 0x23
mov edx, dword [eax - 4]
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10081359
mov eax, edx
push ecx
push eax
call fcn.101e4d70
mov eax, dword [ebp - 0x434]
mov dword [esi], eax
jmp 0x1008131f
lea eax, [ebp - 0x434]
push eax
call fcn.10005f6e
add esp, 4
mov esi, eax
push dword [ebp - 0x444]
call fcn.10005f6e
add esp, 4
push eax
push 4
call fcn.10005b84
mov edx, dword [esi]
mov dword [eax], edx
add esp, 8
mov ecx, edi
call fcn.10007f3e
movzx ebx, bl
mov ecx, 1
test al, al
cmove 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 - 0x1c]
xor ecx, ebp
call fcn.101e48f0
mov esp, ebp
pop ebp
ret
call fcn.1000604b
call fcn.10205f6e
int3