Function at 0x41f5b0
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 + 0x28], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
jle 0x41f80a
jmp 0x41f646
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x464]
cmp ebp, esi
jge 0x41f80a
mov eax, edi
xor ecx, ecx
sub eax, ebx
mov dword [esp + 0x24], ecx
test eax, eax
mov dword [esp + 0x38], eax
jle 0x41f7d4
mov eax, esi
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x34], eax
mov eax, ebx
imul eax, esi
mov dword [esp + 0x20], eax
jmp 0x41f689
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x34]
jge 0x41f7d4
mov edi, dword [edx + 0x197c]
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 0x41f6d2
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 0x41f6d4
mov ecx, dword [esp + 0x28]
mov eax, 7
lea edx, [edi + esi*4 + 4]
add ecx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax]
mov al, byte [esp + 0x13]
test al, al
je 0x41f73d
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 0x41f741
cmp ebx, 0xff
jle 0x41f777
mov ebx, 0xff
mov edx, dword [esp + ebx*4 + 0x60]
mov ecx, dword [esp + 0x1c]
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 + 0x1c], ecx
mov dword [esp + 0x2c], eax
jne 0x41f709
mov ecx, dword [esp + 0x464]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x464]
mov edi, dword [esp + 0x468]
add edx, ecx
mov ecx, dword [esp + 0x38]
inc eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x30]
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x41f681
cmp esi, edi
jle 0x41f7ec
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
add eax, edi
mov dword [esp + 0x14], eax
jmp 0x41f7fe
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0
add eax, esi
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x41f642
mov esi, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov edi, dword [esp + 0x28]
lea eax, [edx + esi]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv edi
cmp eax, 0x5a
jl 0x41f839
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8
xor eax, eax
mov ecx, 1
mov edx, dword [esp + ecx*4 + 0x60]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x41f82a
mov ebx, dword [esp + ecx*4 + 0x5c]
add ebx, ebx
cmp edx, ebx
jg 0x41f82a
inc ecx
cmp ecx, 8
jl 0x41f840
cmp ecx, 0x100
jge 0x41f87f
mov edx, dword [esp + ecx*4 + 0x60]
imul edx, ecx
imul edx, ecx
add eax, edx
inc ecx
cmp ecx, 0x100
jl 0x41f86a
sub edi, esi
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 8