Function at 0x413000
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
mov eax, 0x1558
call fcn.0041a300
mov eax, dword [0x439190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push ebx
mov dword [ebp - 0x1520], eax
mov dword [ebp - 0x1528], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41306d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
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 ebx
call fcn.00416140
mov edi, eax
add esp, 4
mov dword [ebp - 0x1538], edi
test edi, edi
je 0x4138da
cmp edi, 0xffffffff
je 0x4138da
xor eax, eax
push eax
lea edx, [ebp - 0x1524]
push edx
mov dword [ebp - 0xb], eax
mov dword [ebp - 0x1524], eax
push 4
lea eax, [ebp - 0xc]
push eax
push esi
mov byte [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp edi, 4
jb 0x4130eb
cmp dword [ebp - 0x1524], 4
je 0x4130eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
lea ecx, [ebp - 0xc]
push 4
push ecx
call fcn.00411930
add esp, 8
test eax, eax
jne 0x413181
mov edi, dword [ebp - 0x1520]
push edi
push ebx
call fcn.0041a267
add esp, 8
test eax, eax
je 0x4139ac
xor eax, eax
lea edx, [ebp - 0x1534]
mov dword [ebp - 0x1540], eax
mov dword [ebp - 0x153c], eax
mov dword [ebp - 0x1534], eax
mov dword [ebp - 0x1530], eax
push edx
lea eax, [ebp - 0x1540]
push eax
push ebx
call fcn.00416190
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [ebp - 0x1534]
push ecx
lea edx, [ebp - 0x1540]
push edx
jmp 0x413996
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4131c1
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
xor eax, eax
push 0x3fc
push eax
mov word [ebp - 0x151b], ax
mov byte [ebp - 0x1519], al
lea eax, [ebp - 0x1518]
push eax
mov byte [ebp - 0x151c], 0
call fcn.00419b60
add esp, 0xc
push 0
lea ecx, [ebp - 0x1524]
push ecx
push 0x400
lea edx, [ebp - 0x151c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4138b5
cmp dword [ebp - 0x1524], 0x400
jne 0x4138b5
push esi
call edi
mov eax, dword [ebp - 0x1518]
dec eax
je 0x41388d
dec eax
je 0x413251
push 0x51a
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 - 0x1510], 0x64
jb 0x41329f
cmp dword [0x43d820], 0
jne 0x41329f
mov eax, dword [ebp - 0x150c]
mov esi, dword [ebp - 0x1528]
push 0
push 0
push eax
push esi
call fcn.00411e00
add esp, 0x10
test eax, eax
jne 0x4132a5
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
mov esi, dword [ebp - 0x1528]
push 0x400
lea ecx, [ebp - 0xd17]
push 0
push ecx
mov byte [ebp - 0xd18], 0
call fcn.00419b60
push 0x103
lea edx, [ebp - 0x10f]
push 0
push edx
mov byte [ebp - 0x110], 0
call fcn.00419b60
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.00410a00
add esp, 0x20
lea ecx, [ebp - 0x110]
lea eax, [ebp - 0x1500]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x413315
test dl, dl
je 0x413311
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x413315
add eax, 2
add ecx, 2
test dl, dl
jne 0x4132f5
xor eax, eax
jmp 0x41331a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x413410
mov ecx, str.fc1b28f6d31e228bb42421e63eb5fce4
lea eax, [ebp - 0x1500]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x413350
test dl, dl
je 0x41334c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x413350
add eax, 2
add ecx, 2
test dl, dl
jne 0x413330
xor eax, eax
jmp 0x413355
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4133f5
push 0x400
push eax
lea ecx, [ebp - 0x111b]
push ecx
mov byte [ebp - 0x111c], al
call fcn.00419b60
lea edx, [ebp - 0x111c]
push edx
push 0x80
push 0x42d6ac
call fcn.00411950
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x111c]
push ecx
call fcn.00410a00
add esp, 0x20
lea ecx, [ebp - 0x110]
lea eax, [ebp - 0x1500]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4133d0
test dl, dl
je 0x4133cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4133d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4133b0
xor eax, eax
jmp 0x4133d5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4133f5
lea esp, [esp]
mov cl, byte [ebp + eax - 0x111c]
mov byte [ebp + eax - 0xd18], cl
inc eax
test cl, cl
jne 0x4133e0
jmp 0x41342a
push 0x57
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 edx, [ebp - 0xd18]
mov eax, esi
sub edx, esi
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x413420
lea eax, [ebp - 0xd18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413433
sub eax, edx
cmp eax, dword [ebp - 0x150c]
jne 0x4138ff
lea edx, [ebp - 0x1558]
push edx
lea eax, [ebp - 0x1550]
xor esi, esi
push eax
push ebx
mov dword [ebp - 0x1550], esi
mov dword [ebp - 0x154c], esi
mov dword [ebp - 0x1558], esi
mov dword [ebp - 0x1554], esi
call fcn.00416190
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x800
lea edx, [ebp - 0x912]
xor ecx, ecx
push esi
push edx
mov dword [ebp - 0x1530], eax
mov word [ebp - 0x914], cx
call fcn.00419b60
mov edi, dword [ebp - 0x1520]
push edi
lea eax, [ebp - 0x914]
push str._s.igbak
push eax
mov dword [ebp - 0x1548], esi
mov dword [ebp - 0x1528], esi
call fcn.004025f0
lea ecx, [ebp - 0x914]
push ecx
call fcn.00416140
add esp, 0x1c
test eax, eax
je 0x4134dd
cmp eax, 0xffffffff
jne 0x413506
lea edx, [ebp - 0x914]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea eax, [ebp - 0x914]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
mov dword [ebp - 0x1548], esi
test esi, esi
jne 0x413581
push edi
lea ecx, [ebp - 0x914]
push str._s.ig_
push ecx
call fcn.004025f0
add esp, 0xc
mov dword [ebp - 0x1528], 1
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4135a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test esi, esi
je 0x413567
mov eax, dword [ebp - 0x1520]
push 0
push eax
lea ecx, [ebp - 0x914]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
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
push edi
push ebx
call fcn.0041a267
add esp, 8
test eax, eax
jne 0x413525
push eax
push 0x80
push 3
push eax
push 3
push SysReAllocString
lea edx, [ebp - 0x914]
push edx
jmp 0x413538
push 0
push 0
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [ebp - 0x1520]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x1528], 0
lea eax, [ebp - 0x914]
jne 0x4135db
mov eax, esi
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x413647
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1548], 0
je 0x41381c
mov edx, dword [ebp - 0x1520]
push 0
push edx
lea eax, [ebp - 0x914]
push eax
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 - 0x1538]
sub eax, 0x400
mov dword [ebp - 0x1538], eax
mov dword [ebp - 0x1544], eax
cmp eax, 0x200000
jbe 0x41366f
mov dword [ebp - 0x1544], 0x200000
push 0x200000
xor esi, esi
call fcn.0040dff0
add esp, 4
mov dword [ebp - 0x152c], eax
cmp dword [ebp - 0x1538], esi
jbe 0x41374d
mov edx, dword [ebp - 0x1544]
mov eax, dword [ebp - 0x152c]
push 0
lea ecx, [ebp - 0x1524]
push ecx
push edx
push eax
push edi
mov dword [ebp - 0x1524], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4137f9
mov ecx, dword [ebp - 0x1524]
cmp ecx, dword [ebp - 0x1544]
je 0x4136dd
lea edx, [esi + ecx]
cmp edx, dword [ebp - 0x1538]
jne 0x4137f9
mov eax, dword [ebp - 0x152c]
push esi
push eax
push ecx
push eax
lea eax, [ebp - 0xd18]
push eax
lea ecx, [ebp - 0x1510]
push ecx
call fcn.00411b30
mov eax, dword [ebp - 0x1524]
mov ecx, dword [ebp - 0x152c]
add esp, 0x18
push 0
lea edx, [ebp - 0x153c]
push edx
push eax
push ecx
push ebx
mov dword [ebp - 0x153c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4137dc
mov eax, dword [ebp - 0x1524]
cmp dword [ebp - 0x153c], eax
jne 0x4137dc
add esi, eax
cmp esi, dword [ebp - 0x1538]
jb 0x413690
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
lea ecx, [ebp - 0x152c]
push ecx
call fcn.0040e040
add esp, 4
cmp dword [ebp - 0x1548], 0
mov esi, 1
je 0x413836
push 0x80
lea edx, [ebp - 0x914]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x914]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [ebp - 0x1520]
lea eax, [ebp - 0x1558]
push eax
lea ecx, [ebp - 0x1550]
push ecx
push ebx
call fcn.004161e0
add esp, 0xc
mov eax, dword [ebp - 0x1530]
cmp eax, 0xffffffff
je 0x4137c9
push eax
push ebx
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]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
call edi
push ebx
call edi
lea edx, [ebp - 0x152c]
push edx
jmp 0x413814
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
call edi
push ebx
call edi
lea eax, [ebp - 0x152c]
push eax
call fcn.0040e040
add esp, 4
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
cmp dword [ebp - 0x1528], 0
je 0x413799
mov ebx, dword [ebp - 0x1520]
mov edi, esi
jmp 0x413850
push 1
push ebx
lea ecx, [ebp - 0x914]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
test esi, esi
jne 0x41379f
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jle 0x413850
lea edx, [ebp - 0x914]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4137b6
mov edx, dword [ebp - 0x1528]
mov eax, dword [ebp - 0x1520]
push edx
push eax
push ebx
call fcn.00412210
add esp, 0xc
pop edi
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]
push esi
mov ebx, eax
call edi
push ebx
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
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [ebp - 0x1530], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x413912
mov ecx, dword [ebp - 0x1530]
push ecx
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
test edi, edi
jne 0x4139ac
mov edx, dword [ebp - 0x1520]
push edx
push ebx
call fcn.0041a267
add esp, 8
test eax, eax
je 0x4139ac
xor eax, eax
mov dword [ebp - 0x1540], eax
mov dword [ebp - 0x153c], eax
mov dword [ebp - 0x1534], eax
mov dword [ebp - 0x1530], eax
lea eax, [ebp - 0x1534]
push eax
lea ecx, [ebp - 0x1540]
push ecx
push ebx
call fcn.00416190
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [ebp - 0x1520]
push 0x80
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [ebp - 0x1534]
push edx
lea eax, [ebp - 0x1540]
push eax
push edi
call fcn.004161e0
add esp, 0xc
cmp esi, 0xffffffff
je 0x4139ac
push esi
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