Function at 0x4887f0
Capabilities:
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e6c19
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x51c100]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x31], dl
mov esi, ecx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], 0
push ecx
push 1
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebx + 8]
call fcn.00489dd0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
push dword [ebx + 0x24]
mov edx, eax
push dword [ebx + 0x20]
call fcn.00489470
add esp, 8
xor ecx, ecx
mov byte [ebp - 4], 3
cmp byte [ebp - 0x38], cl
mov eax, dword [ebp - 0x3c]
cmove eax, ecx
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x488895
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x488895
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x18]
mov eax, edx
mov dword [ebp - 0x3c], 0
sub eax, 1
je 0x4888b4
sub eax, 1
je 0x4888b4
sub eax, 4
jne 0x488a78
push ecx
lea ecx, [ebp - 0x30]
call fcn.00489440
test al, al
je 0x4888e9
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x30]
dec eax
cmp dword [ebp - 0x1c], 8
mov dword [ebp - 0x20], eax
cmovae ecx, dword [ebp - 0x30]
xor edx, edx
push ecx
mov word [ecx + eax*2], dx
lea ecx, [ebp - 0x30]
call fcn.00489440
test al, al
jne 0x4888c1
mov edx, dword [ebp - 0x18]
cmp edx, 2
jne 0x4889e4
cmp byte [ebp - 0x31], 0
je 0x4889e4
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
setae byte [ebp - 0x31]
test ecx, ecx
je 0x4889e4
xor edi, edi
mov edx, eax
test ecx, ecx
je 0x488935
cmp word [eax], 0x25
je 0x488933
cmp ecx, 1
je 0x488935
add edx, 2
dec ecx
cmp word [edx], 0x25
jne 0x488924
mov edi, edx
test edi, edi
je 0x4889e4
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x4889e4
cmp byte [ebp - 0x31], 0
lea eax, [ebp - 0x30]
push 0
mov byte [ebp - 4], 4
cmovne eax, dword [ebp - 0x30]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
mov dword [ebp - 0x40], 2
xorps xmm0, xmm0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea eax, [edi - 1]
test eax, eax
jne 0x4889a6
xor ecx, ecx
mov dword [esi + 0x10], eax
mov word [esi + eax*2], cx
jmp 0x4889b0
push 0
push eax
mov ecx, esi
call fcn.0040c260
mov ecx, dword [esi + 0x10]
mov edx, esi
inc ecx
cmp dword [esi + 0x14], 8
jb 0x4889be
mov edx, dword [esi]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push ecx
cmovae eax, dword [ebp - 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x488a98
cmp eax, edi
jne 0x488ab3
jmp 0x488a1d
xorps xmm0, xmm0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
movups xmm0, xmmword [ebp - 0x30]
mov dword [esi + 0x14], 0
mov word [ebp - 0x30], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x20]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
lea ecx, [ebp - 0x30]
call fcn.0040a590
movsx eax, byte [ebx + 0x1c]
inc eax
sub eax, 0
je 0x488a58
sub eax, 1
jne 0x488a58
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp byte [ebx + 0xc], cl
cmove eax, ecx
mov dword [ebx + 8], eax
test eax, eax
je 0x488a58
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x488a58
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a057b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, edx
call fcn.00416370
push eax
push 1
lea ecx, [ebp - 0x60]
call fcn.00488410
push 0x519298
lea eax, [ebp - 0x60]
push eax
call fcn.004a2f8b
push str.String_environment_expansion_failed
lea ecx, [ebp - 0x74]
call fcn.00488470
push 0x5193b0
lea eax, [ebp - 0x74]
push eax
call fcn.004a2f8b
push str.String_environment_expansion_failed_due_to_unexpected_buffer_size
lea ecx, [ebp - 0x58]
call fcn.00488470
push 0x5193b0
lea eax, [ebp - 0x58]
push eax
call fcn.004a2f8b
int3