Function at 0x57f330
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a263b
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x606040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 0
call fcn.0040a74d
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x57f38e
push 0x80004005
call fcn.00401e70
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 1
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x57f3c1
push 0x104
lea ecx, [ebp - 0x2c]
call fcn.00402400
mov esi, dword [ebp - 0x2c]
push 0x104
push esi
push str._APPDATA_CanonIJ_Scan_UtilityPDFEditor
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esi - 8]
push esi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x57fc77
cmp eax, dword [esi - 8]
jg 0x57fc77
xor ecx, ecx
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], cx
mov edi, esp
lea eax, [esi - 0x10]
push eax
mov dword [ebp - 0x54], eax
call fcn.004039f0
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.0058e9e0
add esp, 4
lea eax, [esi - 0x10]
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x57f451
push 0x104
lea ecx, [ebp - 0x30]
call fcn.00402400
mov edi, dword [ebp - 0x30]
push str.PDFED.DAT
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [ebp + 8], 0
jne 0x57f483
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x57f483
push 0x5fd754
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0x158
push eax
call fcn.00539115
push str.CanonIJPDFEditorUserSetting
push esi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.SUCMLIB.dll_Ordinal_83]
test eax, eax
je 0x57f4a8
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push 0x5fd720
push eax
call fcn.00539115
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x57f4ce
mov eax, dword [ecx]
push 0x4e20
call dword [eax + 0xc]
test eax, eax
je 0x57f4ce
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push 0x5fd720
push eax
call fcn.00539115
push 0xc
call fcn.0040a3f9
mov esi, eax
add esp, 4
mov dword [ebp - 0x4c], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x57f512
push esi
mov dword [esi], 0
mov dword [esi + 4], 0
mov byte [esi + 8], 0
call dword [sym.imp.SUCMLIB.dll_Ordinal_68]
test eax, eax
je 0x57f514
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push 0x5fd720
push eax
call fcn.00539115
xor esi, esi
mov byte [ebp - 4], 2
cmp dword [ebp + 8], 1
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
jne 0x57f8f9
push edi
mov dword [esi + 4], 1
call dword [sym.imp.SUCMLIB.dll_Ordinal_41]
test eax, eax
je 0x57f564
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x44]
push 0x5fd720
push eax
call fcn.00539115
mov ecx, dword [esi]
test ecx, ecx
je 0x57f58b
mov eax, dword [ecx]
push 0
push edi
call dword [eax + 4]
test eax, eax
je 0x57f587
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push 0x5fd720
push eax
call fcn.00539115
mov byte [esi + 8], 1
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f5a3
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 1
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f5b6
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 1
call fcn.004080c0
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.00408000
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov eax, dword [eax]
lea ecx, [edx + 0xc]
mov eax, dword [eax - 0xc]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x18], eax
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x57f5ed
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040a42b
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], eax
mov ecx, ebx
lea eax, [ebp - 0x4c]
push eax
call fcn.00408000
push dword [eax]
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.005363c5
mov edx, dword [ebp - 0x4c]
add esp, 0xc
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x57f647
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi + 4], 1
jne 0x57f662
push dword [ebp - 0x18]
mov ecx, dword [esi]
mov edx, 3
push dword [ebp + 8]
call fcn.00580090
add esp, 8
cmp dword [esi + 4], 0
jne 0x57f684
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
mov edx, 3
push eax
call fcn.00580120
mov eax, dword [ebp - 0x1c]
add esp, 8
jmp 0x57f687
mov eax, dword [ebp + 8]
push eax
call fcn.0040a426
add esp, 4
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebx + 0x10]
call fcn.00407640
mov edx, dword [ebp + 8]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov eax, dword [eax]
mov eax, dword [eax - 0xc]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x18], eax
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x57f6c8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040a42b
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], eax
lea ecx, [ebx + 0x10]
lea eax, [ebp - 0x4c]
push eax
call fcn.00407640
push dword [eax]
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.005363c5
mov edx, dword [ebp - 0x4c]
add esp, 0xc
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x57f723
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi + 4], 1
jne 0x57f73e
push dword [ebp - 0x18]
mov ecx, dword [esi]
mov edx, 0x10001
push dword [ebp + 8]
call fcn.00580090
add esp, 8
cmp dword [esi + 4], 0
jne 0x57f760
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
mov edx, 0x10001
push eax
call fcn.00580120
mov eax, dword [ebp - 0x1c]
add esp, 8
jmp 0x57f763
mov eax, dword [ebp + 8]
push eax
call fcn.0040a426
mov eax, dword [ebx + 0x14]
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f788
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10002
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f79e
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10002
call fcn.004080c0
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f7ba
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10003
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f7d0
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10003
call fcn.004080c0
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f7ec
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10004
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f802
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10004
call fcn.004080c0
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f81e
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10005
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f834
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10005
call fcn.004080c0
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f850
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10006
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f866
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10006
call fcn.004080c0
mov eax, dword [ebx + 8]
mov dword [ebp - 0x20], eax
cmp dword [esi + 4], 1
jne 0x57f87f
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 2
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f892
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 2
call fcn.004080c0
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f8ae
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10100
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f8c4
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10100
call fcn.004080c0
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x14], eax
cmp dword [esi + 4], 1
jne 0x57f8dd
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 4
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fbdf
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 4
call fcn.004080c0
jmp 0x57fbdf
mov ecx, dword [esi]
mov dword [esi + 4], 0
test ecx, ecx
je 0x57f927
mov eax, dword [ecx]
push 1
push edi
call dword [eax + 4]
test eax, eax
je 0x57f923
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push 0x5fd720
push eax
call fcn.00539115
mov byte [esi + 8], 1
cmp dword [esi + 4], 1
jne 0x57f93a
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 1
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57f94d
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 1
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx], eax
cmp dword [esi + 4], 1
jne 0x57f96b
mov ecx, dword [esi]
mov edx, 3
push 0
push 0
call fcn.00580090
add esp, 8
cmp dword [esi + 4], 0
jne 0x57f988
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
mov edx, 3
push eax
call fcn.00580120
add esp, 8
push dword [ebp - 0x1c]
lea ecx, [ebp + 8]
call fcn.00402cd0
lea eax, [ebp + 8]
mov byte [ebp - 4], 4
lea ecx, [ebx + 4]
push eax
call fcn.00403360
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x57f9c4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x57f9d9
push eax
call fcn.00535994
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp dword [esi + 4], 1
jne 0x57f9f2
push dword [ebp - 0x18]
mov ecx, dword [esi]
mov edx, 0x10001
push eax
call fcn.00580090
add esp, 8
cmp dword [esi + 4], 0
jne 0x57fa0f
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
mov edx, 0x10001
push eax
call fcn.00580120
add esp, 8
push dword [ebp - 0x1c]
lea ecx, [ebp + 8]
call fcn.00402cd0
lea eax, [ebp + 8]
mov byte [ebp - 4], 5
lea ecx, [ebx + 0x10]
push eax
call fcn.00403360
mov byte [ebp - 4], 2
or ecx, 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x57fa4b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x57fa5b
push eax
call fcn.00535994
add esp, 4
cmp dword [esi + 4], 1
jne 0x57fa71
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10002
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fa87
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10002
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x14], eax
cmp dword [esi + 4], 1
jne 0x57faa3
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10003
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fab9
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10003
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x18], eax
cmp dword [esi + 4], 1
jne 0x57fad5
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10004
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57faeb
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10004
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x1c], eax
cmp dword [esi + 4], 1
jne 0x57fb07
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10005
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fb1d
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10005
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x20], eax
cmp dword [esi + 4], 1
jne 0x57fb39
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10006
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fb4f
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10006
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x24], eax
cmp dword [esi + 4], 1
jne 0x57fb68
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 2
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fb7b
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 2
call fcn.004080c0
mov eax, dword [ebp - 0x20]
mov dword [ebx + 8], eax
cmp dword [esi + 4], 1
jne 0x57fb97
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10100
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fbad
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
push 0x10100
call fcn.004080c0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x28], eax
cmp dword [esi + 4], 1
jne 0x57fbc6
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 4
call fcn.00408030
cmp dword [esi + 4], 0
jne 0x57fbd9
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push 4
call fcn.004080c0
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0xc], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x57fbf4
cmp byte [esi + 8], 0
je 0x57fbf4
mov eax, dword [ecx]
call dword [eax + 8]
mov byte [esi + 8], 0
mov ecx, esi
call fcn.0057ffd0
push esi
call fcn.0040a426
mov ecx, dword [ebp - 0x24]
add esp, 4
mov dword [ebp - 0x28], 0
test ecx, ecx
je 0x57fc28
mov eax, dword [ecx]
call dword [eax + 0x10]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.SUCMLIB.dll_Ordinal_84]
mov dword [ebp - 0x24], 0
add edi, 0xfffffff0
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x57fc48
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x54]
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x57fc63
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00401e70
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x57fc9f
mov ecx, esi
call fcn.0057ff40
mov ecx, esi
call fcn.0057ffd0
push esi
call fcn.0040a426
add esp, 4
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x57fcb5
mov eax, dword [ecx]
call dword [eax + 0x10]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.SUCMLIB.dll_Ordinal_84]
mov eax, 0x57fc63
ret