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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46917b
mov eax, dword fs:[0]
push eax
sub esp, 0xcc4
mov eax, dword [0x481288]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x46f5c8
push 0x208
push 0x104
push 0x4882d8
call fcn.004157ac
add esp, 0x10
push 0x46f5cc
lea ecx, [ebp - 0x238]
call fcn.004011c0
mov dword [ebp - 4], 0
mov word [ebp - 0x684], 0
push 0x206
push 0
lea eax, [ebp - 0x682]
push eax
call fcn.00415680
add esp, 0xc
mov word [ebp - 0x45c], 0
push 0x206
push 0
lea ecx, [ebp - 0x45a]
push ecx
call fcn.00415680
add esp, 0xc
push 0x46f5d0
lea ecx, [ebp - 0x254]
call fcn.004011c0
mov byte [ebp - 4], 1
push 0x46f5d4
lea ecx, [ebp - 0x478]
call fcn.004011c0
mov byte [ebp - 4], 2
push 1
push 0x2e
lea edx, [ebp - 0x684]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x436901
lea eax, [ebp - 0x684]
push eax
lea ecx, [ebp - 0x478]
call fcn.00403bf0
lea ecx, [ebp - 0x478]
call fcn.00402490
mov dword [ebp - 0x688], eax
mov ecx, dword [ebp - 0x688]
sub ecx, 1
push ecx
lea ecx, [ebp - 0x478]
call fcn.00403c70
movzx edx, word [eax]
cmp edx, 0x5c
je 0x43689f
push 0x46f5d8
lea ecx, [ebp - 0x478]
call fcn.00403c10
push 0x46f5dc
lea ecx, [ebp - 0x478]
call fcn.00403c10
push 0x46f5f4
lea eax, [ebp - 0x478]
push eax
lea ecx, [ebp - 0xcc8]
push ecx
call fcn.00404060
add esp, 0xc
mov dword [ebp - 0xccc], eax
mov edx, dword [ebp - 0xccc]
mov dword [ebp - 0xcd0], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xcd0]
push eax
lea ecx, [ebp - 0x254]
call fcn.00401e00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xcc8]
call fcn.00401200
lea ecx, [ebp - 0x254]
call fcn.00401220
push eax
lea ecx, [ebp - 0x45c]
push ecx
call fcn.00414f38
add esp, 8
lea edx, [ebp - 0x45c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x436a0f
cmp dword [0x485c34], 1
jne 0x4369df
mov dword [0x48a804], 1
push 1
push 5
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4369c4
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x238]
call fcn.00403bf0
lea ecx, [ebp - 0x238]
call fcn.00402490
mov dword [ebp - 0x68c], eax
mov edx, dword [ebp - 0x68c]
sub edx, 1
push edx
lea ecx, [ebp - 0x238]
call fcn.00403c70
movzx eax, word [eax]
cmp eax, 0x5c
je 0x4369b4
push 0x46f618
lea ecx, [ebp - 0x238]
call fcn.00403c10
push 0x46f61c
lea ecx, [ebp - 0x238]
call fcn.00403c10
lea ecx, [ebp - 0x238]
call fcn.00401220
push eax
push 0x4882d8
call fcn.00414f38
add esp, 8
jmp 0x436a0a
mov dword [0x48a804], 0
push 0x4880d0
push 0x46f63c
push 0x208
push 0x104
push 0x4882d8
call fcn.004157ac
add esp, 0x14
jmp 0x436c4f
mov dword [ebp - 0xaa0], 0
mov word [ebp - 0xa9c], 0
push 0x206
push 0
lea ecx, [ebp - 0xa9a]
push ecx
call fcn.00415680
add esp, 0xc
mov word [ebp - 0x894], 0
push 0x206
push 0
lea edx, [ebp - 0x892]
push edx
call fcn.00415680
add esp, 0xc
lea eax, [ebp - 0x45c]
push eax
mov ecx, dword [ebp - 0xaa0]
push ecx
push 0x46f650
push 0x46f67c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0xaa0], eax
mov edx, dword [ebp - 0xaa0]
mov dword [0x48a804], edx
cmp dword [ebp - 0xaa0], 0
jne 0x436ab6
push 0x4880d0
push 0x46f694
push 0x208
push 0x104
push 0x4882d8
call fcn.004157ac
add esp, 0x14
jmp 0x436c4f
cmp dword [ebp - 0xaa0], 1
jne 0x436b58
push 1
push 5
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x436b3a
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x238]
call fcn.00403bf0
lea ecx, [ebp - 0x238]
call fcn.00402490
mov dword [ebp - 0xaa4], eax
mov edx, dword [ebp - 0xaa4]
sub edx, 1
push edx
lea ecx, [ebp - 0x238]
call fcn.00403c70
movzx eax, word [eax]
cmp eax, 0x5c
je 0x436b2a
push 0x46f6a8
lea ecx, [ebp - 0x238]
call fcn.00403c10
push 0x46f6ac
lea ecx, [ebp - 0x238]
call fcn.00403c10
lea ecx, [ebp - 0x238]
call fcn.00401220
push eax
push 0x4882d8
call fcn.00414f38
add esp, 8
jmp 0x436c4f
cmp dword [ebp - 0xaa0], 2
jne 0x436c4f
lea ecx, [ebp - 0x45c]
push ecx
push 0x208
lea edx, [ebp - 0xa9c]
push edx
push 0x46f6cc
push 0x46f6d0
push 0x46f6f4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0xa9c]
push eax
call fcn.00414d31
add esp, 4
cmp eax, 0x103
jae 0x436c2c
lea ecx, [ebp - 0xa9c]
push ecx
call fcn.00414d31
add esp, 4
movzx edx, word [ebp + eax*2 - 0xa9e]
cmp edx, 0x5c
je 0x436c2c
mov word [ebp - 0xcac], 0
push 0x206
push 0
lea eax, [ebp - 0xcaa]
push eax
call fcn.00415680
add esp, 0xc
lea ecx, [ebp - 0xa9c]
push ecx
push 0x46f70c
push 0x208
push 0x104
lea edx, [ebp - 0xcac]
push edx
call fcn.004157ac
add esp, 0x14
lea eax, [ebp - 0xcac]
push eax
push 0x46f714
push 0x208
push 0x104
lea ecx, [ebp - 0xa9c]
push ecx
call fcn.004157ac
add esp, 0x14
lea edx, [ebp - 0xa9c]
push edx
push 0x46f71c
push 0x208
push 0x104
push 0x4882d8
call fcn.004157ac
add esp, 0x14
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x478]
call fcn.00401200
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x254]
call fcn.00401200
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.00401200
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004151d0
mov esp, ebp
pop ebp
ret