Function at 0x412870
Capabilities:
Copy file
Delete file
Get file attributes
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x85c
mov eax, dword [0x439190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
push esi
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x81c], ecx
mov dword [ebp - 0x844], edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4128e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
push esi
call fcn.00416140
add esp, 4
mov dword [ebp - 0x824], eax
cmp eax, ebx
je 0x412efa
cmp eax, 0xffffffff
je 0x412efa
push ebx
lea eax, [ebp - 0x818]
push eax
push 4
lea ecx, [ebp - 0xc]
push ecx
push edi
mov byte [ebp - 0xc], bl
mov dword [ebp - 0xb], ebx
mov dword [ebp - 0x818], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 4
cmp dword [ebp - 0x824], eax
jb 0x412963
cmp dword [ebp - 0x818], eax
je 0x412963
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0xc]
push 4
push edx
call fcn.00411900
add esp, 8
cmp eax, ebx
je 0x412997
push 2
lea eax, [ebp - 0xc]
push eax
push 0x42d61c
call fcn.0041a05d
add esp, 0xc
test eax, eax
jne 0x412a1f
mov edi, dword [ebp - 0x828]
push edi
push esi
call fcn.0041a267
add esp, 8
test eax, eax
je 0x412fd3
lea ecx, [ebp - 0x83c]
push ecx
lea edx, [ebp - 0x834]
push edx
push esi
mov dword [ebp - 0x834], ebx
mov dword [ebp - 0x830], ebx
mov dword [ebp - 0x83c], ebx
mov dword [ebp - 0x838], ebx
call fcn.00416190
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push edi
mov dword [ebp - 0x844], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x83c]
push eax
lea ecx, [ebp - 0x834]
push ecx
push edi
call fcn.004161e0
mov eax, dword [ebp - 0x844]
jmp 0x412fc3
mov ecx, dword [ebp - 0x81c]
cmp dword [ecx + 0xc], 0x64
lea eax, [ecx + 0xc]
mov dword [ebp - 0x830], eax
jb 0x412a73
cmp dword [0x43d820], ebx
jne 0x412a73
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp - 0x844]
push ebx
push ebx
push edx
push eax
call fcn.00411e00
add esp, 0x10
test eax, eax
jne 0x412a73
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x85c]
push ecx
lea edx, [ebp - 0x854]
push edx
push esi
mov dword [ebp - 0x854], ebx
mov dword [ebp - 0x850], ebx
mov dword [ebp - 0x85c], ebx
mov dword [ebp - 0x858], ebx
call fcn.00416190
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x800
mov dword [ebp - 0x838], eax
lea ecx, [ebp - 0x80e]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x810], ax
call fcn.00419b60
mov edi, dword [ebp - 0x828]
push edi
lea edx, [ebp - 0x810]
push str._s.igbak
push edx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x84c], ebx
call fcn.004025f0
lea eax, [ebp - 0x810]
push eax
call fcn.00416140
add esp, 0x1c
cmp eax, ebx
je 0x412b06
cmp eax, 0xffffffff
jne 0x412b2d
lea ecx, [ebp - 0x810]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea edx, [ebp - 0x810]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x840], eax
cmp eax, ebx
jne 0x412ba7
push edi
lea eax, [ebp - 0x810]
push str.__s.ig_
push eax
call fcn.004025f0
add esp, 0xc
mov dword [ebp - 0x84c], 1
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x814], eax
cmp eax, 0xffffffff
jne 0x412bce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [ebp - 0x840], ebx
je 0x412b8d
push ebx
push edi
lea edx, [ebp - 0x810]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
push edi
push esi
call fcn.0041a267
add esp, 8
test eax, eax
jne 0x412b4c
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
lea ecx, [ebp - 0x810]
push ecx
jmp 0x412b5d
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x810]
cmp dword [ebp - 0x84c], ebx
jne 0x412bea
mov eax, edi
push ebx
push 0x80
push 2
push ebx
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x412c4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x840], ebx
je 0x412c34
push ebx
push edi
lea ecx, [ebp - 0x810]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x81c]
push ebx
lea edx, [ebp - 0x82c]
push edx
push 0x400
push eax
push esi
mov dword [ebp - 0x82c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x82c], 0x400
je 0x412caf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x814]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov edi, eax
call ebx
push esi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x824]
mov dword [ebp - 0x81c], eax
cmp eax, 0x200000
jbe 0x412ccc
mov dword [ebp - 0x81c], 0x200000
push 0x200000
xor edi, edi
call fcn.0040dff0
add esp, 4
mov dword [ebp - 0x820], eax
cmp dword [ebp - 0x824], ebx
jbe 0x412da9
lea ecx, [ecx]
mov eax, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0x820]
push ebx
lea edx, [ebp - 0x818]
push edx
mov edx, dword [ebp - 0x814]
push eax
push ecx
push edx
mov dword [ebp - 0x818], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x412e66
mov ecx, dword [ebp - 0x818]
cmp ecx, dword [ebp - 0x81c]
je 0x412d3e
lea eax, [edi + ecx]
cmp eax, dword [ebp - 0x824]
jne 0x412e66
mov eax, dword [ebp - 0x820]
mov edx, dword [ebp - 0x830]
push edi
push eax
push ecx
mov ecx, dword [ebp - 0x844]
push eax
push ecx
push edx
call fcn.00411a70
mov ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x820]
add esp, 0x18
push ebx
lea eax, [ebp - 0x82c]
push eax
push ecx
push edx
push esi
mov dword [ebp - 0x82c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412e43
mov eax, dword [ebp - 0x818]
cmp dword [ebp - 0x82c], eax
jne 0x412e43
add edi, eax
cmp edi, dword [ebp - 0x824]
jb 0x412cf0
mov ecx, dword [ebp - 0x814]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
push esi
call edi
lea edx, [ebp - 0x820]
push edx
call fcn.0040e040
add esp, 4
mov esi, 1
cmp dword [ebp - 0x840], ebx
je 0x412ea9
push 0x80
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x810]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x828]
lea edx, [ebp - 0x85c]
push edx
lea eax, [ebp - 0x854]
push eax
push ecx
call fcn.004161e0
add esp, 0xc
mov eax, dword [ebp - 0x838]
cmp eax, 0xffffffff
je 0x412e30
mov edx, dword [ebp - 0x828]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
mov eax, dword [ebp - 0x814]
push eax
call ebx
push esi
call ebx
lea ecx, [ebp - 0x820]
push ecx
jmp 0x412e87
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x814]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov edi, eax
call ebx
push esi
call ebx
lea eax, [ebp - 0x820]
push eax
call fcn.0040e040
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x84c], ebx
je 0x412dfa
mov edi, esi
mov edx, dword [ebp - 0x828]
push 1
push edx
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
cmp esi, ebx
jne 0x412dfa
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jle 0x412eb7
lea ecx, [ebp - 0x810]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x412e17
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebp - 0x838], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x824]
cmp eax, 0xffffffff
jne 0x412f38
mov eax, dword [ebp - 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004180c9
mov esp, ebp
pop ebp
ret
cmp eax, ebx
jne 0x412fd3
mov edi, dword [ebp - 0x828]
push edi
push esi
call fcn.0041a267
add esp, 8
test eax, eax
je 0x412fd3
lea ecx, [ebp - 0x834]
push ecx
lea edx, [ebp - 0x848]
push edx
push esi
mov dword [ebp - 0x848], ebx
mov dword [ebp - 0x844], ebx
mov dword [ebp - 0x834], ebx
mov dword [ebp - 0x830], ebx
call fcn.00416190
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push edi
mov dword [ebp - 0x838], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x834]
push eax
lea ecx, [ebp - 0x848]
push ecx
push edi
call fcn.004161e0
mov eax, dword [ebp - 0x838]
add esp, 0xc
cmp eax, 0xffffffff
je 0x412fd3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004180c9
mov esp, ebp
pop ebp
ret