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

Disassembly:
push 0xffffffffffffffff
push 0x445b23
mov eax, dword fs:[0]
push eax
sub esp, 0x42c
mov eax, dword [0x45a0f0]
xor eax, esp
mov dword [esp + 0x424], eax
push ebx
push esi
push edi
mov eax, dword [0x45a0f0]
xor eax, esp
push eax
lea eax, [esp + 0x43c]
mov dword fs:[0], eax
mov dword [esp + 0x444], 0
mov eax, dword [esp + 0x44c]
cmp dword [eax - 8], 0
jne 0x406190
lea ecx, [eax - 0xc]
cmp ecx, dword [0x45bbfc]
je 0x4063b4
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
jmp 0x40639d
push ecx
mov dword [esp + 0x18], esp
cmp dword [eax - 0xc], 0
mov ecx, esp
jl 0x4061b2
mov dword [ecx], eax
mov eax, dword [esp + 0x450]
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x4061c7
mov edx, dword [0x45bc00]
mov dword [ecx], edx
mov eax, dword [esp + 0x450]
push eax
call fcn.004054e0
call fcn.00405bf0
add esp, 4
test eax, eax
jne 0x4061dc
mov eax, dword [esp + 0x44c]
jmp 0x406172
lea esi, [esp + 0x18]
call fcn.00406bb0
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x2e]
mov ebx, 1
mov byte [esp + 0x44c], bl
push ecx
mov word [esp + 0x30], ax
call fcn.0042f120
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x24]
push str.Path
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], 0x208
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x406361
lea eax, [esp + 0x24]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406250
sub eax, edx
sar eax, 1
jne 0x40627b
lea ecx, [esp + 0x18]
call fcn.00405540
lea ecx, [esp + 0x44c]
call fcn.00405540
jmp 0x4063b4
lea eax, [esp + 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406282
sub eax, edx
sar eax, 1
mov edx, 0x3b
cmp dx, word [esp + eax*2 + 0x22]
jne 0x4062ba
lea eax, [esp + 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4062a4
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 0x22], cx
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.iexplore.exe
lea edx, [esp + 0x28]
push edx
call esi
push 0x208
lea eax, [esp + 0x230]
push 0
push eax
call fcn.0042f120
mov edx, dword [0x45e044]
add esp, 0xc
push 0x104
lea ecx, [esp + 0x230]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x22c]
push eax
call edi
lea ecx, [esp + 0x22c]
push ecx
call edi
push 0x4515d0
lea edx, [esp + 0x230]
push edx
call esi
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406361
lea ecx, [esp + 0x22c]
push ecx
call fcn.00407880
add esp, 4
test eax, eax
je 0x406361
mov ecx, dword [esp + 0x44c]
push str.open
lea edx, [esp + 0x28]
call fcn.00406b80
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [ebx - 0xc]
cmp edx, dword [0x45bbfc]
je 0x406385
lea esi, [ebx - 0xc]
push esi
call edi
test eax, eax
jg 0x406385
push esi
call fcn.0042da66
add esp, 4
mov eax, dword [esp + 0x44c]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x45bbfc]
je 0x4063b4
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4063b4
mov edx, dword [esp + 0x44c]
add edx, 0xfffffff4
push edx
call fcn.0042da66
add esp, 4
mov ecx, dword [esp + 0x43c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x424]
xor ecx, esp
call fcn.0042d98b
add esp, 0x438
ret