Function at 0x401580
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e450
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x413090]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
mov esi, 0x104
sub eax, esi
or eax, ecx
jge 0x401600
mov eax, esi
lea ecx, [ebp - 0x10]
call fcn.004020a0
mov edi, dword [ebp - 0x10]
push esi
push edi
push str._appdata__anyprotecttray.dat
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp dword [edi - 8], esi
jl 0x40183f
xor eax, eax
push 0x411300
mov dword [edi - 0xc], esi
push edi
mov word [edi + 0x208], ax
call fcn.00402ea8
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4017e7
mov edx, dword [0x414f28]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
mov esi, 0x400
sub eax, esi
or eax, ecx
jge 0x401668
mov eax, esi
mov ecx, 0x414f28
call fcn.004020a0
mov edx, dword [0x414f28]
push ebx
push esi
push edx
call fcn.00402ebf
mov eax, dword [0x414f28]
add esp, 0xc
cmp dword [eax - 8], esi
jl 0x40183f
mov dword [eax - 0xc], esi
mov edx, dword [0x414f28]
xor ecx, ecx
mov word [edx + 0x800], cx
mov edx, dword [0x414f2c]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x4016bc
mov eax, esi
mov ecx, 0x414f2c
call fcn.004020a0
mov edx, dword [0x414f2c]
push ebx
push esi
push edx
call fcn.00402ebf
mov eax, dword [0x414f2c]
add esp, 0xc
cmp dword [eax - 8], esi
jl 0x40183f
mov dword [eax - 0xc], esi
mov ecx, dword [0x414f2c]
xor eax, eax
mov word [ecx + 0x800], ax
mov edx, dword [0x414f30]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x401710
mov eax, esi
mov ecx, 0x414f30
call fcn.004020a0
mov edx, dword [0x414f30]
push ebx
push esi
push edx
call fcn.00402ebf
mov eax, dword [0x414f30]
add esp, 0xc
cmp dword [eax - 8], esi
jl 0x40183f
mov dword [eax - 0xc], esi
mov eax, dword [0x414f30]
xor edx, edx
mov word [eax + 0x800], dx
mov edx, dword [0x414f34]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x401763
mov eax, esi
mov ecx, 0x414f34
call fcn.004020a0
mov edx, dword [0x414f34]
push ebx
push esi
push edx
call fcn.00402ebf
mov eax, dword [0x414f34]
add esp, 0xc
cmp dword [eax - 8], esi
jl 0x40183f
mov dword [eax - 0xc], esi
mov edx, dword [0x414f34]
xor ecx, ecx
mov word [edx + 0x800], cx
mov edx, dword [0x414f38]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x4017b7
mov eax, esi
mov ecx, 0x414f38
call fcn.004020a0
mov edx, dword [0x414f38]
push ebx
push esi
push edx
call fcn.00402ebf
mov eax, dword [0x414f38]
add esp, 0xc
cmp dword [eax - 8], esi
jl 0x40183f
mov dword [eax - 0xc], esi
mov ecx, dword [0x414f38]
xor eax, eax
push ebx
mov word [ecx + 0x800], ax
call fcn.00402fe5
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40180a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40182d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004025f0
int3