Function at 0x10041370
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x18]
push ebx
push ebp
push esi
mov esi, dword [eax]
mov eax, dword [esp + 0x28]
test eax, eax
push edi
je 0x10041476
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x18]
test esi, esi
je 0x100413c0
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x100413c4
mov eax, dword [esp + 0x14]
mov dl, byte [esi + edi]
mov cl, byte [eax]
xor dl, cl
inc ebp
mov cl, dl
mov byte [esi + edi], dl
mov byte [ebp - 1], cl
inc eax
dec ebx
inc esi
and esi, 0xf
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebx
jne 0x10041392
jmp 0x100413c4
mov ebx, dword [esp + 0x1c]
cmp ebx, 0x10
jb 0x10041432
mov eax, ebx
shr eax, 4
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x20]
push edx
push edi
push edi
call dword [esp + 0x3c]
add esp, 0xc
cmp esi, 0x10
jae 0x10041410
mov edx, dword [esp + 0x14]
mov ecx, 0x13
mov ebx, ebp
sub ecx, esi
sub edx, edi
sub ebx, edi
lea eax, [esi + edi]
shr ecx, 2
mov esi, dword [edx + eax]
xor dword [eax], esi
mov esi, dword [eax]
mov dword [ebx + eax], esi
add eax, 4
dec ecx
jne 0x100413fc
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
sub ebx, 0x10
add ebp, 0x10
add ecx, 0x10
xor esi, esi
dec eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jne 0x100413d2
test ebx, ebx
je 0x1004146b
mov eax, dword [esp + 0x20]
push eax
push edi
push edi
call dword [esp + 0x3c]
mov edx, dword [esp + 0x20]
add esp, 0xc
dec ebx
sub ebp, edi
lea eax, [esi + edi]
sub edx, edi
lea ecx, [ebx + 1]
mov dword [esp + 0x18], ebp
add esi, ecx
mov bl, byte [eax + edx]
mov edi, dword [esp + 0x18]
xor byte [eax], bl
mov bl, byte [eax]
mov byte [eax + edi], bl
inc eax
dec ecx
jne 0x10041459
mov ecx, dword [esp + 0x28]
pop edi
mov dword [ecx], esi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
test esi, esi
je 0x100414ec
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x100414a8
mov al, byte [ebp]
mov dl, byte [esi + edi]
xor dl, al
mov byte [ebx], dl
inc ebx
inc ebp
mov byte [esi + edi], al
dec ecx
inc esi
and esi, 0xf
mov dword [esp + 0x1c], ecx
jne 0x10041486
mov dword [esp + 0x14], ebp
cmp ecx, 0x10
jb 0x10041539
shr ecx, 4
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x20]
push eax
push edi
push edi
call dword [esp + 0x3c]
add esp, 0xc
cmp esi, 0x10
jae 0x10041513
mov edx, ebx
mov ecx, 0x13
sub ebp, ebx
sub edx, edi
sub ecx, esi
lea eax, [esi + edi]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x18], edx
shr ecx, 2
jmp 0x100414fa
mov ecx, dword [esp + 0x1c]
jmp 0x100414ac
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x2c]
add edx, eax
add eax, 4
mov esi, dword [edx + ebp]
mov ebp, esi
xor ebp, dword [eax - 4]
dec ecx
mov dword [edx], ebp
mov dword [eax - 4], esi
jne 0x100414f2
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
sub esi, 0x10
add ebx, 0x10
mov dword [esp + 0x1c], esi
add ebp, 0x10
xor esi, esi
dec eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], eax
jne 0x100414bc
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x1004157b
mov ecx, dword [esp + 0x20]
push ecx
push edi
push edi
call dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
add esp, 0xc
dec ecx
mov edx, ebp
sub edx, ebx
sub ebx, edi
lea ebp, [ecx + 1]
lea eax, [esi + edi]
mov dword [esp + 0x18], ebx
add esi, ebp
jmp 0x10041568
mov ebx, dword [esp + 0x18]
lea edi, [eax + ebx]
mov bl, byte [eax]
mov cl, byte [edi + edx]
xor bl, cl
inc eax
mov byte [edi], bl
mov byte [eax - 1], cl
dec ebp
jne 0x10041564
mov edx, dword [esp + 0x28]
pop edi
mov dword [edx], esi
pop esi
pop ebp
pop ebx
ret