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 ebp, ebp
mov dword [esp + 0x2c], ebp
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], ebp
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 0x409e72
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], ebp
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]
mov edx, dword [ebp + 0x4b2fe8]
push ecx
push 0x104
push edi
push 0x4b3584
push edx
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 0x409e88
cmp eax, dword [edi - 8]
jg 0x409e88
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
cmp dword [edi - 0xc], ecx
je 0x409dbe
mov edx, dword [0x4d3dfc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4d3dfc
call eax
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 0x409c24
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407c90
mov esi, dword [esp + 0x18]
mov ecx, dword [ebp + 0x4b2ff0]
mov edx, dword [ebp + 0x4b2fec]
mov ebx, dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
push 0
push esi
push str.UninstallString
push ecx
push edx
call ebx
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495a6d
add esp, 8
test eax, eax
jl 0x409e88
cmp eax, dword [esi - 8]
jg 0x409e88
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
jne 0x409d27
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x409c98
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00407c90
mov esi, dword [esp + 0x18]
mov edx, dword [ebp + 0x4b2ff4]
mov eax, dword [ebp + 0x4b2fec]
push 0
push esi
push str.UninstallString
push edx
push eax
call ebx
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495a6d
add esp, 8
test eax, eax
jl 0x409e88
cmp eax, dword [esi - 8]
jg 0x409e88
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
jne 0x409d27
add esi, 0xfffffff0
mov byte [esp + 0x40], 4
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x409cfd
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 0x409ddf
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x409ddf
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 0x409d88
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 0x409e92
mov byte [esp + 0x40], 4
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409dba
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov ebp, 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 0x409ddf
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add ebp, 0x10
mov dword [esp + 0x20], ebp
cmp ebp, 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 0x409e2d
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 0x409e4f
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 0x409e70
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 0x409ec9
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 0x409eea
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 0x409f0f
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 0x409f31
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 0x409f52
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, ebp
jmp 0x409e72