Function at 0x4055ae
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42752e
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x4362ec]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push esi
push edi
mov eax, dword [0x4362ec]
xor eax, esp
push eax
lea eax, [esp + 0x288]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
cmp dword [eax + 0x94], esi
mov dword [esp + 0x2c], eax
mov byte [esp + 0x17], 0
jbe 0x40562c
mov al, 1
mov ecx, dword [esp + 0x288]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.004147c2
mov esp, ebp
pop ebp
ret 4
call fcn.00405974
test al, al
je 0x405606
push 0x42b2d4
lea eax, [esp + 0x5c]
push eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a3a7
mov dword [esp + 0x290], esi
push 0x20019
lea edi, [esp + 0x5c]
call fcn.0040a5c6
test eax, eax
je 0x405679
xor bl, bl
or dword [esp + 0x290], 0xffffffff
lea ecx, [esp + 0x58]
call fcn.0040a3e3
mov al, bl
jmp 0x405606
lea eax, [esp + 0x30]
push eax
call fcn.00404ef7
mov byte [esp + 0x290], 1
lea edx, [esp + 0x30]
lea ecx, [esp + 0x58]
call fcn.0040aa8a
test al, al
je 0x405919
cmp dword [esp + 0x34], esi
mov dword [esp + 0x28], esi
jbe 0x405919
test esi, esi
jl 0x4056b8
cmp esi, dword [esp + 0x34]
jl 0x4056cb
mov ebx, 0x80070057
push ebx
mov edi, 0x2e73696b
push edi
call fcn.0040639b
jmp 0x4056d5
mov ebx, 0x80070057
mov edi, 0x2e73696b
test esi, esi
jl 0x4056df
cmp esi, dword [esp + 0x34]
jl 0x4056e6
push ebx
push edi
call fcn.0040639b
mov eax, dword [esp + 0x30]
push dword [esp + 0x2c]
lea eax, [eax + esi*4]
mov eax, dword [eax]
call fcn.0040505f
test al, al
jne 0x40590a
and dword [esp + 0x18], 0
mov byte [esp + 0x290], 2
and dword [esp + 0x1c], 0
mov byte [esp + 0x290], 3
test esi, esi
jl 0x405724
cmp esi, dword [esp + 0x34]
jl 0x40572b
push ebx
push edi
call fcn.0040639b
test esi, esi
jl 0x405735
cmp esi, dword [esp + 0x34]
jl 0x40573c
push ebx
push edi
call fcn.0040639b
mov eax, dword [esp + 0x30]
push dword [eax + esi*4]
lea eax, [esp + 0x20]
push 0x42b2d4
push str._s_s
push eax
call fcn.00407b07
add esp, 0x10
push dword [esp + 0x1c]
lea eax, [esp + 0x44]
push eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a3a7
mov byte [esp + 0x290], 4
push 0x20019
lea edi, [esp + 0x44]
call fcn.0040a5c6
test eax, eax
jne 0x405934
push eax
mov ecx, str.ProfileImagePath
lea ebx, [esp + 0x1c]
call fcn.0040a754
test eax, eax
jne 0x405934
push 0x104
lea eax, [esp + 0x70]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x405806
xor ebx, ebx
mov byte [esp + 0x17], bl
mov byte [esp + 0x290], 3
mov ecx, edi
call fcn.0040a3e3
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], ebx
je 0x4057e6
lea ecx, [esp + 0x1c]
call fcn.00407ca7
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], ebx
je 0x40590a
lea ecx, [esp + 0x18]
call fcn.00407ca7
jmp 0x40590a
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00407b20
push dword [esp + 0x18]
lea esi, [esp + 0x27]
call fcn.0040cc33
xor ebx, ebx
test al, al
je 0x4058c7
cmp byte [esp + 0x23], bl
je 0x4058c7
push str._ntuser.dat
push dword [esp + 0x1c]
lea esi, [esp + 0x5c]
push 2
call fcn.00407343
mov esi, dword [eax]
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.00406458
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x290], 5
mov esi, dword [esp + 0x2c]
push dword [esi + 0x94]
lea eax, [esp + 0x28]
push str.User_d
push eax
call fcn.00407b07
add esp, 0xc
push dword [esp + 0x18]
push dword [esp + 0x28]
push VariantInit
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
cmp eax, ebx
jne 0x4058a7
inc dword [esi + 0x94]
mov byte [esp + 0x17], 1
jmp 0x4058b0
cmp eax, 0x20
je 0x4058b0
mov byte [esp + 0x17], bl
mov byte [esp + 0x290], 4
cmp dword [esp + 0x24], ebx
je 0x4058c7
lea ecx, [esp + 0x24]
call fcn.00407ca7
mov byte [esp + 0x290], 3
lea ecx, [esp + 0x40]
call fcn.0040a3e3
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], ebx
je 0x4058ef
lea ecx, [esp + 0x1c]
call fcn.00407ca7
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], ebx
je 0x405906
lea ecx, [esp + 0x18]
call fcn.00407ca7
mov esi, dword [esp + 0x28]
inc esi
cmp esi, dword [esp + 0x34]
mov dword [esp + 0x28], esi
jb 0x4056ae
mov byte [esp + 0x290], 0
lea eax, [esp + 0x30]
push eax
call fcn.00404f1f
mov bl, byte [esp + 0x17]
jmp 0x405664
mov byte [esp + 0x17], 0
mov byte [esp + 0x290], 3
lea ecx, [esp + 0x40]
call fcn.0040a3e3
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], 0
je 0x405962
lea ecx, [esp + 0x1c]
call fcn.00407ca7
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], 0
jmp 0x4057f2