Function at 0x416490
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x100
cmp eax, 5
push ebx
push esi
push edi
jne 0x416671
mov eax, dword [esp + 0x118]
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.0041c820
mov esi, dword [esp + 0x11c]
lea edx, [esp + 0x64]
push esi
push edx
call fcn.0041cb40
add esp, 0x10
xor eax, eax
mov cl, byte [eax + esi + 0x10]
mov bl, byte [eax + esi]
xor bl, cl
mov byte [eax + esi], bl
inc eax
cmp eax, 0x10
jb 0x4164cf
lea edi, [esi + 0x10]
lea edx, [esp + 0x5c]
push edi
push edx
call fcn.0041cb40
mov ecx, 0xfffffff0
add esp, 8
mov eax, edi
sub ecx, esi
mov dl, byte [eax + 0x10]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
inc eax
lea edx, [ecx + eax]
cmp edx, 0x10
jb 0x4164fb
lea edi, [esi + 0x20]
lea eax, [esp + 0x5c]
push edi
push eax
call fcn.0041cb40
mov ecx, 0xffffffe0
add esp, 8
mov eax, edi
sub ecx, esi
mov dl, byte [eax + 0x10]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
inc eax
lea edx, [ecx + eax]
cmp edx, 0x10
jb 0x416527
lea eax, [esi + 0x30]
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.0041cb40
lea edx, [esp + 0x14]
lea eax, [esp + 0x64]
push edx
push eax
call fcn.0041c820
mov al, byte [esi + 0x3d]
add esp, 0x10
cmp al, 0x53
je 0x416570
pop edi
pop esi
mov ax, 2
pop ebx
add esp, 0x100
ret 0x18
mov al, byte [esi + 0x3c]
test al, 0x80
je 0x41660f
and eax, 0x9f
add eax, 0xffffff80
cmp eax, 8
ja case.default.0x416588
jmp dword [eax*4 + 0x41670c]
pop edi
pop esi
mov ax, 0x41
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 4
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0xa
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0x15
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0x4a
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0x3f
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0x10
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0xff
pop ebx
add esp, 0x100
ret 0x18
cmp al, 0x3c
ja case.0x416588.132
mov edx, dword [esp + 0x120]
and eax, 0xff
cmp eax, edx
ja case.0x416588.132
mov ecx, dword [esp + 0x124]
mov dword [ecx], eax
xor ecx, ecx
mov cl, byte [esi + 0x3c]
cmp edx, ecx
jb 0x416661
mov edi, dword [esp + 0x11c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
xor ax, ax
pop ebx
add esp, 0x100
ret 0x18
pop edi
pop esi
mov ax, 0x49
pop ebx
add esp, 0x100
ret 0x18
cmp eax, 7
jne case.0x416588.128
mov esi, dword [esp + 0x114]
mov eax, dword [esp + 0x118]
mov ecx, 0x12
lea edi, [esp + 0xc]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.0041c820
lea edx, [esp + 0x64]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.0041cd40
add esp, 0x10
test al, al
jne 0x4166f9
mov edx, dword [esp + 0x124]
mov ecx, dword [esp + 0x120]
push ebp
mov ebp, dword [esp + 0x120]
lea edi, [esp + 0x12]
mov dword [edx], ecx
xor esi, esi
mov edx, ebp
sub edi, ebp
test ecx, ecx
jbe 0x4166e3
mov bl, byte [edi + edx]
inc esi
mov byte [edx], bl
inc edx
dec ecx
cmp esi, 4
jb 0x4166d2
mov edx, ecx
lea esi, [esp + 0x18]
lea edi, [ebp + 4]
pop ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004130a0
pop edi
pop esi
pop ebx
add esp, 0x100
ret 0x18