Function at 0x1002e5d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1011efb0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x1016e750]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
cmp dword [0x10172298], 0
jne 0x1002e610
xor ecx, ecx
call fcn.1002d0e0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jl 0x1002e7d5
push 0x1013a04c
push eax
call fcn.10103a8d
mov edi, eax
add esp, 8
test edi, edi
je 0x1002e7d5
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x1002e7d5
lea esi, [edi + 2]
test esi, esi
js 0x1002e7d5
cmp esi, dword [eax - 0xc]
jg 0x1002e7d5
lea eax, [eax + esi*2]
push 0x1013a04c
push eax
call fcn.10103a8d
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1002e7d5
mov ecx, dword [ebp - 0x10]
sub ebx, dword [ecx]
sar ebx, 1
cmp ebx, 0xffffffff
je 0x1002e7d5
sub ebx, edi
lea eax, [ebx - 2]
push eax
push esi
lea eax, [ebp - 0x18]
push eax
call fcn.10026a50
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x18]
cmp dword [esi - 0xc], 0
je 0x1002e7b4
push 0x1012ec60
lea ecx, [ebp - 0x14]
call fcn.10023fc0
mov byte [ebp - 4], 1
mov edx, 1
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x514
or ecx, edx
jge 0x1002e6e2
push 0x514
lea ecx, [ebp - 0x14]
call fcn.100249c0
mov eax, dword [ebp - 0x14]
push 0x514
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
push dword [ecx - 8]
push ecx
call fcn.1010374b
mov edx, eax
add esp, 8
test edx, edx
js 0x1002e88e
mov ecx, dword [ebp - 0x14]
cmp edx, dword [ecx - 8]
jg 0x1002e88e
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov word [eax + edx*2], cx
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x1c], ecx
je 0x1002e797
cmp dword [eax - 0xc], ecx
je 0x1002e797
mov ecx, dword [ebp - 0x10]
lea eax, [ebx + 2]
push eax
push edi
call fcn.10026580
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
push edi
call fcn.1002c880
mov byte [ebp - 4], 0
or ecx, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1002e76a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
mov eax, dword [ebp - 0x10]
test ecx, ecx
jg 0x1002e610
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1002e60d
lea edx, [eax - 0x10]
mov byte [ebp - 4], cl
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1002e7b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1002e7d5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x10]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jle 0x1002e843
push 0x25
push eax
call fcn.101033a1
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1002e843
sub ebx, dword [edi]
sar ebx, 1
cmp ebx, 0xffffffff
je 0x1002e843
xor edi, edi
mov esi, 0x1016f600
mov edx, dword [esi]
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x1c], ecx
jmp 0x1002e810
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1002e810
mov ecx, dword [ebp - 0x10]
sub eax, dword [ebp - 0x1c]
sar eax, 1
push eax
mov ecx, dword [ecx]
push edx
lea eax, [ecx + ebx*2]
push eax
call fcn.1010465a
add esp, 0xc
test eax, eax
je 0x1002e855
add esi, 0x10
inc edi
cmp esi, 0x1016f850
jl 0x1002e801
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
shl edi, 4
mov ecx, dword [edi + 0x1016f600]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002e861
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.10026580
push dword [edi + 0x1016f60c]
mov ecx, dword [ebp - 0x10]
push ebx
call fcn.1002c880
jmp 0x1002e60d
push 0x80070057
call fcn.100223c0
int3