Function at 0x417980
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x15c
mov eax, dword [0x5ed284]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push ebp
mov ebp, dword [esp + 0x178]
push esi
mov esi, dword [esp + 0x174]
push edi
mov edi, dword [esp + 0x184]
push 0x4f
lea eax, [esp + 0x11d]
push 0
push eax
mov byte [esp + 0x124], 0
call sub.VCRUNTIME140.dll_memset
push 0xaf
lea ecx, [esp + 0x79]
push 0
push ecx
mov byte [esp + 0x80], 0
call sub.VCRUNTIME140.dll_memset
push 0x58
lea edx, [esp + 0x2c]
push 0
push edx
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [esp + 0x1a0]
add esp, 0x24
cmp ebx, 0x3a
ja 0x417bf1
test ebp, ebp
je 0x417bf1
test edi, edi
je 0x417bf1
cmp dword [esp + 0x188], 0x50
jb 0x417bf1
jmp 0x417a28
test ebx, ebx
jne 0x417a33
lea esi, [esp + 0x118]
push 2
lea eax, [esp + 0x22]
push eax
mov byte [esp + 0x20], 7
call fcn.00417350
mov cl, byte [esp + 0x170]
movzx eax, byte [esi]
mov dl, byte [esp + 0x174]
mov byte [esp + 0x20], cl
movzx ecx, byte [esi + 1]
mov byte [esp + 0x21], dl
movzx edx, byte [esi + 2]
mov byte [esp + 0x22], al
movzx eax, byte [esi + 3]
mov byte [esp + 0x23], cl
push 2
lea ecx, [esp + 0x2a]
push ecx
mov byte [esp + 0x2c], dl
mov byte [esp + 0x2d], al
call fcn.00417350
cmp ebx, 4
jbe 0x417ab2
lea edx, [ebx - 4]
push edx
add esi, 4
lea eax, [esp + 0x2c]
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, 0x39
sub eax, ebx
add esp, 0xc
test eax, eax
jle 0x417abe
push eax
lea ecx, [esp + ebx + 0x28]
push ecx
jmp 0x417ab9
push 0x35
lea edx, [esp + 0x2c]
push edx
call fcn.00417350
cmp ebx, 4
jbe 0x417acc
sub bl, 4
mov byte [esp + 0x5d], bl
jmp 0x417ad1
mov byte [esp + 0x5d], 0
mov al, byte [esp + 0x26]
mov cl, byte [esp + 0x27]
lea edx, [esp + 0x68]
push ebp
push edx
mov byte [esp + 0x66], al
mov byte [esp + 0x67], cl
call fcn.004168c0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.00416b50
add esp, 0x10
xor eax, eax
movzx edx, byte [esp + eax + 0x40]
movzx ecx, byte [esp + eax + 0x41]
xor byte [esp + eax + 0x50], dl
xor byte [esp + eax + 0x51], cl
movzx edx, byte [esp + eax + 0x42]
movzx ecx, byte [esp + eax + 0x43]
xor byte [esp + eax + 0x52], dl
xor byte [esp + eax + 0x53], cl
add eax, 4
cmp eax, 0x10
jb 0x417b00
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x6c]
push eax
call fcn.00416b50
add esp, 8
xor eax, eax
movzx ecx, byte [esp + eax + 0x30]
movzx edx, byte [esp + eax + 0x31]
xor byte [esp + eax + 0x40], cl
xor byte [esp + eax + 0x41], dl
movzx ecx, byte [esp + eax + 0x32]
movzx edx, byte [esp + eax + 0x33]
xor byte [esp + eax + 0x42], cl
xor byte [esp + eax + 0x43], dl
add eax, 4
cmp eax, 0x10
jb 0x417b40
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00416b50
add esp, 8
xor eax, eax
movzx edx, byte [esp + eax + 0x20]
movzx ecx, byte [esp + eax + 0x21]
xor byte [esp + eax + 0x30], dl
xor byte [esp + eax + 0x31], cl
movzx edx, byte [esp + eax + 0x22]
movzx ecx, byte [esp + eax + 0x23]
xor byte [esp + eax + 0x32], dl
xor byte [esp + eax + 0x33], cl
add eax, 4
cmp eax, 0x10
jb 0x417b80
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x6c]
push eax
call fcn.00416b50
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x74]
push edx
call fcn.004168c0
lea eax, [esp + 0x28]
push eax
call fcn.00424030
mov ecx, 0x14
lea esi, [esp + 0x2c]
add esp, 0x14
rep movsd dword es:[edi], dword [esi]
jmp 0x417bec
xor ax, ax
jmp 0x417bf5
mov ax, 0x1d10
mov ecx, dword [esp + 0x168]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052bfb9
add esp, 0x15c
ret