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

Disassembly:
sub esp, 0xa38
mov eax, dword [0x448728]
xor eax, esp
mov dword [esp + 0xa34], eax
push ebx
push ebp
push esi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x226]
mov esi, ecx
push ebx
push eax
mov dword [esp + 0x18], esi
mov word [esp + 0x22c], bx
call fcn.00423e40
push 0x206
lea ecx, [esp + 0x2a]
push ebx
push ecx
mov word [esp + 0x30], bx
call fcn.00423e40
push 0x206
lea edx, [esp + 0x446]
push ebx
push edx
mov word [esp + 0x44c], bx
call fcn.00423e40
add esp, 0x24
cmp dword [esi + 0xa8], 8
jb 0x40520e
mov eax, dword [esi + 0x94]
jmp 0x405214
lea eax, [esi + 0x94]
push str.DongFangInfo.ini
push eax
lea eax, [esp + 0x430]
push str._s_s
push eax
call fcn.00421a5b
add esp, 0x10
lea ecx, [esp + 0x428]
push ecx
push 0x104
lea edx, [esp + 0x20]
push edx
push 0x43ecb8
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esp + 0x18]
push eax
call ebp
test eax, eax
je 0x4052ad
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405270
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x1c]
push ecx
add esi, 4
call fcn.00401210
mov edx, dword [esp + 0xc]
pop esi
pop ebp
mov byte [edx + 1], 1
pop ebx
mov ecx, dword [esp + 0xa34]
xor ecx, esp
call fcn.0042178f
add esp, 0xa38
ret
push edi
push ebx
push 0x2b
lea eax, [esp + 0x22c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x224]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4052d0
mov edx, dword [0x43eda8]
mov dword [edi], edx
lea edi, [esp + 0x224]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4052f0
mov ecx, 7
mov esi, 0x43edac
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x224]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x405312
lea eax, [esp + 0x224]
mov dword [edi], edx
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x405330
mov ecx, dword [str.DongFang]
mov edx, dword [0x43edcc]
mov dword [eax], ecx
mov ecx, dword [0x43edd0]
mov dword [eax + 4], edx
mov edx, dword [0x43edd4]
mov dword [eax + 8], ecx
mov cx, word [0x43edd8]
mov dword [eax + 0xc], edx
mov word [eax + 0x10], cx
lea eax, [esp + 0x224]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x405374
mov edx, dword [str..ini]
mov ecx, dword [0x43ede0]
mov dword [eax], edx
mov dx, word [0x43ede4]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x224]
push eax
push 0x104
lea ecx, [esp + 0x24]
push ecx
push 0x43ecb8
push str.CfgUserPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x1c]
push edx
call ebp
test eax, eax
je 0x4053ff
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4053d5
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x20]
push eax
lea esi, [edi + 4]
call fcn.00401210
mov byte [edi + 1], 1
jmp 0x40558e
push 0x206
lea ecx, [esp + 0x63a]
push ebx
push ecx
mov word [esp + 0x640], bx
call fcn.00423e40
add esp, 0xc
xor eax, eax
nop
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0x634], cx
add eax, 2
cmp cx, bx
jne 0x405420
lea edi, [esp + 0x634]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x405441
lea edx, [esp + 0x14]
push edx
push 0xf003f
push ebx
lea eax, [esp + 0x640]
push eax
mov ecx, 7
mov esi, 0x43edac
push reloc.OLEAUT32.dll_SysReAllocString
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4054d3
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push ebx
push ebx
push str.CfgUserPath
push eax
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4054d3
lea ecx, [esp + 0x1c]
push ecx
call ebp
test eax, eax
je 0x4054d3
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x10]
lea eax, [esi + 4]
push eax
lea edx, [esp + 0x20]
call fcn.004011e0
mov byte [esi + 1], 1
jmp 0x40558e
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea edx, [esp + 0x840]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x83c]
push 0x5c
push eax
call fcn.00421e9d
push str.DongFangInfo.ini
lea ecx, [esp + 0x848]
push ecx
lea edx, [esp + 0x43c]
push str._s_s
push edx
mov word [eax + 2], bx
call fcn.00421a5b
add esp, 0x18
lea eax, [esp + 0x42c]
push eax
push 0x104
lea ecx, [esp + 0x24]
push ecx
push 0x43ecb8
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x1c]
push edx
call ebp
test eax, eax
je 0x405587
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405560
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x20]
push eax
lea esi, [edi + 4]
call fcn.00401210
mov byte [edi + 1], 1
jmp 0x40558e
mov ecx, dword [esp + 0x10]
mov byte [ecx + 1], bl
mov ecx, dword [esp + 0xa44]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042178f
add esp, 0xa38
ret