Function at 0x40125f
Capabilities:
Delete file
Encode data using xor
Move file
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x15a8
call fcn.004016e0
mov cx, word [0x403ce4]
push ebx
push ebp
push esi
push edi
xor eax, eax
lea edi, [esp + 0x1e]
mov word [esp + 0x1c], cx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x7f
mov word [esp + 0x34], cx
pop ecx
xor eax, eax
lea edi, [esp + 0x32]
and dword [esp + 0x14], 0
and byte [esp + 0x1b], 0
mov ebp, 0x4030e4
rep stosd dword es:[edi], eax
push 0x403064
push ebp
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
pop ecx
test esi, esi
pop ecx
jne 0x4012c6
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4015ba
mov eax, dword [0x403ce0]
push 2
push 0xfffffffffffffffb
add eax, eax
pop ecx
sub ecx, eax
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
push esi
jne 0x401339
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push 1
lea eax, [esp + 0x23]
push 1
push eax
call ebx
add esp, 0x10
cmp eax, 1
jne 0x401338
mov eax, dword [0x403ce0]
push 2
movsx edi, byte [esp + 0x1f]
push 0xfffffffffffffffb
add eax, eax
pop ecx
mov dword [esp + 0x14], edi
sub ecx, eax
sub ecx, edi
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
push esi
jne 0x401339
push 1
lea eax, [esp + 0x24]
push edi
push eax
call ebx
add esp, 0x10
cmp eax, 1
je 0x401345
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
jmp 0x4012ba
lea eax, [esp + 0x1c]
push str..exe
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
test eax, eax
pop ecx
mov ebp, 0x4032e4
jne 0x4013b4
lea eax, [esp + 0x30]
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
and word [eax*2 + 0x4032dc], 0
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.MSVCRT.dll_wcscat]
push esi
call edi
add esp, 0x18
lea eax, [esp + 0x30]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push 0x403064
push 0x4030e4
call dword [sym.imp.MSVCRT.dll__wfopen]
pop ecx
mov esi, eax
pop ecx
mov eax, dword [0x403ce0]
push 2
push 0xffffffffffffffef
add eax, eax
pop ecx
sub ecx, eax
sub ecx, dword [esp + 0x14]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x4014e1
mov dword [esp + 0x10], 0x4038ec
push esi
push 4
push 1
push dword [esp + 0x1c]
call ebx
add esp, 0x10
cmp eax, 4
jne 0x4014e1
add dword [esp + 0x10], eax
cmp dword [esp + 0x10], 0x4038f8
jb 0x4013e1
push 0x40306c
push ebp
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebp, eax
pop ecx
test ebp, ebp
pop ecx
mov dword [esp + 0x10], ebp
je 0x4014e1
push 0
push dword [0x4038ec]
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
push esi
je 0x40144a
call edi
push ebp
call edi
pop ecx
pop ecx
push 0x4030e4
jmp 0x4012bb
mov ebp, 0x1388
lea eax, [esp + 0x234]
push ebp
push 1
push eax
call ebx
add esp, 0x10
test eax, eax
je 0x4014b9
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax]
mov ecx, dword [0x4038f0]
cmp edx, ecx
jbe 0x40147a
sub ecx, dword [esp + 0x14]
mov eax, ecx
xor ecx, ecx
test eax, eax
jbe 0x40148d
xor byte [esp + ecx + 0x230], 0x99
inc ecx
cmp ecx, eax
jb 0x401480
push dword [esp + 0x10]
push eax
lea eax, [esp + 0x238]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add dword [esp + 0x24], eax
push esi
push ebp
lea eax, [esp + 0x248]
push 1
push eax
call ebx
add esp, 0x20
jmp 0x40145f
push dword [esp + 0x10]
call edi
cmp dword [esp + 0x18], 0
pop ecx
je 0x4014e1
push 0x40306c
push 0x4034e4
call dword [sym.imp.MSVCRT.dll__wfopen]
pop ecx
mov dword [esp + 0x14], eax
test eax, eax
pop ecx
jne 0x4014f0
push esi
call edi
mov dword [esp], 0x4030e4
jmp 0x4012bb
mov eax, dword [0x4038ec]
mov ecx, dword [0x4038f0]
add ecx, eax
push 0
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
je 0x401523
push esi
call edi
push dword [esp + 0x14]
call edi
pop ecx
pop ecx
push 0x4030e4
jmp 0x4015ab
and dword [esp + 0x14], 0
push esi
push ebp
lea eax, [esp + 0x238]
push 1
push eax
call ebx
add esp, 0x10
test eax, eax
je 0x401593
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax]
mov ecx, dword [0x4038f4]
cmp edx, ecx
jbe 0x401554
sub ecx, dword [esp + 0x14]
mov eax, ecx
xor ecx, ecx
test eax, eax
jbe 0x401567
xor byte [esp + ecx + 0x230], 0x99
inc ecx
cmp ecx, eax
jb 0x40155a
push dword [esp + 0x10]
push eax
lea eax, [esp + 0x238]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add dword [esp + 0x24], eax
push esi
push ebp
lea eax, [esp + 0x248]
push 1
push eax
call ebx
add esp, 0x20
jmp 0x401539
push dword [esp + 0x10]
call edi
cmp dword [esp + 0x18], 0
pop ecx
push esi
jne 0x4015be
call edi
mov dword [esp], 0x4030e4
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call esi
push 0x4034e4
call esi
xor eax, eax
jmp 0x4015c4
call edi
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15a8
ret