Function at 0x402405
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa34
mov eax, dword [0x43e054]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x208
lea eax, [ebp - 0x414]
push edi
xor ebx, ebx
mov esi, ecx
push ebx
push eax
call fcn.00417110
push edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00417110
push edi
lea eax, [ebp - 0x61c]
push ebx
push eax
call fcn.00417110
lea eax, [esi + 0x9c]
add esp, 0x24
cmp dword [eax + 0x14], 8
jb 0x40245f
mov eax, dword [eax]
push str.DFInputInfo.ini
push eax
lea eax, [ebp - 0x61c]
push 0x42f438
push eax
call fcn.0040342b
add esp, 0x10
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x42f3a0
push str.CfgRootPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x4024e5
cmp word [ebp - 0x20c], bx
je 0x4024cc
lea eax, [ebp - 0x20c]
push eax
call fcn.00419744
pop ecx
mov ebx, eax
push ebx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x3c]
call fcn.004032c0
mov byte [esi + 0x20], 1
jmp 0x4026c0
push ebx
push 0x2b
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x414]
push 0x42f46c
push eax
call fcn.004196f1
lea eax, [ebp - 0x414]
push str.DFInput
push eax
call fcn.004196f1
lea eax, [ebp - 0x414]
push 0x42f46c
push eax
call fcn.004196f1
lea eax, [ebp - 0x414]
push str.DFInput
push eax
call fcn.004196f1
lea eax, [ebp - 0x414]
push 0x42f470
push eax
call fcn.004196f1
add esp, 0x28
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x42f3a0
push str.CfgRootPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x4024b4
push 0x208
lea eax, [ebp - 0x824]
push ebx
push eax
call fcn.00417110
lea eax, [ebp - 0x824]
push str.SOFTWARE_
push eax
call fcn.00419722
lea eax, [ebp - 0x824]
push str.DFInput
push eax
call fcn.004196f1
add esp, 0x1c
lea eax, [ebp - 0xa30]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x824]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40262e
lea eax, [ebp - 0xa34]
mov dword [ebp - 0xa34], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push ebx
push str.CfgRootPath
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40262e
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x40262e
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4024b4
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0xa2c]
mov byte [esi + 0x20], bl
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0xa2c]
push 0x5c
push eax
call fcn.0041726a
xor ecx, ecx
push str.DFInputInfo.ini
mov word [eax + 2], cx
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x61c]
push 0x42f438
push eax
call fcn.0040342b
add esp, 0x18
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x42f3a0
push str.CfgRootPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x4024b4
mov byte [esi + 0x20], bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409ec6
mov esp, ebp
pop ebp
ret