Function at 0x401450
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404b50
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x409014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp byte [ebp + 8], 0
mov dword [ebp - 4], 0
mov dword [edi], 0
mov byte [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
je 0x40171b
cmp dword [ebp + 0x24], 0
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x4014f4
push 0xf
push str.pdfreghook.dll
lea ecx, [ebp + 0x14]
call fcn.00402760
cmp dword [ebp + 0x28], 8
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push eax
call esi
test eax, eax
je 0x4014f4
cmp dword [ebp + 0x28], 8
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
mov eax, dword [edi]
test eax, eax
jne 0x4016cb
cmp byte [ebp + 0x10], al
je 0x40171b
lea eax, [ebp - 0x28]
push eax
call fcn.004025c0
add esp, 4
cmp dword [ebp - 0x18], 0
mov byte [ebp - 4], 1
je 0x401564
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call esi
test eax, eax
je 0x401564
push 8
push str.office6
lea ecx, [ebp - 0x28]
call fcn.00402760
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
jmp 0x4015b7
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov byte [ebp - 4], al
cmp edx, 8
jb 0x4015b7
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4015ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4015ad
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00403f81
add esp, 8
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 0x18], eax
push str.pdfreghook.dll
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004012f0
add esp, 0xc
cmp dword [ebp - 0x30], 0
mov byte [ebp - 4], 3
je 0x401638
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call esi
test eax, eax
je 0x401638
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call esi
test eax, eax
je 0x401638
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004013b0
call fcn.00401c50
add esp, 0x18
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 8
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x401672
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401668
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4016b5
push edx
push ecx
call fcn.00403f81
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov byte [ebp - 4], al
cmp edx, 8
jb 0x4016c5
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4016bb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4016bb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00403f81
add esp, 8
mov eax, dword [edi]
test eax, eax
je 0x40171b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.IsHooked
push eax
call esi
push str.Hook
push dword [edi]
mov dword [edi + 8], eax
call esi
push str.UnHook
push dword [edi]
mov dword [edi + 0xc], eax
call esi
push str.TrueQueryRegValue
push dword [edi]
mov dword [edi + 0x10], eax
call esi
cmp byte [ebp + 0xc], 0
mov dword [edi + 0x14], eax
je 0x40171b
mov eax, dword [edi + 0xc]
test eax, eax
je 0x401712
call eax
mov byte [edi + 4], al
mov eax, dword [edi + 8]
test eax, eax
je 0x40171b
call eax
mov edx, dword [ebp + 0x28]
cmp edx, 8
jb 0x401757
mov ecx, dword [ebp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40174d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40174d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00403f81
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004041ee
mov esp, ebp
pop ebp
ret 0x24