Function at 0x10089f40
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10189a4d
mov eax, dword fs:[0]
push eax
sub esp, 0x8d0
mov eax, dword [0x101ed40c]
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]
cmp dword [esi + 0x10], 0
jne 0x10089f7e
xor al, al
jmp 0x1008a392
push 0xc
xor eax, eax
mov dword [ebp - 0x8c8], 0
push str._SystemRoot_
lea ecx, [ebp - 0x8d8]
mov dword [ebp - 0x8c4], 7
mov word [ebp - 0x8d8], ax
call fcn.10044c60
push 0x15
xor eax, eax
mov dword [ebp - 4], 0
push str._SystemRoot_System32
lea ecx, [ebp - 0x8c0]
mov dword [ebp - 0x8b0], 0
mov dword [ebp - 0x8ac], 7
mov word [ebp - 0x8c0], ax
call fcn.10044c60
push 0x15
xor eax, eax
mov byte [ebp - 4], 1
push str._SystemRoot_SysWOW64
lea ecx, [ebp - 0x8a8]
mov dword [ebp - 0x898], 0
mov dword [ebp - 0x894], 7
mov word [ebp - 0x8a8], ax
call fcn.10044c60
cmp dword [esi + 0x14], 8
mov byte [ebp - 4], 2
jb 0x1008a022
mov esi, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x218]
push 0x104
push eax
push esi
call ebx
xor eax, eax
mov dword [ebp - 0x838], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x834], 7
mov word [ebp - 0x848], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a060
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x848]
call fcn.10044c60
cmp dword [ebp - 0x834], 8
lea ecx, [ebp - 0x848]
mov edx, dword [ebp - 0x848]
lea edi, [ebp - 0x848]
mov eax, dword [ebp - 0x838]
cmovae ecx, edx
push fcn.10158c69
cmovae edi, edx
mov byte [ebp - 4], 3
push edi
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x848]
cmovae ecx, edx
lea eax, [ebp - 0x8dc]
push ecx
push eax
call fcn.10088980
add esp, 0x14
lea ecx, [ebp - 0x420]
cmp dword [ebp - 0x8c4], 8
lea eax, [ebp - 0x8d8]
cmovae eax, dword [ebp - 0x8d8]
push 0x104
push ecx
push eax
call ebx
xor eax, eax
mov dword [ebp - 0x880], 0
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x87c], 7
mov word [ebp - 0x890], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a117
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x890]
call fcn.10044c60
cmp dword [ebp - 0x87c], 8
lea ecx, [ebp - 0x890]
mov edx, dword [ebp - 0x890]
lea edi, [ebp - 0x890]
mov eax, dword [ebp - 0x880]
cmovae ecx, edx
push fcn.10158c69
cmovae edi, edx
mov byte [ebp - 4], 4
push edi
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x890]
cmovae ecx, edx
lea eax, [ebp - 0x8dc]
push ecx
push eax
call fcn.10088980
add esp, 0x14
lea ecx, [ebp - 0x628]
cmp dword [ebp - 0x8ac], 8
lea eax, [ebp - 0x8c0]
cmovae eax, dword [ebp - 0x8c0]
push 0x104
push ecx
push eax
call ebx
xor eax, eax
mov dword [ebp - 0x868], 0
lea ecx, [ebp - 0x628]
mov dword [ebp - 0x864], 7
mov word [ebp - 0x878], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a1d0
sub ecx, edx
lea eax, [ebp - 0x628]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x878]
call fcn.10044c60
cmp dword [ebp - 0x864], 8
lea ecx, [ebp - 0x878]
mov edx, dword [ebp - 0x878]
lea edi, [ebp - 0x878]
mov eax, dword [ebp - 0x868]
cmovae ecx, edx
push fcn.10158c69
cmovae edi, edx
mov byte [ebp - 4], 5
push edi
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x878]
cmovae ecx, edx
lea eax, [ebp - 0x8dc]
push ecx
push eax
call fcn.10088980
add esp, 0x14
lea ecx, [ebp - 0x830]
cmp dword [ebp - 0x894], 8
lea eax, [ebp - 0x8a8]
cmovae eax, dword [ebp - 0x8a8]
push 0x104
push ecx
push eax
call ebx
xor eax, eax
mov dword [ebp - 0x850], 0
lea ecx, [ebp - 0x830]
mov dword [ebp - 0x84c], 7
mov word [ebp - 0x860], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1008a287
sub ecx, edx
lea eax, [ebp - 0x830]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x860]
call fcn.10044c60
cmp dword [ebp - 0x84c], 8
lea ecx, [ebp - 0x860]
mov edx, dword [ebp - 0x860]
lea edi, [ebp - 0x860]
mov eax, dword [ebp - 0x850]
cmovae ecx, edx
push fcn.10158c69
cmovae edi, edx
mov byte [ebp - 4], 6
push edi
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x860]
cmovae ecx, edx
lea eax, [ebp - 0x8dc]
push ecx
push eax
call fcn.10088980
add esp, 0x14
lea eax, [ebp - 0x890]
lea ecx, [ebp - 0x848]
push 0
push eax
call fcn.1008a580
test eax, eax
je 0x1008a341
push 0
lea eax, [ebp - 0x878]
push eax
lea ecx, [ebp - 0x848]
call fcn.1008a580
test eax, eax
je 0x1008a341
push 0
lea eax, [ebp - 0x860]
push eax
lea ecx, [ebp - 0x848]
call fcn.1008a580
test eax, eax
je 0x1008a341
xor bl, bl
jmp 0x1008a343
mov bl, 1
lea ecx, [ebp - 0x860]
call fcn.100424a0
lea ecx, [ebp - 0x878]
call fcn.100424a0
lea ecx, [ebp - 0x890]
call fcn.100424a0
lea ecx, [ebp - 0x848]
call fcn.100424a0
lea ecx, [ebp - 0x8a8]
call fcn.100424a0
lea ecx, [ebp - 0x8c0]
call fcn.100424a0
lea ecx, [ebp - 0x8d8]
call fcn.100424a0
mov al, bl
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.10126919
mov esp, ebp
pop ebp
ret 4