Function at 0x412210
Capabilities:
Check if file exists
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, 0x1150
call fcn.0041a300
mov eax, dword [0x439190]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x111c], eax
xor eax, eax
push eax
push 0x80
push 3
push eax
push 3
push SysReAllocString
push ebx
mov dword [ebp - 0x1134], ebx
mov dword [ebp - 0x113c], eax
mov dword [ebp - 0x1138], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41228b
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 ebx
call fcn.00416140
mov ebx, eax
add esp, 4
mov dword [ebp - 0x1150], ebx
test ebx, ebx
jg 0x4122c9
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
push ebx
call fcn.0040dff0
add esp, 4
push 0
lea ecx, [ebp - 0x1140]
push ecx
push ebx
push eax
push esi
mov dword [ebp - 0x1118], eax
mov dword [ebp - 0x1140], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x1140], ebx
je 0x412334
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x1118]
push edx
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
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1118]
push ebx
push eax
call fcn.00411930
add esp, 8
test eax, eax
je 0x4127a4
mov eax, dword [ebp - 0x1118]
lea ecx, [eax + 0xc]
mov esi, eax
xor ebx, ebx
cmp dword [ecx], 0x64
mov dword [ebp - 0x1120], esi
mov dword [ebp - 0x114c], ecx
jb 0x4123b9
cmp dword [0x43d820], ebx
jne 0x4123b9
mov ecx, dword [eax + 0x10]
push ebx
push ebx
push ecx
push edi
call fcn.00411e00
add esp, 0x10
test eax, eax
jne 0x4123b9
lea edx, [ebp - 0x1118]
push edx
call fcn.0040e040
add esp, 4
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
push 0x400
lea eax, [ebp - 0x50b]
push ebx
push eax
mov byte [ebp - 0x50c], 0
call fcn.00419b60
push 0x103
lea ecx, [ebp - 0x107]
push ebx
push ecx
mov byte [ebp - 0x108], 0
call fcn.00419b60
lea edx, [ebp - 0x108]
push edx
push edi
call fcn.00410a00
add esp, 0x20
add esi, 0x14
lea ecx, [ebp - 0x108]
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x412426
test dl, dl
je 0x412422
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x412426
add eax, 2
add ecx, 2
test dl, dl
jne 0x412406
xor eax, eax
jmp 0x41242b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x41253e
mov ecx, str.fc1b28f6d31e228bb42421e63eb5fce4
mov eax, esi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x412460
test dl, dl
je 0x41245c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x412460
add eax, 2
add ecx, 2
test dl, dl
jne 0x412440
xor eax, eax
jmp 0x412465
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x412535
push 0x400
lea eax, [ebp - 0x1113]
push ebx
push eax
mov byte [ebp - 0x1114], 0
call fcn.00419b60
lea ecx, [ebp - 0x1114]
push ecx
push 0x80
push 0x42d6ac
call fcn.00411950
lea edx, [ebp - 0x108]
push edx
lea eax, [ebp - 0x1114]
push eax
call fcn.00410a00
add esp, 0x20
lea ecx, [ebp - 0x108]
mov eax, esi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4124e0
test dl, dl
je 0x4124dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4124e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4124c0
xor eax, eax
jmp 0x4124e5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x412513
lea ecx, [ebp - 0x1118]
push ecx
call fcn.0040e040
add esp, 4
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
xor eax, eax
jmp 0x412520
mov cl, byte [ebp + eax - 0x1114]
mov byte [ebp + eax - 0x50c], cl
inc eax
test cl, cl
jne 0x412520
jmp 0x412552
lea edx, [ebp - 0x1118]
push edx
jmp 0x4124f0
lea edx, [ebp - 0x50c]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x412548
lea eax, [ebp - 0x50c]
lea edx, [eax + 1]
jmp 0x412560
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x412560
mov ecx, dword [ebp - 0x1120]
sub eax, edx
cmp eax, dword [ecx + 0x10]
je 0x412580
lea eax, [ebp - 0x1118]
push eax
jmp 0x4124f0
cmp dword [ecx + 4], 1
je 0x41259f
lea ecx, [ebp - 0x1118]
push ecx
call fcn.0040e040
add esp, 4
push 0x51a
jmp 0x4124fa
mov edi, dword [ebp - 0x1134]
lea edx, [ebp - 0x1128]
push edx
lea eax, [ebp - 0x1130]
push eax
push edi
mov dword [ebp - 0x1130], ebx
mov dword [ebp - 0x112c], ebx
mov dword [ebp - 0x1128], ebx
mov dword [ebp - 0x1124], ebx
call fcn.00416190
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [ebp - 0x111c]
push 0x80
push edi
mov dword [ebp - 0x1120], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x800
lea edx, [ebp - 0xd0e]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0xd10], cx
call fcn.00419b60
push edi
lea eax, [ebp - 0xd10]
push str._s.igbak
push eax
call fcn.004025f0
lea ecx, [ebp - 0xd10]
push ecx
call fcn.00416140
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
add esp, 0x1c
test eax, eax
jg 0x412667
lea edx, [ebp - 0xd10]
push edx
call fcn.00415d40
add esp, 4
test eax, eax
je 0x412659
lea eax, [ebp - 0xd10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
lea ecx, [ebp - 0xd10]
push ecx
push edi
call esi
mov ebx, eax
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4126ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x1118]
push edx
mov edi, eax
call fcn.0040e040
add esp, 4
test ebx, ebx
je 0x4126b4
mov eax, dword [ebp - 0x111c]
push 0
push eax
lea ecx, [ebp - 0xd10]
push ecx
call esi
push edi
jmp 0x4124fa
mov esi, dword [ebp - 0x1150]
lea edx, [esi - 0x400]
push edx
call fcn.0040dff0
mov edx, dword [ebp - 0x114c]
push eax
mov dword [ebp - 0x1144], eax
mov eax, dword [ebp - 0x1118]
add esi, 0xfffffc00
push esi
add eax, 0x400
push eax
lea ecx, [ebp - 0x50c]
push ecx
push edx
call fcn.00410e70
mov ecx, dword [ebp - 0x1144]
add esp, 0x18
push 0
lea eax, [ebp - 0x1148]
push eax
push esi
push ecx
push edi
mov dword [ebp - 0x1148], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x1148], esi
je 0x412734
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x113c], eax
jmp 0x41273e
mov dword [ebp - 0x1138], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x41275f
cmp dword [ebp - 0x1138], 0
je 0x41275f
lea edx, [ebp - 0xd10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x1144]
push eax
call fcn.0040e040
mov esi, dword [ebp - 0x111c]
lea ecx, [ebp - 0x1128]
push ecx
lea edx, [ebp - 0x1130]
push edx
push esi
call fcn.004161e0
mov eax, dword [ebp - 0x1120]
add esp, 0x10
cmp eax, 0xffffffff
je 0x412836
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x412836
mov edi, dword [ebp - 0x111c]
mov esi, dword [ebp - 0x1134]
push edi
push esi
call fcn.0041a267
add esp, 8
test eax, eax
je 0x412836
xor eax, eax
mov dword [ebp - 0x1128], eax
mov dword [ebp - 0x1124], eax
mov dword [ebp - 0x1130], eax
mov dword [ebp - 0x112c], eax
lea eax, [ebp - 0x1130]
push eax
lea ecx, [ebp - 0x1128]
push ecx
push esi
call fcn.00416190
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
push edi
mov esi, eax
call ebx
mov edx, dword [ebp - 0x1134]
push 0
push edi
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x1130]
push eax
lea ecx, [ebp - 0x1128]
push ecx
push edi
call fcn.004161e0
add esp, 0xc
cmp esi, 0xffffffff
je 0x412836
push esi
push edi
call ebx
lea edx, [ebp - 0x1118]
push edx
call fcn.0040e040
mov esi, dword [ebp - 0x1138]
add esp, 4
test esi, esi
jne 0x41285c
mov eax, dword [ebp - 0x113c]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004180c9
mov esp, ebp
pop ebp
ret