Function at 0x1064e2f
Capabilities:
Copy file
Delete file
Read file on windows
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x1251b5c]
xor eax, dword [ebp + 4]
push ebx
push esi
push edi
xor ebx, ebx
push 0xa
mov dword [ebp - 4], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x50]
mov dword [ebp - 0x54], ebx
rep stosd dword es:[edi], eax
mov edi, 0x1000
push edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], ebx
mov byte [0x125176c], bl
call dword [sym.imp.msvcrt.dll_malloc]
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
je 0x1065200
mov eax, dword [0x1252da4]
cmp eax, ebx
je 0x1064e8c
mov esi, eax
jmp 0x1064eb1
cmp byte [0x125176c], bl
mov esi, 0x10024d2
jne 0x1064eb1
push 0x1005618
push 0x1011018
call fcn.010642c8
pop ecx
pop ecx
mov byte [0x125176c], 1
lea eax, [ebp - 0x158]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.imagehlp.dll_FindExecutableImage]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x1064efa
cmp byte [0x125178c], bl
je 0x1064ee8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push 0x1010fe4
call fcn.010642c8
add esp, 0xc
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01064de7
jmp 0x1065200
push ebx
lea ecx, [ebp - 0x14]
push ecx
push edi
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10651e3
push dword [ebp - 0xc]
call dword [sym.imp.imagehlp.dll_ImageNtHeader]
mov esi, eax
cmp esi, ebx
je 0x10651e3
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x1064f48
cmp dword [esi + 8], eax
je 0x1064f48
lea eax, [ebp - 0x158]
push eax
push 0x1010fb0
call fcn.010642c8
pop ecx
pop ecx
push 2
jmp 0x1064fb0
cmp dword [ebp + 0x10], ebx
je 0x1064fc5
mov edi, dword [sym.imp.msvcrt.dll__strcmpi]
push 0x100dfe8
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x1064fc0
push 0x100dff4
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x1064fc0
push 0x100d2b4
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x1064fc0
push 0x100e000
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x1064fc0
mov eax, dword [ebp + 0x10]
cmp dword [esi + 0x58], eax
je 0x1064fc0
lea eax, [ebp - 0x158]
push eax
push 0x1010f80
call fcn.010642c8
pop ecx
pop ecx
push 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01064de7
jmp 0x10651e3
mov edi, 0x1000
mov eax, dword [esi + 0x50]
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
mov eax, dword [esi + 0x34]
cmp eax, ecx
je 0x1065124
cmp dword [esi + 0xa4], ebx
je 0x1065124
cmp byte [0x125178c], bl
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x1c], ecx
je 0x106500b
push ecx
push eax
push dword [ebp + 8]
push 0x1010f4c
call fcn.010642c8
add esp, 0x10
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1010f40
push 0x1010f3c
call dword [sym.imp.msvcrt.dll__tempnam]
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x1065200
push 1
mov esi, eax
push esi
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x106505d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x158]
push eax
push 0x1010f0c
jmp 0x1065093
push ebx
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push 1
push 1
push 0x1010ef8
push esi
call fcn.0106ec62
test eax, eax
jne 0x10650a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push esi
push 0x1010ec4
call fcn.010642c8
add esp, 0x10
jmp 0x10651f2
mov eax, dword [ebp + 0x10]
push ebx
push ebx
push 3
push ebx
push 3
push 0xc0000000
push esi
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x10651f2
push ebx
lea ecx, [ebp - 0x14]
push ecx
push edi
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10651e3
push dword [ebp - 0xc]
call dword [sym.imp.imagehlp.dll_ImageNtHeader]
cmp eax, ebx
je 0x10651e3
push ebx
push ebx
push ebx
push dword [ebp - 8]
mov dword [eax + 0x34], 0x33330000
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10651e3
push ebx
lea eax, [ebp - 0x20]
push eax
push edi
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10651e3
push ebx
push ebx
push ebx
push 0x1000002
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
cmp esi, ebx
jne 0x1065159
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x158]
push eax
push 0x1010e94
call fcn.010642c8
add esp, 0xc
jmp 0x10651d8
push ebx
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
jne 0x1065184
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push 0x1010e5c
call fcn.010642c8
add esp, 0xc
jmp 0x10651cd
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], ebx
mov byte [ebp - 0x2c], bl
call fcn.01064d0d
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x1065200
push dword [ebp + 8]
push 0x1010e24
call fcn.010642c8
pop ecx
pop ecx
cmp edi, ebx
je 0x10651d8
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp esi, ebx
je 0x10651e3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0xffffffff
je 0x10651f2
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
je 0x1065200
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0xc]
call esi
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.0105b9a4
leave
ret 0x10