Function at 0x40dad0
Capabilities:
Check if file exists
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10b0c
call fcn.0044c0a0
push ebx
push esi
lea eax, [ebp - 0xb0c]
push edi
push eax
mov dword [ebp - 0x1c], ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, dword [0x4881a0]
lea edx, [ebp - 0xb0c]
push edx
lea eax, [ebp - 0x10]
push str._sNUList.ini
push eax
mov dword [ebp - 0x10], ecx
call fcn.00402d60
mov edx, dword [ebp - 0x10]
mov ecx, dword [0x4881a0]
add esp, 0xc
mov dword [ebp - 4], ecx
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40db99
mov ecx, 0x3fff
xor eax, eax
lea edi, [ebp - 0x10b0a]
mov word [ebp - 0x10b0c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x10b0c]
push eax
push 0x8000
push ecx
push 0x491808
push str.pdown
push str.NUList
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x10b0c]
test edx, edx
jne 0x40db7a
xor eax, eax
jmp 0x40db87
lea eax, [ebp - 0x10b0c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x10b0c]
push ecx
push eax
lea ecx, [ebp - 4]
call fcn.00403710
jmp 0x40dbee
mov edx, dword [ebp - 0x10]
push 0x489280
push edx
call fcn.0044c4c5
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40dbee
mov ecx, 9
mov esi, str._NUList__r_npdown_r_n
lea edi, [ebp - 0x4c]
push ebx
rep movsd dword es:[edi], dword [esi]
push 1
lea eax, [ebp - 0xa]
push 2
push eax
movsw word es:[edi], word [esi]
mov byte [ebp - 0xa], 0xff
mov byte [ebp - 9], 0xfe
call fcn.0044c35b
push ebx
push 1
lea ecx, [ebp - 0x4c]
push 0x24
push ecx
call fcn.0044c35b
push ebx
call fcn.0044c2de
add esp, 0x24
mov ecx, dword [ebp - 0x1c]
call fcn.0040d6d0
xor ecx, ecx
mov dword [ebp - 0x24], eax
test eax, eax
mov dword [ebp - 0x20], ecx
jle 0x40def8
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.0040da10
mov ebx, eax
test ebx, ebx
je 0x40dee6
mov ecx, ebx
call fcn.0040a260
mov esi, eax
test esi, esi
je 0x40dee6
push esi
call fcn.00421870
mov ecx, 0x191
xor eax, eax
lea edi, [ebp - 0x8fc]
mov dword [ebp - 0x904], 0x8b8
mov dword [ebp - 0x6bc], 0x648
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0xe
lea edi, [ebp - 0x98]
mov dword [ebp - 0x2b8], edx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x54], edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x60], edx
lea edx, [ebp - 0x904]
push edx
push esi
call fcn.004217c0
add esp, 0xc
test al, al
je 0x40dee6
mov eax, dword [ebp - 0x8d4]
test eax, eax
je 0x40dee6
cmp dword [ebp - 0x8d0], 1
jne 0x40dee6
mov eax, dword [0x4881a0]
lea ecx, [ebp - 0x98]
test ecx, ecx
mov dword [ebp - 0x14], eax
jne 0x40dcba
xor edi, edi
jmp 0x40dcf3
lea edx, [ebp - 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0044c0a0
mov edi, esp
push esi
push edi
lea eax, [ebp - 0x98]
push 0xffffffffffffffff
push eax
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp - 0x8f8]
mov edx, dword [ebp - 0x8fc]
push ecx
lea eax, [ebp - 0x2a4]
push edx
push eax
mov eax, 0x10624dd3
lea ecx, [ebp - 0x8c4]
mul dword [ebp - 0x58]
shr edx, 6
push ecx
push edx
mov ecx, ebx
call fcn.0040a0f0
mov edx, dword [eax + 8]
lea eax, [ebp - 0x14]
push edx
push 0x489248
push edi
push 0x4891f4
push eax
call fcn.00402d60
mov ecx, dword [ebp - 4]
add esp, 0x28
mov eax, dword [ecx - 8]
test eax, eax
jne 0x40de32
mov edx, dword [0x4881a0]
mov eax, 0x4891f0
test eax, eax
mov dword [ebp - 8], edx
je 0x40dd68
push 0x4891f0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4891f0
push eax
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [ebp - 8]
call fcn.0040e770
lea edx, [ebp - 8]
lea ecx, [ebp - 0xc]
push edx
call fcn.00402ba0
mov eax, dword [ebp - 8]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40ddb7
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40ddb7
mov edx, dword [ebp - 8]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
cmp ecx, eax
je 0x40de06
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x40ddd5
mov edx, dword [0x4881a4]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x40dddc
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x40ddeb
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 4]
call fcn.00403710
jmp 0x40de03
lea ecx, [ebp - 4]
call fcn.004039a0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [ebp - 0xc]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40deb9
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40deb9
mov edx, dword [ebp - 0xc]
add edx, 0xfffffff4
push edx
jmp 0x40deb1
mov eax, dword [0x4881a0]
mov ecx, 0x4891f0
test ecx, ecx
mov dword [ebp - 8], eax
jne 0x40de47
xor eax, eax
jmp 0x40de52
push 0x4891f0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4891f0
push eax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 8]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.0040e770
lea eax, [ebp - 8]
lea ecx, [ebp - 0x18]
push eax
call fcn.00402ba0
lea ecx, [ebp - 8]
call fcn.00403680
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [ebp - 4]
call fcn.004037d0
mov eax, dword [ebp - 0x18]
mov ecx, dword [0x4881a4]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40deb9
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40deb9
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff4
push eax
call fcn.004472d3
add esp, 4
mov eax, dword [ebp - 0x14]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40dee6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40dee6
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
inc ecx
cmp ecx, eax
mov dword [ebp - 0x20], ecx
jl 0x40dc06
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push eax
push ecx
push str.pdown
push str.NUList
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [ebp - 4]
mov ecx, dword [0x4881a4]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40df3d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40df3d
mov eax, dword [ebp - 4]
add eax, 0xfffffff4
push eax
call fcn.004472d3
add esp, 4
mov eax, dword [ebp - 0x10]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40df6a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40df6a
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
lea esp, [ebp - 0x10b18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret