Function at 0x412281
Capabilities:
Copy file
Delete file
Encode data using xor
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10680
call fcn.00452790
push esi
push edi
lea eax, [esp + 0x218]
call fcn.004110ee
lea eax, [esp + 0x140]
call fcn.00411eb0
push 0
push dword [ebx + 4]
xor edi, edi
push dword [ebx]
inc edi
mov dword [esp + 0x28], edi
call fcn.004508e3
add esp, 0xc
lea eax, [esp + 0x580]
push eax
push dword [ebp + 8]
mov esi, ebx
call fcn.004126d5
test eax, eax
je 0x4122df
push 6
pop eax
jmp 0x41255d
push dword [ebx]
lea eax, [esp + 0x13]
push edi
push edi
push eax
call fcn.0045019d
push dword [ebx]
lea eax, [esp + 0x28]
push edi
push 4
pop esi
push esi
push eax
call fcn.0045019d
push dword [ebx]
mov edi, dword [esp + 0x38]
push 1
lea eax, [esp + 0x3c]
push esi
xor edi, 0x87bc
push eax
mov dword [esp + 0x48], edi
call fcn.0045019d
push dword [ebx]
lea eax, [esp + 0x48]
push 1
push esi
push eax
call fcn.0045019d
mov eax, dword [esp + 0x54]
add esp, 0x40
push dword [ebx]
xor eax, 0xa685
push 1
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x3c]
push esi
push eax
call fcn.0045019d
push dword [ebx]
lea eax, [esp + 0x44]
push 1
push esi
push eax
call fcn.0045019d
push dword [ebx]
lea eax, [esp + 0x50]
push 1
push esi
push eax
call fcn.0045019d
push dword [ebx]
lea eax, [esp + 0x5c]
push 1
push esi
push eax
call fcn.0045019d
add esp, 0x40
lea eax, [esp + 0x478]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea eax, [esp + 0x38]
push eax
push 0
push 0x469e0c
lea eax, [esp + 0x484]
push eax
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
lea eax, [esp + 0x38]
push 0x469e10
push eax
call fcn.00450849
test eax, eax
pop ecx
pop ecx
mov dword [esp + 0x20], eax
jne 0x4123c6
push 9
jmp 0x4122d9
mov eax, dword [ebx + 8]
add eax, 0x2477
push eax
lea esi, [esp + 0x144]
call fcn.00411ff0
xor esi, esi
cmp edi, esi
mov dword [esp + 0x10], esi
jle 0x41247a
jmp 0x4123ef
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add eax, 0x10000
cmp eax, edi
jle 0x412404
mov esi, edi
sub esi, dword [esp + 0x10]
jmp 0x412409
mov esi, 0x10000
push dword [ebx]
add dword [esp + 0x14], esi
push esi
lea eax, [esp + 0x690]
push 1
push eax
call fcn.0045019d
add esp, 0x10
xor edi, edi
test esi, esi
jle 0x412441
lea eax, [esp + 0x140]
push eax
call fcn.00411fc2
xor byte [esp + edi + 0x688], al
inc edi
cmp edi, esi
jl 0x412428
push esi
lea eax, [esp + 0x68c]
push eax
lea edi, [esp + 0x24]
call fcn.0041109a
push dword [esp + 0x20]
lea eax, [esp + 0x68c]
push esi
push 1
push eax
call fcn.00450b32
mov eax, dword [esp + 0x20]
add esp, 0x10
cmp eax, dword [esp + 0x18]
jl 0x4123eb
xor esi, esi
push dword [esp + 0x20]
call fcn.00450c26
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x28], eax
pop ecx
je 0x4124a3
push 0xa
pop esi
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov eax, esi
jmp 0x41255d
cmp byte [esp + 0xf], 1
jne 0x4124fd
lea eax, [esp + 0x218]
call fcn.004110ee
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x240]
push eax
mov dword [esp + 0x234], esi
mov dword [esp + 0x238], esi
call fcn.0044cf30
push dword [ebp + 0xc]
lea eax, [esp + 0x34d]
push eax
call fcn.0044cf30
add esp, 0x10
lea eax, [esp + 0x218]
call fcn.0041111a
test eax, eax
je 0x412517
push 0xb
jmp 0x412490
push esi
push dword [ebp + 0xc]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
test eax, eax
jne 0x412517
push 7
jmp 0x412490
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push esi
push 0x80
push 3
push esi
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x41255b
lea eax, [esp + 0x28]
push eax
push esi
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8