Function at 0x402c50
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 0x402e9a
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetACP
cmp eax, 0x3b6
jne 0x402e74
call fcn.00402890
test al, al
je 0x402e74
mov byte [0x42803c], 0
push 0x402ea8
call sub.kernel32.dll_LoadLibraryA
mov dword [0x428048], eax
cmp dword [0x428048], 0
jne 0x402d77
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 0x402d01
lea eax, [ebp - 4]
mov edx, 0x402ec0
call sub.Vcl50.bpl__System__LStrCat_qqrv
lea eax, [ebp - 0x110]
mov ecx, 0x402ecc
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 0x402d68
push 0
lea eax, [ebp - 0x114]
mov ecx, 0x402ecc
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, 0x402ee4
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 0x402ea8
call sub.kernel32.dll_LoadLibraryA
mov dword [0x428048], eax
push 0x402ef4
mov eax, dword [0x428048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x428050], eax
push 0x402f08
mov eax, dword [0x428048]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x428054], eax
cmp dword [0x428050], 0
je 0x402db3
cmp dword [0x428054], 0
jne 0x402dc9
mov ecx, 0x402f24
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 0x402f70
call sub.kernel32.dll_LoadLibraryA
mov dword [0x428044], eax
push 0x402ef4
mov eax, dword [0x428044]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x42804c], eax
lea ecx, [ebp - 0x124]
mov edx, 0x402ae8
mov eax, dword [0x42804c]
call fcn.00402784
mov eax, dword [ebp - 0x124]
mov dword [0x428058], eax
mov eax, dword [ebp - 0x120]
mov dword [0x42805c], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x428060], eax
push 0x402f08
mov eax, dword [0x428044]
push eax
call sub.kernel32.dll_GetProcAddress
mov dword [0x42804c], eax
lea ecx, [ebp - 0x124]
mov edx, 0x402994
mov eax, dword [0x42804c]
call fcn.00402784
mov eax, dword [ebp - 0x124]
mov dword [0x428064], eax
mov eax, dword [ebp - 0x120]
mov dword [0x428068], eax
mov eax, dword [ebp - 0x11c]
mov dword [0x42806c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402ea1
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