Function at 0x405940
Capabilities:
Get file attributes
Read .ini file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573610
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
push edi
mov eax, dword [0x5bda40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], 0
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x10]
call fcn.00410610
mov byte [ebp - 4], 6
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x14]
call fcn.004068e0
mov byte [ebp - 4], 7
push 1
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00406c40
mov dword [ebp - 0x88], eax
push 0x5a10a4
mov edx, dword [ebp - 0x88]
push edx
call fcn.00406fe0
add esp, 8
mov byte [ebp - 0x3d], al
lea ecx, [ebp - 0x44]
call fcn.004072c0
movzx eax, byte [ebp - 0x3d]
test eax, eax
je 0x4059e1
push 0x5a10a8
lea ecx, [ebp - 0x14]
call fcn.00406a60
push ecx
mov ecx, esp
mov dword [ebp - 0x48], esp
lea edx, [ebp - 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0x8c], eax
call fcn.0050ba00
add esp, 4
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
je 0x405c75
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.004068e0
mov byte [ebp - 4], 8
lea ecx, [ebp + 0x18]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00406a40
push 0x5a10ac
lea ecx, [ebp - 0x18]
call fcn.00406a60
push ecx
mov ecx, esp
mov dword [ebp - 0x4c], esp
lea edx, [ebp - 0x18]
push edx
call fcn.004068e0
mov dword [ebp - 0x94], eax
call fcn.0050ba00
add esp, 4
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
je 0x405b58
lea ecx, [ebp - 0x24]
call fcn.00410610
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x20]
call fcn.00410610
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
push 0x104
push 0x104
lea ecx, [ebp - 0x20]
call fcn.004070d0
push eax
push 0x5a10b8
push 0x5a10bc
push 0x5a10c4
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringW]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x24]
call fcn.00406980
push 0xffffffffffffffff
lea ecx, [ebp - 0x20]
call fcn.00407110
lea ecx, [ebp - 0x20]
call fcn.00406bb0
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp - 0x20]
push edx
call fcn.00406fc0
add esp, 8
movzx eax, al
test eax, eax
je 0x405b2f
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
lea ecx, [ebp + 0x10]
call fcn.004072e0
push eax
push 0x5a10e8
push 0x5a10f0
call dword [sym.imp.KERNEL32.DLL_WritePrivateProfileStringW]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406980
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x20]
call fcn.004072c0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x24]
call fcn.004072c0
jmp 0x405c69
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x18]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 0x5a1114
lea ecx, [ebp - 0x2c]
call fcn.00406900
mov byte [ebp - 4], 0xb
push 0
lea edx, [ebp - 0x28]
push edx
lea edi, [ebp - 0x2c]
call fcn.004fa1b0
add esp, 8
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp + 0x14]
call fcn.00406980
mov ecx, dword [ebp + 0x24]
push ecx
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x50], esp
lea edx, [ebp + 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], eax
mov byte [ebp - 4], 0xd
push ecx
mov ecx, esp
mov dword [ebp - 0x54], esp
lea edx, [ebp + 0x10]
push edx
call fcn.004068e0
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 0xe
push ecx
mov ecx, esp
mov dword [ebp - 0x58], esp
lea edx, [ebp + 0x18]
push edx
call fcn.004068e0
mov dword [ebp - 0xac], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xb0], eax
mov byte [ebp - 4], 0xf
push ecx
mov ecx, esp
mov dword [ebp - 0x5c], esp
lea edx, [ebp - 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0xb4], eax
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x84]
call fcn.004060d0
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x10]
call fcn.00406980
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x28]
call fcn.004072c0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2c]
call fcn.004072c0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x18]
call fcn.004072c0
lea ecx, [ebp - 0x10]
call fcn.004070f0
movzx ecx, al
test ecx, ecx
je 0x405d08
lea edx, [ebp - 0x10]
push edx
mov ecx, dword [ebp + 8]
call fcn.004068e0
mov eax, dword [ebp - 0x80]
or eax, 1
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14]
call fcn.004072c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
call fcn.004072c0
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xc]
call fcn.004072c0
mov byte [ebp - 4], 3
lea ecx, [ebp + 0x10]
call fcn.004072c0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x14]
call fcn.004072c0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x18]
call fcn.004072c0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x1c]
call fcn.004072c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.004072c0
mov eax, dword [ebp + 8]
jmp 0x4060b2
lea ecx, [ebp + 0x20]
call fcn.004070f0
movzx ecx, al
test ecx, ecx
je 0x405d9b
lea edx, [ebp - 0x10]
push edx
mov ecx, dword [ebp + 8]
call fcn.004068e0
mov eax, dword [ebp - 0x80]
or eax, 1
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14]
call fcn.004072c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
call fcn.004072c0
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xc]
call fcn.004072c0
mov byte [ebp - 4], 3
lea ecx, [ebp + 0x10]
call fcn.004072c0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x14]
call fcn.004072c0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x18]
call fcn.004072c0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x1c]
call fcn.004072c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.004072c0
mov eax, dword [ebp + 8]
jmp 0x4060b2
lea ecx, [ebp + 0x20]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00406980
push 1
lea edx, [ebp - 0x64]
push edx
lea ecx, [ebp - 0x14]
call fcn.00406c40
mov dword [ebp - 0xb8], eax
push 0x5a1118
mov eax, dword [ebp - 0xb8]
push eax
call fcn.00406fe0
add esp, 8
mov byte [ebp - 0x5d], al
lea ecx, [ebp - 0x64]
call fcn.004072c0
movzx ecx, byte [ebp - 0x5d]
test ecx, ecx
je 0x405def
push 0x5a111c
lea ecx, [ebp - 0x14]
call fcn.00406a60
push ecx
mov ecx, esp
mov dword [ebp - 0x68], esp
lea edx, [ebp - 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0xbc], eax
call fcn.0050ba00
add esp, 4
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
je 0x406037
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x30]
call fcn.004068e0
mov byte [ebp - 4], 0x10
lea ecx, [ebp + 0x18]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00406a40
push 0x5a1120
lea ecx, [ebp - 0x30]
call fcn.00406a60
push ecx
mov ecx, esp
mov dword [ebp - 0x6c], esp
lea edx, [ebp - 0x30]
push edx
call fcn.004068e0
mov dword [ebp - 0xc4], eax
call fcn.0050ba00
add esp, 4
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
je 0x405f66
lea ecx, [ebp - 0x3c]
call fcn.00410610
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x38]
call fcn.00410610
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
push 0x104
push 0x104
lea ecx, [ebp - 0x38]
call fcn.004070d0
push eax
push 0x5a112c
push 0x5a1130
push 0x5a1138
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringW]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00406980
push 0xffffffffffffffff
lea ecx, [ebp - 0x38]
call fcn.00407110
lea ecx, [ebp - 0x38]
call fcn.00406bb0
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00406fc0
add esp, 8
movzx eax, al
test eax, eax
je 0x405f3d
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
lea ecx, [ebp + 0x10]
call fcn.004072e0
push eax
push 0x5a115c
push 0x5a1164
call dword [sym.imp.KERNEL32.DLL_WritePrivateProfileStringW]
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406980
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x38]
call fcn.004072c0
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x3c]
call fcn.004072c0
jmp 0x40602b
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x30]
call fcn.004072e0
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 0
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x70], esp
lea edx, [ebp + 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xd0], eax
mov byte [ebp - 4], 0x13
push ecx
mov ecx, esp
mov dword [ebp - 0x74], esp
lea edx, [ebp + 0x10]
push edx
call fcn.004068e0
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0xd8], eax
mov byte [ebp - 4], 0x14
push ecx
mov ecx, esp
mov dword [ebp - 0x78], esp
lea edx, [ebp + 0x18]
push edx
call fcn.004068e0
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0xe0], eax
mov byte [ebp - 4], 0x15
push ecx
mov ecx, esp
mov dword [ebp - 0x7c], esp
lea edx, [ebp - 0x14]
push edx
call fcn.004068e0
mov dword [ebp - 0xe4], eax
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x84]
call fcn.004060d0
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x10]
call fcn.00406980
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x30]
call fcn.004072c0
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004068e0
mov edx, dword [ebp - 0x80]
or edx, 1
mov dword [ebp - 0x80], edx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14]
call fcn.004072c0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
call fcn.004072c0
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xc]
call fcn.004072c0
mov byte [ebp - 4], 3
lea ecx, [ebp + 0x10]
call fcn.004072c0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x14]
call fcn.004072c0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x18]
call fcn.004072c0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x1c]
call fcn.004072c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x20]
call fcn.004072c0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
mov esp, ebp
pop ebp
ret 0x20