Function at 0x408ea0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5ed284]
xor eax, esp
mov dword [esp + 0x108], eax
mov ecx, dword [esp + 0x110]
cmp ecx, 5
mov eax, dword [esp + 0x118]
push ebx
mov ebx, dword [esp + 0x120]
push ebp
mov ebp, dword [esp + 0x12c]
push esi
mov esi, dword [esp + 0x120]
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
jne 0x409082
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004168c0
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.00416b50
add esp, 0x10
xor eax, eax
jmp 0x408f10
movzx edx, byte [esi + eax + 0x10]
movzx ecx, byte [esi + eax + 0x11]
xor byte [esi + eax], dl
xor byte [esi + eax + 1], cl
movzx edx, byte [esi + eax + 0x12]
movzx ecx, byte [esi + eax + 0x13]
xor byte [esi + eax + 2], dl
xor byte [esi + eax + 3], cl
add eax, 4
cmp eax, 0x10
jb 0x408f10
lea edi, [esi + 0x10]
lea edx, [esp + 0x18]
push edi
push edx
call fcn.00416b50
add esp, 8
mov eax, edi
mov ecx, 4
movzx edx, byte [eax + 0x10]
xor byte [eax], dl
movzx edx, byte [eax + 0x11]
xor byte [eax + 1], dl
movzx edx, byte [eax + 0x12]
xor byte [eax + 2], dl
movzx edx, byte [eax + 0x13]
xor byte [eax + 3], dl
add eax, 4
sub ecx, 1
jne 0x408f53
lea edi, [esi + 0x20]
lea eax, [esp + 0x18]
push edi
push eax
call fcn.00416b50
add esp, 8
mov eax, edi
mov ecx, 4
mov edi, edi
movzx edx, byte [eax + 0x10]
xor byte [eax], dl
movzx edx, byte [eax + 0x11]
xor byte [eax + 1], dl
movzx edx, byte [eax + 0x12]
xor byte [eax + 2], dl
movzx edx, byte [eax + 0x13]
xor byte [eax + 3], dl
add eax, 4
sub ecx, 1
jne 0x408f90
lea eax, [esi + 0x30]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.00416b50
lea edx, [esp + 0xd0]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.004168c0
add esp, 0x10
cmp byte [esi + 0x3d], 0x53
je 0x408fe2
mov ax, 2
jmp 0x409061
movzx eax, byte [esi + 0x3c]
test al, al
jns 0x40902e
and eax, 0x9f
add eax, 0xffffff80
cmp eax, 8
ja case.default.0x408ff7
jmp dword [eax*4 + 0x409128]
mov ax, 0x41
jmp 0x409061
mov ax, 4
jmp 0x409061
mov ax, 0xa
jmp 0x409061
mov ax, 0x15
jmp 0x409061
mov ax, 0x4a
jmp 0x409061
mov ax, 0x3f
jmp 0x409061
mov ax, 0x10
jmp 0x409061
mov ax, 0xff
jmp 0x409061
cmp al, 0x3c
ja case.0x408ff7.132
movzx ecx, al
mov eax, dword [esp + 0x130]
cmp ecx, eax
ja case.0x408ff7.132
movzx edx, byte [esi + 0x3c]
mov dword [ebp], edx
movzx ecx, byte [esi + 0x3c]
cmp eax, ecx
jb 0x40907c
movzx edx, byte [esi + 0x3c]
push edx
push esi
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor ax, ax
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052bfb9
add esp, 0x10c
ret 0x18
mov ax, 0x49
jmp 0x409061
cmp ecx, 7
jne case.0x408ff7.128
push eax
lea eax, [esp + 0x1c]
mov ecx, 0x12
lea edi, [esp + 0xcc]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.004168c0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0xd4]
push edx
call fcn.004176e0
movzx ebx, ax
mov ebp, ebx
add esp, 0x10
and ebp, 0xff
jne 0x409110
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x130]
mov dword [eax], esi
mov eax, dword [esp + 0x10]
lea edi, [esp + 0xca]
xor ecx, ecx
sub edi, eax
mov edi, edi
test esi, esi
jbe 0x4090f7
mov dl, byte [edi + eax]
mov byte [eax], dl
add ecx, 1
add eax, 1
sub esi, 1
cmp ecx, 4
jb 0x4090e0
mov ecx, dword [esp + 0x10]
push esi
lea eax, [esp + 0xd4]
push eax
add ecx, 4
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp bx, 0x103
mov eax, 0x112
je 0x409061
movzx eax, bp
jmp 0x409061