Function at 0x10002e10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100271c8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x10033010]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 0
call fcn.10005250
mov ecx, eax
test ecx, ecx
jne 0x10002e5b
push 0x80004005
call fcn.10005470
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
call fcn.10005250
mov ecx, eax
test ecx, ecx
jne 0x10002e7f
push 0x80004005
call fcn.10005470
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 2
push eax
push ecx
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], 0
push eax
lea ecx, [ebp + 0xc]
call fcn.10003710
mov byte [ebp - 4], 3
lea ebx, [esi - 0x10]
mov edx, dword [eax]
or edi, 0xffffffff
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x10002efd
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x10002eee
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x10002eee
call fcn.10004100
mov dword [ebp - 0x1c], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10002ee6
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x10002efd
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.10004170
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x20]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10002f20
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
nop dword [eax + eax]
mov eax, 0x1002d15c
mov ecx, esi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x10002f4d
test dx, dx
je 0x10002f49
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x10002f4d
add ecx, 4
add eax, 4
test dx, dx
jne 0x10002f27
xor eax, eax
jmp 0x10002f52
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x100030c5
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test ebx, ebx
jne 0x10002fff
lea ecx, [ebp - 0x14]
call fcn.10003eb0
lea eax, [ebp - 0x18]
push eax
push ecx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp + 0xc]
call fcn.10003710
mov byte [ebp - 4], 7
lea edi, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x10002ff0
cmp dword [edi + 0xc], ebx
lea esi, [edi + 0xc]
jl 0x10002fe1
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x10002fe1
call fcn.10004100
or ebx, 0xffffffff
mov dword [ebp - 0x20], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10002fcc
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
lea esi, [eax + 0x10]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x1c]
or edi, 0xffffffff
mov dword [ebp - 0x10], esi
jmp 0x10002f04
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.10004170
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov edx, dword [ebp - 0x1c]
jmp 0x10002f04
js 0x100030bb
mov edi, dword [ebp - 0x14]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x10003025
push ebx
lea ecx, [ebp - 0x14]
call fcn.10004490
mov edi, dword [ebp - 0x14]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push dword [edi - 8]
push edi
call fcn.1000f927
add esp, 8
test eax, eax
js 0x100030bb
cmp eax, dword [edi - 8]
jg 0x100030bb
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov edx, 0x1002d0ec
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.10003450
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x18]
call fcn.10003520
add esp, 4
mov byte [ebp - 4], 6
or ebx, 0xffffffff
mov edx, dword [ebp - 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000308f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
push dword [ebp - 0x18]
lea ecx, [ebp + 0xc]
call fcn.10003820
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100030c8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x100030c8
push 0x80070057
call fcn.10005470
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
mov ecx, ebx
call fcn.10003f10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100030f4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1000310f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x1000312e
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8