Function at 0x417520
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453d44
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x46f074]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
push ecx
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x40], 0
push eax
push ecx
call fcn.00417450
add esp, 0x10
test al, al
jne 0x4175ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.00410bb0
jmp 0x417820
mov eax, dword [ebp - 0x40]
cmp eax, 1
je 0x4175b8
cmp eax, 2
jne 0x4175c5
mov ebx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
sub ebx, ecx
test bl, 1
je 0x4175d7
lea ecx, [ebp - 0x38]
mov ebx, 0xd
call fcn.00410bb0
jmp 0x417820
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
mov eax, ebx
mov byte [ebp - 4], 1
shr eax, 1
jne 0x417601
xor edx, edx
mov dword [ebp - 0x1c], eax
mov word [ebp + eax*2 - 0x2c], dx
jmp 0x41760f
push 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.00409670
mov ecx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x41762f
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push ebx
cmovae eax, dword [ebp - 0x2c]
push ecx
push eax
call fcn.00436e20
mov edi, dword [ebp - 0x1c]
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x2c]
push 1
push eax
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x3c]
push eax
call fcn.0040b100
cmp eax, 0xffffffff
je 0x41766d
lea ecx, [ebp - 0x2c]
cmp eax, edi
ja 0x417663
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x1c], eax
cmovae ecx, dword [ebp - 0x2c]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x41766d
push 0
sub eax, edi
push eax
call fcn.00409670
cmp dword [ebp - 0x40], 2
jne 0x4177a9
xor edx, edx
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], edx
mov word [ebp - 0x58], cx
mov byte [ebp - 4], 2
nop
cmp eax, 8
lea ecx, [ebp - 0x58]
push edx
cmovae ecx, dword [ebp - 0x58]
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 - 0x48]
cmp eax, ecx
jbe 0x4176ca
sub eax, ecx
lea ecx, [ebp - 0x58]
push 0
push eax
call fcn.00409670
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
jmp 0x417690
test eax, eax
jne 0x417735
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x4176eb
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040ca00
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], 0
cmp eax, 8
jb 0x417714
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca00
xor eax, eax
mov dword [ebp - 0x18], 7
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.00410bb0
jmp 0x417820
lea edx, [eax - 1]
cmp edx, ecx
ja 0x417752
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
mov dword [ebp - 0x48], edx
cmovae eax, dword [ebp - 0x58]
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x41775f
sub edx, ecx
lea ecx, [ebp - 0x58]
push 0
push edx
call fcn.00409670
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x417774
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca00
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea ecx, [ebp - 0x2c]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x1c], 0
push eax
call fcn.0040b8a0
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x4177a9
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040ca00
lea eax, [ebp - 0x2c]
cmp esi, eax
je 0x4177ed
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x4177c3
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.0040ca00
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x4177db
mov eax, dword [esi]
jmp 0x4177dd
mov eax, esi
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x2c]
push eax
mov ecx, esi
call fcn.0040b8a0
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x417802
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.0040ca00
xor eax, eax
mov dword [ebp - 0x18], 7
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
call fcn.00410bb0
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 - 0x14]
xor ecx, ebp
call fcn.0041d21a
mov esp, ebp
pop ebp
ret