Function at 0x40205c
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 0x4022a6
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetACP
cmp eax, 0x3b6
jne 0x402280
call fcn.00401c08
test al, al
je 0x402280
mov byte [0x423040], 0
push 0x4022b4
call sub.kernel32.dll_LoadLibraryA
mov dword [0x42304c], eax
cmp dword [0x42304c], 0
jne 0x402183
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 0x40210d
lea eax, [ebp - 4]
mov edx, 0x4022cc
call sub.Vcl50.bpl__System__LStrCat_qqrv
lea eax, [ebp - 0x110]
mov ecx, 0x4022d8
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 0x402174
push 0
lea eax, [ebp - 0x114]
mov ecx, 0x4022d8
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, 0x4022f0
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 0x4022b4
call sub.kernel32.dll_LoadLibraryA
mov dword [0x42304c], eax
push 0x402300
mov eax, dword [0x42304c]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x423054], eax
push 0x402314
mov eax, dword [0x42304c]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x423058], eax
cmp dword [0x423054], 0
je 0x4021bf
cmp dword [0x423058], 0
jne 0x4021d5
mov ecx, 0x402330
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 0x40237c
call sub.kernel32.dll_LoadLibraryA
mov dword [0x423048], eax
push 0x402300
mov eax, dword [0x423048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x423050], eax
lea ecx, [ebp - 0x124]
mov edx, 0x401eb8
mov eax, dword [0x423050]
call fcn.00401ac0
mov eax, dword [ebp - 0x124]
mov dword [0x42305c], eax
mov eax, dword [ebp - 0x120]
mov dword [0x423060], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x423064], eax
push 0x402314
mov eax, dword [0x423048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x423050], eax
lea ecx, [ebp - 0x124]
mov edx, 0x401d0c
mov eax, dword [0x423050]
call fcn.00401ac0
mov eax, dword [ebp - 0x124]
mov dword [0x423068], eax
mov eax, dword [ebp - 0x120]
mov dword [0x42306c], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x423070], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4022ad
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