Function at 0x48a940
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 0x4ea345
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x521104]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x4c], eax
mov esi, ecx
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x50], ecx
cmp eax, 1
je 0x48a995
cmp eax, 2
jne 0x48a99e
mov eax, dword [esi + 4]
sub eax, dword [esi]
test al, 1
je 0x48a9a8
mov eax, 0xd
jmp 0x48ab98
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
xor ecx, ecx
mov dword [ebp - 0x18], 7
movups xmmword [ebp - 0x2c], xmm0
mov word [ebp - 0x2c], cx
shr eax, 1
mov dword [ebp - 4], ecx
jne 0x48a9d4
mov dword [ebp - 0x1c], eax
mov word [ebp + eax*2 - 0x2c], cx
jmp 0x48a9df
push 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040beb0
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x48aa06
mov edx, dword [esi]
lea eax, [ebp - 0x2c]
mov ecx, dword [esi + 4]
sub ecx, edx
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push edx
push eax
call fcn.004a6310
mov edi, dword [ebp - 0x1c]
add esp, 0xc
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
test edi, edi
je 0x48aa7b
mov ecx, edi
xor edx, edx
mov esi, eax
test ecx, ecx
je 0x48aa47
movzx eax, word [eax]
test ax, ax
je 0x48aa42
nop word [eax + eax]
cmp ecx, 1
je 0x48aa44
movzx eax, word [esi + 2]
add esi, 2
dec ecx
test ax, ax
jne 0x48aa30
mov edx, esi
mov eax, dword [ebp - 0x48]
test edx, edx
je 0x48aa7b
sub edx, eax
sar edx, 1
cmp edx, 0xffffffff
je 0x48aa7b
cmp edx, edi
ja 0x48aa6e
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x48aa7b
push 0
sub edx, edi
lea ecx, [ebp - 0x2c]
push edx
call fcn.0040beb0
cmp dword [ebp - 0x4c], 2
jne 0x48ab56
xor edx, edx
xorps xmm0, xmm0
mov eax, 7
mov dword [ebp - 0x34], edx
xor ecx, ecx
mov dword [ebp - 0x30], eax
movups xmmword [ebp - 0x44], xmm0
mov word [ebp - 0x44], cx
mov byte [ebp - 4], 1
cmp eax, 8
lea ecx, [ebp - 0x44]
push edx
cmovae ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp - 0x34]
cmp eax, ecx
jbe 0x48aadd
sub eax, ecx
lea ecx, [ebp - 0x44]
push 0
push eax
call fcn.0040beb0
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
jmp 0x48aaa3
test eax, eax
jne 0x48aaf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x44]
mov esi, eax
call fcn.0040a450
jmp 0x48ab8e
lea edx, [eax - 1]
cmp edx, ecx
ja 0x48ab13
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
mov dword [ebp - 0x34], edx
cmovae eax, dword [ebp - 0x44]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x48ab20
sub edx, ecx
lea ecx, [ebp - 0x44]
push 0
push edx
call fcn.0040beb0
lea ecx, [ebp - 0x2c]
call fcn.0040a450
movups xmm0, xmmword [ebp - 0x44]
xor eax, eax
lea ecx, [ebp - 0x44]
mov word [ebp - 0x44], ax
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [ebp - 0x34]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
call fcn.0040a450
mov esi, dword [ebp - 0x50]
lea eax, [ebp - 0x2c]
cmp esi, eax
je 0x48ab8c
mov ecx, esi
call fcn.0040a450
movups xmm0, xmmword [ebp - 0x2c]
xor eax, eax
mov word [ebp - 0x2c], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
xor esi, esi
lea ecx, [ebp - 0x2c]
call fcn.0040a450
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.004a389b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret