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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff920
mov eax, 0x587140
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
call fcn.0054c16c
mov word [ebp - 0x34], 8
xor edx, edx
xor ecx, ecx
mov dword [ebp - 4], edx
lea eax, [ebp - 0x6e0]
inc dword [ebp - 0x28]
mov word [ebp - 0x34], 0x14
mov word [ebp - 0x34], 0x20
mov dword [ebp - 8], ecx
inc dword [ebp - 0x28]
mov word [ebp - 0x34], 0x14
push 0x3ff
push eax
call sub.KERNEL32.DLL_GetWindowsDirectoryA
mov word [ebp - 0x34], 0x2c
mov edx, 0x580017
lea eax, [ebp - 0x10]
call fcn.00559dd8
inc dword [ebp - 0x28]
lea edx, [ebp - 0x10]
push edx
lea edx, [ebp - 0x6e0]
lea eax, [ebp - 0xc]
call fcn.00559dd8
inc dword [ebp - 0x28]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x14]
inc dword [ebp - 0x28]
pop edx
call fcn.0055a0e0
lea edx, [ebp - 0x14]
lea eax, [ebp - 4]
call fcn.0055a0b8
dec dword [ebp - 0x28]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0055a088
mov word [ebp - 0x34], 0x38
mov edx, 0x580035
lea eax, [ebp - 0x1c]
call fcn.00559dd8
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x6e0]
lea eax, [ebp - 0x18]
call fcn.00559dd8
inc dword [ebp - 0x28]
xor ecx, ecx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
inc dword [ebp - 0x28]
pop edx
call fcn.0055a0e0
lea edx, [ebp - 0x20]
lea eax, [ebp - 8]
call fcn.0055a0b8
dec dword [ebp - 0x28]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.0055a088
mov eax, dword [ebp - 4]
call fcn.005426c0
test al, al
jne 0x4be21e
mov eax, dword [ebp - 8]
call fcn.005426c0
cmp al, 1
jne 0x4be1eb
push 0
cmp dword [ebp - 4], 0
je 0x4be199
mov edx, dword [ebp - 4]
jmp 0x4be19e
mov edx, 0x58004b
push edx
cmp dword [ebp - 8], 0
je 0x4be1aa
mov eax, dword [ebp - 8]
jmp 0x4be1af
mov eax, 0x58004a
push eax
call sub.KERNEL32.DLL_CopyFileA
mov eax, 0xfffffffe
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
push 0x18
push 0
lea ecx, [ebp - 0xb0]
push ecx
call fcn.0054bd38
add esp, 0xc
push 0
push 0
push 1
push 0
push 0
push 0
push 0x58004c
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
test esi, esi
jne 0x4be280
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
push 0
lea ecx, [ebp - 0x48]
push ecx
push 0x18
lea eax, [ebp - 0xb0]
push eax
push 0
push 0
push 0x74080
push esi
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
jne 0x4be2db
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
test byte [ebp - 0xac], 1
jne 0x4be31d
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
xor ebx, ebx
push 0x20
push 0
lea eax, [ebp - 0xd0]
push eax
call fcn.0054bd38
add esp, 0xc
lea edx, [ebp - 0x2e0]
push 0x210
push 0
push edx
call fcn.0054bd38
add esp, 0xc
test bl, 1
je 0x4be356
mov byte [ebp - 0xc7], 0xb0
jmp 0x4be35d
mov byte [ebp - 0xc7], 0xa0
mov ecx, ebx
mov eax, 0x10
sar eax, cl
and eax, dword [ebp - 0xac]
jne 0x4be45b
mov byte [ebp - 0xc6], 0xec
mov byte [ebp - 0xc4], bl
lea edx, [ebp - 0x48]
mov byte [ebp - 0xcb], 1
mov byte [ebp - 0xca], 1
mov dword [ebp - 0xd0], pe_nt_image_headers32
push 0
push edx
lea ecx, [ebp - 0x2e0]
push 0x210
push ecx
lea eax, [ebp - 0xd0]
push 0x20
push eax
push 0x7c088
push esi
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
jne 0x4be3fa
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
lea eax, [ebp - 0x2d0]
push 0x14
add eax, 0x14
push eax
push edi
call fcn.0054bcc8
add esp, 0xc
mov byte [edi + 0x14], 0
push 0x14
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.0040d5f4
add esp, 0xc
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x4be499
inc ebx
cmp bl, 4
jb 0x4be31f
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 8]
dec dword [ebp - 0x28]
call fcn.0055a088
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0055a088
pop eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret