Function at 0x493330
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 0x4eebc5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
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 eax, edx
mov dword [ebp - 0x4c], eax
mov esi, ecx
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x50], ecx
cmp eax, 1
je 0x493385
cmp eax, 2
jne 0x49338e
mov eax, dword [esi + 4]
sub eax, dword [esi]
test al, 1
je 0x493398
mov eax, 0xd
jmp 0x493588
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 0x4933c4
mov dword [ebp - 0x1c], eax
mov word [ebp + eax*2 - 0x2c], cx
jmp 0x4933cf
push 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040b8e0
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x4933f6
mov edx, dword [esi]
lea eax, [ebp - 0x2c]
mov ecx, dword [esi + 4]
sub ecx, edx
cmp dword [ebp - 0x18], 7
push ecx
cmova eax, dword [ebp - 0x2c]
push edx
push eax
call fcn.004a8710
mov edi, dword [ebp - 0x1c]
add esp, 0xc
cmp dword [ebp - 0x18], 7
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
test edi, edi
je 0x49346b
mov ecx, edi
xor edx, edx
mov esi, eax
test ecx, ecx
je 0x493437
movzx eax, word [eax]
test ax, ax
je 0x493432
nop word [eax + eax]
cmp ecx, 1
je 0x493434
movzx eax, word [esi + 2]
add esi, 2
dec ecx
test ax, ax
jne 0x493420
mov edx, esi
mov eax, dword [ebp - 0x48]
test edx, edx
je 0x49346b
sub edx, eax
sar edx, 1
cmp edx, 0xffffffff
je 0x49346b
cmp edx, edi
ja 0x49345e
cmp dword [ebp - 0x18], 7
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
cmova eax, dword [ebp - 0x2c]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x49346b
push 0
sub edx, edi
lea ecx, [ebp - 0x2c]
push edx
call fcn.0040b8e0
cmp dword [ebp - 0x4c], 2
jne 0x493546
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, 7
lea ecx, [ebp - 0x44]
push edx
cmova ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 7
push ecx
cmova eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp - 0x34]
cmp eax, ecx
jbe 0x4934cd
sub eax, ecx
lea ecx, [ebp - 0x44]
push 0
push eax
call fcn.0040b8e0
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
jmp 0x493493
test eax, eax
jne 0x4934e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x44]
mov esi, eax
call fcn.0040a900
jmp 0x49357e
lea edx, [eax - 1]
cmp edx, ecx
ja 0x493503
cmp dword [ebp - 0x30], 7
lea eax, [ebp - 0x44]
mov dword [ebp - 0x34], edx
cmova eax, dword [ebp - 0x44]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x493510
sub edx, ecx
lea ecx, [ebp - 0x44]
push 0
push edx
call fcn.0040b8e0
lea ecx, [ebp - 0x2c]
call fcn.0040a900
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.0040a900
mov esi, dword [ebp - 0x50]
lea eax, [ebp - 0x2c]
cmp esi, eax
je 0x49357c
mov ecx, esi
call fcn.0040a900
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.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