Function at 0x494880
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 0x4eee0e
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x545100]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x34], esi
push ecx
push 1
lea eax, [ebp - 0x38]
mov dword [ebp - 0x40], esi
push eax
mov ecx, edx
mov dword [ebp - 0x3c], 0
call fcn.00496450
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
push dword [ebx + 0x10]
mov edx, eax
push dword [ebx + 0xc]
call fcn.00495680
add esp, 8
mov byte [ebp - 4], 2
cmp byte [ebp - 0x34], 0
jne 0x494906
xor eax, eax
mov dword [ebp - 0x38], eax
jmp 0x494909
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x49491f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x49491f
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x18]
mov eax, edx
mov dword [ebp - 0x38], 0
sub eax, 1
je 0x49493e
sub eax, 1
je 0x49493e
sub eax, 4
jne 0x494ac6
push ecx
lea ecx, [ebp - 0x30]
call fcn.004955b0
test al, al
je 0x494978
nop dword [eax + eax]
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x30]
dec eax
cmp dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], eax
cmova ecx, dword [ebp - 0x30]
xor edx, edx
push ecx
mov word [ecx + eax*2], dx
lea ecx, [ebp - 0x30]
call fcn.004955b0
test al, al
jne 0x494950
mov edx, dword [ebp - 0x18]
cmp edx, 2
jne 0x494a65
cmp dword [ebp - 0x1c], 7
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
cmova eax, dword [ebp - 0x30]
test ecx, ecx
je 0x494a65
xor edi, edi
mov edx, eax
test ecx, ecx
je 0x4949b6
cmp word [eax], 0x25
je 0x4949b4
cmp ecx, 1
je 0x4949b6
add edx, 2
dec ecx
cmp word [edx], 0x25
jne 0x4949a5
mov edi, edx
test edi, edi
je 0x494a65
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x494a65
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 7
push 0
cmova eax, dword [ebp - 0x30]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
mov dword [ebp - 0x3c], 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 0x494a27
xor ecx, ecx
mov dword [esi + 0x10], eax
mov word [esi + eax*2], cx
jmp 0x494a31
push 0
push eax
mov ecx, esi
call fcn.0040b8e0
mov ecx, dword [esi + 0x10]
mov edx, esi
inc ecx
cmp dword [esi + 0x14], 7
jbe 0x494a3f
mov edx, dword [esi]
cmp dword [ebp - 0x1c], 7
lea eax, [ebp - 0x30]
push ecx
cmova eax, dword [ebp - 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x494aec
cmp eax, edi
jne 0x494b07
jmp 0x494a9e
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.0040a900
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.004a5e3b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push dword [ebx + 0x10]
mov ecx, edx
push dword [ebx + 0xc]
call fcn.0040bde0
push eax
push 1
lea ecx, [ebp - 0x5c]
call fcn.00495e90
push 0x542884
lea eax, [ebp - 0x5c]
push eax
call fcn.004a869b
push str.String_environment_expansion_failed
lea ecx, [ebp - 0x70]
call fcn.00494740
push 0x542970
lea eax, [ebp - 0x70]
push eax
call fcn.004a869b
push str.String_environment_expansion_failed_due_to_unexpected_buffer_size
lea ecx, [ebp - 0x54]
call fcn.00494740
push 0x542970
lea eax, [ebp - 0x54]
push eax
call fcn.004a869b
int3