Function at 0x4c7c0750
Capabilities:
Get common file path
Get program files directory
Read .ini file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x61c
push esi
xor esi, esi
push 0x206
lea eax, [ebp - 0x412]
push esi
push eax
mov word [ebp - 0x414], si
call sub.msvcrt.dll_memset
push 0x206
lea ecx, [ebp - 0x61a]
push esi
push ecx
mov word [ebp - 0x61c], si
call sub.msvcrt.dll_memset
add esp, 0x18
cmp dword [ebp + 0x10], esi
jne 0x4c7c07bf
push 0x173
push 0x4c785228
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
movzx eax, word [ebp + 0xc]
add eax, 0xffffffff
cmp eax, 0x80
ja case.0x4c7c07d1.3
jmp dword [eax*4 + 0x4c7c0fa4]
mov eax, str.SplResourceModule
jmp 0x4c7c0c1b
mov eax, str.KMOutputModule
jmp 0x4c7c0c1b
mov eax, str.OutputModule
jmp 0x4c7c0c1b
mov eax, str.UserIFModule
jmp 0x4c7c0c1b
mov eax, str.UserIFModuleHighEnd
jmp 0x4c7c0c1b
mov eax, str.Form3Module
jmp 0x4c7c0c1b
mov eax, str.HelpFile
jmp 0x4c7c0c1b
mov eax, str.HelpFileHighEnd
jmp 0x4c7c0c1b
mov eax, str.HelpFileHighEndS
jmp 0x4c7c0c1b
mov eax, str.ManualSetData
jmp 0x4c7c0c1b
mov eax, str.StampMarkData
jmp 0x4c7c0c1b
mov eax, str.FreePaperData
jmp 0x4c7c0c1b
mov eax, str.MNLFile
jmp 0x4c7c0c1b
mov eax, str.STMFile
jmp 0x4c7c0c1b
mov eax, str.StampResourceModule
jmp 0x4c7c0c1b
mov eax, str.StampMarkDll
jmp 0x4c7c0c1b
mov eax, str.FRPFile
jmp 0x4c7c0c1b
mov eax, str.TagData
jmp 0x4c7c0c1b
mov eax, str.DispMsgModule
jmp 0x4c7c0c1b
mov eax, str.UMDModule
jmp 0x4c7c0c1b
mov eax, str.UMDModuleNT4
jmp 0x4c7c0c1b
mov eax, str.EPWSRUN
jmp 0x4c7c0c1b
mov eax, str.EPWSENV
jmp 0x4c7c0c1b
mov eax, str.EPWSTMS
jmp 0x4c7c0c1b
mov eax, str.EPWSRCV
jmp 0x4c7c0c1b
mov eax, str.STM3Module
jmp 0x4c7c0c1b
mov eax, str.ImagePageModule
jmp 0x4c7c0c1b
mov eax, str.JournalModule
jmp 0x4c7c0c1b
mov eax, str.OutputModule95
jmp 0x4c7c0c1b
mov eax, str.EjlGenModule
jmp 0x4c7c0c1b
mov eax, str.PtnGenModule
jmp 0x4c7c0c1b
mov eax, str.CompressModule
jmp 0x4c7c0c1b
mov eax, str.NameDBModuleP
jmp 0x4c7c0c1b
mov eax, str.NameDBModuleMonoP
jmp 0x4c7c0c1b
mov eax, str.NameDBModuleI
jmp 0x4c7c0c1b
mov eax, str.UMRStandardModule
jmp 0x4c7c0c1b
mov eax, str.UMRIMMDModule
jmp 0x4c7c0c1b
mov eax, str.UMRIMMDMonoModule
jmp 0x4c7c0c1b
mov eax, str.Thai3PathModule
jmp 0x4c7c0c1b
mov eax, str.CMTableData
jmp 0x4c7c0c1b
mov eax, str.ColorTransModule
jmp 0x4c7c0c1b
mov eax, str.IMMDModule
jmp 0x4c7c0c1b
mov eax, str.IMMDMonoModule
jmp 0x4c7c0c1b
mov eax, str.JobConModule
jmp 0x4c7c0c1b
mov eax, str.ImageBarcodeLibrary
jmp 0x4c7c0c1b
mov eax, str.ImageBarcodeRLibrary
jmp 0x4c7c0c1b
mov eax, str.CfgFileI
jmp 0x4c7c0c1b
mov eax, str.DatFileI
jmp 0x4c7c0c1b
mov eax, str.UcfFileI
jmp 0x4c7c0c1b
mov eax, str.WatFileI
jmp 0x4c7c0c1b
mov eax, str.ReplayModuleI
jmp 0x4c7c0c1b
mov eax, str.OutputModuleI
jmp 0x4c7c0c1b
mov eax, str.OutputMonoModuleI
jmp 0x4c7c0c1b
mov eax, str.OutputModuleI_ESCP3
jmp 0x4c7c0c1b
mov eax, str.UIModuleI
jmp 0x4c7c0c1b
mov eax, str.UIRESModuleI
jmp 0x4c7c0c1b
mov eax, str.UIRES2ModuleI
jmp 0x4c7c0c1b
mov eax, str.UtilModuleI
jmp 0x4c7c0c1b
mov eax, str.PrnInfoModuleI
jmp 0x4c7c0c1b
mov eax, str.PrnInfo2ModuleI
jmp 0x4c7c0c1b
mov eax, str.PrnModelIDI
jmp 0x4c7c0c1b
mov eax, str.LangIDI
jmp 0x4c7c0c1b
mov eax, str.STMModuleI
jmp 0x4c7c0c1b
mov eax, str.STM2ModuleI
jmp 0x4c7c0c1b
mov eax, str.ModelNameI
jmp 0x4c7c0c1b
mov eax, str.ICMCheckSumI
jmp 0x4c7c0c1b
mov eax, str.ProgressMeterI
jmp 0x4c7c0c1b
mov eax, str.ExeNameI
jmp 0x4c7c0c1b
mov eax, str.PrePrnI
jmp 0x4c7c0c1b
mov eax, str.PreviewUII
jmp 0x4c7c0c1b
mov eax, str.PrePrnJobConI
jmp 0x4c7c0c1b
mov eax, str.PrePrnUMRI
jmp 0x4c7c0c1b
mov eax, str.PrePrnIMMDI
jmp 0x4c7c0c1b
mov eax, str.PrePrnOutputI
jmp 0x4c7c0c1b
mov eax, str.MWModule
jmp 0x4c7c0c1b
mov eax, str.HalftoneEngineModule
jmp 0x4c7c0c1b
mov eax, str.OutPutResource
jmp 0x4c7c0c1b
mov eax, str.WaterMarkDialog
jmp 0x4c7c0c1b
mov eax, str.InkDispControl
jmp 0x4c7c0c1b
mov eax, str.OutPutResouceNum
jmp 0x4c7c0c1b
mov eax, str.PreviewUI2I
jmp 0x4c7c0c1b
mov eax, str.InfFileNameI
jmp 0x4c7c0c1b
mov eax, str.STM3ModuleI
jmp 0x4c7c0c1b
mov eax, str.EventLogI
jmp 0x4c7c0c1b
mov eax, str.UMDModule95
jmp 0x4c7c0c1b
mov eax, str.StampSpec
jmp 0x4c7c0c1b
mov eax, str.LocalizeFileI
jmp 0x4c7c0c1b
mov eax, str.SAInstI
jmp 0x4c7c0c1b
mov eax, str.SADatI
jmp 0x4c7c0c1b
mov eax, str.EBPLPTI
jmp 0x4c7c0c1b
mov eax, str.EBPrflI
jmp 0x4c7c0c1b
mov eax, str.UIResourceModule
jmp 0x4c7c0c1b
mov eax, str.UIResourceModuleHighend
jmp 0x4c7c0c1b
mov eax, str.UILanguageConfigFile
jmp 0x4c7c0c1b
mov eax, str.TagFileModule
jmp 0x4c7c0c1b
mov eax, str.StatusPrintModule
jmp 0x4c7c0c1b
mov eax, str.ConfigFile
jmp 0x4c7c0c1b
mov eax, str.CtrlAEditor
jmp 0x4c7c0c1b
mov eax, str.LogSetTool
jmp 0x4c7c0c1b
mov eax, str.LayoutTool
jmp 0x4c7c0c1b
mov eax, str.MemorySwitchTool
jmp 0x4c7c0c1b
mov eax, str.TmfLogoTool
jmp 0x4c7c0c1b
mov eax, str.UnicodeMappingTool
jmp 0x4c7c0c1b
mov eax, str.UnicodeConversionDLL
jmp 0x4c7c0c1b
mov eax, str.UnicodeConversionConfigFile
jmp 0x4c7c0c1b
mov eax, str.EsdConbinationTool
jmp 0x4c7c0c1b
mov eax, str.HalftoneModule1bpp
jmp 0x4c7c0c1b
mov eax, str.HalftoneModule4bpp
jmp 0x4c7c0c1b
mov eax, str.ElectricJournalTool
jmp 0x4c7c0c1b
mov eax, str.EsdConbinationToolMemorySwitch
jmp 0x4c7c0c1b
mov eax, str.CommonLogoTool
jmp 0x4c7c0c1b
mov eax, str.ModelName
jmp 0x4c7c0c1b
mov eax, str.DefaultLanguage
jmp 0x4c7c0c1b
mov eax, str.CommonLogoNVbit
jmp 0x4c7c0c1b
mov eax, str.PtrInfoAutoSetTool
mov edx, dword [ebp + 8]
push edx
push 0x104
lea ecx, [ebp - 0x414]
push ecx
push 0x4c78521c
push eax
push str.User_Mode_Printer_Driver_Information
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x4c78521c
lea edx, [ebp - 0x414]
push edx
call fcn.4c7c0480
test ax, ax
je 0x4c7c07b6
push ebx
push 0x206
lea eax, [ebp - 0x20a]
push esi
push eax
mov word [ebp - 0x20c], si
call sub.msvcrt.dll_memset
mov ebx, dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
mov dword [ebp - 4], esi
mov dword [ebp + 0xc], esi
push edi
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x104
jae 0x4c7c0eb5
mov esi, dword [ebp - 4]
movzx eax, word [ebp + esi*2 - 0x414]
cmp ax, 0x25
lea esi, [ebp + esi*2 - 0x414]
jne 0x4c7c0e8d
push 0xd
push 0x4c785198
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4c7c0cf1
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x20c]
mov edi, 0x4c785198
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4c7c0cd0
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
jmp 0x4c7c0dde
push 0xe
push 0x4c785178
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4c7c0d33
lea edx, [ebp - 0x20c]
push edx
push eax
push eax
push 0x26
push eax
mov edi, 0x4c785178
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4c7c0f3f
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
jmp 0x4c7c0dde
push 0x11
push 0x4c785128
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4c7c0d72
lea ecx, [ebp - 0x20c]
push ecx
push eax
push eax
push 0x2a
push eax
mov edi, 0x4c785128
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4c7c0f46
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
jmp 0x4c7c0dde
push 0x14
push 0x4c78514c
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4c7c0db4
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x2b
push 0
mov edi, 0x4c78514c
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4c7c0f4d
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
jmp 0x4c7c0dde
push 2
push 0x4c785120
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x4c7c0f5b
mov edi, 0x4c785120
mov word [ebp - 0x20c], 0x25
mov word [ebp - 0x20a], ax
lea eax, [ebp - 0x414]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4c7c0de7
sub eax, edx
sar eax, 1
mov edx, eax
lea eax, [ebp - 0x20c]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4c7c0e01
sub eax, esi
sar eax, 1
add eax, edx
cmp eax, 0x104
jae 0x4c7c0f54
mov edx, dword [ebp + 0xc]
lea ecx, [edx + edx]
lea eax, [ebp - 0x20c]
mov edx, ecx
mov ecx, eax
sub edx, ecx
lea edx, [ebp + edx - 0x61c]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4c7c0e36
mov eax, edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4c7c0e50
sub eax, edx
mov edx, dword [ebp - 4]
sar eax, 1
lea eax, [edx + eax - 1]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4c7c0e72
mov ecx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
lea edx, [ecx + eax - 1]
mov dword [ebp + 0xc], edx
jmp 0x4c7c0e9a
test ax, ax
mov word [ebp + ecx*2 - 0x61c], ax
je 0x4c7c0eb2
mov eax, dword [ebp - 4]
add dword [ebp + 0xc], 1
add eax, 1
cmp eax, 0x104
mov dword [ebp - 4], eax
jb 0x4c7c0c80
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 4], 0x104
je 0x4c7c0f70
cmp ecx, 0x104
je 0x4c7c0f70
push 0x206
lea eax, [ebp - 0x20a]
push 0
push eax
mov word [ebp - 0x20c], 0
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x20c]
add esp, 0xc
sub edx, eax
jmp 0x4c7c0f00
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4c7c0f00
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x61c]
push edx
lea eax, [ebp - 0x20c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
jne 0x4c7c0f62
push 0x3d9
jmp 0x4c7c0f75
push 0x388
jmp 0x4c7c0f75
push 0x394
jmp 0x4c7c0f75
push 0x3a0
jmp 0x4c7c0f75
push 0x3b6
jmp 0x4c7c0f75
push 0x3af
jmp 0x4c7c0f75
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 0xc
push 0x3c9
push 0x4c785228
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
push 0x35d
jmp 0x4c7c079d