Function at 0x405dd0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x41b250]
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 0x405e1d
mov dword [ebp - 0x3c], 1
jmp 0x405e24
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
je 0x405e3b
push 0x68
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0xc], eax
jmp 0x405e4a
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 0x41a088
push str.os2gdi.exe
push str.boot
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
movsx ecx, byte [ebp - 0x54]
cmp ecx, 0x58
je 0x405e8e
movsx edx, byte [ebp - 0x53]
test edx, edx
je 0x405e8e
mov dword [ebp - 0xc], 0x10
cmp dword [ebp - 0xc], 0x100
jge 0x405ea4
cmp dword [ebp - 0xc], 0
jle 0x405ea4
xor eax, eax
jmp 0x4060f4
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 0x405ede
mov cl, byte [ebp - 1]
add cl, 1
mov byte [ebp - 1], cl
movzx edx, byte [ebp - 1]
cmp edx, 0xc8
jge 0x405f63
mov eax, dword [ebp + 0x10]
and eax, 1
je 0x405f02
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 4], al
jmp 0x405f0e
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 0x405f26
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 5], al
jmp 0x405f32
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 0x405f4a
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x55]
mov byte [edx + ecx*4 + 6], al
jmp 0x405f56
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 0x405ed5
mov byte [ebp - 1], 0x14
jmp 0x405f72
mov cl, byte [ebp - 1]
add cl, 1
mov byte [ebp - 1], cl
movzx edx, byte [ebp - 1]
cmp edx, 0xc8
jge 0x405f8c
movzx eax, byte [ebp - 1]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 7], 0
jmp 0x405f69
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 0x405ff7
mov dword [ebp - 0x24], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov dword [ebp - 0x10], eax
jmp 0x40600b
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 0x4060ad
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 0x40607d
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 0x40604a
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 0x406002
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 0x4060db
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.0040fa05
mov esp, ebp
pop ebp
ret 0xc