Function at 0x491a50
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x51c
push ebx
push ebp
mov ebp, dword [esp + 0x53c]
push esi
push edi
mov edi, dword [esp + 0x538]
xor esi, esi
mov ebx, 1
lea eax, [edi - 0x12]
mov word [ebp], si
cmp eax, 0x59
mov word [esp + 0x11c], si
mov byte [esp + 0x18], 0
mov dword [esp + 0x10], esi
ja case.0x491a98.27
xor ecx, ecx
mov cl, byte [eax + 0x491ef0]
jmp dword [ecx*4 + 0x491ec8]
lea edx, [esp + 0x11c]
push str.FORMATS.DLL
push edx
call fcn.004d631b
mov eax, dword [str.ReadDCX_W]
mov ecx, dword [0x5a1044]
mov dx, word [0x5a1048]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov word [esp + 0x28], dx
jmp 0x491cec
lea eax, [esp + 0x11c]
push str.SFF.DLL
push eax
call fcn.004d631b
mov ecx, dword [str.ReadSFF_W]
mov edx, dword [0x5a1028]
mov ax, word [0x5a102c]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov word [esp + 0x28], ax
jmp 0x491cf1
lea ecx, [esp + 0x11c]
push str.FORMATS.DLL
push ecx
call fcn.004d631b
mov edx, dword [str.ReadWAD3]
mov eax, dword [0x5a101c]
mov cl, byte [0x5a1020]
add esp, 8
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x20], cl
xor ebx, ebx
jmp case.0x491a98.27
lea edx, [esp + 0x11c]
push str.ICS.DLL
push edx
call fcn.004d631b
mov eax, dword [str.ReadICS]
mov ecx, dword [0x5a1004]
add esp, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
xor ebx, ebx
jmp case.0x491a98.27
lea edx, [esp + 0x11c]
push str.WBZ.DLL
push edx
call fcn.004d631b
mov edx, dword [esp + 0x550]
mov eax, dword [str.ReadWBC]
mov ecx, dword [0x5a0ffc]
push 0x599c64
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
call fcn.004d631b
add esp, 0x10
xor ebx, ebx
jmp case.0x491a98.27
lea eax, [esp + 0x11c]
push str.POSTSCRIPT.DLL
push eax
call fcn.004d631b
mov ecx, dword [str.ReadPostscript_W]
mov edx, dword [0x5a0fc8]
mov eax, dword [0x5a0fcc]
mov dword [esp + 0x20], ecx
mov ecx, dword [0x5a0fd0]
mov dword [esp + 0x24], edx
mov dl, byte [0x5a0fd4]
add esp, 8
cmp edi, 0x5a
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov byte [esp + 0x28], dl
jne 0x491c51
mov eax, dword [esp + 0x540]
push eax
push 1
push str.Load_UseNewDLL
push 0x598da0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x491c51
lea ecx, [esp + 0x11c]
push str.PDF.DLL
push ecx
call fcn.004d631b
mov edx, dword [str.ReadPDF_W]
mov eax, dword [0x5a0f9c]
mov cx, word [0x5a0fa0]
add esp, 8
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov word [esp + 0x20], cx
mov esi, 1
jmp case.0x491a98.27
lea edx, [esp + 0x11c]
push str.FORMATS.DLL
push edx
call fcn.004d631b
mov eax, dword [str.ReadGLCD_W]
mov ecx, dword [0x5a0f90]
mov dx, word [0x5a0f94]
mov dword [esp + 0x20], eax
mov al, byte [0x5a0f96]
mov dword [esp + 0x24], ecx
mov word [esp + 0x28], dx
mov byte [esp + 0x2a], al
jmp 0x491cec
lea ecx, [esp + 0x11c]
push str.FORMATS.DLL
push ecx
call fcn.004d631b
mov edx, dword [str.ReadMPO_W]
mov eax, dword [0x5a0f84]
mov cx, word [0x5a0f88]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov word [esp + 0x28], cx
jmp 0x491cec
lea edx, [esp + 0x11c]
push str.TOOLS.DLL
push edx
call fcn.004d631b
mov ecx, 5
mov esi, str.LoadResourceImage_W
lea edi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
mov esi, 1
add esp, 8
lea eax, [esp + 0x10]
push ebp
lea ecx, [esp + 0x120]
push eax
push ecx
call fcn.00490890
mov edi, eax
add esp, 0xc
test edi, edi
mov dword [esp + 0x14], edi
jne 0x491d33
push eax
lea edx, [esp + 0x120]
push ebp
push edx
call fcn.004905d0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret
test esi, esi
je 0x491d7a
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x491e76
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x491d5a
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
lea eax, [esp + 0x120]
push ebp
push eax
call fcn.004905d0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret
cmp ebx, 1
jne 0x491d95
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x491eab
jmp 0x491d4b
lea edx, [esp + 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x491d4b
mov edi, dword [esp + 0x530]
lea edx, [esp + 0x428]
push edx
push edi
call fcn.00490210
mov ecx, dword [esp + 0x53c]
lea eax, [esp + 0x32c]
push eax
lea edx, [esp + 0x434]
push ecx
push edx
mov byte [esp + 0x338], 0
call esi
add esp, 0x14
mov esi, eax
lea eax, [esp + 0x324]
push 0x104
push ebp
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x491e10
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x538], 0x6b
jne 0x491e55
test esi, esi
jne 0x491e55
push ebp
call fcn.004d6be0
mov edx, dword [esp + 0x540]
push esi
push esi
push esi
push esi
push edx
push 1
lea ecx, [esp + 0x30]
push esi
lea edx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x56c]
push edx
push ebp
push ecx
push eax
push esi
push esi
push esi
push edi
call fcn.00409430
add esp, 0x44
mov esi, eax
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret
mov ecx, dword [esp + 0x548]
mov edx, dword [esp + 0x53c]
mov edi, dword [esp + 0x530]
push ecx
mov ecx, dword [esp + 0x544]
push ebp
push edx
mov edx, dword [esp + 0x540]
push ecx
push edx
push edi
call eax
add esp, 0x18
mov esi, eax
jmp 0x491dfd
mov ecx, dword [esp + 0x534]
mov edi, dword [esp + 0x530]
push ebp
push ecx
push edi
call eax
add esp, 0xc
mov esi, eax
jmp 0x491dfd