Function at 0x40558c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42751c
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 0x40560a
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.004147b8
mov esp, ebp
pop ebp
ret 4
call fcn.00405952
test al, al
je 0x4055e4
push 0x42b2e4
lea eax, [esp + 0x5c]
push eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a3c4
mov dword [esp + 0x290], esi
push 0x20019
lea edi, [esp + 0x5c]
call fcn.0040a5e3
test eax, eax
je 0x405657
xor bl, bl
or dword [esp + 0x290], 0xffffffff
lea ecx, [esp + 0x58]
call fcn.0040a400
mov al, bl
jmp 0x4055e4
lea eax, [esp + 0x30]
push eax
call fcn.00404ed5
mov byte [esp + 0x290], 1
lea edx, [esp + 0x30]
lea ecx, [esp + 0x58]
call fcn.0040aaa7
test al, al
je 0x4058f7
cmp dword [esp + 0x34], esi
mov dword [esp + 0x28], esi
jbe 0x4058f7
test esi, esi
jl 0x405696
cmp esi, dword [esp + 0x34]
jl 0x4056a9
mov ebx, 0x80070057
push ebx
mov edi, 0x2e73696b
push edi
call fcn.00406375
jmp 0x4056b3
mov ebx, 0x80070057
mov edi, 0x2e73696b
test esi, esi
jl 0x4056bd
cmp esi, dword [esp + 0x34]
jl 0x4056c4
push ebx
push edi
call fcn.00406375
mov eax, dword [esp + 0x30]
push dword [esp + 0x2c]
lea eax, [eax + esi*4]
mov eax, dword [eax]
call fcn.0040503d
test al, al
jne 0x4058e8
and dword [esp + 0x18], 0
mov byte [esp + 0x290], 2
and dword [esp + 0x1c], 0
mov byte [esp + 0x290], 3
test esi, esi
jl 0x405702
cmp esi, dword [esp + 0x34]
jl 0x405709
push ebx
push edi
call fcn.00406375
test esi, esi
jl 0x405713
cmp esi, dword [esp + 0x34]
jl 0x40571a
push ebx
push edi
call fcn.00406375
mov eax, dword [esp + 0x30]
push dword [eax + esi*4]
lea eax, [esp + 0x20]
push 0x42b2e4
push str._s_s
push eax
call fcn.00407ac5
add esp, 0x10
push dword [esp + 0x1c]
lea eax, [esp + 0x44]
push eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a3c4
mov byte [esp + 0x290], 4
push 0x20019
lea edi, [esp + 0x44]
call fcn.0040a5e3
test eax, eax
jne 0x405912
push eax
mov ecx, str.ProfileImagePath
lea ebx, [esp + 0x1c]
call fcn.0040a771
test eax, eax
jne 0x405912
push 0x104
lea eax, [esp + 0x70]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x4057e4
xor ebx, ebx
mov byte [esp + 0x17], bl
mov byte [esp + 0x290], 3
mov ecx, edi
call fcn.0040a400
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], ebx
je 0x4057c4
lea ecx, [esp + 0x1c]
call fcn.00407c65
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], ebx
je 0x4058e8
lea ecx, [esp + 0x18]
call fcn.00407c65
jmp 0x4058e8
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00407ade
push dword [esp + 0x18]
lea esi, [esp + 0x27]
call fcn.0040cc50
xor ebx, ebx
test al, al
je 0x4058a5
cmp byte [esp + 0x23], bl
je 0x4058a5
push str._ntuser.dat
push dword [esp + 0x1c]
lea esi, [esp + 0x5c]
push 2
call fcn.0040731d
mov esi, dword [eax]
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.00406432
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.00407ac5
add esp, 0xc
push dword [esp + 0x18]
push dword [esp + 0x28]
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
cmp eax, ebx
jne 0x405885
inc dword [esi + 0x94]
mov byte [esp + 0x17], 1
jmp 0x40588e
cmp eax, 0x20
je 0x40588e
mov byte [esp + 0x17], bl
mov byte [esp + 0x290], 4
cmp dword [esp + 0x24], ebx
je 0x4058a5
lea ecx, [esp + 0x24]
call fcn.00407c65
mov byte [esp + 0x290], 3
lea ecx, [esp + 0x40]
call fcn.0040a400
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], ebx
je 0x4058cd
lea ecx, [esp + 0x1c]
call fcn.00407c65
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], ebx
je 0x4058e4
lea ecx, [esp + 0x18]
call fcn.00407c65
mov esi, dword [esp + 0x28]
inc esi
cmp esi, dword [esp + 0x34]
mov dword [esp + 0x28], esi
jb 0x40568c
mov byte [esp + 0x290], 0
lea eax, [esp + 0x30]
push eax
call fcn.00404efd
mov bl, byte [esp + 0x17]
jmp 0x405642
mov byte [esp + 0x17], 0
mov byte [esp + 0x290], 3
lea ecx, [esp + 0x40]
call fcn.0040a400
mov byte [esp + 0x290], 2
cmp dword [esp + 0x1c], 0
je 0x405940
lea ecx, [esp + 0x1c]
call fcn.00407c65
mov byte [esp + 0x290], 1
cmp dword [esp + 0x18], 0
jmp 0x4057d0