Function at 0x40cc34
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Query or enumerate registry value
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x150d8
call fcn.00401200
cmp dword [ebp + 0xc], 0
je 0x40d79c
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x90d8]
call fcn.0040c1d0
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40d79c
push ebx
push esi
push edi
push 6
mov ebx, 0x400
lea eax, [ebp - 0x3830]
lea esi, [ebp - 0x150d8]
pop edi
push esi
push eax
call fcn.0040b510
add esi, 0x2000
dec edi
jne 0x40cc8e
xor esi, esi
push dword [esi*4 + 0x4150b8]
lea eax, [ebp - 0x90d8]
push eax
call fcn.0040f3a6
test eax, eax
je 0x40ccc2
inc esi
cmp esi, 0xe
jb 0x40cca0
jmp case.default.0x40cccb
cmp esi, 0xd
ja case.default.0x40cccb
jmp dword [esi*4 + 0x40d7a0]
cmp dword [ebp + 0x10], 2
jne case.default.0x40cccb
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.00412922
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af85
lea eax, [ebp - 0x1830]
push eax
call fcn.004076e7
lea eax, [ebp - 0x3830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040aff7
lea ecx, [ebp - 0x4438]
call fcn.004061fb
lea eax, [ebp - 0x1830]
push eax
lea ecx, [ebp - 0x4438]
call fcn.0040622b
lea ecx, [ebp - 0x58d8]
call fcn.0040387e
push edi
lea eax, [ebp - 0x58d8]
push eax
lea ecx, [ebp - 0x4438]
call fcn.004065b9
test al, al
je 0x40cebc
mov edi, dword [0x413144]
push 0
lea eax, [ebp - 0x54d8]
push eax
call dword [0x4130d0]
cmp byte [ebp - 0x4cc8], 0
je 0x40ce28
call fcn.00407266
cmp eax, ebx
je 0x40ce28
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00407888
lea eax, [ebp - 0x1030]
push eax
call fcn.004076e7
lea eax, [ebp - 0x830]
push eax
call fcn.0040af5b
mov esi, eax
cmp esi, 4
jb 0x40cdcf
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af5b
cmp esi, eax
ja 0x40cde5
lea eax, [ebp - 0x3830]
push eax
push 0
call fcn.00407685
test al, al
jne 0x40cebc
lea eax, [ebp - 0x54d8]
push eax
call fcn.0040af5b
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x54d6], cx
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.0040abda
push 0x14
pop eax
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x54d8]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x2c], 3
call dword [0x4131a0]
lea eax, [ebp - 0x54d8]
push eax
call edi
cmp eax, 0xffffffff
je 0x40cea0
lea eax, [ebp - 0x54d8]
push eax
call dword [0x413068]
test eax, eax
jne 0x40cea0
xor esi, esi
jmp 0x40ce4c
inc esi
push esi
lea eax, [ebp - 0x54d8]
push eax
push str._s._d.tmp
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.0040b1f9
add esp, 0x14
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40ce4b
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x54d8]
push eax
call dword [0x413170]
test eax, eax
je 0x40cea0
push 4
push 0
lea eax, [ebp - 0x1030]
push eax
call dword [0x4130fc]
push 0
lea eax, [ebp - 0x58d8]
push eax
lea ecx, [ebp - 0x4438]
call fcn.004065b9
test al, al
jne 0x40cd64
lea ecx, [ebp - 0x4438]
call fcn.00406218
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], edi
jne case.default.0x40cccb
mov eax, dword [0x422b1c]
test eax, eax
sete bl
test bl, bl
jne 0x40ceee
push str._br_
push eax
call fcn.0040aff7
cmp byte [ebp - 1], 0
je 0x40cefc
lea edi, [ebp - 0x3830]
jmp 0x40cf06
lea edi, [ebp + 0xc]
call fcn.0040c375
mov edi, eax
test bl, bl
je 0x40cf0e
xor esi, esi
jmp 0x40cf1b
push dword [0x422b1c]
call fcn.0040af5b
mov esi, eax
push edi
call fcn.0040af5b
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x422b1c]
call fcn.0040ab75
mov dword [0x422b1c], eax
test bl, bl
je 0x40cf41
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.0040aff7
cmp byte [ebp - 1], 0
jne case.default.0x40cccb
push edi
call fcn.0040ab56
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], edi
jne case.default.0x40cccb
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [0x413288]
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], edi
jne case.default.0x40cccb
cmp word [0x421a12], di
jne case.default.0x40cccb
xor eax, eax
cmp word [ebp - 0x3830], 0x22
lea esi, [ebp - 0x3830]
mov word [ebp - 0x830], ax
jne 0x40cfb0
lea esi, [ebp - 0x382e]
push esi
call fcn.0040af5b
cmp eax, ebx
jae case.default.0x40cccb
movzx eax, word [esi]
cmp ax, 0x2e
jne 0x40cfe0
cmp word [esi + 2], 0x5c
jne 0x40cfe0
lea eax, [esi + 4]
cmp word [eax], di
je case.default.0x40cccb
push eax
jmp 0x40d0bc
cmp ax, 0x5c
je 0x40d0bb
cmp ax, di
je 0x40cffa
cmp word [esi + 2], 0x3a
je 0x40d0bb
lea eax, [ebp - 0xc]
push eax
push 1
push edi
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d05d
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push str.ProgramFilesDir
push dword [ebp - 0xc]
mov dword [ebp - 8], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
shr dword [ebp - 8], 1
mov eax, 0x3ff
cmp dword [ebp - 8], eax
jae 0x40d053
mov eax, dword [ebp - 8]
xor ecx, ecx
mov word [ebp + eax*2 - 0x830], cx
cmp word [ebp - 0x830], di
je 0x40d08e
lea eax, [ebp - 0x830]
push eax
call fcn.0040af5b
cmp word [ebp + eax*2 - 0x832], 0x5c
je 0x40d08e
push 0x413658
lea eax, [ebp - 0x830]
push eax
call fcn.0040aff7
push esi
call fcn.0040af5b
mov edi, eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040af5b
add edi, eax
cmp edi, 0x3ff
jae 0x40d0c8
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040aff7
jmp 0x40d0c8
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040af85
push 0x22
lea eax, [ebp - 0x830]
push eax
call fcn.0040b14c
test eax, eax
je 0x40d0e6
cmp word [eax + 2], 0
jne 0x40d0e6
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x830]
push eax
mov edi, str.C:UsersREMAppDataLocalTemp_
push edi
call fcn.0040af85
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040c596
push 0x66
push dword [ebp + 8]
call dword [0x413268]
mov esi, eax
lea eax, [ebp - 0x830]
push eax
push esi
call dword [0x413288]
mov ebx, dword [0x4131d4]
push edi
push 0
push 0x143
push esi
call ebx
lea eax, [ebp - 0x830]
push eax
push edi
call fcn.0040b070
test eax, eax
je case.default.0x40cccb
lea eax, [ebp - 0x830]
push eax
push 0
push 0x143
push esi
call ebx
jmp case.default.0x40cccb
cmp dword [0x421a0c], 1
je case.default.0x40cccb
movzx eax, word [ebp - 0x3830]
push eax
call fcn.0040e9d4
test al, al
je 0x40d18e
movzx eax, word [ebp - 0x3830]
sub eax, 0x30
mov dword [0x421a0c], eax
jmp case.default.0x40cccb
mov dword [0x421a0c], 2
jmp case.default.0x40cccb
movzx eax, word [ebp - 0x3830]
sub eax, edi
je 0x40d1d3
sub eax, 0x30
je 0x40d1c0
dec eax
je 0x40d1d3
dec eax
jne case.default.0x40cccb
mov byte [0x4218e7], 1
jmp 0x40d1c7
mov byte [0x4218e7], 0
mov byte [0x4218e6], 0
jmp case.default.0x40cccb
mov byte [0x4218e7], 0
mov byte [0x4218e6], 1
jmp case.default.0x40cccb
movzx eax, word [ebp - 0x3830]
push eax
call fcn.0040aba1
cmp eax, 0x46
je 0x40d21c
cmp eax, 0x55
je 0x40d210
mov byte [0x4218e5], 0
mov byte [0x4218e4], 0
jmp case.default.0x40cccb
mov byte [0x4218e4], 1
jmp case.default.0x40cccb
mov byte [0x4218e5], 1
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], 4
jne 0x40d24f
push 0x413840
lea eax, [ebp - 0x3830]
push eax
call fcn.0040b070
test eax, eax
je 0x40d24f
push edi
lea ecx, [ebp - 0x3830]
call fcn.0040c9db
mov byte [0x422b28], 1
jmp case.default.0x40cccb
mov byte [0x422b29], 1
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], 1
jne 0x40d3f8
lea eax, [ebp - 0x1030]
push eax
push ebx
call dword [0x4130f8]
lea eax, [ebp - 0x1030]
push eax
call fcn.004076e7
xor esi, esi
push esi
push dword [0x41509c]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.0040b1f9
mov edi, dword [0x413144]
jmp 0x40d2d6
inc esi
push esi
push dword [0x41509c]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.0040b1f9
add esp, 0x18
lea eax, [ebp - 0x1830]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40d2b5
lea eax, [ebp - 0x1830]
push eax
push 0x66
push dword [ebp + 8]
call dword [0x4131d8]
xor edi, edi
cmp word [ebp - 0x3830], di
je case.default.0x40cccb
cmp byte [0x422b16], 0
jne case.default.0x40cccb
xor eax, eax
mov word [ebp - 0x430], ax
push 0x2c
lea eax, [ebp - 0x3830]
push eax
call fcn.0040b11f
test eax, eax
jne 0x40d377
xor ecx, ecx
cmp word [ebp - 0x3830], di
je 0x40d377
lea eax, [ebp - 0x3830]
cmp word [eax], 0x40
je 0x40d356
inc ecx
lea eax, [ebp + ecx*2 - 0x3830]
cmp word [eax], di
jne 0x40d341
jmp 0x40d377
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x382e]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040af85
xor eax, eax
mov word [ebp + esi - 0x3830], ax
cmp word [ebp - 0x430], di
jne 0x40d3a6
lea eax, [ebp - 0x150d8]
push eax
lea eax, [ebp - 0x3830]
push eax
call fcn.0040af85
lea eax, [ebp - 0x130d8]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040af85
lea eax, [ebp - 0x3830]
push eax
call fcn.0040b60e
xor eax, eax
mov word [ebp - 0x2830], ax
push 0x24
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [0x413260]
cmp eax, 6
je case.default.0x40cccb
push 1
push dword [ebp + 8]
mov byte [0x422b15], 1
mov byte [0x4219f2], 1
call dword [0x4131e0]
xor edi, edi
cmp dword [ebp + 0x10], 7
jne case.default.0x40cccb
cmp dword [0x421a0c], edi
jne 0x40d414
mov dword [0x421a0c], 2
mov byte [0x421a08], 1
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], 3
jne 0x40d44c
cmp word [ebp - 0x3830], di
je 0x40d43f
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [0x413288]
lea edi, [ebp + 0xc]
call fcn.0040c375
mov dword [0x422b20], eax
mov byte [0x422b17], 1
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], 5
jne 0x40d24f
push 1
jmp 0x40d244
cmp dword [ebp + 0x10], 6
jne case.default.0x40cccb
xor eax, eax
mov word [ebp - 0x830], ax
movzx eax, word [ebp - 0x150d8]
push eax
call fcn.0040aba1
push ebx
cmp eax, 0x50
je 0x40d4c2
cmp eax, 0x54
lea eax, [ebp - 0x830]
je 0x40d4ae
push 0x4210e0
push eax
call fcn.0040ea2b
mov dword [ebp - 8], 0x10
jmp 0x40d4da
push 0x4200e0
push eax
call fcn.0040ea2b
mov dword [ebp - 8], 7
jmp 0x40d4da
push 0x4208e0
lea eax, [ebp - 0x830]
push eax
call fcn.0040ea2b
mov dword [ebp - 8], 2
xor eax, eax
mov word [ebp - 0x68d8], ax
mov word [ebp - 0x1830], ax
lea eax, [ebp - 0x130d8]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af85
cmp word [ebp - 0x1030], 0x22
jne 0x40d54a
lea eax, [ebp - 0x130d6]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af85
push 0x22
lea eax, [ebp - 0x102e]
push eax
call fcn.0040b11f
cmp eax, edi
je 0x40d5e2
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af85
jmp 0x40d5e2
lea eax, [ebp - 0x1030]
push eax
call fcn.00405dd7
test al, al
jne 0x40d5e2
xor ebx, ebx
lea esi, [ebp - 0x1030]
cmp word [ebp - 0x1030], bx
je 0x40d5e2
movzx eax, word [esi]
cmp ax, 0x20
je 0x40d57e
cmp ax, 0x2f
jne 0x40d5d1
movzx edi, ax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1030]
push eax
call fcn.00405dd7
test al, al
je 0x40d5ce
mov ebx, esi
cmp di, 0x2f
jne 0x40d5b4
push 0x2f
pop eax
mov word [ebp - 0x1830], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x182e]
jmp 0x40d5c3
inc esi
inc esi
cmp word [esi], 0x20
je 0x40d5b4
push esi
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af85
mov word [ebx], di
jmp 0x40d5d1
mov word [esi], di
inc esi
inc esi
cmp word [esi], 0
jne 0x40d56f
test ebx, ebx
je 0x40d5e2
xor eax, eax
mov word [ebx], ax
xor esi, esi
cmp word [ebp - 0xb0d8], si
je 0x40d600
lea eax, [ebp - 0x68d8]
push eax
lea eax, [ebp - 0xb0d8]
push eax
call fcn.004077c2
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.004077c2
cmp word [ebp - 0x830], si
jne 0x40d62b
push dword [ebp - 8]
lea eax, [ebp - 0x830]
push eax
call fcn.0040b5d4
lea eax, [ebp - 0x830]
push eax
call fcn.004076e7
cmp word [ebp - 0x110d8], si
je 0x40d65f
lea eax, [ebp - 0x110d8]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040aff7
lea eax, [ebp - 0x830]
push eax
call fcn.004076e7
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x4030]
push eax
call fcn.0040af85
lea eax, [ebp - 0xd0d8]
cmp word [ebp - 0xd0d8], si
jne 0x40d687
lea eax, [ebp - 0x130d8]
push eax
call fcn.00407a09
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040aff7
lea eax, [ebp - 0x830]
push eax
call fcn.00407c9b
cmp eax, esi
je 0x40d6b9
push str..lnk
push eax
call fcn.0040f3a6
test eax, eax
je 0x40d6ca
push str..lnk
lea eax, [ebp - 0x830]
push eax
call fcn.0040aff7
push 1
lea eax, [ebp - 0x830]
push eax
call fcn.00405fc0
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040af85
lea eax, [ebp - 0x60d8]
push eax
call fcn.00407d4d
lea eax, [ebp - 0x1830]
push eax
call fcn.0040e92c
push eax
lea eax, [ebp - 0x68d8]
push eax
call fcn.0040e92c
push eax
lea eax, [ebp - 0xf0d8]
push eax
call fcn.0040e92c
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040e92c
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x70d8]
push eax
push esi
call fcn.00412837
cmp word [ebp - 0x4030], si
je case.default.0x40cccb
push 0
lea eax, [ebp - 0x4030]
push eax
push 5
push 0x1000
call dword [0x413198]
jmp case.default.0x40cccb
cmp dword [ebp + 0x10], 7
jne case.default.0x40cccb
mov byte [0x421a10], 1
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x90d8]
call fcn.0040c1d0
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40cc7a
pop edi
pop esi
pop ebx
leave
ret 0xc