Function at 0x406080
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x154
push ebx
push esi
push edi
mov esi, 0x40d520
push ebp
mov ebp, dword [esp + 0x168]
push ebp
call fcn.00406420
add esp, 4
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esi]
test eax, eax
je 0x4060ae
push eax
call ebx
mov dword [esi], 0
add esi, 4
cmp esi, 0x40d584
jb 0x4060a5
cmp dword [0x40ffe4], 0
je 0x406132
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
mov esi, eax
lea eax, [esp + 0x10]
push eax
push 4
push 8
push esi
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
lea ecx, [esp + 0x10]
mov eax, dword [0x40ffe0]
push ecx
push 4
push 0x10
push eax
call dword [sym.imp.GDI32.dll_SetPaletteEntries]
mov ecx, dword [0x40d3fc]
push ecx
push esi
call fcn.004075e0
add esp, 8
test eax, eax
jne 0x406132
push 0xf
mov eax, dword [0x40d3fc]
push eax
call fcn.00407610
push 0x10
mov eax, dword [0x40d400]
push eax
call fcn.00407610
push 0x14
mov eax, dword [0x40d410]
push eax
call fcn.00407610
xor edi, edi
xor esi, esi
mov eax, dword [esi + 0x40d3c0]
add esi, 4
push eax
push edi
inc edi
call fcn.004074f0
add esp, 8
mov dword [esi + 0x40d3bc], eax
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [esi + 0x40d51c], eax
cmp esi, 0x64
jl 0x406136
cmp byte [ebp], 0
je 0x406347
cmp dword [0x40e42c], 0
jne 0x406182
cmp dword [0x40e428], 0
je 0x406347
push ebp
push 0x400
push 0x40ddc0
push 0x410328
push str.NonclientMetrics
mov esi, 0x40ddc0
push str.Metrics
mov edi, 0x40d740
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x40ddc0
call fcn.00402370
add esp, 4
mov ecx, 0x55
rep movsd dword es:[edi], dword [esi]
cmp dword [0x40e42c], 0
je 0x4061d6
cmp dword [0x40e428], 0
jne 0x406369
lea eax, [esp + 0x10]
push 0
push eax
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov dword [esp + 0x18], 0x154
push 0x154
push 0x29
call esi
cmp dword [0x40e42c], 0
jne 0x4062cb
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [0x40d744], eax
mov eax, dword [esp + 0x20]
mov dword [0x40d748], ecx
mov ecx, dword [esp + 0x24]
mov dword [0x40d74c], edx
mov edx, dword [esp + 0x64]
mov dword [0x40d750], eax
mov eax, dword [esp + 0x68]
mov dword [0x40d754], ecx
mov ecx, dword [esp + 0xa8]
push 2
mov dword [0x40d794], edx
mov dword [0x40d798], eax
mov edx, dword [esp + 0xb0]
lea eax, [esp + 0x2c]
push eax
mov dword [0x40d7d8], ecx
push 0x40d758
mov dword [0x40d7dc], edx
call fcn.00407b20
lea ecx, [esp + 0x78]
add esp, 0xc
push 2
push ecx
push 0x40d79c
call fcn.00407b20
lea ecx, [esp + 0xbc]
add esp, 0xc
push 2
push ecx
push 0x40d7e0
call fcn.00407b20
lea ecx, [esp + 0xf8]
add esp, 0xc
push 2
push ecx
push 0x40d81c
call fcn.00407b20
lea ecx, [esp + 0x134]
add esp, 0xc
push 2
push ecx
push 0x40d858
call fcn.00407b20
add esp, 0xc
cmp dword [0x40e428], 0
jne 0x40636f
lea eax, [esp + 0x28]
push 1
push eax
push 0x40d758
call fcn.00407b20
lea eax, [esp + 0x78]
add esp, 0xc
push 1
push eax
push 0x40d79c
call fcn.00407b20
lea eax, [esp + 0xbc]
add esp, 0xc
push 1
push eax
push 0x40d7e0
call fcn.00407b20
lea eax, [esp + 0xf8]
add esp, 0xc
push 1
push eax
push 0x40d81c
call fcn.00407b20
lea eax, [esp + 0x134]
add esp, 0xc
push 1
push eax
push 0x40d858
call fcn.00407b20
add esp, 0xc
jmp 0x40636f
push 0
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov dword [0x40d740], 0x154
push 0x40d740
push 0x154
push 0x29
call esi
jmp 0x40636f
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
cmp byte [ebp], 0
je 0x4063be
cmp dword [0x40e420], 0
je 0x4063be
push ebp
push 0x400
push 0x40ddc0
push 0x410328
push str.IconMetrics
mov esi, 0x40ddc0
push str.Metrics
mov edi, 0x40d900
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x40ddc0
call fcn.00402370
add esp, 4
mov ecx, 0x13
rep movsd dword es:[edi], dword [esi]
jmp 0x4063d5
mov dword [0x40d900], 0x4c
push 0
push 0x40d900
push 0x4c
push 0x2d
call esi
push ebp
mov esi, 0x40d5c0
call fcn.004064a0
add esp, 4
mov edi, dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov eax, dword [esi]
test eax, eax
je 0x4063f2
push eax
call ebx
lea eax, [esi + 4]
add esi, 0x40
push eax
call edi
mov dword [esi - 0x40], eax
cmp esi, 0x40d700
jb 0x4063e9
call fcn.00406500
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x154
ret