Function at 0x40d6d0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44a5c6
push eax
mov eax, 0x2044
mov dword fs:[0], esp
call fcn.004364f0
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x7ff
xor eax, eax
lea edi, [esp + 0x52]
mov word [esp + 0x50], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x50]
push eax
mov eax, dword [0x45b53c]
lea edx, [esp + 0x14]
push ecx
mov ecx, dword [0x45b538]
push edx
push eax
mov esi, 1
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0x1000
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
cmp dword [esp + 0x10], esi
jne 0x40d90d
cmp word [esp + 0x50], bx
je 0x40d90d
cmp dword [esp + 0x14], ebx
jbe 0x40d90d
mov edx, dword [0x455050]
lea eax, [esp + 0x50]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
mov dword [esp + 0x10], edx
je 0x40d7d2
lea ecx, [esp + 0x54]
shr ecx, 0x10
jne 0x40d796
xor eax, eax
lea edx, [esp + 0x54]
mov ax, dx
lea ecx, [esp + 0x10]
push eax
call fcn.004015b0
jmp 0x40d7d2
lea eax, [esp + 0x54]
push eax
call ebp
mov esi, eax
cmp esi, ebx
je 0x40d7d2
push esi
lea ecx, [esp + 0x14]
call fcn.00401820
test eax, eax
je 0x40d7d2
lea ecx, [esi + esi]
lea edx, [esi + esi + 2]
cmp edx, ecx
jb 0x40d7d2
mov edi, dword [esp + 0x10]
mov eax, ecx
lea esi, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x455860
mov dword [esp + 0x205c], ebx
test ecx, ecx
jne 0x40d7e6
xor eax, eax
jmp 0x40d7ed
push 0x455860
call ebp
push 0x455860
push eax
lea ecx, [esp + 0x18]
call fcn.0040aa60
mov eax, dword [0x45b540]
lea ecx, [esp + 0x10]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.0040aa60
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
pop ebp
je 0x40d8a5
mov edi, dword [esp + 0xc]
lea ecx, [esp + 0x18]
call fcn.0042bff0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2058], 1
xor esi, esi
call fcn.0042c870
test eax, eax
je 0x40d86c
lea ecx, [esp + 0x28]
lea edx, [esp + 0x20]
push ecx
push edx
push edi
lea ecx, [esp + 0x24]
call fcn.0042c030
test eax, eax
jne 0x40d87e
lea eax, [esp + 0x24]
push eax
call fcn.0042b9f0
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x2058], bl
call fcn.0042c020
jmp 0x40d8a5
mov eax, dword [esp + 0x20]
cmp eax, 3
je 0x40d88c
cmp eax, 2
jne 0x40d891
mov esi, 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x2058], bl
call fcn.0042c020
cmp esi, ebx
jne 0x40d8dc
mov al, byte [0x45c550]
test al, 1
jne 0x40d8d0
mov dl, al
mov ecx, 0x45c560
or dl, 1
mov byte [0x45c550], dl
call fcn.00428c20
push 0x404c10
call fcn.0043667e
add esp, 4
push 0x26
mov ecx, 0x45c560
call fcn.00428ef0
mov eax, dword [esp + 0xc]
mov edx, dword [0x455054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d944
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d944
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ac06
add esp, 4
jmp 0x40d944
mov al, byte [0x45c550]
test al, 1
jne 0x40d938
mov dl, al
mov ecx, 0x45c560
or dl, 1
mov byte [0x45c550], dl
call fcn.00428c20
push 0x404c10
call fcn.0043667e
add esp, 4
push 0x25
mov ecx, 0x45c560
call fcn.00428ef0
mov ecx, dword [esp + 0x2050]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2050
ret