Function at 0x490390
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 0x4f61fe
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x54d104]
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.004919a0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
push dword [ebx + 0x10]
mov edx, eax
push dword [ebx + 0xc]
call fcn.00490f20
add esp, 8
xor ecx, ecx
mov byte [ebp - 4], 2
cmp byte [ebp - 0x34], cl
mov eax, dword [ebp - 0x38]
cmove eax, ecx
mov dword [ebp - 0x38], eax
test eax, eax
je 0x49042d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x49042d
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 0x49044c
sub eax, 1
je 0x49044c
sub eax, 4
jne 0x4905d6
push ecx
lea ecx, [ebp - 0x30]
call fcn.00490ef0
test al, al
je 0x490488
nop dword [eax]
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.00490ef0
test al, al
jne 0x490460
mov edx, dword [ebp - 0x18]
cmp edx, 2
jne 0x490575
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
test ecx, ecx
je 0x490575
xor edi, edi
mov edx, eax
test ecx, ecx
je 0x4904c6
cmp word [eax], 0x25
je 0x4904c4
cmp ecx, 1
je 0x4904c6
add edx, 2
dec ecx
cmp word [edx], 0x25
jne 0x4904b5
mov edi, edx
test edi, edi
je 0x490575
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x490575
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 8
push 0
cmovae 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 0x490537
xor ecx, ecx
mov dword [esi + 0x10], eax
mov word [esi + eax*2], cx
jmp 0x490541
push 0
push eax
mov ecx, esi
call fcn.0040b5f0
mov ecx, dword [esi + 0x10]
mov edx, esi
inc ecx
cmp dword [esi + 0x14], 8
jb 0x49054f
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 0x4905f6
cmp eax, edi
jne 0x490611
jmp 0x4905ae
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.0040aa40
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.004af3ab
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, edx
call fcn.004157c0
push eax
push 1
lea ecx, [ebp - 0x5c]
call fcn.0048fff0
push 0x54a0b4
lea eax, [ebp - 0x5c]
push eax
call fcn.004b1dab
push str.String_environment_expansion_failed
lea ecx, [ebp - 0x70]
call fcn.00490050
push 0x54a190
lea eax, [ebp - 0x70]
push eax
call fcn.004b1dab
push str.String_environment_expansion_failed_due_to_unexpected_buffer_size
lea ecx, [ebp - 0x54]
call fcn.00490050
push 0x54a190
lea eax, [ebp - 0x54]
push eax
call fcn.004b1dab
int3