Function at 0x405d20
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x41a178]
xor eax, ebp
mov dword [ebp - 0x40], eax
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x34], eax
push 0x68
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x28], eax
push 0x26
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
and edx, 0x100
je 0x405d6d
mov dword [ebp - 0x3c], 1
jmp 0x405d74
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
je 0x405d8b
push 0x68
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0xc], eax
jmp 0x405d9a
push 0x18
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x34]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push str.SYSTEM.INI
push 0x14
lea eax, [ebp - 0x54]
push eax
push 0x419088
push str.os2gdi.exe
push str.boot
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
movsx ecx, byte [ebp - 0x54]
cmp ecx, 0x58
je 0x405dde
movsx edx, byte [ebp - 0x53]
test edx, edx
je 0x405dde
mov dword [ebp - 0xc], 0x10
cmp dword [ebp - 0xc], 0x100
jge 0x405df4
cmp dword [ebp - 0xc], 0
jle 0x405df4
xor eax, eax
jmp 0x406044
push 0x408
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x30], eax
mov eax, 0x300
mov ecx, dword [ebp - 0x30]
mov word [ecx], ax
mov edx, 0x100
mov eax, dword [ebp - 0x30]
mov word [eax + 2], dx
mov byte [ebp - 0x55], 0
mov byte [ebp - 1], 0x14
jmp 0x405e2e
mov cl, byte [ebp - 1]
add cl, 1
mov byte [ebp - 1], cl
movzx edx, byte [ebp - 1]
cmp edx, 0xc8
jge 0x405eb3
mov eax, dword [ebp + 0x10]
and eax, 1
je 0x405e52
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 4], al
jmp 0x405e5e
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 4], 0
mov eax, dword [ebp + 0x10]
and eax, 2
je 0x405e76
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 5], al
jmp 0x405e82
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 5], 0
mov eax, dword [ebp + 0x10]
and eax, 4
je 0x405e9a
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 6], al
jmp 0x405ea6
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 6], 0
mov al, byte [ebp - 0x55]
add al, 1
mov byte [ebp - 0x55], al
jmp 0x405e25
mov byte [ebp - 1], 0x14
jmp 0x405ec2
mov cl, byte [ebp - 1]
add cl, 1
mov byte [ebp - 1], cl
movzx edx, byte [ebp - 1]
cmp edx, 0xc8
jge 0x405edc
movzx eax, byte [ebp - 1]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 7], 0
jmp 0x405eb9
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov dword [ebp - 0x18], eax
push 0
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.GDI32.dll_RealizePalette]
push 8
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0xc]
cdq
mov ecx, 0xa0
idiv ecx
add eax, 1
mov dword [ebp - 0x24], eax
jne 0x405f47
mov dword [ebp - 0x24], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov dword [ebp - 0x10], eax
jmp 0x405f5b
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edx + 0xc]
jge 0x405ffd
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x38]
je 0x405fcd
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp - 0x20], 0xffffffff
je 0x405f9a
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [ebp - 0x38]
add edx, 0x14
movzx eax, dx
or eax, 0x1000000
push eax
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 8], eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.GDI32.dll_MoveToEx]
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.GDI32.dll_LineTo]
jmp 0x405f52
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
push 1
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
cmp dword [ebp - 0x20], 0xffffffff
je 0x40602b
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.0040f735
mov esp, ebp
pop ebp
ret 0xc