Function at 0x409cf9
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 4], eax
push 0x68
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x40], eax
push 0x26
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x28], eax
test byte [ebp - 0x27], 1
je 0x409d41
mov dword [ebp - 0x20], 1
jmp 0x409d48
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], 0
je 0x409d66
push 0x68
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x34], eax
jmp 0x409d75
push 0x18
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push str.SYSTEM.INI
push 0x14
lea eax, [ebp - 0x54]
push eax
push 0x412984
push str.os2gdi.exe
push str.boot
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
movsx eax, byte [ebp - 0x54]
cmp eax, 0x58
je 0x409dc1
movsx eax, byte [ebp - 0x53]
test eax, eax
je 0x409dc1
mov dword [ebp - 0x34], 0x10
cmp dword [ebp - 0x34], 0x100
jge 0x409ddf
cmp dword [ebp - 0x34], 0
jle 0x409ddf
xor eax, eax
jmp 0x40a053
push 0x408
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov word [eax], 0x300
mov eax, dword [ebp - 0x30]
mov word [eax + 2], 0x100
mov byte [ebp - 0x10], 0
mov byte [ebp - 0x38], 0x14
jmp 0x409e10
inc byte [ebp - 0x38]
xor eax, eax
mov al, byte [ebp - 0x38]
cmp eax, 0xc8
jge 0x409ea9
test byte [ebp + 0x10], 1
je 0x409e3e
mov al, byte [ebp - 0x10]
xor ecx, ecx
mov cl, byte [ebp - 0x38]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 4], al
jmp 0x409e4b
xor eax, eax
mov al, byte [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 4], 0
test byte [ebp + 0x10], 2
je 0x409e69
mov al, byte [ebp - 0x10]
xor ecx, ecx
mov cl, byte [ebp - 0x38]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 5], al
jmp 0x409e76
xor eax, eax
mov al, byte [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 5], 0
test byte [ebp + 0x10], 4
je 0x409e94
mov al, byte [ebp - 0x10]
xor ecx, ecx
mov cl, byte [ebp - 0x38]
mov edx, dword [ebp - 0x30]
mov byte [edx + ecx*4 + 6], al
jmp 0x409ea1
xor eax, eax
mov al, byte [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 6], 0
inc byte [ebp - 0x10]
jmp 0x409e0d
mov byte [ebp - 0x38], 0x14
jmp 0x409eb5
inc byte [ebp - 0x38]
xor eax, eax
mov al, byte [ebp - 0x38]
cmp eax, 0xc8
jge 0x409ed7
xor eax, eax
mov al, byte [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax*4 + 7], 0
jmp 0x409eb2
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.GDI32.dll_CreatePalette]
mov dword [ebp - 0x2c], eax
push 0
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push eax
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 - 0x1c], eax
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x3c], 0xffffffff
mov eax, dword [ebp + 0xc]
mov ecx, 0xa0
mov eax, dword [eax + 0xc]
cdq
idiv ecx
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x409f48
mov dword [ebp - 0xc], 1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x24], eax
jmp 0x409f59
inc dword [ebp - 0x24]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x24]
cmp dword [eax + 0xc], ecx
jle 0x40a003
mov eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 8], eax
je 0x409fd3
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp - 0x3c], 0xffffffff
je 0x409fa0
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x18]
add eax, 0x14
movzx eax, ax
or eax, 0x1000000
push eax
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_LineTo]
jmp 0x409f56
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 1
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
cmp dword [ebp - 0x3c], 0xffffffff
je 0x40a035
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
jmp 0x40a053
pop edi
pop esi
pop ebx
leave
ret 0xc