Function at 0x417600
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov ecx, dword [ebx + 0xc]
push edi
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], ecx
cmp ecx, eax
jae 0x41766b
cmp dword [ebp + 0x14], 0
je 0x41762e
push eax
push ebx
call fcn.00416f80
add esp, 8
mov ebx, eax
jmp 0x41766b
mov eax, dword [ebp + 4]
mov edi, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 0x30]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x14]
mov dword [ebp + 4], edi
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x2c], esi
mov dword [ebp + 0x30], ecx
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x14], esi
test esi, esi
jle 0x417729
nop dword [eax]
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + edi*4]
mov edx, dword [eax + 4]
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax + edi*4]
mov ecx, dword [eax + 4]
lea eax, [edx + 0x7fff]
lea esi, [ecx + 0x7fff]
cmp ecx, eax
ja 0x4176c0
cmp esi, edx
jb 0x4176c0
sub edx, ecx
mov esi, 0x8000
nop dword [eax]
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub esi, 1
jne 0x4176b0
jmp 0x41771c
lea eax, [edx + 0x20]
mov esi, 0x200
sub edx, ecx
nop word [eax + eax]
lea ecx, [ecx + 0x40]
lea eax, [eax + 0x40]
movups xmm0, xmmword [ecx - 0x40]
movups xmm1, xmmword [edx + ecx - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x40], xmm1
movups xmm0, xmmword [ecx - 0x30]
movups xmm1, xmmword [eax - 0x50]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x40]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [ecx - 0x20]
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
movups xmm0, xmmword [ecx - 0x10]
movups xmm1, xmmword [eax - 0x30]
pxor xmm1, xmm0
movups xmmword [ecx - 0x10], xmm1
sub esi, 1
jne 0x4176d0
mov esi, dword [esp + 0x14]
inc edi
cmp edi, esi
jl 0x417680
mov ecx, dword [ebp + 0x30]
test ecx, ecx
je 0x417817
cmp dword [ebx + 0x30], 0
jne 0x417765
cmp dword [ebp + 0x14], 0
jne 0x417757
mov eax, dword [ebp + 8]
cmp eax, dword [ebx + 8]
jne 0x417757
mov dword [ebx + 0x30], ecx
mov dword [ebp + 0x30], 0
jmp 0x417817
push dword [ebx + 8]
call fcn.00416420
add esp, 4
mov dword [ebx + 0x30], eax
xor edi, edi
test esi, esi
jle 0x417817
nop
mov eax, dword [ebp + 0x30]
mov eax, dword [eax + edi*4]
mov edx, dword [eax + 4]
mov eax, dword [ebx + 0x30]
lea ecx, [edx + 0x7fff]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 4]
lea esi, [eax + 0x7fff]
cmp eax, ecx
ja 0x4177b0
cmp esi, edx
jb 0x4177b0
sub edx, eax
mov esi, 0x8000
nop dword [eax]
mov cl, byte [eax + edx]
lea eax, [eax + 1]
or byte [eax - 1], cl
sub esi, 1
jne 0x4177a0
jmp 0x41780c
lea ecx, [edx + 0x20]
mov esi, 0x200
sub edx, eax
nop word [eax + eax]
lea eax, [eax + 0x40]
lea ecx, [ecx + 0x40]
movups xmm0, xmmword [eax - 0x40]
movups xmm1, xmmword [edx + eax - 0x40]
por xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
movups xmm1, xmmword [ecx - 0x50]
por xmm1, xmm0
movups xmm0, xmmword [ecx - 0x40]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [eax - 0x20]
por xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
movups xmm0, xmmword [eax - 0x10]
movups xmm1, xmmword [ecx - 0x30]
por xmm1, xmm0
movups xmmword [eax - 0x10], xmm1
sub esi, 1
jne 0x4177c0
inc edi
cmp edi, dword [esp + 0x14]
jl 0x417770
mov eax, dword [ebp + 0x20]
cmp eax, 2
jne 0x41782b
cmp dword [ebx + 0x20], eax
lea esi, [ebx + 0x20]
jne 0x417832
mov dword [esi], eax
jmp 0x417848
test eax, eax
je 0x41783f
lea esi, [ebx + 0x20]
cmp dword [esi], 0
je 0x41783f
mov dword [esi], 1
jmp 0x417848
lea esi, [ebx + 0x20]
mov dword [esi], 0
cmp dword [ebp + 0x14], 0
jne 0x417857
push ebp
call fcn.00415c50
add esp, 4
mov ecx, dword [ebx + 0xc]
mov ebp, 0x8000
test ecx, ecx
je 0x4178a2
mov eax, dword [ebx + 0x2c]
dec ecx
mov edx, ecx
mov edi, ecx
shr edx, 0x12
and ecx, 7
shr edi, 3
inc ecx
and edi, 0x7fff
mov eax, dword [eax + edx*4]
mov edx, dword [eax + 4]
mov al, 1
shl al, cl
dec al
and byte [edx + edi], al
inc edi
cmp edi, ebp
jae 0x4178a2
mov eax, ebp
sub eax, edi
push eax
lea eax, [edx + edi]
push 0
push eax
call fcn.0052b3e0
add esp, 0xc
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x4178ea
mov edi, dword [ebx + 0x30]
test edi, edi
je 0x4178ea
dec ecx
mov eax, ecx
mov edx, ecx
shr eax, 0x12
and ecx, 7
shr edx, 3
inc ecx
and edx, 0x7fff
mov eax, dword [edi + eax*4]
mov edi, dword [eax + 4]
mov al, 1
shl al, cl
dec al
and byte [edi + edx], al
inc edx
cmp edx, ebp
jae 0x4178ea
sub ebp, edx
lea eax, [edi + edx]
push ebp
push 0
push eax
call fcn.0052b3e0
add esp, 0xc
push 0
push ebx
call fcn.00416790
add esp, 8
test eax, eax
jne 0x417919
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x417913
push dword [ebx + 8]
push eax
call fcn.004163d0
add esp, 8
mov dword [ebx + 0x30], 0
mov dword [esi], 2
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret