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

Disassembly:
push 0xffffffffffffffff
push 0x4b0198
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 [0x4d3dcc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dcc
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x44], ebx
call fcn.00407f90
mov esi, dword [esp + 0x30]
push esi
lea ecx, [esp + 0x1c]
push str._sStartupManager.exe
push ecx
mov byte [esp + 0x50], 1
call fcn.00408720
mov edi, dword [esp + 0x24]
add esp, 0x10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40995a
add edi, 0xfffffff0
push edi
call fcn.00406e50
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 0x409932
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 0x409953
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, ebx
jmp 0x409cfc
mov eax, dword [0x4d3dcc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dcc
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.00406e50
add eax, 0x10
mov dword [edi], eax
lea eax, [esp + 0x2c]
add esp, 4
push eax
call fcn.00407dc0
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x28]
push str._sconfig.ini
push edx
mov byte [esp + 0x54], 3
call fcn.00408720
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 0x4099da
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 [0x4d3dcc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4d3dcc
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 0x409a20
push 0x104
lea ecx, [esp + 0x28]
call fcn.00407af0
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push ecx
push 0x104
push edi
push 0x4b3594
push str.HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstallGlary_Utilities_5
push 0x4b358c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00495384
add esp, 8
test eax, eax
jl 0x409d12
cmp eax, dword [edi - 8]
jg 0x409d12
xor edx, edx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], dx
cmp dword [edi - 0xc], edx
je 0x409c48
mov eax, dword [0x4d3dcc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dcc
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 0x409ab1
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407af0
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + 0x4b3004]
mov ecx, dword [ebx + 0x4b3000]
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.00495384
add esp, 8
test eax, eax
jl 0x409d12
cmp eax, dword [esi - 8]
jg 0x409d12
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
cmp dword [esi - 0xc], edx
jne 0x409b60
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x409b21
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407af0
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + 0x4b3008]
mov ecx, dword [ebx + 0x4b3000]
push 0
push esi
push str.UninstallString
push eax
push ecx
call ebp
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495384
add esp, 8
test eax, eax
jl 0x409d12
cmp eax, dword [esi - 8]
jg 0x409d12
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
cmp dword [esi - 0xc], 0
jne 0x409bb1
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 0x409b87
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 0x409c69
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x409c69
push ecx
lea ebp, [esi - 0x10]
mov dword [esp + 0x38], esp
mov ebx, esp
push ebp
call fcn.00406e50
add eax, 0x10
mov dword [ebx], eax
lea eax, [esp + 0x38]
add esp, 4
push eax
call fcn.00407dc0
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x20]
push str._sStartupManager.exe
push edx
mov byte [esp + 0x54], 6
call fcn.00408720
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 0x409c12
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 0x409d1c
mov byte [esp + 0x40], 4
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c44
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 0x409c69
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 0x4099de
mov esi, dword [esp + 0x14]
add esi, 0xfffffff0
push esi
call fcn.00406e50
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 0x409cb7
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 0x409cd9
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 0x409cfa
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.00406e50
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 0x409d53
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 0x409d74
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 0x409d99
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 0x409dbb
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 0x409ddc
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, ebp
jmp 0x409cfc