Function at 0x479890
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e0044
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x520078]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov esi, dword [ebp + 0xc]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push dword [ebp + 0x10]
lea edi, [ebp - 0x3c]
mov dword [ebp - 4], 0
push edi
lea edi, [ebp - 0x34]
mov dword [ebp - 0x3c], 0
push edi
push eax
call fcn.004797c0
add esp, 0x10
test al, al
jne 0x47991f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, edi
mov ebx, eax
call fcn.00417380
jmp 0x479b92
mov eax, dword [ebp - 0x3c]
cmp eax, 1
je 0x47992c
cmp eax, 2
jne 0x479939
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
sub ebx, ecx
test bl, 1
je 0x47994b
lea ecx, [ebp - 0x34]
mov ebx, 0xd
call fcn.00417380
jmp 0x479b92
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, ebx
mov byte [ebp - 4], 1
shr eax, 1
jne 0x479975
xor edx, edx
mov dword [ebp - 0x18], eax
mov word [ebp + eax*2 - 0x28], dx
jmp 0x479983
push 0
push eax
lea ecx, [ebp - 0x28]
call fcn.00419fe0
mov ecx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x4799a3
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ebx
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call fcn.004ad070
mov edi, dword [ebp - 0x18]
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x28]
push 1
push eax
mov word [ebp - 0x38], ax
lea eax, [ebp - 0x38]
push eax
call fcn.004175b0
cmp eax, 0xffffffff
je 0x4799e1
lea ecx, [ebp - 0x28]
cmp eax, edi
ja 0x4799d7
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x18], eax
cmovae ecx, dword [ebp - 0x28]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x4799e1
push 0
sub eax, edi
push eax
call fcn.00419fe0
cmp dword [ebp - 0x3c], 2
jne 0x479b1b
xor edx, edx
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], edx
mov word [ebp - 0x54], cx
mov byte [ebp - 4], 2
cmp eax, 8
lea ecx, [ebp - 0x54]
push edx
cmovae ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
push ecx
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp - 0x44]
cmp eax, ecx
jbe 0x479a3c
sub eax, ecx
lea ecx, [ebp - 0x54]
push 0
push eax
call fcn.00419fe0
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
jmp 0x479a02
test eax, eax
jne 0x479aa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [ebp - 0x40]
cmp eax, 8
jb 0x479a5d
inc eax
lea ecx, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
call fcn.00415a10
xor eax, eax
mov dword [ebp - 0x40], 7
mov word [ebp - 0x54], ax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], 0
cmp eax, 8
jb 0x479a86
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00415a10
xor eax, eax
mov dword [ebp - 0x14], 7
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00417380
jmp 0x479b92
lea edx, [eax - 1]
cmp edx, ecx
ja 0x479ac4
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
mov dword [ebp - 0x44], edx
cmovae eax, dword [ebp - 0x54]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x479ad1
sub edx, ecx
lea ecx, [ebp - 0x54]
push 0
push edx
call fcn.00419fe0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x479ae6
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00415a10
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x54]
mov dword [ebp - 0x18], 0
push eax
call fcn.00415340
mov eax, dword [ebp - 0x40]
cmp eax, 8
jb 0x479b1b
inc eax
lea ecx, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
call fcn.00415a10
lea eax, [ebp - 0x28]
cmp esi, eax
je 0x479b5f
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x479b35
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.00415a10
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x479b4d
mov eax, dword [esi]
jmp 0x479b4f
mov eax, esi
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x28]
push eax
mov ecx, esi
call fcn.00415340
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x479b74
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00415a10
xor eax, eax
mov dword [ebp - 0x14], 7
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00417380
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00493bec
mov esp, ebp
pop ebp
ret