Function at 0x40f810
Capabilities:
Check if file exists
Delete registry value
Get file attributes
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x67c
mov eax, dword [0x5a40e0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
lea eax, [ecx - 0x9001]
cmp eax, 9
ja case.default.0x40f838
jmp dword [eax*4 + 0x40fdec]
push 0x900a
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
lea eax, [ebp - 0x668]
mov dword [ebp - 0x668], 0
push eax
push 0x5554a5
push 0x555504
call fcn.00403e20
add esp, 8
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne case.default.0x40f838
mov dword [ebp - 0x66c], eax
lea eax, [ebp - 0x678]
push eax
lea eax, [ebp - 0x66c]
mov dword [ebp - 0x674], 4
push eax
lea eax, [ebp - 0x674]
mov dword [ebp - 0x678], 4
push eax
push 0
push 0x555528
push dword [ebp - 0x668]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40f8fa
call fcn.0040f2e0
test eax, eax
jne 0x40f8fa
push eax
push 0xf
call fcn.0040c490
add esp, 8
push dword [ebp - 0x668]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0
push 0xf
mov dword [ebp - 0x66c], 1
call fcn.0040c490
add esp, 8
test eax, eax
je 0x40f932
push 4
lea eax, [ebp - 0x66c]
push eax
push 4
push 0
push str.DistillerPrinterFontCache
push dword [ebp - 0x668]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x668]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0x9005
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
call fcn.00457d80
test eax, eax
je case.default.0x40f838
push 0
push 0x3e8
push 0x9005
push dword [esi]
call dword [sym.imp.USER32.dll_SetTimer]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0x9009
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [0x5a9274]
mov dword [0x5a9278], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0x9007
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0x9008
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
call fcn.00402ef0
push 0
push 0x5265c00
push 0x9007
push dword [esi]
call dword [sym.imp.USER32.dll_SetTimer]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x3f4]
mov ecx, esi
push dword [esi + eax*4 + 0x3d0]
call fcn.0040fe40
mov eax, dword [esi + 0x3f4]
inc eax
mov dword [esi + 0x3f4], eax
cmp eax, 6
jle case.default.0x40f838
mov dword [esi + 0x3f4], 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
push 0x9006
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
mov ecx, esi
call fcn.0040f6d0
mov eax, dword [esi + 4]
test eax, eax
je case.default.0x40f838
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov dword [esi + 4], 0
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x3f4]
mov ecx, esi
push dword [esi + eax*4 + 0x3d0]
call fcn.0040fe40
mov eax, dword [esi + 0x3f4]
inc eax
mov dword [esi + 0x3f4], eax
cmp eax, 2
jle case.default.0x40f838
mov dword [esi + 0x3f4], 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x670]
push eax
cmp ecx, 0x9002
jne 0x40fae9
push str.SoftwareAdobeAcrobat_DistillerSpooledJobs
jmp 0x40faee
push str.SoftwareAdobeAcrobat_DistillerEmailJobs
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne case.default.0x40f838
push ebx
push edi
push 0x40e
push eax
mov dword [ebp - 0x66c], eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.00525b40
add esp, 0xc
mov dword [ebp - 0x678], 0x410
lea eax, [ebp - 0x67c]
mov dword [ebp - 0x674], 0
mov dword [ebp - 0x668], 0
mov dword [ebp - 0x67c], 4
push eax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x674]
push eax
push 0
lea eax, [ebp - 0x678]
push eax
lea eax, [ebp - 0x414]
push eax
push 0
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40fdb6
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push dword [ebp - 0x67c]
inc dword [ebp - 0x668]
lea eax, [ebp - 0x668]
push eax
push dword [ebp - 0x674]
lea eax, [ebp - 0x414]
push 0
push eax
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x414]
push eax
call edi
cmp eax, 0xffffffff
je 0x40fc55
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40fd22
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40fd22
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp dword [ebp + 8], 0x9002
lea eax, [ebp - 0x414]
push eax
push dword [esi]
jne 0x40fde0
call fcn.0040d880
add esp, 8
jmp 0x40fdc1
lea edx, [ebp - 0x414]
lea ecx, [edx + 2]
mov edi, edi
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40fc60
sub edx, ecx
mov ecx, 0x5555bc
sar edx, 1
lea eax, [edx*2 - 6]
sub eax, ecx
lea edx, [ebp - 0x414]
add edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40fc85
lea eax, [ebp - 0x414]
push eax
call edi
cmp eax, 0xffffffff
je 0x40fd22
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x414]
push eax
push dword [esi]
call fcn.0040d880
lea edx, [ebp - 0x414]
add esp, 8
lea ecx, [edx + 2]
lea esp, [esp]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40fcd0
sub edx, ecx
mov ecx, 0x5555c4
sar edx, 1
lea eax, [edx*2 - 6]
sub eax, ecx
lea edx, [ebp - 0x414]
add edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40fcf5
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ecx, 0x5a94a8
call fcn.0040f6d0
inc dword [ebp - 0x66c]
xor eax, eax
push 0x40e
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.00525b40
add esp, 0xc
mov dword [ebp - 0x678], 0x410
lea eax, [ebp - 0x67c]
mov dword [ebp - 0x674], 0
mov dword [ebp - 0x668], 0
mov dword [ebp - 0x67c], 4
push eax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x674]
push eax
push 0
lea eax, [ebp - 0x678]
push eax
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x66c]
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x40fb94
cmp dword [ebp - 0x66c], 0
jne 0x40fdc1
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.USER32.dll_KillTimer]
push dword [ebp - 0x670]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00525b2c
mov esp, ebp
pop ebp
ret 4
call fcn.0040a100
add esp, 8
jmp 0x40fdc1