Function at 0x40176a
Capabilities:
Encode data using xor
Get file size
Read file via mapping
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x838
push ebx
push esi
push edi
push 0x400
lea eax, [ebp - 0x834]
push eax
xor ebx, ebx
push ebx
mov byte [ebp - 0x1c], 0xc4
mov byte [ebp - 0x1b], 0xab
mov byte [ebp - 0x1a], 0x36
mov byte [ebp - 0x19], 0xb9
mov byte [ebp - 0x18], 0x40
mov byte [ebp - 0x17], 0xf1
mov byte [ebp - 0x16], 0xdd
mov byte [ebp - 0x15], 0x9c
mov byte [ebp - 0x14], 0x7b
mov byte [ebp - 0x13], 0xa0
mov byte [ebp - 0x12], 0xf
mov byte [ebp - 0x11], 0xcd
mov byte [ebp - 0x10], 0x31
mov byte [ebp - 0xf], 0xb5
mov byte [ebp - 0xe], 0x9e
mov byte [ebp - 0xd], 8
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 2
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
je 0x401930
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push ebx
push 2
push ebx
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x401927
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x40191e
xor esi, esi
lea ecx, [ebp - 0xd]
lea eax, [ebp + esi - 0x1c]
mov dl, byte [eax]
mov byte [ebp - 5], dl
mov dl, byte [ecx]
mov byte [eax], dl
mov al, byte [ebp - 5]
inc esi
mov byte [ecx], al
dec ecx
cmp esi, 8
jb 0x40183f
lea eax, [edi - 0x10]
xor esi, esi
mov dword [ebp - 0x30], eax
cmp eax, ebx
jbe 0x401915
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
sub edx, eax
mov dword [ebp - 0x28], edx
jmp 0x401878
mov edx, dword [ebp - 0x28]
xor ecx, ecx
mov dword [ebp - 0x24], 0x10
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], ebx
add edx, esi
dec dword [ebp - 0x24]
cmp ecx, dword [ebp - 0xc]
jne 0x4018a1
movzx edi, byte [eax]
movzx ecx, byte [edx + eax]
inc eax
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0x24], ebx
jne 0x401889
sub ecx, dword [ebp - 0xc]
je 0x4018ae
inc esi
cmp esi, dword [ebp - 0x30]
jb 0x401875
jmp 0x401915
mov eax, dword [ebp - 0x20]
add esi, eax
cmp esi, ebx
je 0x401915
add esi, 0x10
mov edi, dword [esi]
cmp edi, 0x100000
jae 0x401915
lea eax, [edi + 1]
call fcn.00402150
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x401915
xor edx, edx
mov ecx, 0xff
mov eax, edi
div ecx
lea ecx, [esi + 4]
mov esi, dword [ebp - 0xc]
mov eax, esi
mov byte [ebp - 5], dl
mov edx, edi
call fcn.004021c0
xor eax, eax
cmp edi, ebx
jbe 0x401901
mov cl, byte [ebp - 5]
xor byte [esi + eax], cl
inc eax
cmp eax, edi
jb 0x4018f6
mov eax, esi
mov esi, dword [ebp + 8]
mov ecx, edi
call fcn.00401673
mov eax, dword [ebp - 0xc]
call fcn.00402170
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x234], ebx
je 0x401948
cmp dword [eax + 0x23c], ebx
je 0x401948
xor eax, eax
inc eax
jmp 0x40194a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret