Function at 0x1004e97
Capabilities:
Copy file
Delete file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], ebx
cmp dword [ebp + 8], ebx
je 0x1004fcd
cmp esi, ebx
je 0x1004fcd
lea eax, [ebp - 0x68]
push eax
push 4
call fcn.01002865
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x68]
push eax
push 0x1005000
push esi
push dword [ebp + 8]
call fcn.01004b6f
test eax, eax
je 0x100678a
cmp dword [ebp - 0x70], 1
je 0x10067a6
lea eax, [ebp - 0x68]
push eax
call fcn.0100138a
test eax, eax
je 0x10067b2
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0xc]
or eax, 0x20000
push eax
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp esi, ebx
jne 0x1004f90
push 2
push 0x1004fdc
push dword [ebp - 0x30]
call fcn.01004cac
mov esi, eax
cmp esi, ebx
jne 0x1004f87
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSaveKeyExW]
push 4
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x6c]
call edi
mov esi, eax
cmp esi, 0x57
jne 0x1004f71
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyW]
mov esi, eax
cmp esi, 0xb7
je 0x10067c0
cmp esi, 0x57
je 0x1006872
pop edi
lea eax, [ebp - 0x6c]
push eax
call fcn.01001324
push esi
call fcn.01003151
cmp esi, ebx
jne 0x100687a
push 0x20000
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x20
push eax
call fcn.010030dc
lea eax, [ebp - 0x68]
push eax
call fcn.0100307d
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.01002af3
leave
ret 8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100689c
push 0x20000
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x40
push eax
call fcn.010030dc
xor ebx, ebx
inc ebx
jmp 0x1004fb2
push 4
call fcn.01008449
jmp 0x1004fb2
push 0xffffffffffffffff
call fcn.01003151
push 0x20001
jmp 0x100678f
push ebx
push 0xcf
call fcn.0100339e
push 1
push 0xce
mov esi, eax
call fcn.0100339e
mov dword [ebp - 0x70], eax
push dword [ebp - 0x58]
push dword [ebp - 0x70]
push dword [ebp - 0x24]
push esi
call fcn.010034ce
cmp eax, 2
jg 0x10067dc
cmp eax, 1
je 0x10067ff
mov esi, 0x4c7
jmp 0x1004f86
mov eax, dword [ebp - 0x24]
push eax
mov dword [ebp - 0x20], eax
call fcn.0100852a
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x100681f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1004f7d
push 4
push ebx
push eax
push dword [ebp - 0x6c]
call edi
mov esi, eax
cmp esi, 0x57
jne 0x1006847
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyW]
mov esi, eax
cmp esi, ebx
jne 0x1006864
push ebx
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1006864
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1004f7d
add esi, 0x77
jmp 0x1004f86
cmp esi, 0x4c7
je 0x1004f9e
xor ebx, ebx
push 0x20001
inc ebx
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x40
jmp 0x1004fac
call dword [sym.imp.msvcrt.dll___iob_func]
add eax, 0x40
push eax
call fcn.0100d7cd
xor eax, eax
inc eax
jmp 0x1004fbd