Function at 0x416060
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x450
mov edx, ecx
push ebx
push ebp
xor ebp, ebp
mov cl, byte [edx + 0x22]
mov bl, byte [edx + 0x12]
xor eax, eax
push esi
test cl, cl
sete al
xor ecx, ecx
push edi
test bl, bl
sete cl
cmp ecx, eax
lea edi, [esp + 0x60]
setne byte [esp + 0x13]
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x24]
mov cx, word [edx + 0x26]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x28]
mov cl, byte [edx + 0x2a]
mov dword [esp + 0x50], eax
mov dword [esp + 0x3c], ecx
xor eax, eax
xor ecx, ecx
mov al, byte [edx + 0x2b]
mov cl, byte [edx + 0x2c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x468]
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebp
jle 0x4162ba
jmp 0x4160f6
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x464]
cmp ebp, esi
jge 0x4162ba
mov eax, edi
xor ecx, ecx
sub eax, ebx
mov dword [esp + 0x24], ecx
test eax, eax
mov dword [esp + 0x38], eax
jle 0x416284
mov eax, esi
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x34], eax
mov eax, ebx
imul eax, esi
mov dword [esp + 0x28], eax
jmp 0x416139
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
cmp ecx, dword [esp + 0x34]
jge 0x416284
mov edi, dword [edx + 0x1974]
add eax, ecx
mov ecx, dword [esp + 0x14]
lea esi, [eax + ecx]
mov al, byte [esp + 0x13]
test al, al
mov edx, dword [edi + esi*4]
je 0x416182
mov eax, edx
mov ecx, edx
and eax, 0xff0000
shr ecx, 0x10
or eax, ecx
mov ecx, edx
shl ecx, 0x10
and edx, 0xff00
or ecx, edx
shr eax, 8
shl ecx, 8
or eax, ecx
mov edx, eax
xor eax, eax
mov ecx, dword [esp + eax + 0x3c]
mov ebp, dword [esp + eax + 0x48]
mov ebx, edx
add eax, 4
shr ebx, cl
and ebx, ebp
cmp eax, 0xc
mov dword [esp + eax + 0x50], ebx
jl 0x416184
mov ecx, dword [esp + 0x18]
mov eax, 7
lea edx, [edi + esi*4 + 4]
add ecx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x20]
mov ebp, dword [eax]
mov al, byte [esp + 0x13]
test al, al
je 0x4161ed
mov ecx, ebp
mov edx, ebp
mov eax, ebp
and ecx, 0xff0000
shr edx, 0x10
shl eax, 0x10
and ebp, 0xff00
or ecx, edx
or eax, ebp
shr ecx, 8
shl eax, 8
or ecx, eax
mov ebp, ecx
xor ebx, ebx
xor edi, edi
mov ecx, dword [esp + edi + 0x3c]
mov eax, dword [esp + edi + 0x48]
mov esi, ebp
mov edx, dword [esp + edi + 0x54]
shr esi, cl
add edi, 4
and esi, eax
mov eax, esi
mov dword [esp + edi + 0x50], esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebx, eax
cmp edi, 0xc
jl 0x4161f1
cmp ebx, 0xff
jle 0x416227
mov ebx, 0xff
mov edx, dword [esp + ebx*4 + 0x60]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
lea ebx, [esp + ebx*4 + 0x60]
inc edx
add ecx, 4
dec eax
mov dword [ebx], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], eax
jne 0x4161b9
mov ecx, dword [esp + 0x464]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x468]
mov esi, dword [esp + 0x464]
add edx, ecx
mov ecx, dword [esp + 0x38]
inc eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x30]
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x416131
cmp esi, edi
jle 0x41629c
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], 0
add eax, edi
mov dword [esp + 0x14], eax
jmp 0x4162ae
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], 0
add eax, esi
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x1c]
cmp ebx, edi
jl 0x4160f2
mov edi, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
lea eax, [edx + edi]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv dword [esp + 0x18]
cmp eax, 0x5a
jl 0x4162e7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8
xor eax, eax
mov ecx, 1
lea esi, [esp + 0x64]
mov edx, dword [esi]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x4162d8
mov ebx, dword [esi - 4]
shl ebx, 1
cmp edx, ebx
jg 0x4162d8
inc ecx
add esi, 4
cmp ecx, 8
jl 0x4162f2
cmp ecx, 0x100
jge 0x416336
lea edx, [esp + ecx*4 + 0x60]
mov esi, dword [edx]
add edx, 4
imul esi, ecx
imul esi, ecx
add eax, esi
inc ecx
cmp ecx, 0x100
jl 0x416320
mov ecx, dword [esp + 0x18]
xor edx, edx
sub ecx, edi
pop edi
pop esi
pop ebp
div ecx
pop ebx
add esp, 0x450
ret 8