Function at 0x4099f0
Capabilities:
Access peb ldr_data
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4b0938
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ca1d0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x2c], ebx
mov eax, dword [0x4d3dfc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dfc
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x44], ebx
call fcn.00408130
mov esi, dword [esp + 0x30]
push esi
lea ecx, [esp + 0x1c]
push str._sStartupManager.exe
push ecx
mov byte [esp + 0x50], 1
call fcn.004088c0
mov edi, dword [esp + 0x24]
add esp, 0x10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409aca
add edi, 0xfffffff0
push edi
call fcn.004070a0
mov ebx, dword [esp + 0x4c]
add eax, 0x10
mov dword [ebx], eax
lea eax, [esi - 0x10]
add esp, 4
mov byte [esp + 0x40], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409aa2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ac3
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, ebx
jmp 0x409e6c
mov eax, dword [0x4d3dfc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dfc
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x34], esp
mov edi, esp
push esi
mov byte [esp + 0x48], 2
mov dword [esp + 0x30], esi
call fcn.004070a0
add eax, 0x10
mov dword [edi], eax
lea eax, [esp + 0x2c]
add esp, 4
push eax
call fcn.00407f60
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x28]
push str._sconfig.ini
push edx
mov byte [esp + 0x54], 3
call fcn.004088c0
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
add esp, 0x14
mov byte [esp + 0x40], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409b4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x20], ebx
mov edx, dword [0x4d3dfc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4d3dfc
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0x40], 4
jge 0x409b90
push 0x104
lea ecx, [esp + 0x28]
call fcn.00407c90
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push ecx
push 0x104
push edi
push 0x4b3584
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstallGlary_Utilities
push 0x4b357c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00495a6d
add esp, 8
test eax, eax
jl 0x409e82
cmp eax, dword [edi - 8]
jg 0x409e82
xor edx, edx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], dx
cmp dword [edi - 0xc], edx
je 0x409db8
mov eax, dword [0x4d3dfc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dfc
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0x40], 5
jge 0x409c21
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407c90
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + 0x4b2ff0]
mov ecx, dword [ebx + 0x4b2fec]
mov ebp, dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
push 0
push esi
push str.UninstallString
push eax
push ecx
call ebp
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495a6d
add esp, 8
test eax, eax
jl 0x409e82
cmp eax, dword [esi - 8]
jg 0x409e82
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
cmp dword [esi - 0xc], edx
jne 0x409cd0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x409c91
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407c90
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + 0x4b2ff4]
mov ecx, dword [ebx + 0x4b2fec]
push 0
push esi
push str.UninstallString
push eax
push ecx
call ebp
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495a6d
add esp, 8
test eax, eax
jl 0x409e82
cmp eax, dword [esi - 8]
jg 0x409e82
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
cmp dword [esi - 0xc], 0
jne 0x409d21
add esi, 0xfffffff0
mov byte [esp + 0x40], 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409cf7
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add edi, 0xfffffff0
mov byte [esp + 0x40], 2
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409dd9
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x409dd9
push ecx
lea ebp, [esi - 0x10]
mov dword [esp + 0x38], esp
mov ebx, esp
push ebp
call fcn.004070a0
add eax, 0x10
mov dword [ebx], eax
lea eax, [esp + 0x38]
add esp, 4
push eax
call fcn.00407f60
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x20]
push str._sStartupManager.exe
push edx
mov byte [esp + 0x54], 6
call fcn.004088c0
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
add esp, 0x14
mov byte [esp + 0x40], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d82
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409e8c
mov byte [esp + 0x40], 4
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409db4
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov ebx, dword [esp + 0x20]
add edi, 0xfffffff0
mov byte [esp + 0x40], 2
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409dd9
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add ebx, 0x10
mov dword [esp + 0x20], ebx
cmp ebx, 0x30
jb 0x409b4e
mov esi, dword [esp + 0x14]
add esi, 0xfffffff0
push esi
call fcn.004070a0
mov edi, dword [esp + 0x4c]
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x40], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e27
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov byte [esp + 0x40], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e49
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e6a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, edi
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 4
push 0x80070057
call fcn.004010b0
add ebx, 0xfffffff0
push ebx
call fcn.004070a0
mov ebp, dword [esp + 0x4c]
add eax, 0x10
add esi, 0xfffffff0
add esp, 4
mov dword [ebp], eax
mov byte [esp + 0x40], 4
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ec3
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add edi, 0xfffffff0
mov byte [esp + 0x40], 2
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409ee4
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x40], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409f09
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov byte [esp + 0x40], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409f2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409f4c
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, ebp
jmp 0x409e6c