Function at 0x4022c0
Capabilities:
Check if file exists
Copy file
Get common file path

Disassembly:
sub esp, 0x618
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], bp
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
lea eax, [esp + 0x14]
push 0x23
push eax
push ebp
call esi
lea ecx, [esp + 0x10]
push str.ArcSoftConnect_bk
push ecx
call fcn.004074df
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 8
lea edx, [esp + 0x10]
push edx
call ebx
test eax, eax
je 0x402782
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x422]
mov word [esp + 0x420], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
lea eax, [esp + 0x424]
push 0x2b
push eax
push ebp
call esi
lea ecx, [esp + 0x420]
push str.ArcSoft
push ecx
call fcn.004074df
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x222]
mov word [esp + 0x220], bp
add esp, 8
lea edx, [esp + 0x218]
rep stosd dword es:[edi], eax
push ebp
push 0x2b
push edx
push ebp
stosw word es:[edi], ax
call esi
lea eax, [esp + 0x218]
push str.ArcSoftBinArcCon.dll
push eax
call fcn.004074df
add esp, 8
lea ecx, [esp + 0x218]
push ecx
call ebx
test eax, eax
jne 0x402411
lea edx, [esp + 0x10]
push str.Bin
push edx
call fcn.004074df
lea eax, [esp + 0x428]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00401fc0
lea edx, [esp + 0x20]
push 0x5c
push edx
call fcn.0040752e
mov word [eax], bp
lea eax, [esp + 0x28]
push str.Connection_ServiceBin
push eax
call fcn.004074df
lea ecx, [esp + 0x440]
push str.Connection_Service
push ecx
call fcn.004074df
lea edx, [esp + 0x448]
lea eax, [esp + 0x38]
push edx
push eax
call fcn.00401fc0
add esp, 0x30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [esp + 0x218]
push ecx
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x218]
push str.ArcAD.dll
push edx
call edi
lea eax, [esp + 0x218]
push eax
call ebx
test eax, eax
jne 0x4024b5
lea ecx, [esp + 0x10]
push str.Bin
push ecx
call fcn.004074df
lea edx, [esp + 0x428]
lea eax, [esp + 0x18]
push edx
push eax
call fcn.00401fc0
lea ecx, [esp + 0x20]
push 0x5c
push ecx
call fcn.0040752e
lea edx, [esp + 0x28]
push str.Connection_ServiceBin
push edx
mov word [eax], bp
call fcn.004074df
lea eax, [esp + 0x440]
push str.Connection_Service
push eax
call fcn.004074df
lea ecx, [esp + 0x448]
lea edx, [esp + 0x38]
push ecx
push edx
call fcn.00401fc0
add esp, 0x30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret
lea eax, [esp + 0x10]
push str.BinMagCore.dll
push eax
call fcn.004074df
add esp, 8
lea ecx, [esp + 0x218]
push ecx
call esi
lea edx, [esp + 0x218]
push str.MagCore.dll
push edx
call edi
lea eax, [esp + 0x218]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402505
lea ecx, [esp + 0x218]
push 0
lea edx, [esp + 0x14]
push ecx
push edx
call ebp
lea eax, [esp + 0x218]
push eax
call esi
lea ecx, [esp + 0x218]
push str.MagicFrame.dll
push ecx
call edi
lea edx, [esp + 0x218]
push edx
call ebx
test eax, eax
jne 0x402550
lea eax, [esp + 0x10]
push eax
call esi
lea ecx, [esp + 0x10]
push str.MagicFrame.dll
push ecx
call edi
lea edx, [esp + 0x218]
push 0
lea eax, [esp + 0x14]
push edx
push eax
call ebp
lea ecx, [esp + 0x218]
push ecx
call esi
lea edx, [esp + 0x218]
push str.MagPCMac.dll
push edx
call edi
lea eax, [esp + 0x218]
push eax
call ebx
test eax, eax
jne 0x40259b
lea ecx, [esp + 0x10]
push ecx
call esi
lea edx, [esp + 0x10]
push str.MagPCMac.dll
push edx
call edi
lea eax, [esp + 0x218]
push 0
lea ecx, [esp + 0x14]
push eax
push ecx
call ebp
lea edx, [esp + 0x218]
push edx
call esi
lea eax, [esp + 0x218]
push str.magPltfm.dll
push eax
call edi
lea ecx, [esp + 0x218]
push ecx
call ebx
test eax, eax
jne 0x4025e6
lea edx, [esp + 0x10]
push edx
call esi
lea eax, [esp + 0x10]
push str.magPltfm.dll
push eax
call edi
lea ecx, [esp + 0x218]
push 0
lea edx, [esp + 0x14]
push ecx
push edx
call ebp
lea eax, [esp + 0x218]
push eax
call esi
lea ecx, [esp + 0x218]
push str.MagUICommon.dll
push ecx
call edi
lea edx, [esp + 0x218]
push edx
call ebx
test eax, eax
jne 0x402631
lea eax, [esp + 0x10]
push eax
call esi
lea ecx, [esp + 0x10]
push str.MagUICommon.dll
push ecx
call edi
lea edx, [esp + 0x218]
push 0
lea eax, [esp + 0x14]
push edx
push eax
call ebp
lea ecx, [esp + 0x218]
push ecx
call esi
lea edx, [esp + 0x218]
push str.MagUICommonET.dll
push edx
call edi
lea eax, [esp + 0x218]
push eax
call ebx
test eax, eax
jne 0x40267c
lea ecx, [esp + 0x10]
push ecx
call esi
lea edx, [esp + 0x10]
push str.MagUICommonET.dll
push edx
call edi
lea eax, [esp + 0x218]
push 0
lea ecx, [esp + 0x14]
push eax
push ecx
call ebp
lea edx, [esp + 0x218]
push edx
call esi
lea eax, [esp + 0x218]
push str.MagUIEngine.dll
push eax
call edi
lea ecx, [esp + 0x218]
push ecx
call ebx
test eax, eax
jne 0x4026c7
lea edx, [esp + 0x10]
push edx
call esi
lea eax, [esp + 0x10]
push str.MagUIEngine.dll
push eax
call edi
lea ecx, [esp + 0x218]
push 0
lea edx, [esp + 0x14]
push ecx
push edx
call ebp
lea eax, [esp + 0x218]
push eax
call esi
lea ecx, [esp + 0x218]
push str.MagUIImage.dll
push ecx
call edi
lea edx, [esp + 0x218]
push edx
call ebx
test eax, eax
jne 0x402712
lea eax, [esp + 0x10]
push eax
call esi
lea ecx, [esp + 0x10]
push str.MagUIImage.dll
push ecx
call edi
lea edx, [esp + 0x218]
push 0
lea eax, [esp + 0x14]
push edx
push eax
call ebp
lea ecx, [esp + 0x218]
push ecx
call esi
lea edx, [esp + 0x218]
push str.MagUIInter.dll
push edx
call edi
lea eax, [esp + 0x218]
push eax
call ebx
test eax, eax
jne 0x40275d
lea ecx, [esp + 0x10]
push ecx
call esi
lea edx, [esp + 0x10]
push str.MagUIInter.dll
push edx
call edi
lea eax, [esp + 0x218]
push 0
lea ecx, [esp + 0x14]
push eax
push ecx
call ebp
lea edx, [esp + 0x10]
push edx
call esi
lea eax, [esp + 0x10]
push 0x5c
push eax
call fcn.0040752e
lea ecx, [esp + 0x18]
mov word [eax], 0
push ecx
call fcn.00401de0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret