Function at 0x40f280
Capabilities:
Delete file
Enumerate files on windows
Get common file path
Query or enumerate registry value
Read file on windows
Set registry value

Disassembly:
sub esp, 0x60c
lea eax, [esp + 0x94]
push ebx
push ebp
push esi
push edi
push 1
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [esp + 0xa4]
push str.InventecDreye9.0User.dat
push ecx
call ebx
push 0
push 0
push 3
push 0
push 3
lea edx, [esp + 0xb8]
push Ordinal_4
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40f69b
lea eax, [esp + 0x10]
push 0
mov edi, 0x64
push eax
lea ecx, [esp + 0x214]
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f694
cmp dword [esp + 0x10], edi
jne 0x40f694
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x14]
mov byte [esp + 0x40], 0
push edx
push 0x20019
push 0
push str.SOFTWAREInventecDreye9.0DreyePLT
push reloc.DreyeWndU.dll_Ordinal_1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f370
lea eax, [esp + 0x10]
lea ecx, [esp + 0x40]
push eax
mov eax, dword [esp + 0x624]
lea edx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x50], 1
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x20
jne 0x40f3bf
lea edi, [esp + 0x40]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.0040fb20
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
add esp, 0xc
jmp 0x40f3d7
xor eax, eax
mov ecx, eax
mov edx, eax
mov esi, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], esi
mov edi, dword [esp + 0x18]
cmp cx, di
ja 0x40f3ff
jne 0x40f40f
mov di, word [esp + 0x2a]
mov bp, word [esp + 0x1a]
cmp di, bp
ja 0x40f3ff
jne 0x40f40f
mov di, word [esp + 0x2e]
cmp di, word [esp + 0x1e]
jbe 0x40f40f
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x18]
push 0x10
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.0040faa0
add esp, 0xc
lea edx, [esp + 0x3c]
lea eax, [esp + 0x14]
mov byte [esp + 0x60], 0
push edx
push eax
push 0
push 0x20006
push 0
push 0x4196bc
push 0
push str.SOFTWAREInventecDreye9.0DreyePLT
push reloc.DreyeWndU.dll_Ordinal_1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40f69b
lea edi, [esp + 0x40]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ebp, dword [esp + 0x620]
mov edx, dword [esp + 0x14]
not ecx
push ecx
lea ecx, [esp + 0x44]
push ecx
push 1
push eax
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40f49d
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60c
ret
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
lea edx, [esp + 0xa8]
push 0x23
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0xa4]
push str.InventecDreye9.0
push eax
call ebx
lea edi, [esp + 0xa4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x518]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa8]
push ecx
call ebx
mov edi, str..dat
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xa4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x3d8]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40f69b
lea edi, [esp + 0x518]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2d4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2d4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x404]
push ecx
push edx
call ebx
push 0
push 0
push 3
push 0
push 3
lea eax, [esp + 0x2e8]
push Ordinal_4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40f63c
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x278]
push 0x64
push edx
push esi
call edi
test eax, eax
je 0x40f635
cmp dword [esp + 0x10], 0x64
jne 0x40f635
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1b0]
push 0x64
push ecx
push esi
call edi
test eax, eax
je 0x40f635
cmp dword [esp + 0x10], 0x64
jne 0x40f635
mov edx, dword [esp + 0x624]
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0x1ac]
push eax
lea edx, [esp + 0x278]
push ecx
mov ecx, dword [esp + 0x62c]
lea eax, [esp + 0x218]
push edx
push eax
push ecx
call fcn.0040f8a0
add esp, 0x18
test eax, eax
jne 0x40f662
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x2d4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x3d8]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40f680
jmp 0x40f553
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60c
ret
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60c
ret