Function at 0x417690
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov ecx, dword [edi + 0x130]
mov ebx, ecx
and ebx, 0xf
mov dword [ebp - 4], ebx
test edx, edx
je 0x4178d8
mov eax, dword [edi + 0x140]
test eax, eax
js 0x4178da
cmp eax, 0xb
je 0x4176de
mov dword [edi + 0x140], 0xfffffffb
lea eax, [esi - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ecx + edx]
cmp eax, dword [edi + 0x12c]
jbe 0x4176ff
mov dword [edi + 0x140], 0xfffffffa
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, ecx
sub eax, ebx
sub eax, edi
test al, 7
jne 0x4177e2
test edx, edx
je 0x417731
test bl, 7
je 0x41772b
mov eax, dword [ebp + 8]
lea ecx, [ebx + edi]
inc ebx
mov al, byte [esi + eax]
inc esi
xor byte [ecx + 0x20], al
cmp esi, edx
jb 0x417714
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 8]
mov dword [ebp - 8], eax
cmp eax, edx
ja 0x417778
add ecx, 0xfffffff8
mov dword [ebp - 4], ecx
cmp ebx, 8
ja 0x417772
mov edx, dword [ebp - 4]
lea ecx, [ebx + edi]
add esi, 8
add ebx, 8
mov eax, dword [edx + eax]
xor dword [ecx + 0x20], eax
mov eax, dword [ebp - 8]
mov eax, dword [edx + eax + 4]
xor dword [ecx + 0x24], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add eax, 8
mov dword [ebp - 8], eax
cmp eax, edx
jbe 0x417741
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 0x10]
cmp eax, edx
ja 0x41784e
lea eax, [edi + 0x30]
mov dword [ebp - 0xc], eax
lea ebx, [esi + ecx]
lea eax, [edi + 0x20]
mov dword [ebp - 8], eax
mov eax, 0x10
mov edi, dword [ebp - 8]
sub eax, ecx
mov dword [ebp - 0x10], eax
nop
push dword [ebp - 0xc]
push edi
push edi
call fcn.00418e24
mov ecx, dword [edi]
add esp, 0xc
xor ecx, dword [ebx]
add esi, 0x10
mov eax, dword [edi + 4]
xor eax, dword [ebx + 4]
mov edx, dword [ebp + 0xc]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
add ebx, 0x10
xor eax, dword [edi + 0xc]
xor ecx, dword [edi + 8]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp eax, edx
jbe 0x4177a0
jmp 0x417848
test edx, edx
je 0x417803
cmp ebx, 0x10
jae 0x4177fd
mov eax, dword [ebp + 8]
lea ecx, [ebx + edi]
inc ebx
mov al, byte [esi + eax]
inc esi
xor byte [ecx + 0x20], al
cmp esi, edx
jb 0x4177e6
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ebx
lea eax, [esi + 0x10]
mov dword [ebp - 0x10], eax
cmp eax, edx
ja 0x41784e
lea eax, [edi + 0x30]
add ecx, 0xfffffff0
lea ebx, [edi + 0x20]
mov dword [ebp - 8], eax
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
nop
push eax
push ebx
push ebx
call fcn.00418e24
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
push ebx
push ebx
call fcn.00417f30
mov edx, dword [ebp + 0xc]
add edi, 0x10
mov eax, dword [ebp - 8]
add esp, 0x18
add esi, 0x10
cmp edi, edx
jbe 0x417820
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp - 4]
cmp esi, edx
jae 0x417882
lea ecx, [edi + 0x20]
cmp ebx, 0x10
jne 0x417870
lea eax, [edi + 0x30]
push eax
push ecx
push ecx
call fcn.00418e24
mov edx, dword [ebp + 0xc]
lea ecx, [edi + 0x20]
add esp, 0xc
xor ebx, ebx
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
inc esi
xor byte [ecx + ebx], al
inc ebx
lea ecx, [edi + 0x20]
cmp esi, edx
jb 0x417855
add dword [edi + 0x130], esi
mov eax, dword [edi + 0x130]
cmp ebx, 0x10
je 0x41789b
cmp eax, dword [edi + 0x12c]
jne 0x4178ac
lea eax, [edi + 0x30]
lea ecx, [edi + 0x20]
push eax
push ecx
push ecx
call fcn.00418e24
add esp, 0xc
mov eax, dword [edi + 0x130]
cmp eax, dword [edi + 0x12c]
jne 0x4178d8
mov dword [edi + 0x140], 0xc
mov dword [edi + 0x130], 0
mov dword [edi + 0x134], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret