Function at 0x4050c4
Capabilities:
Check if file exists
Read .ini file
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5566f8
mov eax, dword fs:[0]
push eax
mov eax, 0x1010
call fcn.005307a0
mov eax, dword [0x5b3db0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ebx, edx
push ebx
push 0
mov edi, ecx
push str.DocSource
push str.General
mov dword [ebp - 0x101c], edi
mov byte [edi + 0x40], 0
call esi
push ebx
push 0
push str.DocSize
push str.General
mov dword [edi + 0x2c], eax
call esi
push ebx
push 0
push str.ImageType
push str.General
mov dword [edi + 0x34], eax
call esi
push ebx
push 0
push str.QualityIndex
push str.General
mov dword [edi + 0x38], eax
call esi
push ebx
push 0xc8
push str.Resolution
push str.General
mov dword [edi + 0x24], eax
call esi
push ebx
push 0
push str.Orientation
push str.General
mov dword [edi + 0x28], eax
call esi
fld qword [0x58c408]
push ecx
push ecx
fstp qword [esp]
push str.Width
mov ecx, ebx
mov dword [edi + 0x30], eax
call fcn.00404f4b
fstp qword [edi + 8]
fld qword [0x58c400]
mov ecx, ebx
fstp qword [esp + 4]
mov dword [esp], str.Height
call fcn.00404f4b
fstp qword [edi + 0x10]
add esp, 0xc
push ebx
push 0x80
push str.BWThreshold
push str.General
call esi
push ebx
push 0
push str.Contrast
push str.General
mov dword [edi + 0x20], eax
call esi
push ebx
push 0
push str.Brightness
push str.General
mov dword [edi + 0x1c], eax
call esi
push ebx
push 0
push str.InputOrientation
push str.General
mov dword [edi + 0x18], eax
call esi
mov dword [edi + 0x48], eax
push ebx
push 0
push str.ShowUI
push str.General
call esi
push ebx
push 0
test eax, eax
push str.ShowConfirmation
setne al
push str.General
mov byte [edi + 0x40], al
call esi
push ebx
push 0
test eax, eax
push str.AutoFeedMode
setne al
push str.General
mov byte [edi + 0x4d], al
call esi
push ebx
push 0
test eax, eax
push str.UsePassportCarrierSheet
setne al
push str.General
mov byte [edi + 0x4e], al
call esi
push ebx
push 0
test eax, eax
push str.ContinueAutoFeedMode
setne al
push str.General
mov byte [edi + 0x50], al
call esi
push ebx
push 0
test eax, eax
push 0x5885a8
setne al
push str.Advanced
mov byte [edi + 0x4f], al
call esi
push ebx
push 0
test eax, eax
push str.Descreen
setne al
push str.Advanced
mov byte [edi + 0x41], al
call esi
push ebx
push 0
test eax, eax
push str.UnsharpMask
setne al
push str.Advanced
mov byte [edi + 0x43], al
call esi
push ebx
push 0
test eax, eax
push str.RemovePunchHoles
setne al
push str.Advanced
mov byte [edi + 0x42], al
call esi
push ebx
push 0
test eax, eax
push str.CorrectDocumentSkew
setne al
push str.Advanced
mov byte [edi + 0x44], al
call esi
test eax, eax
setne al
push ebx
mov byte [edi + 0x45], al
push 0
push str.BlankPageSkip
push str.Advanced
call esi
push ebx
push 0
test eax, eax
push str.DoubleFeedDetection
setne al
push str.Advanced
mov byte [edi + 0x46], al
call esi
push ebx
push 0
test eax, eax
push str.IsEpsonScanStitching
setne al
push str.Advanced
mov byte [edi + 0x47], al
call esi
test eax, eax
push ebx
setne al
push 0x400
mov byte [edi + 0x4c], al
lea eax, [ebp - 0x1014]
push eax
push 0x587cac
push str.ExtProfilePath
push str.Advanced
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405365
lea eax, [ebp - 0x1014]
jmp 0x4053f6
push ebx
call fcn.0052ba99
pop ecx
push ebx
mov dword [ebp - 0x1018], eax
lea eax, [ebp - 0x814]
push 0x400
push eax
call fcn.0052c9d8
mov eax, dword [ebp - 0x1018]
add esp, 0xc
jmp 0x40539a
cmp word [ebp + eax*2 - 0x814], 0x5c
je 0x4053a1
dec eax
test eax, eax
jg 0x40538f
jmp 0x4053ab
xor ecx, ecx
mov word [ebp + eax*2 - 0x814], cx
push 0x5881b8
lea eax, [ebp - 0x814]
push 0x400
push eax
call fcn.0052cce3
add esp, 0xc
lea eax, [ebp - 0x1014]
push eax
lea eax, [ebp - 0x814]
push 0x400
push eax
call fcn.0052cce3
add esp, 0xc
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4053ff
lea eax, [ebp - 0x814]
push eax
lea ecx, [edi + 0x3c]
call fcn.00401d89
push ebx
push 0
push str.FileFormat
push str.Save
call esi
push ebx
push 0
push str.TargetFolderIndex
push str.Save
mov dword [edi + 0x54], eax
call esi
push ebx
push 1
push str.StartNum
push str.Save
mov dword [edi + 0x5c], eax
call esi
push ebx
push 3
push str.CounterDigitLength
push str.Save
mov dword [edi + 0x6c], eax
call esi
push ebx
push 1
push str.EnableTimeFormat
push str.Save
mov dword [edi + 0x70], eax
call esi
push ebx
push 2
test eax, eax
push str.TimeFormat
setne al
push str.Save
mov byte [edi + 0x78], al
call esi
push ebx
push 0
push str.SubFolderSetting
push str.Save
mov dword [edi + 0x64], eax
call esi
push ebx
push 1
push str.EnableSeparatorCounter
push str.Save
mov dword [edi + 0x68], eax
call esi
push ebx
push 3
test eax, eax
push str.SeparationCounterDigitLength
setne al
push str.Save
mov byte [edi + 0x79], al
call esi
push ebx
push 1
push str.EnableBarcodeCharacter
push str.Save
mov dword [edi + 0x74], eax
call esi
push dword [edi + 0x5c]
test eax, eax
setne al
mov byte [edi + 0x7a], al
lea edi, [ebp - 0x1018]
call fcn.00404fca
pop ecx
mov edi, dword [ebp - 0x101c]
and dword [ebp - 4], 0
lea ecx, [edi + 0x58]
push eax
call fcn.00401ee1
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1018]
add ecx, 0xfffffff0
call fcn.004021a7
push ebx
push 0x400
lea eax, [ebp - 0x1014]
push eax
push 0x5883b4
push str.Prefix
push str.Save
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1014]
push eax
lea ecx, [edi + 0x60]
call fcn.00401d89
mov eax, dword [ebp + 8]
test eax, eax
jg 0x405540
push ebx
push 0x2bc
push str.ProjectID
push str.General
call esi
mov dword [edi + 0x80], eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052b424
leave
ret 4