Function at 0x401480
Capabilities:
Extract resource via kernel32 functions
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f3cb
mov eax, dword fs:[0]
push eax
mov eax, 0x103c
call fcn.0040efa0
mov eax, dword [0x417008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x14
push str.Open_registry_key...
mov ecx, 0x417880
mov dword [ebp - 0x102c], 0xfff
call fcn.00401920
lea eax, [ebp - 0x1030]
push eax
push 0x20019
push 0
push str.SoftwareData_Access_WorldwideDataFlex20.1Defaults
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40158d
push 0x1b
push str.Query_registry_key_value...
mov ecx, 0x417880
call fcn.00401920
lea eax, [ebp - 0x102c]
push eax
lea eax, [ebp - 0x1010]
push eax
push 0
push 0
push str.VdfRootDir
push dword [ebp - 0x1030]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40158d
push str.Bin_
lea eax, [ebp - 0x1010]
push 0xfff
push eax
call fcn.004055d4
lea ecx, [ebp - 0x1010]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401550
sub ecx, edx
mov eax, 0xfff
sub eax, ecx
mov dword [ebp - 0x102c], ecx
push eax
lea eax, [ebp - 0x1010]
add eax, ecx
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x1010]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x1a
push str.Loading_runtime_library...
mov ecx, 0x417880
call fcn.00401920
push str.vdfvm.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x401643
push 0x1c
push str.Getting_procedure_address...
mov ecx, 0x417880
call fcn.00401920
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._FlexRunProgramEx_4
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x4015e6
push str.FlexRunProgramEx
push esi
call ebx
mov edi, eax
test edi, edi
je 0x40163c
push 0x13
push str.Loading_DF_image...
mov ecx, 0x417880
call fcn.00401920
push 0xa
push 1
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x401669
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0x19
push str.Running_DF_application...
mov ecx, 0x417880
mov ebx, eax
call fcn.00401920
test ebx, ebx
je 0x40163c
push ebx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40164d
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.004011c0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040208c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1018], 0
mov dword [ebp - 0x1014], 0xf
mov byte [ebp - 0x1028], 0
push 0x38
push str.LoadLibrary_failed_with_error__d___vdfvm_DLL_not_loaded.
lea ecx, [ebp - 0x1028]
mov dword [ebp - 4], 0
call fcn.00401920
lea ecx, [ebp - 0x1048]
call fcn.00401010
cmp dword [eax + 0x14], 0x10
jb 0x4016b6
mov eax, dword [eax]
cmp dword [ebp - 0x1014], 0x10
lea ecx, [ebp - 0x1028]
push 0x10
cmovae ecx, dword [ebp - 0x1028]
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [ebp - 0x1034]
cmp edx, 0x10
jb 0x40170c
mov ecx, dword [ebp - 0x1048]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401702
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40174b
push edx
push ecx
call fcn.00402367
add esp, 8
mov edx, dword [ebp - 0x1014]
cmp edx, 0x10
jb 0x401648
mov ecx, dword [ebp - 0x1028]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40173c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401750
push edx
push ecx
call fcn.00402367
add esp, 8
jmp 0x401648
call fcn.004057fb
call fcn.004057fb
int3