Function at 0x401efc
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
xor eax, eax
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x110], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x402146
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetACP
cmp eax, 0x3b6
jne 0x402120
call fcn.00401b3c
test al, al
je 0x402120
mov byte [0x40b040], 0
push 0x402154
call sub.kernel32.dll_LoadLibraryA
mov dword [0x40b04c], eax
cmp dword [0x40b04c], 0
jne 0x402023
push 0x104
lea eax, [ebp - 0x109]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
lea eax, [ebp - 4]
lea edx, [ebp - 0x109]
mov ecx, 0x105
call sub.Vcl50.bpl__System__LStrFromArray_qqrr17System_AnsiStringpci
mov eax, dword [ebp - 4]
call sub.Vcl50.bpl__System__LStrLen_qqrv
mov edx, dword [ebp - 4]
cmp byte [edx + eax - 1], 0x5c
je 0x401fad
lea eax, [ebp - 4]
mov edx, 0x40216c
call sub.Vcl50.bpl__System__LStrCat_qqrv
lea eax, [ebp - 0x110]
mov ecx, 0x402178
mov edx, dword [ebp - 4]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x110]
call sub.Vcl50.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x402014
push 0
lea eax, [ebp - 0x114]
mov ecx, 0x402178
mov edx, dword [ebp - 4]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x114]
call sub.Vcl50.bpl__System__LStrToPChar_qqrv
push eax
lea eax, [ebp - 0x118]
mov ecx, 0x402190
mov edx, dword [ebp - 4]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x118]
call sub.Vcl50.bpl__System__LStrToPChar_qqrv
push eax
call sub.kernel32.dll_CopyFileA
push 0x402154
call sub.kernel32.dll_LoadLibraryA
mov dword [0x40b04c], eax
push 0x4021a0
mov eax, dword [0x40b04c]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x40b054], eax
push 0x4021b4
mov eax, dword [0x40b04c]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x40b058], eax
cmp dword [0x40b054], 0
je 0x40205f
cmp dword [0x40b058], 0
jne 0x402075
mov ecx, 0x4021d0
mov dl, 1
mov eax, dword [sym.imp.Vcl50.bpl__Sysutils_Exception_]
call sub.Vcl50.bpl__Sysutils_Exception__bctr_qqrx17System_AnsiString
call sub.Vcl50.bpl__System__RaiseExcept_qqrv
push 0x40221c
call sub.kernel32.dll_LoadLibraryA
mov dword [0x40b048], eax
push 0x4021a0
mov eax, dword [0x40b048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x40b050], eax
lea ecx, [ebp - 0x124]
mov edx, 0x401d94
mov eax, dword [0x40b050]
call fcn.00401a30
mov eax, dword [ebp - 0x124]
mov dword [0x40b05c], eax
mov eax, dword [ebp - 0x120]
mov dword [0x40b060], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x40b064], eax
push 0x4021b4
mov eax, dword [0x40b048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x40b050], eax
lea ecx, [ebp - 0x124]
mov edx, 0x401c40
mov eax, dword [0x40b050]
call fcn.00401a30
mov eax, dword [ebp - 0x124]
mov dword [0x40b068], eax
mov eax, dword [ebp - 0x120]
mov dword [0x40b06c], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x40b070], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40214d
lea eax, [ebp - 0x118]
mov edx, 3
call sub.Vcl50.bpl__System__LStrArrayClr_qqrv
lea eax, [ebp - 4]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
ret