Function at 0x40f46e
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 [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x414], ax
xor ebx, ebx
lea eax, [ebp - 0x412]
push ebx
push eax
mov esi, ecx
call fcn.005534a0
xor eax, eax
push edi
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call fcn.005534a0
xor eax, eax
push edi
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push ebx
push eax
call fcn.005534a0
lea eax, [esi + 0x9c]
add esp, 0x24
cmp dword [eax + 0x14], 8
jb 0x40f4e3
mov eax, dword [eax]
push str.DongFangInfo.ini
push eax
lea eax, [ebp - 0x61c]
push 0x5bf43c
push eax
call fcn.00554d64
add esp, 0x10
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5bf400
push str.CfgUserPath
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 0x40f569
cmp word [ebp - 0x20c], bx
je 0x40f550
lea eax, [ebp - 0x20c]
push eax
call fcn.00553cf3
pop ecx
mov ebx, eax
push ebx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x24]
call fcn.00402120
mov byte [esi + 0x21], 1
jmp 0x40f748
push ebx
push 0x2b
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x414]
push 0x5bfc6c
push eax
call fcn.00554508
lea eax, [ebp - 0x414]
push str.DongFangInput
push eax
call fcn.00554508
lea eax, [ebp - 0x414]
push 0x5bfc6c
push eax
call fcn.00554508
lea eax, [ebp - 0x414]
push str.DongFang
push eax
call fcn.00554508
lea eax, [ebp - 0x414]
push 0x5c08e0
push eax
call fcn.00554508
add esp, 0x28
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5bf400
push str.CfgUserPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x40f538
push 0x206
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push ebx
push eax
call fcn.005534a0
lea eax, [ebp - 0x824]
push str.SOFTWARE_
push eax
call fcn.00554537
lea eax, [ebp - 0x824]
push str.DongFangInput
push eax
call fcn.00554508
add esp, 0x1c
lea eax, [ebp - 0xa30]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x824]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40f6b9
lea eax, [ebp - 0xa34]
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push ebx
push str.CfgUserPath
push dword [ebp - 0xa30]
mov dword [ebp - 0xa34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f6b9
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x40f6b9
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40f538
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0xa2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0xa2c]
push 0x5c
push eax
call fcn.00554fbb
xor ecx, ecx
mov word [eax + 2], cx
push str.DongFangInfo.ini
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x61c]
push 0x5bf43c
push eax
call fcn.00554d64
add esp, 0x18
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x5bf400
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x40f538
mov byte [esi + 0x21], bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00553d0c
leave
ret