Function at 0x10039630
Capabilities:
Check if file exists
Query or enumerate registry value
Resolve function by parsing pe exports
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x100783d8
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1008e418]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
xor eax, eax
cmp ax, word [0x10092898]
jne 0x1003967b
push 0x104
push 0x10092898
mov ebx, str.patch.db
xor ecx, ecx
call fcn.10045834
xor eax, eax
lea ecx, [esp + 0x5c]
push ecx
push eax
push 0x10092898
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x100396d8
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
xor edx, edx
cmp dx, word [0x10092aa0]
jne 0x100396f9
push 0x104
push 0x10092aa0
mov ebx, str.cachepatch
xor ecx, ecx
call fcn.10045834
push 0x10092aa0
push str._s_system.dat
lea esi, [esp + 0x2c]
call fcn.100460a6
mov edi, 8
add esp, 8
cmp dword [eax + 0x18], edi
jb 0x1003971e
mov eax, dword [eax + 4]
jmp 0x10039721
add eax, 4
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call esi
test eax, eax
sete bl
cmp dword [esp + 0x3c], edi
jb 0x10039742
mov eax, dword [esp + 0x28]
push eax
call fcn.10056169
add esp, 4
test bl, bl
jne 0x100397d9
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push eax
push str.dbLastWriteTime
xor ebx, ebx
push str.Softwareprojonepodlppatchmgr_
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], edi
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov eax, edi
lea ecx, [esp + 0x70]
lea edx, [esp + 0x1c]
mov ebp, dword [edx]
cmp ebp, dword [ecx]
jne 0x1003979f
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x10039786
jmp 0x1003987b
movzx ebp, byte [ecx]
movzx eax, byte [edx]
sub eax, ebp
jne 0x100397cb
movzx eax, byte [edx + 1]
movzx ebp, byte [ecx + 1]
sub eax, ebp
jne 0x100397cb
movzx eax, byte [edx + 2]
movzx ebp, byte [ecx + 2]
sub eax, ebp
jne 0x100397cb
movzx eax, byte [edx + 3]
movzx ecx, byte [ecx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
cmp eax, ebx
je 0x1003987b
xor edx, edx
cmp dx, word [0x10092aa0]
jne 0x100397fa
push 0x104
push 0x10092aa0
mov ebx, str.cachepatch
xor ecx, ecx
call fcn.10045834
xor eax, eax
cmp ax, word [0x10092898]
jne 0x1003981b
push 0x104
push 0x10092898
mov ebx, str.patch.db
xor ecx, ecx
call fcn.10045834
push 0x10092898
call esi
test eax, eax
je 0x100396bf
push 0x10092aa0
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x10092aa0
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
mov edx, 0x10092aa0
mov ecx, 0x10092898
call fcn.10034570
neg eax
sbb eax, eax
add eax, 1
je 0x100396bf
push edi
lea ecx, [esp + 0x74]
push ecx
push 3
push str.dbLastWriteTime
push str.Softwareprojonepodlppatchmgr_
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
xor edx, edx
cmp dx, word [0x10092aa0]
jne 0x1003989c
push 0x104
push 0x10092aa0
mov ebx, str.cachepatch
xor ecx, ecx
call fcn.10045834
mov eax, 0x10092aa0
lea ecx, [esp + 0x40]
call fcn.10039610
mov dword [esp + 0x88], 0
cmp dword [eax + 0x18], edi
jb 0x100398bf
mov eax, dword [eax + 4]
jmp 0x100398c2
add eax, 4
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x100398c7
sub ecx, esi
sar ecx, 1
push ecx
mov esi, 0x10090150
call fcn.1000a960
cmp dword [esp + 0x58], edi
jb 0x100398f4
mov eax, dword [esp + 0x44]
push eax
call fcn.10056169
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret